diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2011-02-18 21:00:58 -0800 |
|---|---|---|
| committer | Vishvananda Ishaya <vishvananda@gmail.com> | 2011-02-18 21:00:58 -0800 |
| commit | e21567404aa31c39bf1b14b8a8b2f02703fd5905 (patch) | |
| tree | af25d914a6884648bc61d9910c7d78ff51e6e99f /nova | |
| parent | 8de8d1d045ca9fe12596e53d2244f4f8703cc209 (diff) | |
| download | nova-e21567404aa31c39bf1b14b8a8b2f02703fd5905.tar.gz nova-e21567404aa31c39bf1b14b8a8b2f02703fd5905.tar.xz nova-e21567404aa31c39bf1b14b8a8b2f02703fd5905.zip | |
remove the weird is_vpn logic in compute/api.py
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/compute/api.py | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index 0d2690c72..81ea6dc53 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -100,25 +100,23 @@ class API(base.Base): "run %s more instances of this type.") % num_instances, "InstanceLimitExceeded") - is_vpn = image_id == FLAGS.vpn_image_id - if not is_vpn: - image = self.image_service.show(context, image_id) - if kernel_id is None: - kernel_id = image.get('kernel_id', None) - if ramdisk_id is None: - ramdisk_id = image.get('ramdisk_id', None) - # No kernel and ramdisk for raw images - if kernel_id == str(FLAGS.null_kernel): - kernel_id = None - ramdisk_id = None - LOG.debug(_("Creating a raw instance")) - # Make sure we have access to kernel and ramdisk (if not raw) - logging.debug("Using Kernel=%s, Ramdisk=%s" % - (kernel_id, ramdisk_id)) - if kernel_id: - self.image_service.show(context, kernel_id) - if ramdisk_id: - self.image_service.show(context, ramdisk_id) + image = self.image_service.show(context, image_id) + if kernel_id is None: + kernel_id = image.get('kernel_id', None) + if ramdisk_id is None: + ramdisk_id = image.get('ramdisk_id', None) + # No kernel and ramdisk for raw images + if kernel_id == str(FLAGS.null_kernel): + kernel_id = None + ramdisk_id = None + LOG.debug(_("Creating a raw instance")) + # Make sure we have access to kernel and ramdisk (if not raw) + logging.debug("Using Kernel=%s, Ramdisk=%s" % + (kernel_id, ramdisk_id)) + if kernel_id: + self.image_service.show(context, kernel_id) + if ramdisk_id: + self.image_service.show(context, ramdisk_id) if security_group is None: security_group = ['default'] |
