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:
Davanum Srinivas 2012-12-13 16:51:53 -05:00
parent d1e7f796bf
commit 76588ed039
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -2761,7 +2761,7 @@ class ServersControllerCreateTest(test.TestCase):
'open': 'stack',
},
'personality': {},
'config_drive': True,
'config_drive': "true",
},
}