1) Update few comments where whitespace is missing after '#'

2) Update document so that copy right notice doesn't appear in generated document
3) Now using self.flag(...) instead of setting the flags like FLAGS.vmwareapi_username by direct assignment.
4) Added the missing double quote at the end a string in vim_util.py
This commit is contained in:
sateesh 2011-03-17 20:13:48 +05:30
parent f5ad4125d0
commit cbcda1ec46
6 changed files with 39 additions and 40 deletions

View File

@ -1,5 +1,4 @@
.. ..
Copyright (c) 2010 Citrix Systems, Inc. Copyright (c) 2010 Citrix Systems, Inc.
Copyright 2010 OpenStack LLC. Copyright 2010 OpenStack LLC.

View File

@ -43,15 +43,15 @@ class VMWareAPIVMTestCase(test.TestCase):
def setUp(self): def setUp(self):
super(VMWareAPIVMTestCase, self).setUp() super(VMWareAPIVMTestCase, self).setUp()
self.flags(vmwareapi_host_ip='test_url',
vmwareapi_host_username='test_username',
vmware_host_password='test_pass')
self.manager = manager.AuthManager() self.manager = manager.AuthManager()
self.user = self.manager.create_user('fake', 'fake', 'fake', self.user = self.manager.create_user('fake', 'fake', 'fake',
admin=True) admin=True)
self.project = self.manager.create_project('fake', 'fake', 'fake') self.project = self.manager.create_project('fake', 'fake', 'fake')
self.network = utils.import_object(FLAGS.network_manager) self.network = utils.import_object(FLAGS.network_manager)
self.stubs = stubout.StubOutForTesting() self.stubs = stubout.StubOutForTesting()
FLAGS.vmwareapi_host_ip = 'test_url'
FLAGS.vmwareapi_host_username = 'test_username'
FLAGS.vmwareapi_host_password = 'test_pass'
vmwareapi_fake.reset() vmwareapi_fake.reset()
db_fakes.stub_out_db_instance_api(self.stubs) db_fakes.stub_out_db_instance_api(self.stubs)
stubs.set_stubs(self.stubs) stubs.set_stubs(self.stubs)

View File

@ -640,7 +640,7 @@ class FakeVim(object):
try: try:
obj_ref = obj.obj obj_ref = obj.obj
# This means that we are doing a search for the managed # This means that we are doing a search for the managed
#dataobects of the type in the inventory # dataobjects of the type in the inventory
if obj_ref == "RootFolder": if obj_ref == "RootFolder":
for mdo_ref in _db_content[type]: for mdo_ref in _db_content[type]:
mdo = _db_content[type][mdo_ref] mdo = _db_content[type][mdo_ref]

View File

@ -29,7 +29,7 @@ from suds.sudsobject import Property
from nova import flags from nova import flags
from nova.virt.vmwareapi import error_util from nova.virt.vmwareapi import error_util
RESP_NOT_XML_ERROR = 'Response is "text/html", not "text/xml' RESP_NOT_XML_ERROR = 'Response is "text/html", not "text/xml"'
CONN_ABORT_ERROR = 'Software caused connection abort' CONN_ABORT_ERROR = 'Software caused connection abort'
ADDRESS_IN_USE_ERROR = 'Address already in use' ADDRESS_IN_USE_ERROR = 'Address already in use'

View File

@ -45,7 +45,7 @@ def build_recursive_traversal_spec(client_factory):
""" """
visit_folders_select_spec = build_selection_spec(client_factory, visit_folders_select_spec = build_selection_spec(client_factory,
"visitFolders") "visitFolders")
#For getting to hostFolder from datacnetr # For getting to hostFolder from datacenter
dc_to_hf = build_traversal_spec(client_factory, "dc_to_hf", "Datacenter", dc_to_hf = build_traversal_spec(client_factory, "dc_to_hf", "Datacenter",
"hostFolder", False, "hostFolder", False,
[visit_folders_select_spec]) [visit_folders_select_spec])