@GET @Path("/vmstatus/{vmname}") public String getStatusForVM(@PathParam("vmname") String vmName) throws VMWareException { Configuration conf = Configuration.getInstance(); VMWareHelper helper = VMWareHelper.getInstance(conf.getUserName(), conf.getPassword(), conf.getUrl()); ManagedEntityStatus status = helper.getStatusForVm(vmName); if (status == null) { throw new VMWareException("Name of VM " + vmName + " not found"); } return helper.getStatusForVm(vmName).toString(); }
public ManagedEntityStatus getConfigStatus() { return (ManagedEntityStatus) getCurrentProperty("configStatus"); }
public ManagedEntityStatus getOverallStatus() { return (ManagedEntityStatus) getCurrentProperty("overallStatus"); }