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

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


      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"));

      // Get the edited VApp
      vApp = vAppApi.get(vAppUrn);
View Full Code Here


   public void testPowerOffVApp() {
      // Power on VApp
      vApp = powerOnVApp(vAppUrn);

      // The method under test
      Task powerOffVApp = vAppApi.powerOff(vAppUrn);
      assertTrue(retryTaskSuccess.apply(powerOffVApp), String.format(TASK_COMPLETE_TIMELY, "powerOffVApp"));

      // Get the edited VApp
      vApp = vAppApi.get(vAppUrn);
View Full Code Here

      // Power on, then suspend the VApp
      vApp = powerOnVApp(vAppUrn);
      vApp = suspendVApp(vAppUrn);

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

      LeaseSettingsSection oldSection = vAppApi.getLeaseSettingsSection(vAppUrn);
      Integer twoHours = (int) TimeUnit.SECONDS.convert(2L, TimeUnit.HOURS);
      LeaseSettingsSection newSection = oldSection.toBuilder().deploymentLeaseInSeconds(twoHours).build();

      // The method under test
      Task editLeaseSettingsSection = vAppApi.editLeaseSettingsSection(vAppUrn, newSection);
      assertTrue(retryTaskSuccess.apply(editLeaseSettingsSection),
               String.format(TASK_COMPLETE_TIMELY, "editLeaseSettingsSection"));

      // Retrieve the modified section
      LeaseSettingsSection modified = vAppApi.getLeaseSettingsSection(vAppUrn);
View Full Code Here

               .build();

      NetworkConfigSection newSection = oldSection.toBuilder().networkConfigs(ImmutableSet.of(newVAppNetworkConfiguration)).build();

      // The method under test
      Task editNetworkConfigSection = vAppApi.editNetworkConfigSection(vAppUrn, newSection);
      assertTrue(retryTaskSuccess.apply(editNetworkConfigSection),
               String.format(TASK_COMPLETE_TIMELY, "editNetworkConfigSection"));

      // Retrieve the modified section
      NetworkConfigSection modified = vAppApi.getNetworkConfigSection(vAppUrn);
View Full Code Here

                                 .vendor(MsgType.builder().value("jclouds Inc.").build())
                                 // NOTE other ProductSection elements not returned by vCloud
                                 .build()).build();

      // The method under test
      Task editProductSections = vAppApi.editProductSections(vAppUrn, newSections);
      assertTrue(retryTaskSuccess.apply(editProductSections),
               String.format(TASK_COMPLETE_TIMELY, "editProductSections"));

      // Retrieve the modified section
      ProductSectionList modified = vAppApi.getProductSections(vAppUrn);
View Full Code Here

      // Copy existing section and edit fields
      StartupSection oldSection = vAppApi.getStartupSection(vAppUrn);
      StartupSection newSection = oldSection.toBuilder().build();

      // The method under test
      Task editStartupSection = vAppApi.editStartupSection(vAppUrn, newSection);
      assertTrue(retryTaskSuccess.apply(editStartupSection), String.format(TASK_COMPLETE_TIMELY, "editStartupSection"));

      // Retrieve the modified section
      StartupSection modified = vAppApi.getStartupSection(vAppUrn);
View Full Code Here

   }

   @Test(groups = { "live", "user" }, description = "DELETE /vApp/{id}/metadata/{key}", dependsOnMethods = { "testSetMetadataValue" })
   public void testRemoveMetadataEntry() {
      // Delete the entry
      Task task = context.getApi().getMetadataApi(vAppUrn).remove(key);
      retryTaskSuccess.apply(task);

      // Confirm the entry has been removed
      Metadata newMetadata = context.getApi().getMetadataApi(vAppUrn).get();
View Full Code Here

      Map<String, String> oldMetadataMap = Checks.metadataToMap(oldMetadata);

      // Store a value, to be removed
      String key = name("key-");
      String value = name("value-");
      Task task = context.getApi().getMetadataApi(vAppUrn).putAll(ImmutableMap.of(key, value));
      retryTaskSuccess.apply(task);

      // Confirm the entry contains everything that was there, and everything that was being added
      Metadata newMetadata = context.getApi().getMetadataApi(vAppUrn).get();
      Map<String, String> expectedMetadataMap = ImmutableMap.<String, String> builder().putAll(oldMetadataMap)
View Full Code Here

   public void testRemoveVApp() {
      // Create a temporary VApp to remove
      VApp temp = instantiateVApp();

      // The method under test
      Task removeVApp = vAppApi.remove(temp.getId());
      assertTrue(retryTaskSuccess.apply(removeVApp), String.format(TASK_COMPLETE_TIMELY, "removeVApp"));

      VApp removed = vAppApi.get(temp.getId());
      assertNull(removed, "The VApp " + temp.getName() + " should have been removed");
   }
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.