return new Answer(cmd, false, "No hosts in cluster, which is pretty weird");
}
for (ManagedObjectReference hostMOR : hosts) {
HostMO hostMo = new HostMO(context, hostMOR);
hostMo.deletePortGroup(cmd.getNicUuid().toString());
s_logger.debug("Removed portgroup " + cmd.getNicUuid() + " from host " + hostMo.getHostName());
}
return new Answer(cmd, true, "Unregistered resources for NIC " + cmd.getNicUuid());
} catch (Exception e) {
if (e instanceof RemoteException) {