summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorRick Harris <rconradharris@gmail.com>2012-07-10 22:06:42 +0000
committerRick Harris <rconradharris@gmail.com>2012-07-11 00:49:59 +0000
commit26b536bfcaf1cfcadf3b028a4ee83a3026a85ffd (patch)
treeae0ff4a416dd3ae5c7b5aab88bb75c30e1a1b708 /nova/tests
parent58a6d062bd9eb90a7d52aebeeb0e8cec03f63651 (diff)
Clarifying which vm_utils functions are private.
This clarification should aid in future refactorings by giving a hint of which methods are not referenced outside of the file (except for test stubs). Change-Id: I574b2caa25d54969a1627fa69f101b2480152b08
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/test_xenapi.py6
-rw-r--r--nova/tests/xenapi/stubs.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py
index 301c78d69..b8ef49869 100644
--- a/nova/tests/test_xenapi.py
+++ b/nova/tests/test_xenapi.py
@@ -287,7 +287,7 @@ class XenAPIVMTestCase(stubs.XenAPITestBase):
def test_init_host(self):
session = xenapi_conn.XenAPISession('test_url', 'root', 'test_pass')
- vm = vm_utils.get_this_vm_ref(session)
+ vm = vm_utils._get_this_vm_ref(session)
# Local root disk
vdi0 = xenapi_fake.create_vdi('compute', None)
vbd0 = xenapi_fake.create_vbd(vm, vdi0)
@@ -308,7 +308,7 @@ class XenAPIVMTestCase(stubs.XenAPITestBase):
def test_get_rrd_server(self):
self.flags(xenapi_connection_url='myscheme://myaddress/')
- server_info = vm_utils.get_rrd_server()
+ server_info = vm_utils._get_rrd_server()
self.assertEqual(server_info[0], 'myscheme')
self.assertEqual(server_info[1], 'myaddress')
@@ -316,7 +316,7 @@ class XenAPIVMTestCase(stubs.XenAPITestBase):
def fake_get_rrd(host, vm_uuid):
with open('xenapi/vm_rrd.xml') as f:
return re.sub(r'\s', '', f.read())
- self.stubs.Set(vm_utils, 'get_rrd', fake_get_rrd)
+ self.stubs.Set(vm_utils, '_get_rrd', fake_get_rrd)
fake_diagnostics = {
'vbd_xvdb_write': '0.0',
diff --git a/nova/tests/xenapi/stubs.py b/nova/tests/xenapi/stubs.py
index 037053473..299efd7e0 100644
--- a/nova/tests/xenapi/stubs.py
+++ b/nova/tests/xenapi/stubs.py
@@ -346,7 +346,7 @@ def stub_out_migration_methods(stubs):
stubs.Set(vmops.VMOps, '_destroy', fake_destroy)
stubs.Set(vmops.VMOps, '_move_disks', fake_move_disks)
stubs.Set(vm_utils, 'scan_default_sr', fake_sr)
- stubs.Set(vm_utils, 'scan_sr', fake_sr)
+ stubs.Set(vm_utils, '_scan_sr', fake_sr)
stubs.Set(vmops.VMOps, '_create_snapshot', fake_create_snapshot)
stubs.Set(vm_utils, 'get_vdi_for_vm_safely', fake_get_vdi)
stubs.Set(vm_utils, 'get_sr_path', fake_get_sr_path)