I want to set Affinity Rule on a particular VM using pyVmomi. I am taking the help from Steve's sample example DrsAffRule.java. Now I am stuck in this specific line :
//create the MOR object for DRS cluster | ||
ManagedObjectReference mref_drs = createMOR("ClusterComputeResource", drs_obj_id); | ||
ClusterComputeResource ccr = (ClusterComputeResource ) | ||
MorUtil.createExactManagedEntity(si.getServerConnection(), mref_drs); |
Didn't find any ManagedObjectReference class in pyVmomi. The createMOR() and createExactManagedEntity() methods are in util package I tried to mimic the same in pyVmomi but without the MOR class I'm not able to do that.
Any idea how to do that ????
Thanks,
Reuben