From: Zhiteng Huang Date: Wed, 8 Jan 2014 03:22:25 +0000 (+0800) Subject: Remove legacy config option 'connection_type' X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=fce28fe9ce246fa9f2e1fc9946efacf207485260;p=openstack-build%2Fcinder-build.git Remove legacy config option 'connection_type' 'connection_type' is a legacy config option originated from Nova. Nova used this option to specify underlying virtualization type for compute service and had deprecated it (with 'compute_driver') in Folsom and had it removed in later release. In Cinder Folsom release, the XenSMDriver in Cinder used this config option to verify the target hypervisor but in Grizzly XenSMDriver has been renamed and refactored and no longer used this config. Therefore, this option is dead for a long time, and should be removed. Change-Id: I4d72f31302fa813df42e71224151148a9c4a76c7 --- diff --git a/cinder/common/config.py b/cinder/common/config.py index d3ce0cb35..a81bc5818 100644 --- a/cinder/common/config.py +++ b/cinder/common/config.py @@ -56,10 +56,6 @@ def _get_my_ip(): core_opts = [ - cfg.StrOpt('connection_type', - default=None, - help='Virtualization api connection type : libvirt, xenapi, ' - 'or fake'), cfg.StrOpt('api_paste_config', default="api-paste.ini", help='File name for the paste.deploy config for cinder-api'), diff --git a/cinder/tests/api/contrib/test_qos_specs_manage.py b/cinder/tests/api/contrib/test_qos_specs_manage.py index 310b8b62d..0c3afd7f2 100644 --- a/cinder/tests/api/contrib/test_qos_specs_manage.py +++ b/cinder/tests/api/contrib/test_qos_specs_manage.py @@ -141,8 +141,7 @@ def return_disassociate_all(context, id): class QoSSpecManageApiTest(test.TestCase): def setUp(self): super(QoSSpecManageApiTest, self).setUp() - self.flags(connection_type='fake', - host='fake', + self.flags(host='fake', notification_driver=[test_notifier.__name__]) self.controller = qos_specs_manage.QoSSpecsController() #reset notifier drivers left over from other api/contrib tests diff --git a/cinder/tests/api/contrib/test_types_extra_specs.py b/cinder/tests/api/contrib/test_types_extra_specs.py index 1cdc3ab3e..ccf29ad94 100644 --- a/cinder/tests/api/contrib/test_types_extra_specs.py +++ b/cinder/tests/api/contrib/test_types_extra_specs.py @@ -65,8 +65,7 @@ class VolumeTypesExtraSpecsTest(test.TestCase): def setUp(self): super(VolumeTypesExtraSpecsTest, self).setUp() - self.flags(connection_type='fake', - host='fake', + self.flags(host='fake', notification_driver=[test_notifier.__name__]) self.stubs.Set(cinder.db, 'volume_type_get', volume_type_get) self.api_path = '/v2/fake/os-volume-types/1/extra_specs' diff --git a/cinder/tests/api/contrib/test_types_manage.py b/cinder/tests/api/contrib/test_types_manage.py index d8e6ef30c..6be714f22 100644 --- a/cinder/tests/api/contrib/test_types_manage.py +++ b/cinder/tests/api/contrib/test_types_manage.py @@ -64,8 +64,7 @@ def return_volume_types_get_by_name(context, name): class VolumeTypesManageApiTest(test.TestCase): def setUp(self): super(VolumeTypesManageApiTest, self).setUp() - self.flags(connection_type='fake', - host='fake', + self.flags(host='fake', notification_driver=[test_notifier.__name__]) self.controller = types_manage.VolumeTypesManageController() """to reset notifier drivers left over from other api/contrib tests""" diff --git a/cinder/tests/api/contrib/test_volume_type_encryption.py b/cinder/tests/api/contrib/test_volume_type_encryption.py index e2d2a1d93..96ceb2432 100644 --- a/cinder/tests/api/contrib/test_volume_type_encryption.py +++ b/cinder/tests/api/contrib/test_volume_type_encryption.py @@ -51,8 +51,7 @@ class VolumeTypeEncryptionTest(test.TestCase): def setUp(self): super(VolumeTypeEncryptionTest, self).setUp() - self.flags(connection_type='fake', - host='fake', + self.flags(host='fake', notification_driver=[test_notifier.__name__]) self.api_path = '/v2/fake/os-volume-types/1/encryption' """to reset notifier drivers left over from other api/contrib tests""" diff --git a/cinder/tests/conf_fixture.py b/cinder/tests/conf_fixture.py index 72b5b59a9..5f88f6348 100644 --- a/cinder/tests/conf_fixture.py +++ b/cinder/tests/conf_fixture.py @@ -36,7 +36,6 @@ def set_defaults(conf): conf.set_default('volume_driver', 'cinder.tests.fake_driver.FakeISCSIDriver') conf.set_default('iscsi_helper', 'fake') - conf.set_default('connection_type', 'fake') conf.set_default('fake_rabbit', True) conf.set_default('rpc_backend', 'cinder.openstack.common.rpc.impl_fake') conf.set_default('iscsi_num_targets', 8) diff --git a/cinder/tests/test_backup.py b/cinder/tests/test_backup.py index c8b33779f..310326bd0 100644 --- a/cinder/tests/test_backup.py +++ b/cinder/tests/test_backup.py @@ -45,8 +45,7 @@ class BackupTestCase(test.TestCase): def setUp(self): super(BackupTestCase, self).setUp() vol_tmpdir = tempfile.mkdtemp() - self.flags(connection_type='fake', - volumes_dir=vol_tmpdir) + self.flags(volumes_dir=vol_tmpdir) self.backup_mgr = \ importutils.import_object(CONF.backup_manager) self.backup_mgr.host = 'testhost' diff --git a/cinder/tests/test_volume.py b/cinder/tests/test_volume.py index 4c50acb5b..a27a2250d 100644 --- a/cinder/tests/test_volume.py +++ b/cinder/tests/test_volume.py @@ -92,8 +92,7 @@ class BaseVolumeTestCase(test.TestCase): def setUp(self): super(BaseVolumeTestCase, self).setUp() vol_tmpdir = tempfile.mkdtemp() - self.flags(connection_type='fake', - volumes_dir=vol_tmpdir, + self.flags(volumes_dir=vol_tmpdir, notification_driver=[test_notifier.__name__]) self.volume = importutils.import_object(CONF.volume_manager) self.context = context.get_admin_context() diff --git a/cinder/tests/test_volume_utils.py b/cinder/tests/test_volume_utils.py index 727647ff2..607039092 100644 --- a/cinder/tests/test_volume_utils.py +++ b/cinder/tests/test_volume_utils.py @@ -43,8 +43,7 @@ class UsageInfoTestCase(test.TestCase): def setUp(self): super(UsageInfoTestCase, self).setUp() - self.flags(connection_type='fake', - host='fake', + self.flags(host='fake', notification_driver=[test_notifier.__name__]) self.volume = importutils.import_object(CONF.volume_manager) self.user_id = 'fake' diff --git a/etc/cinder/cinder.conf.sample b/etc/cinder/cinder.conf.sample index 9b0dc61f3..6a1a5dfbb 100644 --- a/etc/cinder/cinder.conf.sample +++ b/etc/cinder/cinder.conf.sample @@ -238,10 +238,6 @@ # Options defined in cinder.common.config # -# Virtualization api connection type : libvirt, xenapi, or -# fake (string value) -#connection_type= - # File name for the paste.deploy config for cinder-api (string # value) #api_paste_config=api-paste.ini