configdrive: return an empty network config when filename is empty
Additionally, don't bother checking for a network config if it isn't going to be processed.
This commit is contained in:
@@ -42,6 +42,9 @@ func (cd *configDrive) FetchUserdata() ([]byte, error) {
|
||||
}
|
||||
|
||||
func (cd *configDrive) FetchNetworkConfig(filename string) ([]byte, error) {
|
||||
if filename == "" {
|
||||
return []byte{}, nil
|
||||
}
|
||||
return cd.tryReadFile(path.Join(cd.openstackRoot(), filename))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user