* Updated document vmware_readme.rst to mention VLAN networking

* Corrected docstrings as per pep0257 recommentations.
* Stream-lined the comments.
* Updated code with locals() where ever applicable.
* VIM : It stands for VMware Virtual Infrastructure Methodology. We have used the terminology from VMware.  we have added a question in FAQ inside vmware_readme.rst in doc/source
* New fake db: vmwareapi fake module uses a different set of fields and hence the structures required are different. Ex: bridge : 'xenbr0' does not hold good for VMware environment and bridge : 'vmnic0' is used instead. Also return values varies, hence went for implementing separate fake db.
* Now using eventlet library instead and removed io_utils.py from branch.
* Now using glance.client.Client instead of homegrown code to talk to Glance server to handle images.
* Corrected all mis-spelled function names and corresponding calls. Yeah, an auto-complete side-effect!
This commit is contained in:
sateesh
2011-03-16 21:54:02 +05:30
parent 966eec71f0
commit afd2999354
5 changed files with 35 additions and 22 deletions

View File

@@ -26,7 +26,7 @@ from nova import utils
def stub_out_db_instance_api(stubs):
""" Stubs out the db API for creating Instances """
"""Stubs out the db API for creating Instances."""
INSTANCE_TYPES = {
'm1.tiny': dict(memory_mb=512, vcpus=1, local_gb=0, flavorid=1),
@@ -38,7 +38,7 @@ def stub_out_db_instance_api(stubs):
dict(memory_mb=16384, vcpus=8, local_gb=160, flavorid=5)}
class FakeModel(object):
""" Stubs out for model """
"""Stubs out for model."""
def __init__(self, values):
self.values = values
@@ -53,7 +53,7 @@ def stub_out_db_instance_api(stubs):
raise NotImplementedError()
def fake_instance_create(values):
""" Stubs out the db.instance_create method """
"""Stubs out the db.instance_create method."""
type_data = INSTANCE_TYPES[values['instance_type']]
@@ -77,7 +77,7 @@ def stub_out_db_instance_api(stubs):
return FakeModel(base_options)
def fake_network_get_by_instance(context, instance_id):
""" Stubs out the db.network_get_by_instance method """
"""Stubs out the db.network_get_by_instance method."""
fields = {
'bridge': 'vmnet0',
@@ -87,11 +87,11 @@ def stub_out_db_instance_api(stubs):
return FakeModel(fields)
def fake_instance_action_create(context, action):
""" Stubs out the db.instance_action_create method """
"""Stubs out the db.instance_action_create method."""
pass
def fake_instance_get_fixed_address(context, instance_id):
""" Stubs out the db.instance_get_fixed_address method """
"""Stubs out the db.instance_get_fixed_address method."""
return '10.10.10.10'
def fake_instance_type_get_all(context, inactive=0):