The method at vmops.py _get_datacenter_ref_and_name does not calculate datacenter properly.
def _get_datacenter_ref_and_name(self):
"""Get the datacenter name and the reference."""
dc_obj = self._session._call_method(vim_util, "get_objects", "Datacenter", ["name"]) vm_util._cancel_retrieve_if_necessary(self._session, dc_obj)
return dc_obj.objects[0].obj, dc_obj.objects[0].propSet[0].val
This will not be correct on systems with more than one datacenter.
The method at vmops.py _get_datacenter _ref_and_ name does not calculate datacenter properly.
def _get_datacenter _ref_and_ name(self) : _call_method( vim_util, "get_objects",
"Datacenter" , ["name"])
vm_util. _cancel_ retrieve_ if_necessary( self._session, dc_obj) objects[ 0].obj, dc_obj. objects[ 0].propSet[ 0].val
"""Get the datacenter name and the reference."""
dc_obj = self._session.
return dc_obj.
This will not be correct on systems with more than one datacenter.