diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py index 2e5c65de..62c2f67e 100644 --- a/nova/tests/test_xenapi.py +++ b/nova/tests/test_xenapi.py @@ -102,7 +102,6 @@ class XenAPIVolumeTestCase(test.TestCase): firewall_driver='nova.virt.xenapi.firewall.' 'Dom0IptablesFirewallDriver') db_fakes.stub_out_db_instance_api(self.stubs) - stubs.stub_out_get_target(self.stubs) xenapi_fake.reset() self.instance_values = {'id': 1, 'project_id': self.user_id, @@ -844,7 +843,6 @@ class XenAPIMigrateInstance(test.TestCase): 'Dom0IptablesFirewallDriver') stubs.stubout_session(self.stubs, stubs.FakeSessionForVMTests) db_fakes.stub_out_db_instance_api(self.stubs) - stubs.stub_out_get_target(self.stubs) xenapi_fake.reset() xenapi_fake.create_network('fake', FLAGS.flat_network_bridge) self.user_id = 'fake' @@ -1700,7 +1698,6 @@ class XenAPISRSelectionTestCase(test.TestCase): """Unit tests for testing we find the right SR.""" def setUp(self): super(XenAPISRSelectionTestCase, self).setUp() - stubs.stub_out_get_target(self.stubs) xenapi_fake.reset() def test_safe_find_sr_raise_exception(self): diff --git a/nova/tests/xenapi/stubs.py b/nova/tests/xenapi/stubs.py index 5dfb3b28..7486c4d7 100644 --- a/nova/tests/xenapi/stubs.py +++ b/nova/tests/xenapi/stubs.py @@ -22,10 +22,8 @@ from eventlet import tpool from nova.virt.xenapi import connection as xenapi_conn from nova.virt.xenapi import fake -from nova.virt.xenapi import volume_utils from nova.virt.xenapi import vm_utils from nova.virt.xenapi import vmops -from nova import utils def stubout_firewall_driver(stubs, conn): @@ -73,14 +71,6 @@ def stubout_session(stubs, cls, product_version=(5, 6, 2), **opt_args): stubs.Set(tpool, 'execute', lambda m, *a, **kw: m(*a, **kw)) -def stub_out_get_target(stubs): - """Stubs out _get_target in volume_utils""" - def fake_get_target(volume_id): - return (None, None) - - stubs.Set(volume_utils, '_get_target', fake_get_target) - - def stubout_get_this_vm_uuid(stubs): def f(): vms = [rec['uuid'] for ref, rec