From 625996722f08b57b2926cf4d6aff5fe03abc196c Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Mon, 1 Oct 2012 11:44:55 -0400 Subject: remove deprecated connection_type flag Fixes bug #1025712 connection_type was deprecated in Folsom and should now be removed in Grizzly as early as possible to shake out any fallout. This removes all references to it, changes the config sample and tests appropriately. Remove old default fixtures for flavors that specify ephemeral disks if the connection_type flag was set to 'libvirt' Change-Id: I8af831600a1931ae92c6d06c5105bd1bd81debe3 --- nova/compute/manager.py | 1 - nova/compute/utils.py | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'nova/compute') diff --git a/nova/compute/manager.py b/nova/compute/manager.py index f9c739001..9f311e881 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -85,7 +85,6 @@ compute_opts = [ "This is NOT the full path - just a folder name." "For per-compute-host cached images, set to _base_$my_ip"), cfg.StrOpt('compute_driver', - default='nova.virt.connection.get_connection', help='Driver to use for controlling virtualization. Options ' 'include: libvirt.LibvirtDriver, xenapi.XenAPIDriver, ' 'fake.FakeDriver, baremetal.BareMetalDriver, ' diff --git a/nova/compute/utils.py b/nova/compute/utils.py index a8a0a6544..17416f991 100644 --- a/nova/compute/utils.py +++ b/nova/compute/utils.py @@ -81,8 +81,7 @@ def get_device_name_for_instance(context, instance, device): except (TypeError, AttributeError, ValueError): raise exception.InvalidDevicePath(path=mappings['root']) # NOTE(vish): remove this when xenapi is setting default_root_device - if (FLAGS.connection_type == 'xenapi' or - FLAGS.compute_driver.endswith('xenapi.XenAPIDriver')): + if FLAGS.compute_driver.endswith('xenapi.XenAPIDriver'): prefix = '/dev/xvd' if req_prefix != prefix: LOG.debug(_("Using %(prefix)s instead of %(req_prefix)s") % locals()) @@ -97,8 +96,7 @@ def get_device_name_for_instance(context, instance, device): # NOTE(vish): remove this when xenapi is properly setting # default_ephemeral_device and default_swap_device - if (FLAGS.connection_type == 'xenapi' or - FLAGS.compute_driver.endswith('xenapi.XenAPIDriver')): + if FLAGS.compute_driver.endswith('xenapi.XenAPIDriver'): instance_type_id = instance['instance_type_id'] instance_type = instance_types.get_instance_type(instance_type_id) if instance_type['ephemeral_gb']: -- cgit