Examples of UndeployVAppParams


Examples of org.jclouds.vcloud.director.v1_5.domain.params.UndeployVAppParams

            .httpRequestBuilder().build(),
         new VcloudHttpResponsePrimer()
            .xmlFilePayload("/vApp/undeployTask.xml", VCloudDirectorMediaType.TASK)
            .httpResponseBuilder().build());

      UndeployVAppParams params = UndeployVAppParams.builder()
            .build();

    Task expected = undeployTask();

    assertEquals(api.getVAppApi().undeploy(vAppURI, params), expected);
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.params.UndeployVAppParams

   @Test(groups = { "live", "user" }, description = "POST /vApp/{id}/action/undeploy", dependsOnMethods = { "testDeployVApp" })
   public void testUndeployVApp() {
      // Power on VApp
      vApp = powerOnVApp(vAppUrn);

      UndeployVAppParams params = UndeployVAppParams.builder().build();

      // The method under test
      Task undeploy = vAppApi.undeploy(vAppUrn, params);
      assertTrue(retryTaskSuccess.apply(undeploy), String.format(TASK_COMPLETE_TIMELY, "undeploy"));
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.params.UndeployVAppParams

    */
   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);
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.params.UndeployVAppParams

      }

      // Undeploy the VApp if necessary
      if (vApp.isDeployed()) {
         try {
            UndeployVAppParams params = UndeployVAppParams.builder()
                     .undeployPowerAction(UndeployVAppParams.PowerAction.SHUTDOWN).build();
            Task undeployTask = vAppApi.undeploy(vAppUrn, params);
            taskDoneEventually(undeployTask);
         } catch (Exception e) {
            // keep going; cleanup as much as possible
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.params.UndeployVAppParams

            .httpRequestBuilder().build(),
         new VcloudHttpResponsePrimer()
            .xmlFilePayload("/vApp/undeployTask.xml", VCloudDirectorMediaType.TASK)
            .httpResponseBuilder().build());

      UndeployVAppParams params = UndeployVAppParams.builder()
            .build();

    Task expected = undeployTask();

    assertEquals(api.getVmApi().undeploy(vmURI, params), expected);
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.params.UndeployVAppParams

   @Test(description = "POST /vApp/{id}/action/undeploy", dependsOnMethods = { "testDeployVm" })
   public void testUndeployVm() {
      // Power on Vm
      vm = powerOnVm(vmUrn);

      UndeployVAppParams params = UndeployVAppParams.builder().build();

      // The method under test
      Task undeploy = vmApi.undeploy(vmUrn, params);
      assertTrue(retryTaskSuccess.apply(undeploy), String.format(TASK_COMPLETE_TIMELY, "undeploy"));
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.params.UndeployVAppParams

      List<Vm> vms = remove.getChildren().getVms();
      Vm temp = Iterables.get(vms, 0);

      // otherwise it's impossible to stop a running vApp with no vms
      if (vms.size() == 1) {
         UndeployVAppParams undeployParams = UndeployVAppParams.builder().build();
         Task shutdownVapp = vAppApi.undeploy(remove.getId(), undeployParams);
         assertTaskSucceedsLong(shutdownVapp);
      } else {
         powerOffVm(temp.getId());
      }
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.params.UndeployVAppParams

    */
   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);
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.params.UndeployVAppParams

      }

      // Undeploy the VApp if necessary
      if (vApp.isDeployed()) {
         try {
            UndeployVAppParams params = UndeployVAppParams.builder()
                     .undeployPowerAction(UndeployVAppParams.PowerAction.SHUTDOWN).build();
            Task undeployTask = vAppApi.undeploy(vAppUrn, params);
            taskDoneEventually(undeployTask);
         } catch (Exception e) {
            // keep going; cleanup as much as possible
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.params.UndeployVAppParams

   @Test(description = "POST /vApp/{id}/action/undeploy", dependsOnMethods = { "testDeployVm" })
   public void testUndeployVm() {
      // Power on Vm
      vm = powerOnVm(vmUrn);

      UndeployVAppParams params = UndeployVAppParams.builder().build();

      // The method under test
      Task undeploy = vmApi.undeploy(vmUrn, params);
      assertTrue(retryTaskSuccess.apply(undeploy), String.format(TASK_COMPLETE_TIMELY, "undeploy"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.