Package org.jclouds.vcloud.director.v1_5.domain.ResourceEntity

Examples of org.jclouds.vcloud.director.v1_5.domain.ResourceEntity.Status


   /**
    * Power off a {@link Vm}.
    */
   protected Vm powerOffVm(String vmUrn) {
      Vm test = vmApi.get(vmUrn);
      Status status = test.getStatus();
      if (status != Status.POWERED_OFF || test.isDeployed()) {
         UndeployVAppParams undeployParams = UndeployVAppParams.builder().build();
         Task shutdownVapp = vmApi.undeploy(vmUrn, undeployParams);
         assertTaskSucceedsLong(shutdownVapp);
      }
View Full Code Here


   /**
    * Suspend a {@link VApp}.
    */
   protected VApp suspendVApp(String vAppUrn) {
      VApp test = vAppApi.get(vAppUrn);
      Status status = test.getStatus();
      if (status != Status.SUSPENDED) {
         Task suspend = vAppApi.suspend(vAppUrn);
         assertTaskSucceedsLong(suspend);
      }
      test = vAppApi.get(vAppUrn);
View Full Code Here

   /**
    * Suspend a {@link Vm}.
    */
   protected Vm suspendVm(String vmUrn) {
      Vm test = vmApi.get(vmUrn);
      Status status = test.getStatus();
      if (status != Status.SUSPENDED) {
         Task suspend = vmApi.suspend(vmUrn);
         assertTaskSucceedsLong(suspend);
      }
      test = vmApi.get(vmUrn);
View Full Code Here

   /**
    * Power on a {@link VApp}.
    */
   protected VApp powerOnVApp(String vAppUrn) {
      VApp test = vAppApi.get(vAppUrn);
      Status status = test.getStatus();
      if (status != Status.POWERED_ON) {
         Task powerOn = vAppApi.powerOn(vAppUrn);
         assertTaskSucceedsLong(powerOn);
      }
      test = vAppApi.get(vAppUrn);
View Full Code Here

   /**
    * Power on a {@link Vm}.
    */
   protected Vm powerOnVm(String vmUrn) {
      Vm test = vmApi.get(vmUrn);
      Status status = test.getStatus();
      if (status != Status.POWERED_ON) {
         Task powerOn = vmApi.powerOn(vmUrn);
         assertTaskSucceedsLong(powerOn);
      }
      test = vmApi.get(vmUrn);
View Full Code Here

   /**
    * Power off a {@link VApp}.
    */
   protected VApp powerOffVApp(String vAppUrn) {
      VApp test = vAppApi.get(vAppUrn);
      Status status = test.getStatus();
      if (status != Status.POWERED_OFF) {
         Task powerOff = vAppApi.powerOff(vAppUrn);
         assertTaskSucceedsLong(powerOff);
      }
      test = vAppApi.get(vAppUrn);
View Full Code Here

   /**
    * Power off a {@link Vm}.
    */
   protected Vm powerOffVm(String vmUrn) {
      Vm test = vmApi.get(vmUrn);
      Status status = test.getStatus();
      if (status != Status.POWERED_OFF || test.isDeployed()) {
         UndeployVAppParams undeployParams = UndeployVAppParams.builder().build();
         Task shutdownVapp = vmApi.undeploy(vmUrn, undeployParams);
         assertTaskSucceedsLong(shutdownVapp);
      }
View Full Code Here

   /**
    * Suspend a {@link VApp}.
    */
   protected VApp suspendVApp(String vAppUrn) {
      VApp test = vAppApi.get(vAppUrn);
      Status status = test.getStatus();
      if (status != Status.SUSPENDED) {
         Task suspend = vAppApi.suspend(vAppUrn);
         assertTaskSucceedsLong(suspend);
      }
      test = vAppApi.get(vAppUrn);
View Full Code Here

   /**
    * Suspend a {@link Vm}.
    */
   protected Vm suspendVm(String vmUrn) {
      Vm test = vmApi.get(vmUrn);
      Status status = test.getStatus();
      if (status != Status.SUSPENDED) {
         Task suspend = vmApi.suspend(vmUrn);
         assertTaskSucceedsLong(suspend);
      }
      test = vmApi.get(vmUrn);
View Full Code Here

   /**
    * Power on a {@link VApp}.
    */
   protected VApp powerOnVApp(String vAppUrn) {
      VApp test = vAppApi.get(vAppUrn);
      Status status = test.getStatus();
      if (status != Status.POWERED_ON) {
         Task powerOn = vAppApi.powerOn(vAppUrn);
         assertTaskSucceedsLong(powerOn);
      }
      test = vAppApi.get(vAppUrn);
View Full Code Here

TOP

Related Classes of org.jclouds.vcloud.director.v1_5.domain.ResourceEntity.Status

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.