Package org.jclouds.trmk.vcloud_0_8.domain

Examples of org.jclouds.trmk.vcloud_0_8.domain.VAppConfiguration


      );

      String expected = Strings2.toStringAndClose(getClass().getResourceAsStream("/configureVApp.xml"))
               .replace("eduardo", "MyAppServer6");

      VAppConfiguration config = new VAppConfiguration().deleteDiskWithAddressOnParent(1);
     
      GeneratedHttpRequest request = requestForArgs(ImmutableList.<Object> of(vApp, config));

      BindVAppConfigurationToXmlPayload binder = injector.getInstance(BindVAppConfigurationToXmlPayload.class);
View Full Code Here


                                 "9").elementName("foo").addressOnParent("0").hostResource("1048576").resourceType(
                                 ResourceType.DISK_DRIVE).virtualQuantity(209152l).build()));

      String expected = Strings2.toStringAndClose(getClass().getResourceAsStream("/configureVAppAll.xml"));

      VAppConfiguration config = changeNameTo("eduardo").changeMemoryTo(1536).changeProcessorCountTo(1).addDisk(
               25 * 1048576).addDisk(25 * 1048576);

      GeneratedHttpRequest request = requestForArgs(ImmutableList.<Object> of(vApp, config));

      BindVAppConfigurationToXmlPayload binder = injector.getInstance(BindVAppConfigurationToXmlPayload.class);
View Full Code Here

                                 .virtualQuantity(1024l).build(), ResourceAllocationSettingData.builder().instanceID(
                                 "9").elementName("foo").addressOnParent("0").hostResource("1048576").resourceType(
                                 ResourceType.DISK_DRIVE).virtualQuantity(209152l).build()));
      String expected = Strings2.toStringAndClose(getClass().getResourceAsStream("/configureVApp4.xml"));

      VAppConfiguration config = new VAppConfiguration().changeProcessorCountTo(4);

      GeneratedHttpRequest request = requestForArgs(ImmutableList.<Object> of(vApp, config));

      BindVAppConfigurationToXmlPayload binder = injector.getInstance(BindVAppConfigurationToXmlPayload.class);
View Full Code Here

                                 ResourceType.DISK_DRIVE).virtualQuantity(209152l).build()));

      String expected = Strings2.toStringAndClose(getClass().getResourceAsStream("/configureVApp.xml"))
               .replace("eduardo", "MyAppServer6").replace("1024", "1536");

      VAppConfiguration config = new VAppConfiguration().changeMemoryTo(1536);

      GeneratedHttpRequest request = requestForArgs(ImmutableList.<Object> of(vApp, config));

      BindVAppConfigurationToXmlPayload binder = injector.getInstance(BindVAppConfigurationToXmlPayload.class);
View Full Code Here

                                 ResourceType.DISK_DRIVE).virtualQuantity(209152l).build()));

      String expected = Strings2.toStringAndClose(getClass().getResourceAsStream("/configureVApp.xml"))
               .replace("eduardo", "roberto");

      VAppConfiguration config = new VAppConfiguration().changeNameTo("roberto");

      GeneratedHttpRequest request = requestForArgs(ImmutableList.<Object> of(vApp, config));
      BindVAppConfigurationToXmlPayload binder = injector.getInstance(BindVAppConfigurationToXmlPayload.class);

      Map<String, Object> map = Maps.newHashMap();
View Full Code Here

      );

      String expected = Strings2.toStringAndClose(getClass().getResourceAsStream("/configureVApp.xml"))
               .replace("eduardo", "MyAppServer6");

      VAppConfiguration config = new VAppConfiguration().deleteDiskWithAddressOnParent(1);
     
      GeneratedHttpRequest request = requestForArgs(ImmutableList.<Object> of(vApp, config));

      BindVAppConfigurationToXmlPayload binder = injector.getInstance(BindVAppConfigurationToXmlPayload.class);
View Full Code Here

                                 "9").elementName("foo").addressOnParent("0").hostResource("1048576").resourceType(
                                 ResourceType.DISK_DRIVE).virtualQuantity(209152l).build()));

      String expected = Strings2.toStringAndClose(getClass().getResourceAsStream("/configureVAppAll.xml"));

      VAppConfiguration config = changeNameTo("eduardo").changeMemoryTo(1536).changeProcessorCountTo(1).addDisk(
               25 * 1048576).addDisk(25 * 1048576);

      GeneratedHttpRequest request = requestForArgs(ImmutableList.<Object> of(vApp, config));

      BindVAppConfigurationToXmlPayload binder = injector.getInstance(BindVAppConfigurationToXmlPayload.class);
View Full Code Here

                                 .virtualQuantity(1024l).build(), ResourceAllocationSettingData.builder().instanceID(
                                 "9").elementName("foo").addressOnParent("0").hostResource("1048576").resourceType(
                                 ResourceType.DISK_DRIVE).virtualQuantity(209152l).build()));
      String expected = Strings2.toStringAndClose(getClass().getResourceAsStream("/configureVApp4.xml"));

      VAppConfiguration config = new VAppConfiguration().changeProcessorCountTo(4);

      GeneratedHttpRequest request = requestForArgs(ImmutableList.<Object> of(vApp, config));

      BindVAppConfigurationToXmlPayload binder = injector.getInstance(BindVAppConfigurationToXmlPayload.class);
View Full Code Here

                                 ResourceType.DISK_DRIVE).virtualQuantity(209152l).build()));

      String expected = Strings2.toStringAndClose(getClass().getResourceAsStream("/configureVApp.xml"))
               .replace("eduardo", "MyAppServer6").replace("1024", "1536");

      VAppConfiguration config = new VAppConfiguration().changeMemoryTo(1536);

      GeneratedHttpRequest request = requestForArgs(ImmutableList.<Object> of(vApp, config));

      BindVAppConfigurationToXmlPayload binder = injector.getInstance(BindVAppConfigurationToXmlPayload.class);
View Full Code Here

      checkArgument(checkNotNull(request, "request") instanceof GeneratedHttpRequest,
               "this binder is only valid for GeneratedHttpRequests!");
      GeneratedHttpRequest gRequest = (GeneratedHttpRequest) request;
      VApp vApp = checkNotNull(findVAppInArgsOrNull(gRequest), "vApp");
      checkArgument(vApp.getStatus() == Status.OFF, "vApp must be off!");
      VAppConfiguration configuration = checkNotNull(findConfigInArgsOrNull(gRequest), "config");

      try {
         return stringBinder.bindToRequest(request, generateXml(vApp, configuration));
      } catch (ParserConfigurationException e) {
         throw new RuntimeException(e);
View Full Code Here

TOP

Related Classes of org.jclouds.trmk.vcloud_0_8.domain.VAppConfiguration

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.