diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-10-01 21:56:20 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-10-01 21:56:20 +0000 |
| commit | d399c755688c5c4d7f7aa5cb5fa8a55b4319f9ff (patch) | |
| tree | 2f9a13bc50847ec240f291934cf6ec3863cc495e /nova/tests | |
| parent | 14cfc19381b7f923b9c0e174038810a1a1aec5dc (diff) | |
| parent | a36288351af519ef62ad4f52b3e3e38601ba3f58 (diff) | |
Merge "xenapi: Removing legacy swap-in-image."
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/test_xenapi.py | 25 | ||||
| -rw-r--r-- | nova/tests/xenapi/stubs.py | 10 |
2 files changed, 0 insertions, 35 deletions
diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py index 0449f3daf..ed76c72aa 100644 --- a/nova/tests/test_xenapi.py +++ b/nova/tests/test_xenapi.py @@ -618,30 +618,6 @@ class XenAPIVMTestCase(stubs.XenAPITestBase): os_type="linux", architecture="x86-64") self.check_vm_params_for_linux() - def test_spawn_vhd_glance_swapdisk(self): - # Change the default host_call_plugin to one that'll return - # a swap disk - orig_func = stubs.FakeSessionForVMTests.host_call_plugin - _host_call_plugin = stubs.FakeSessionForVMTests.host_call_plugin_swap - stubs.FakeSessionForVMTests.host_call_plugin = _host_call_plugin - # Stubbing out firewall driver as previous stub sets a particular - # stub for async plugin calls - stubs.stubout_firewall_driver(self.stubs, self.conn) - try: - # We'll steal the above glance linux test - self.test_spawn_vhd_glance_linux() - finally: - # Make sure to put this back - stubs.FakeSessionForVMTests.host_call_plugin = orig_func - - # We should have 2 VBDs. - self.assertEqual(len(self.vm['VBDs']), 2) - # Now test that we have 1. - self.tearDown() - self.setUp() - self.test_spawn_vhd_glance_linux() - self.assertEqual(len(self.vm['VBDs']), 1) - def test_spawn_vhd_glance_windows(self): self._test_spawn(IMAGE_VHD, None, None, os_type="windows", architecture="i386") @@ -1410,7 +1386,6 @@ class XenAPIGenerateLocal(stubs.XenAPITestBase): super(XenAPIGenerateLocal, self).setUp() self.flags(xenapi_connection_url='test_url', xenapi_connection_password='test_pass', - xenapi_generate_swap=True, firewall_driver='nova.virt.xenapi.firewall.' 'Dom0IptablesFirewallDriver') stubs.stubout_session(self.stubs, stubs.FakeSessionForVMTests) diff --git a/nova/tests/xenapi/stubs.py b/nova/tests/xenapi/stubs.py index fa1108175..35aa8e4aa 100644 --- a/nova/tests/xenapi/stubs.py +++ b/nova/tests/xenapi/stubs.py @@ -175,16 +175,6 @@ class FakeSessionForVMTests(fake.SessionBase): return (super(FakeSessionForVMTests, self). host_call_plugin(_1, _2, plugin, method, _5)) - def host_call_plugin_swap(self, _1, _2, plugin, method, _5): - if (plugin, method) == ('glance', 'download_vhd'): - root_uuid = _make_fake_vdi() - swap_uuid = _make_fake_vdi() - return pickle.dumps(dict(root=dict(uuid=root_uuid), - swap=dict(uuid=swap_uuid))) - else: - return (super(FakeSessionForVMTests, self). - host_call_plugin(_1, _2, plugin, method, _5)) - def VM_start(self, _1, ref, _2, _3): vm = fake.get_record('VM', ref) if vm['power_state'] != 'Halted': |
