yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #04701
[Bug 1200482] Re: Fakes for vmware driver incorrectly represent vsphere objects
** Changed in: nova
Status: Fix Committed => Fix Released
** Changed in: nova
Milestone: None => havana-3
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1200482
Title:
Fakes for vmware driver incorrectly represent vsphere objects
Status in OpenStack Compute (Nova):
Fix Released
Bug description:
The mock representation of vmware vSphere objects in fake.py is
incorrect at many places. I will highlight some of them :-
1. The object returned by retrieveProperties API in the vsphere WebServices SDK will be an ObjectContent. But the current implementation uses ManagedObject.
See :- https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/fake.py#L797
Ref :- http://pubs.vmware.com/vsphere-51/index.jsp#com.vmware.wssdk.apiref.doc/vmodl.query.PropertyCollector.html#retrieveContents
2. ManagedObjects are associated with unique managed object id's. The
current implementation defaults the ID's at the time of creating the
objects. Thus there is only one unique instance per managed entity
type.
3. Every ManagedObject has a ManagedObjectReference created as an
attribute on the class. This is wrong. A ManagedObjectReference is a
data object that holds the managed object's ID.
4. HostSystem objects should be allowed to be in connected or
disconnected modes. This will allow negative test cases to work.
5. ClusterComputeResource is an aggregate object. Currently, there is
no way to add multiple hosts or resource pools or datastores to a
cluster.
6. Datastore object needs improvement to indicate the state of the
object and other critical attributes.
These and few other limitations with the fixtures makes a lot of code
churn in the fake.py file resulting in merge conflicts for developers.
If the infrastructure is setup in a robust way, a lot of new tests can
be added without modifying the fakes that much. This will also allow
developers to increase the code coverage for the driver.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1200482/+subscriptions