diff --git a/Authors b/Authors index 2a1f0c21..299114da 100644 --- a/Authors +++ b/Authors @@ -4,6 +4,7 @@ Anthony Young Armando Migliaccio Chris Behrens Chmouel Boudjnah +David Pravec Dean Troyer Devin Carlen Ed Leafe @@ -27,6 +28,7 @@ Rick Clark Rick Harris Ryan Lane Ryan Lucio +Salvatore Orlando Sandy Walsh Soren Hansen Thierry Carrez @@ -35,3 +37,4 @@ Trey Morris Vishvananda Ishaya Youcef Laribi Zhixue Wu + diff --git a/nova/tests/test_virt.py b/nova/tests/test_virt.py index 8dab8de2..1c155abe 100644 --- a/nova/tests/test_virt.py +++ b/nova/tests/test_virt.py @@ -157,7 +157,6 @@ class LibvirtConnTestCase(test.TestCase): (lambda t: t.find('./devices/serial/source').get( 'path').split('/')[1], 'console.log'), (lambda t: t.find('./memory').text, '2097152')] - if rescue: common_checks += [ (lambda t: t.findall('./devices/disk/source')[0].get( diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py index b5d3ea39..ed2e4ffd 100644 --- a/nova/tests/test_xenapi.py +++ b/nova/tests/test_xenapi.py @@ -48,6 +48,7 @@ class XenAPIVolumeTestCase(test.TestCase): FLAGS.xenapi_connection_url = 'test_url' FLAGS.xenapi_connection_password = 'test_pass' fakes.stub_out_db_instance_api(self.stubs) + stubs.stub_out_get_target(self.stubs) fake.reset() self.values = {'name': 1, 'id': 1, 'project_id': 'fake', diff --git a/nova/tests/xenapi/stubs.py b/nova/tests/xenapi/stubs.py index 1dacad6a..a7e592fe 100644 --- a/nova/tests/xenapi/stubs.py +++ b/nova/tests/xenapi/stubs.py @@ -18,12 +18,13 @@ from nova.virt import xenapi_conn from nova.virt.xenapi import fake +from nova.virt.xenapi import volume_utils def stubout_session(stubs, cls): - """ Stubs out two methods from XenAPISession """ + """Stubs out two methods from XenAPISession""" def fake_import(self): - """ Stubs out get_imported_xenapi of XenAPISession """ + """Stubs out get_imported_xenapi of XenAPISession""" fake_module = 'nova.virt.xenapi.fake' from_list = ['fake'] return __import__(fake_module, globals(), locals(), from_list, -1) @@ -34,6 +35,14 @@ def stubout_session(stubs, cls): fake_import) +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) + + class FakeSessionForVMTests(fake.SessionBase): """ Stubs out a XenAPISession for VM tests """ def __init__(self, uri):