Merging trunk
This commit is contained in:
		
							
								
								
									
										3
									
								
								Authors
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								Authors
									
									
									
									
									
								
							@@ -4,6 +4,7 @@ Anthony Young <sleepsonthefloor@gmail.com>
 | 
				
			|||||||
Armando Migliaccio <Armando.Migliaccio@eu.citrix.com>
 | 
					Armando Migliaccio <Armando.Migliaccio@eu.citrix.com>
 | 
				
			||||||
Chris Behrens <cbehrens@codestud.com>
 | 
					Chris Behrens <cbehrens@codestud.com>
 | 
				
			||||||
Chmouel Boudjnah <chmouel@chmouel.com>
 | 
					Chmouel Boudjnah <chmouel@chmouel.com>
 | 
				
			||||||
 | 
					David Pravec <David.Pravec@danix.org>
 | 
				
			||||||
Dean Troyer <dtroyer@gmail.com>
 | 
					Dean Troyer <dtroyer@gmail.com>
 | 
				
			||||||
Devin Carlen <devin.carlen@gmail.com>
 | 
					Devin Carlen <devin.carlen@gmail.com>
 | 
				
			||||||
Ed Leafe <ed@leafe.com>
 | 
					Ed Leafe <ed@leafe.com>
 | 
				
			||||||
@@ -27,6 +28,7 @@ Rick Clark <rick@openstack.org>
 | 
				
			|||||||
Rick Harris <rick.harris@rackspace.com>
 | 
					Rick Harris <rick.harris@rackspace.com>
 | 
				
			||||||
Ryan Lane <rlane@wikimedia.org>
 | 
					Ryan Lane <rlane@wikimedia.org>
 | 
				
			||||||
Ryan Lucio <rlucio@internap.com>
 | 
					Ryan Lucio <rlucio@internap.com>
 | 
				
			||||||
 | 
					Salvatore Orlando <salvatore.orlando@eu.citrix.com>
 | 
				
			||||||
Sandy Walsh <sandy.walsh@rackspace.com>
 | 
					Sandy Walsh <sandy.walsh@rackspace.com>
 | 
				
			||||||
Soren Hansen <soren.hansen@rackspace.com>
 | 
					Soren Hansen <soren.hansen@rackspace.com>
 | 
				
			||||||
Thierry Carrez <thierry@openstack.org>
 | 
					Thierry Carrez <thierry@openstack.org>
 | 
				
			||||||
@@ -35,3 +37,4 @@ Trey Morris <trey.morris@rackspace.com>
 | 
				
			|||||||
Vishvananda Ishaya <vishvananda@gmail.com>
 | 
					Vishvananda Ishaya <vishvananda@gmail.com>
 | 
				
			||||||
Youcef Laribi <Youcef.Laribi@eu.citrix.com>
 | 
					Youcef Laribi <Youcef.Laribi@eu.citrix.com>
 | 
				
			||||||
Zhixue Wu <Zhixue.Wu@citrix.com>
 | 
					Zhixue Wu <Zhixue.Wu@citrix.com>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -157,7 +157,6 @@ class LibvirtConnTestCase(test.TestCase):
 | 
				
			|||||||
            (lambda t: t.find('./devices/serial/source').get(
 | 
					            (lambda t: t.find('./devices/serial/source').get(
 | 
				
			||||||
                'path').split('/')[1], 'console.log'),
 | 
					                'path').split('/')[1], 'console.log'),
 | 
				
			||||||
            (lambda t: t.find('./memory').text, '2097152')]
 | 
					            (lambda t: t.find('./memory').text, '2097152')]
 | 
				
			||||||
 | 
					 | 
				
			||||||
        if rescue:
 | 
					        if rescue:
 | 
				
			||||||
            common_checks += [
 | 
					            common_checks += [
 | 
				
			||||||
                (lambda t: t.findall('./devices/disk/source')[0].get(
 | 
					                (lambda t: t.findall('./devices/disk/source')[0].get(
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -48,6 +48,7 @@ class XenAPIVolumeTestCase(test.TestCase):
 | 
				
			|||||||
        FLAGS.xenapi_connection_url = 'test_url'
 | 
					        FLAGS.xenapi_connection_url = 'test_url'
 | 
				
			||||||
        FLAGS.xenapi_connection_password = 'test_pass'
 | 
					        FLAGS.xenapi_connection_password = 'test_pass'
 | 
				
			||||||
        fakes.stub_out_db_instance_api(self.stubs)
 | 
					        fakes.stub_out_db_instance_api(self.stubs)
 | 
				
			||||||
 | 
					        stubs.stub_out_get_target(self.stubs)
 | 
				
			||||||
        fake.reset()
 | 
					        fake.reset()
 | 
				
			||||||
        self.values = {'name': 1, 'id': 1,
 | 
					        self.values = {'name': 1, 'id': 1,
 | 
				
			||||||
                  'project_id': 'fake',
 | 
					                  'project_id': 'fake',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,12 +18,13 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
from nova.virt import xenapi_conn
 | 
					from nova.virt import xenapi_conn
 | 
				
			||||||
from nova.virt.xenapi import fake
 | 
					from nova.virt.xenapi import fake
 | 
				
			||||||
 | 
					from nova.virt.xenapi import volume_utils
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def stubout_session(stubs, cls):
 | 
					def stubout_session(stubs, cls):
 | 
				
			||||||
    """ Stubs out two methods from XenAPISession """
 | 
					    """Stubs out two methods from XenAPISession"""
 | 
				
			||||||
    def fake_import(self):
 | 
					    def fake_import(self):
 | 
				
			||||||
        """ Stubs out get_imported_xenapi of XenAPISession """
 | 
					        """Stubs out get_imported_xenapi of XenAPISession"""
 | 
				
			||||||
        fake_module = 'nova.virt.xenapi.fake'
 | 
					        fake_module = 'nova.virt.xenapi.fake'
 | 
				
			||||||
        from_list = ['fake']
 | 
					        from_list = ['fake']
 | 
				
			||||||
        return __import__(fake_module, globals(), locals(), from_list, -1)
 | 
					        return __import__(fake_module, globals(), locals(), from_list, -1)
 | 
				
			||||||
@@ -34,6 +35,14 @@ def stubout_session(stubs, cls):
 | 
				
			|||||||
                       fake_import)
 | 
					                       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):
 | 
					class FakeSessionForVMTests(fake.SessionBase):
 | 
				
			||||||
    """ Stubs out a XenAPISession for VM tests """
 | 
					    """ Stubs out a XenAPISession for VM tests """
 | 
				
			||||||
    def __init__(self, uri):
 | 
					    def __init__(self, uri):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user