axxyhtrx / pysphere

Automatically exported from code.google.com/p/pysphere
0 stars 0 forks source link

currentBalance and targetBalance Key/Values for ClusterComputeResource #46

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
properties = ["summary.targetBalance"]

results = s._retrieve_properties_traversal(property_names=properties,
                                           obj_type=MORTypes.ClusterComputeResource)

for item in results:
    print "=" * 80
    print "MOR:", item.Obj
    for p in item.PropSet:
        print p.Name, "=>", p.Val

What is the expected output? 
the same as effectiveCpu

What do you see instead?
Invalid Property Type

What version of the product are you using? On what operating system?
pysphere-0.1.7

Please provide any additional information below.
They keys are there
['AdmissionControlInfo', 'CurrentBalance', 'CurrentEVCModeKey', 
'CurrentFailoverLevel', 'DasData', 'DynamicProperty', '
DynamicType', 'EffectiveCpu',....

Output from

mors = s.get_datacenters().keys() + s.get_clusters().keys() + 
s.get_hosts().keys() + s._get_managed_objects(MORTypes.VirtualMachine).keys()
# for mor in mors: print mor
props = {MORTypes.ClusterComputeResource:[]}
results = s._get_object_properties_bulk(mors, props)

for host in results:
    for prop in host.PropSet:
       print "prop Name"
       print "========="
       print dir(prop.Name)
       print "prop Val"
       print "========="
       print dir(prop.Val)

Original issue reported on code.google.com by winnjohn...@gmail.com on 15 Nov 2013 at 10:52