summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEwan Mellor <ewan.mellor@citrix.com>2010-07-29 01:21:50 +0100
committerEwan Mellor <ewan.mellor@citrix.com>2010-07-29 01:21:50 +0100
commitb01c531ba5cb408a630e992beda769032b135f6a (patch)
treec543f50981a073ff4f67926699f6176580bb28bf
parent96995456ccd24ec46f703bfa3e784eb193858bbb (diff)
Move the reading of API parameters above the call to _get_image, so that
they have a chance to take effect.
-rw-r--r--nova/endpoint/cloud.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/nova/endpoint/cloud.py b/nova/endpoint/cloud.py
index acba50b95..7e51cc83b 100644
--- a/nova/endpoint/cloud.py
+++ b/nova/endpoint/cloud.py
@@ -518,14 +518,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())