VMware Compute Driver Rename
blueprint vmware-compute-driver Rename VMWare to VMware Rename network_utils to network_util to conform to the util class naming convention Remove the infinite loop in vim.__getattr__ Change-Id: I5bdad331a86c7aa4ca36e7a8345b53e455678c0f
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
# under the License.
|
||||
|
||||
"""
|
||||
Test suite for VMWareAPI.
|
||||
Test suite for VMwareAPI.
|
||||
"""
|
||||
|
||||
from nova.compute import power_state
|
||||
@@ -33,11 +33,11 @@ from nova.virt.vmwareapi import driver
|
||||
from nova.virt.vmwareapi import fake as vmwareapi_fake
|
||||
|
||||
|
||||
class VMWareAPIVMTestCase(test.TestCase):
|
||||
class VMwareAPIVMTestCase(test.TestCase):
|
||||
"""Unit tests for Vmware API connection calls."""
|
||||
|
||||
def setUp(self):
|
||||
super(VMWareAPIVMTestCase, self).setUp()
|
||||
super(VMwareAPIVMTestCase, self).setUp()
|
||||
self.context = context.RequestContext('fake', 'fake', is_admin=False)
|
||||
self.flags(vmwareapi_host_ip='test_url',
|
||||
vmwareapi_host_username='test_username',
|
||||
@@ -48,7 +48,7 @@ class VMWareAPIVMTestCase(test.TestCase):
|
||||
vmwareapi_fake.reset()
|
||||
db_fakes.stub_out_db_instance_api(self.stubs)
|
||||
stubs.set_stubs(self.stubs)
|
||||
self.conn = driver.VMWareESXDriver(None, False)
|
||||
self.conn = driver.VMwareESXDriver(None, False)
|
||||
# NOTE(vish): none of the network plugging code is actually
|
||||
# being tested
|
||||
self.network_info = [({'bridge': 'fa0',
|
||||
@@ -78,7 +78,7 @@ class VMWareAPIVMTestCase(test.TestCase):
|
||||
nova.tests.image.fake.stub_out_image_service(self.stubs)
|
||||
|
||||
def tearDown(self):
|
||||
super(VMWareAPIVMTestCase, self).tearDown()
|
||||
super(VMwareAPIVMTestCase, self).tearDown()
|
||||
vmwareapi_fake.cleanup()
|
||||
nova.tests.image.fake.FakeImageService_reset()
|
||||
|
||||
|
||||
@@ -21,31 +21,31 @@ Stubouts for the test suite
|
||||
|
||||
from nova.virt.vmwareapi import driver
|
||||
from nova.virt.vmwareapi import fake
|
||||
from nova.virt.vmwareapi import network_utils
|
||||
from nova.virt.vmwareapi import network_util
|
||||
from nova.virt.vmwareapi import vmops
|
||||
from nova.virt.vmwareapi import vmware_images
|
||||
|
||||
|
||||
def fake_get_vim_object(arg):
|
||||
"""Stubs out the VMWareAPISession's get_vim_object method."""
|
||||
"""Stubs out the VMwareAPISession's get_vim_object method."""
|
||||
return fake.FakeVim()
|
||||
|
||||
|
||||
def fake_is_vim_object(arg, module):
|
||||
"""Stubs out the VMWareAPISession's is_vim_object method."""
|
||||
"""Stubs out the VMwareAPISession's is_vim_object method."""
|
||||
return isinstance(module, fake.FakeVim)
|
||||
|
||||
|
||||
def set_stubs(stubs):
|
||||
"""Set the stubs."""
|
||||
stubs.Set(vmops.VMWareVMOps, 'plug_vifs', fake.fake_plug_vifs)
|
||||
stubs.Set(network_utils, 'get_network_with_the_name',
|
||||
stubs.Set(vmops.VMwareVMOps, 'plug_vifs', fake.fake_plug_vifs)
|
||||
stubs.Set(network_util, 'get_network_with_the_name',
|
||||
fake.fake_get_network)
|
||||
stubs.Set(vmware_images, 'fetch_image', fake.fake_fetch_image)
|
||||
stubs.Set(vmware_images, 'get_vmdk_size_and_properties',
|
||||
fake.fake_get_vmdk_size_and_properties)
|
||||
stubs.Set(vmware_images, 'upload_image', fake.fake_upload_image)
|
||||
stubs.Set(driver.VMWareAPISession, "_get_vim_object",
|
||||
stubs.Set(driver.VMwareAPISession, "_get_vim_object",
|
||||
fake_get_vim_object)
|
||||
stubs.Set(driver.VMWareAPISession, "_is_vim_object",
|
||||
stubs.Set(driver.VMwareAPISession, "_is_vim_object",
|
||||
fake_is_vim_object)
|
||||
|
||||
Reference in New Issue
Block a user