summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorSean Dague <sdague@linux.vnet.ibm.com>2012-10-01 11:44:55 -0400
committerSean Dague <sdague@linux.vnet.ibm.com>2012-10-01 15:14:39 -0400
commit625996722f08b57b2926cf4d6aff5fe03abc196c (patch)
tree247b519b74c6a026aaba46ff2ebb1b77106cadaf /nova/tests
parent878dd9c0e29aeff4b485c28c63ba6c607fa7ca10 (diff)
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
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/fake_flags.py1
-rw-r--r--nova/tests/test_virt_drivers.py29
-rw-r--r--nova/tests/test_xenapi.py3
-rw-r--r--nova/tests/test_xensm.py2
4 files changed, 2 insertions, 33 deletions
diff --git a/nova/tests/fake_flags.py b/nova/tests/fake_flags.py
index f0fde3588..32f34b3e7 100644
--- a/nova/tests/fake_flags.py
+++ b/nova/tests/fake_flags.py
@@ -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')
diff --git a/nova/tests/test_virt_drivers.py b/nova/tests/test_virt_drivers.py
index d24ad615a..05fe140d1 100644
--- a/nova/tests/test_virt_drivers.py
+++ b/nova/tests/test_virt_drivers.py
@@ -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')
diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py
index f8bf253cb..5c1187267 100644
--- a/nova/tests/test_xenapi.py
+++ b/nova/tests/test_xenapi.py
@@ -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()
diff --git a/nova/tests/test_xensm.py b/nova/tests/test_xensm.py
index c1748567b..a4c0fb07d 100644
--- a/nova/tests/test_xensm.py
+++ b/nova/tests/test_xensm.py
@@ -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')