Removed unused methods and classes
TrivialFix Change-Id: Idbe2b2c2654b17bd9482504e0708aeef10b6767e
This commit is contained in:
parent
0fce05b27c
commit
bbe500472e
|
@ -136,9 +136,6 @@ class BlockDeviceMappingTestV21(test.TestCase):
|
|||
self.assertNotIn('imageRef', kwargs)
|
||||
return old_create(*args, **kwargs)
|
||||
|
||||
def _validate_bdm(*args, **kwargs):
|
||||
pass
|
||||
|
||||
self.stubs.Set(compute_api.API, 'create', create)
|
||||
self.mox.ReplayAll()
|
||||
self._test_create(params, no_image=True)
|
||||
|
|
|
@ -1960,11 +1960,6 @@ class ServersControllerCreateTest(test.TestCase):
|
|||
instance.update(values)
|
||||
return instance
|
||||
|
||||
def server_update(context, instance_uuid, params, update_cells=True):
|
||||
inst = self.instance_cache_by_uuid[instance_uuid]
|
||||
inst.update(params)
|
||||
return inst
|
||||
|
||||
def server_update_and_get_original(
|
||||
context, instance_uuid, params, update_cells=False,
|
||||
columns_to_join=None):
|
||||
|
|
|
@ -1922,11 +1922,6 @@ class ServersControllerCreateTest(test.TestCase):
|
|||
instance.update(values)
|
||||
return instance
|
||||
|
||||
def server_update(context, instance_uuid, params, update_cells=False):
|
||||
inst = self.instance_cache_by_uuid[instance_uuid]
|
||||
inst.update(params)
|
||||
return inst
|
||||
|
||||
def server_update_and_get_original(
|
||||
context, instance_uuid, params, update_cells=False,
|
||||
columns_to_join=None):
|
||||
|
|
|
@ -4644,9 +4644,6 @@ class ComputeTestCase(BaseTestCase):
|
|||
def throw_up(*args, **kwargs):
|
||||
raise test.TestingException()
|
||||
|
||||
def fake(*args, **kwargs):
|
||||
pass
|
||||
|
||||
self.stubs.Set(self.compute.driver, 'finish_migration', throw_up)
|
||||
|
||||
self._stub_out_resize_network_methods()
|
||||
|
|
|
@ -1316,10 +1316,6 @@ class ComputeManagerUnitTestCase(test.NoDBTestCase):
|
|||
def save(self):
|
||||
pass
|
||||
|
||||
class FakeInstanceList(object):
|
||||
def get_by_filters(self, *args, **kwargs):
|
||||
return []
|
||||
|
||||
a = FakeInstance('123', 'apple', {'clean_attempts': '100'})
|
||||
b = FakeInstance('456', 'orange', {'clean_attempts': '3'})
|
||||
c = FakeInstance('789', 'banana', {})
|
||||
|
|
|
@ -1032,9 +1032,6 @@ class IronicDriverTestCase(test.NoDBTestCase):
|
|||
provision_state=ironic_states.ACTIVE)
|
||||
instance = fake_instance.fake_instance_obj(self.ctx, node=node_uuid)
|
||||
|
||||
def fake_set_provision_state(*_):
|
||||
node.provision_state = ironic_states.ERROR
|
||||
|
||||
mock_node.get_by_instance_uuid.return_value = node
|
||||
self.assertRaises(exception.NovaException, self.driver.destroy,
|
||||
self.ctx, instance, None, None)
|
||||
|
|
|
@ -5184,9 +5184,6 @@ class LibvirtConnTestCase(test.NoDBTestCase):
|
|||
def fake_none(self, *args):
|
||||
return
|
||||
|
||||
def fake_raise(self):
|
||||
raise fakelibvirt.libvirtError('ERR')
|
||||
|
||||
class FakeTime(object):
|
||||
def __init__(self):
|
||||
self.counter = 0
|
||||
|
@ -10458,9 +10455,6 @@ class LibvirtConnTestCase(test.NoDBTestCase):
|
|||
mock_domain = self.mox.CreateMock(fakelibvirt.virDomain)
|
||||
self.resultXML = None
|
||||
|
||||
def fake_none(*args, **kwargs):
|
||||
return
|
||||
|
||||
def fake_getLibVersion():
|
||||
return 9011
|
||||
|
||||
|
@ -10493,9 +10487,6 @@ class LibvirtConnTestCase(test.NoDBTestCase):
|
|||
def fake_get_domain(instance):
|
||||
return mock_domain
|
||||
|
||||
def fake_defineXML(xml):
|
||||
return
|
||||
|
||||
def fake_baselineCPU(cpu, flag):
|
||||
return """<cpu mode='custom' match='exact'>
|
||||
<model fallback='allow'>Westmere</model>
|
||||
|
@ -11536,9 +11527,6 @@ class LibvirtDriverTestCase(test.NoDBTestCase):
|
|||
def fake_get_host_ip_addr():
|
||||
return '10.0.0.1'
|
||||
|
||||
def fake_execute(*args, **kwargs):
|
||||
pass
|
||||
|
||||
self.stubs.Set(self.drvr, 'get_instance_disk_info',
|
||||
fake_get_instance_disk_info)
|
||||
self.stubs.Set(self.drvr, '_destroy', fake_destroy)
|
||||
|
|
|
@ -1253,9 +1253,6 @@ class RbdTestCase(_ImageTestCase, test.NoDBTestCase):
|
|||
def fake_fetch(target, *args, **kwargs):
|
||||
return
|
||||
|
||||
def fake_resize(rbd_name, size):
|
||||
return
|
||||
|
||||
self.stubs.Set(os.path, 'exists', lambda _: True)
|
||||
self.stubs.Set(image, 'check_image_exists', lambda: True)
|
||||
|
||||
|
|
|
@ -59,11 +59,6 @@ class SROps(stubs.XenAPITestBaseNoDB):
|
|||
class FakeException(Exception):
|
||||
pass
|
||||
|
||||
def fake_call_xenapi(method, *args):
|
||||
self.assertEqual(method, 'VDI.get_SR')
|
||||
self.assertEqual(args[0], vdi_ref)
|
||||
return args[0]
|
||||
|
||||
session = mock.Mock()
|
||||
session.XenAPI.Failure = FakeException
|
||||
session.call_xenapi.side_effect = FakeException
|
||||
|
|
|
@ -2291,9 +2291,6 @@ def _write_partition(session, virtual_size, dev):
|
|||
{'primary_first': primary_first, 'primary_last': primary_last,
|
||||
'dev_path': dev_path})
|
||||
|
||||
def execute(*cmd, **kwargs):
|
||||
return utils.execute(*cmd, **kwargs)
|
||||
|
||||
_make_partition(session, dev, "%ds" % primary_first, "%ds" % primary_last)
|
||||
LOG.debug('Writing partition table %s done.', dev_path)
|
||||
|
||||
|
|
Loading…
Reference in New Issue