use import_object_ns for compute_driver loading
Part of bp:virt-driver-cleanup Convert to using import_object_ns which allows us to import specific virt drivers as 'libvirt.LibvirtDriver' instead of 'nova.virt.libvirt.libvirtDriver'. Update testing to ensure this works with both short names and long names (which need not be in the nova.virt namespace). Change-Id: I5eee3389c7719d5f361532b0eddaa249233283a5
This commit is contained in:
		@@ -117,9 +117,13 @@ class VirtDriverLoaderTestCase(_FakeDriverBackendTestCase):
 | 
			
		||||
    final class"""
 | 
			
		||||
 | 
			
		||||
    # if your driver supports being tested in a fake way, it can go here
 | 
			
		||||
    #
 | 
			
		||||
    # both long form and short form drivers are supported
 | 
			
		||||
    new_drivers = {
 | 
			
		||||
        'nova.virt.fake.FakeDriver': 'FakeDriver',
 | 
			
		||||
        'nova.virt.libvirt.LibvirtDriver': 'LibvirtDriver'
 | 
			
		||||
        'nova.virt.libvirt.LibvirtDriver': 'LibvirtDriver',
 | 
			
		||||
        'fake.FakeDriver': 'FakeDriver',
 | 
			
		||||
        'libvirt.LibvirtDriver': 'LibvirtDriver'
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    # NOTE(sdague): remove after Folsom release when connection_type
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user