Examples of CloneVAppOptions


Examples of org.jclouds.trmk.vcloud_0_8.options.CloneVAppOptions

            "this binder is only valid for GeneratedHttpRequests!");
      GeneratedHttpRequest gRequest = (GeneratedHttpRequest) request;
      String newName = checkNotNull(postParams.remove("newName"), "newName").toString();
      String vApp = checkNotNull(postParams.remove("vApp"), "vApp").toString();

      CloneVAppOptions options = findOptionsInArgsOrNull(gRequest);
      if (options == null) {
         options = new CloneVAppOptions();
      }
      try {
         return stringBinder.bindToRequest(request, generateXml(newName, vApp, options));
      } catch (ParserConfigurationException e) {
         throw new RuntimeException(e);
View Full Code Here

Examples of org.jclouds.trmk.vcloud_0_8.options.CloneVAppOptions

   });
  
   public void testWithDescriptionDeployOn() throws Exception {
      String expected = Strings2.toStringAndClose(getClass().getResourceAsStream("/cloneVApp.xml"));

      CloneVAppOptions options = new CloneVAppOptions().deploy().powerOn().withDescription(
               "The description of the new vApp");
      GeneratedHttpRequest request = requestForArgs(ImmutableList.<Object> of(options));

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

Examples of org.jclouds.trmk.vcloud_0_8.options.CloneVAppOptions

      StringBuilder name = new StringBuilder();
      for (int i = 0; i < 15; i++)
         name.append("b");
      String newName = name.toString();

      CloneVAppOptions options = deploy().powerOn().withDescription("The description of " + newName);

      System.out.printf("%d: cloning vApp%n", System.currentTimeMillis());
      Task task = api.cloneVAppInVDC(vdc.getHref(), vApp.getHref(), newName, options);

      // wait for the task to complete
View Full Code Here

Examples of org.jclouds.trmk.vcloud_0_8.options.CloneVAppOptions

            "this binder is only valid for GeneratedHttpRequests!");
      GeneratedHttpRequest gRequest = (GeneratedHttpRequest) request;
      String newName = checkNotNull(postParams.remove("newName"), "newName").toString();
      String vApp = checkNotNull(postParams.remove("vApp"), "vApp").toString();

      CloneVAppOptions options = findOptionsInArgsOrNull(gRequest);
      if (options == null) {
         options = new CloneVAppOptions();
      }
      try {
         return stringBinder.bindToRequest(request, generateXml(newName, vApp, options));
      } catch (ParserConfigurationException e) {
         throw new RuntimeException(e);
View Full Code Here

Examples of org.jclouds.trmk.vcloud_0_8.options.CloneVAppOptions

   });
  
   public void testWithDescriptionDeployOn() throws Exception {
      String expected = Strings2.toStringAndClose(getClass().getResourceAsStream("/cloneVApp.xml"));

      CloneVAppOptions options = new CloneVAppOptions().deploy().powerOn().withDescription(
               "The description of the new vApp");
      GeneratedHttpRequest request = requestForArgs(ImmutableList.<Object> of(options));

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

Examples of org.jclouds.trmk.vcloud_0_8.options.CloneVAppOptions

      StringBuilder name = new StringBuilder();
      for (int i = 0; i < 15; i++)
         name.append("b");
      String newName = name.toString();

      CloneVAppOptions options = deploy().powerOn().withDescription("The description of " + newName);

      System.out.printf("%d: cloning vApp%n", System.currentTimeMillis());
      Task task = api.cloneVAppInVDC(vdc.getHref(), vApp.getHref(), newName, options);

      // wait for the task to complete
View Full Code Here

Examples of org.jclouds.vcloud.options.CloneVAppOptions

   public void testCopyVAppToVDCAndNameOptions() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(VAppAsyncClient.class, "copyVAppToVDCAndName", URI.class, URI.class, String.class,
               CloneVAppOptions[].class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of(URI
               .create("https://vcenterprise.bluelock.com/api/v1.0/vapp/201"), URI
               .create("https://vcenterprise.bluelock.com/api/v1.0/vdc/1"), "new-linux-server", new CloneVAppOptions()
               .deploy().powerOn().description("The description of the new vApp")));

      assertRequestLineEquals(request,
               "POST https://vcenterprise.bluelock.com/api/v1.0/vdc/1/action/cloneVApp HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "Accept: application/vnd.vmware.vcloud.task+xml\n");
View Full Code Here

Examples of org.jclouds.vcloud.options.CloneVAppOptions

   public void testMoveVAppToVDCAndRenameOptions() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(VAppAsyncClient.class, "moveVAppToVDCAndRename", URI.class, URI.class, String.class,
               CloneVAppOptions[].class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of(URI
               .create("https://vcenterprise.bluelock.com/api/v1.0/vapp/201"), URI
               .create("https://vcenterprise.bluelock.com/api/v1.0/vdc/1"), "new-linux-server", new CloneVAppOptions()
               .deploy().powerOn().description("The description of the new vApp")));

      assertRequestLineEquals(request,
               "POST https://vcenterprise.bluelock.com/api/v1.0/vdc/1/action/cloneVApp HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "Accept: application/vnd.vmware.vcloud.task+xml\n");
View Full Code Here

Examples of org.jclouds.vcloud.options.CloneVAppOptions

   public void testCopyVAppToVDCAndNameOptions() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(VAppApi.class, "copyVAppToVDCAndName", URI.class, URI.class, String.class,
               CloneVAppOptions[].class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of(URI
               .create("https://vcenterprise.bluelock.com/api/v1.0/vapp/201"), URI
               .create("https://vcenterprise.bluelock.com/api/v1.0/vdc/1"), "new-linux-server", new CloneVAppOptions()
               .deploy().powerOn().description("The description of the new vApp")));

      assertRequestLineEquals(request,
               "POST https://vcenterprise.bluelock.com/api/v1.0/vdc/1/action/cloneVApp HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "Accept: application/vnd.vmware.vcloud.task+xml\n");
View Full Code Here

Examples of org.jclouds.vcloud.options.CloneVAppOptions

   public void testMoveVAppToVDCAndRenameOptions() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(VAppApi.class, "moveVAppToVDCAndRename", URI.class, URI.class, String.class,
               CloneVAppOptions[].class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of(URI
               .create("https://vcenterprise.bluelock.com/api/v1.0/vapp/201"), URI
               .create("https://vcenterprise.bluelock.com/api/v1.0/vdc/1"), "new-linux-server", new CloneVAppOptions()
               .deploy().powerOn().description("The description of the new vApp")));

      assertRequestLineEquals(request,
               "POST https://vcenterprise.bluelock.com/api/v1.0/vdc/1/action/cloneVApp HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "Accept: application/vnd.vmware.vcloud.task+xml\n");
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.