Fix for broken switch for config_drive
There's a wrong check in api.py, we should check if config_drive is not a boolean string before we try to treat it as an image id Fixes LP #1090148 Change-Id: I2e0bc49922781138e569471b0dd360fb3918b687
This commit is contained in:
parent
d1e7f796bf
commit
76588ed039
@ -462,7 +462,7 @@ class API(base.Base):
|
||||
|
||||
# Handle config_drive
|
||||
config_drive_id = None
|
||||
if config_drive and config_drive is not True:
|
||||
if config_drive and not utils.is_valid_boolstr(config_drive):
|
||||
# config_drive is volume id
|
||||
config_drive_id = config_drive
|
||||
config_drive = None
|
||||
|
@ -2761,7 +2761,7 @@ class ServersControllerCreateTest(test.TestCase):
|
||||
'open': 'stack',
|
||||
},
|
||||
'personality': {},
|
||||
'config_drive': True,
|
||||
'config_drive': "true",
|
||||
},
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user