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
This commit is contained in:
Sean Dague
2012-10-01 11:44:55 -04:00
parent f8c5615654
commit 335e672cc1
5 changed files with 2 additions and 37 deletions

View File

@@ -74,10 +74,6 @@ def _get_my_ip():
core_opts = [
cfg.StrOpt('connection_type',
default=None,
help='Deprecated (use compute_driver instead): Virtualization '
'api connection type : libvirt, xenapi, or fake'),
cfg.StrOpt('sql_connection',
default='sqlite:///$state_path/$sqlite_db',
help='The SQLAlchemy connection string used to connect to the '

View File

@@ -32,7 +32,6 @@ flags.DECLARE('volume_driver', 'nova.volume.manager')
def set_defaults(conf):
conf.set_default('api_paste_config', '$state_path/etc/nova/api-paste.ini')
conf.set_default('compute_driver', 'nova.virt.fake.FakeDriver')
conf.set_default('connection_type', 'fake')
conf.set_default('fake_network', True)
conf.set_default('fake_rabbit', True)
conf.set_default('flat_network_bridge', 'br100')

View File

@@ -144,13 +144,6 @@ class VirtDriverLoaderTestCase(_FakeDriverBackendTestCase):
'libvirt.LibvirtDriver': 'LibvirtDriver'
}
# NOTE(sdague): remove after Folsom release when connection_type
# is removed
old_drivers = {
'libvirt': 'LibvirtDriver',
'fake': 'FakeDriver'
}
def test_load_new_drivers(self):
for cls, driver in self.new_drivers.iteritems():
self.flags(compute_driver=cls)
@@ -164,28 +157,6 @@ class VirtDriverLoaderTestCase(_FakeDriverBackendTestCase):
self.assertEqual(cm.driver.__class__.__name__, driver,
"Could't load driver %s" % cls)
# NOTE(sdague): remove after Folsom release when connection_type
# is removed
def test_load_old_drivers(self):
# we explicitly use the old default
self.flags(compute_driver='nova.virt.connection.get_connection')
for cls, driver in self.old_drivers.iteritems():
self.flags(connection_type=cls)
# NOTE(sdague) the try block is to make it easier to debug a
# failure by knowing which driver broke
try:
cm = ComputeManager()
except Exception as e:
self.fail("Couldn't load connection %s - %s" % (cls, e))
self.assertEqual(cm.driver.__class__.__name__, driver,
"Could't load connection %s" % cls)
def test_fail_to_load_old_drivers(self):
self.flags(compute_driver='nova.virt.connection.get_connection')
self.flags(connection_type='56kmodem')
self.assertRaises(exception.VirtDriverNotFound, ComputeManager)
def test_fail_to_load_new_drivers(self):
self.flags(compute_driver='nova.virt.amiga')

View File

@@ -1957,8 +1957,7 @@ class XenAPIAggregateTestCase(stubs.XenAPITestBase):
firewall_driver='nova.virt.xenapi.firewall.'
'Dom0IptablesFirewallDriver',
host='host',
connection_type='xenapi',
compute_driver='nova.virt.xenapi.driver.XenAPIDriver')
compute_driver='xenapi.XenAPIDriver')
host_ref = xenapi_fake.get_all('host')[0]
stubs.stubout_session(self.stubs, stubs.FakeSessionForVMTests)
self.context = context.get_admin_context()

View File

@@ -49,7 +49,7 @@ class XenSMTestCase(stubs.XenAPITestBase):
self.user_id = 'fake'
self.project_id = 'fake'
self.context = context.RequestContext(self.user_id, self.project_id)
self.flags(connection_type='xenapi',
self.flags(compute_driver='xenapi.XenAPIDriver',
xenapi_connection_url='http://test_url',
xenapi_connection_username='test_user',
xenapi_connection_password='test_pass')