return new Answer(cmd, true, "Nothing to do");
}
s_logger.debug("Cleaning up portgroup " + cmd.getNicUuid() + " on switch "
+ _guestTrafficInfo.getVirtualSwitchName());
VmwareContext context = getServiceContext();
VmwareHypervisorHost host = getHyperHost(context);
ManagedObjectReference clusterMO = host.getHyperHostCluster();
// Get a list of all the hosts in this cluster
@SuppressWarnings("unchecked")
List<ManagedObjectReference> hosts = (List<ManagedObjectReference>) context.getVimClient()
.getDynamicProperty(clusterMO, "host");
if (hosts == null) {
return new Answer(cmd, false, "No hosts in cluster, which is pretty weird");
}