Package org.jclouds.rest.internal

Examples of org.jclouds.rest.internal.GeneratedHttpRequest


      checkFilters(request);
   }

   public void testRemoveVMFromVDC() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(VMAsyncApi.class, "removeVMFromVDC", String.class, String.class, String.class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of("11", "22", "33"));

      assertRequestLineEquals(request,
               "DELETE https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33 HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "");
      assertPayloadEquals(request, null, null, false);
View Full Code Here


      checkFilters(request);
   }

   public void testRemoveVM() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(VMAsyncApi.class, "removeVM", URI.class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of(URI
               .create("https://api.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/33")));

      assertRequestLineEquals(request,
               "DELETE https://api.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/33 HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "");
View Full Code Here

      checkFilters(request);
   }

   public void testPowerOffVM() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(VMAsyncApi.class, "powerOffVM", URI.class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of(URI
               .create("https://api.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/33")));

      assertRequestLineEquals(request,
               "POST https://api.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/33/action/powerOff HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "");
View Full Code Here

      checkFilters(request);
   }

   public void testPowerOnVM() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(VMAsyncApi.class, "powerOnVM", URI.class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of(URI
               .create("https://api.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/33")));

      assertRequestLineEquals(request,
               "POST https://api.savvis.net/rest/api/v0.8/org/11/vdc/22/vApp/33/action/powerOn HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "");
View Full Code Here

public class ServiceManagementAsyncApiTest extends BaseVPDCAsyncApiTest<ServiceManagementAsyncApi> {

   public void testPowerOnVMVDC() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(ServiceManagementAsyncApi.class, "powerOnVMInVDC", String.class, String.class,
               String.class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of("11", "22", "33"));

      assertRequestLineEquals(request,
               "POST https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33/action/powerOn HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "");
      assertPayloadEquals(request, null, null, false);
View Full Code Here

      checkFilters(request);
   }

   public void testPowerOnVM() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(ServiceManagementAsyncApi.class, "powerOnVM", URI.class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of(URI
               .create("https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33")));

      assertRequestLineEquals(request,
               "POST https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33/action/powerOn HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "");
View Full Code Here

   }

   public void testPowerOffVMVDC() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(ServiceManagementAsyncApi.class, "powerOffVMInVDC", String.class, String.class,
               String.class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of("11", "22", "33"));

      assertRequestLineEquals(request,
               "POST https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33/action/powerOff HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "");
      assertPayloadEquals(request, null, null, false);
View Full Code Here

      checkFilters(request);
   }

   public void testPowerOffVM() throws SecurityException, NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(ServiceManagementAsyncApi.class, "powerOffVM", URI.class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of(URI
               .create("https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33")));

      assertRequestLineEquals(request,
               "POST https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/vApp/33/action/powerOff HTTP/1.1");
      assertNonPayloadHeadersEqual(request, "");
View Full Code Here

public class FirewallAsyncApiTest extends BaseVPDCAsyncApiTest<FirewallAsyncApi> {

   public void testAddFirewallRule() throws NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(FirewallAsyncApi.class, "addFirewallRule", String.class, String.class,
               FirewallRule.class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of("11", "22", FirewallRule.builder().firewallType(
               "SERVER_TIER_FIREWALL").isEnabled(true).source("internet").destination("VM Tier01").port("22").protocol(
               "Tcp").policy("allow").description("Server Tier Firewall Rule").isLogged(false).build()));

      assertRequestLineEquals(request,
               "PUT https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/FirewallService HTTP/1.1");
View Full Code Here

   }

   public void testDeleteFirewallRule() throws NoSuchMethodException, IOException {
      Invokable<?, ?> method = method(FirewallAsyncApi.class, "deleteFirewallRule", String.class, String.class,
               FirewallRule.class);
      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of("11", "22", FirewallRule.builder().firewallType(
               "SERVER_TIER_FIREWALL").isEnabled(true).source("internet").destination("VM Tier01").port("22").protocol(
               "Tcp").policy("allow").description("Server Tier Firewall Rule").isLogged(false).build()));

      assertRequestLineEquals(request,
               "DELETE https://api.savvis.net/vpdc/v1.0/org/11/vdc/22/FirewallService HTTP/1.1");
View Full Code Here

TOP

Related Classes of org.jclouds.rest.internal.GeneratedHttpRequest

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.