Move the reading of API parameters above the call to _get_image, so that
they have a chance to take effect.
This commit is contained in:
@@ -519,14 +519,14 @@ class CloudController(object):
|
||||
kernel_id = image.get('kernelId', FLAGS.default_kernel)
|
||||
ramdisk_id = image.get('ramdiskId', FLAGS.default_ramdisk)
|
||||
|
||||
# make sure we have access to kernel and ramdisk
|
||||
self._get_image(context, kernel_id)
|
||||
self._get_image(context, ramdisk_id)
|
||||
|
||||
# API parameters overrides of defaults
|
||||
kernel_id = kwargs.get('kernel_id', kernel_id)
|
||||
ramdisk_id = kwargs.get('ramdisk_id', ramdisk_id)
|
||||
|
||||
# make sure we have access to kernel and ramdisk
|
||||
self._get_image(context, kernel_id)
|
||||
self._get_image(context, ramdisk_id)
|
||||
|
||||
logging.debug("Going to run instances...")
|
||||
reservation_id = utils.generate_uid('r')
|
||||
launch_time = time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime())
|
||||
|
Reference in New Issue
Block a user