Merge "Removed unused methods and classes"

This commit is contained in:
Jenkins 2015-05-29 00:54:26 +00:00 committed by Gerrit Code Review
commit 372b7b138e
10 changed files with 0 additions and 46 deletions

View File

@ -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)

View File

@ -1937,11 +1937,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):

View File

@ -1899,11 +1899,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):

View File

@ -4628,9 +4628,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()

View File

@ -1317,10 +1317,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', {})

View File

@ -1063,9 +1063,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)

View File

@ -5185,9 +5185,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
@ -10459,9 +10456,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
@ -10494,9 +10488,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>
@ -11537,9 +11528,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)

View File

@ -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)

View File

@ -61,11 +61,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

View File

@ -2292,9 +2292,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)