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

Examples of org.jclouds.vcloud.director.v1_5.domain.Task


    */
   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);
      assertStatus(VAPP, test, Status.POWERED_ON);
      return test;
View Full Code Here


    */
   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);
      assertStatus(VM, test, Status.POWERED_ON);
      return test;
View Full Code Here

    */
   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);
      assertStatus(VAPP, test, Status.POWERED_OFF);
      return test;
View Full Code Here

   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);
      }
      test = vmApi.get(vmUrn);
      assertStatus(VM, test, Status.POWERED_OFF);
      return test;
View Full Code Here

    */
   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);
      assertStatus(VAPP, test, Status.SUSPENDED);
      return test;
View Full Code Here

    */
   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);
      assertStatus(VM, test, Status.SUSPENDED);
      return test;
View Full Code Here

                  .ipAddressAllocationMode(IpAddressAllocationMode.POOL)
                  .build();
        
         section = section.toBuilder().networkConnection(newNetworkConnection).build();
      }
      Task configureNetwork = vmApi.editNetworkConnectionSection(vm.getId(), section);
      assertTaskSucceedsLong(configureNetwork);
   }
View Full Code Here

   @AfterClass(alwaysRun = true, dependsOnMethods = { "cleanUpEnvironment" })
   protected void tidyUp() {
      if (key != null) {
         try {
           Task remove = context.getApi().getMetadataApi(vAppTemplateUrn).remove(key);
           taskDoneEventually(remove);
         } catch (Exception e) {
            logger.warn(e, "Error when deleting metadata entry '%s'", key);
         }
      }
View Full Code Here

  
   private void addVAppNetworkWithSecurityGroupOnVApp(ImmutableList<String> securityGroups, String vAppUrn) {
      String newVAppNetworkName = generateVAppNetworkName(network.getName(), securityGroups);
      // Create a vAppNetwork with firewall rules
      NetworkConfigSection newSection = generateNetworkConfigSection(securityGroups, newVAppNetworkName);
      Task editNetworkConfigSection = vAppApi.editNetworkConfigSection(vAppUrn, newSection);
      assertTrue(retryTaskSuccess.apply(editNetworkConfigSection), String.format(TASK_COMPLETE_TIMELY, "editNetworkConfigSection"));
      attachVmToVAppNetwork(vm, newVAppNetworkName);
   }
View Full Code Here

                           .network("none")
                           .ipAddressAllocationMode(IpAddressAllocationMode.NONE)
                           .build())
                  .build();
      }
      Task cleanUpNetworks = vmApi.editNetworkConnectionSection(vm.getId(), section);
      assertTaskSucceedsLong(cleanUpNetworks);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.vcloud.director.v1_5.domain.Task

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.