Package org.jclouds.http

Examples of org.jclouds.http.HttpRequest$ConcreteBuilder


      assertNull(api.get("testimage1"));
   }

   public void testInsertDiskResponseIs2xx() {
      HttpRequest insert = HttpRequest
              .builder()
              .method("POST")
              .endpoint("https://www.googleapis.com/compute/v1beta13/projects/myproject/disks")
              .addHeader("Accept", "application/json")
              .addHeader("Authorization", "Bearer " + TOKEN)
View Full Code Here


              ".com/compute/v1beta13/projects/myproject/zones/us-central1-a"))
              , new ParseOperationTest().expected());
   }

   public void testDeleteDiskResponseIs2xx() {
      HttpRequest delete = HttpRequest
              .builder()
              .method("DELETE")
              .endpoint("https://www.googleapis" +
                      ".com/compute/v1beta13/projects/myproject/disks/testimage1")
              .addHeader("Accept", "application/json")
View Full Code Here

      assertEquals(api.delete("testimage1"),
              new ParseOperationTest().expected());
   }

   public void testDeleteDiskResponseIs4xx() {
      HttpRequest delete = HttpRequest
              .builder()
              .method("DELETE")
              .endpoint("https://www.googleapis" +
                      ".com/compute/v1beta13/projects/myproject/disks/testimage1")
              .addHeader("Accept", "application/json")
View Full Code Here

      assertNull(api.delete("testimage1"));
   }

   public void testListDisksResponseIs2xx() {
      HttpRequest list = HttpRequest
              .builder()
              .method("GET")
              .endpoint("https://www.googleapis" +
                      ".com/compute/v1beta13/projects/myproject/disks")
              .addHeader("Accept", "application/json")
View Full Code Here

      assertEquals(api.listFirstPage().toString(),
              new ParseDiskListTest().expected().toString());
   }

   public void testListDisksResponseIs4xx() {
      HttpRequest list = HttpRequest
              .builder()
              .method("GET")
              .endpoint("https://www.googleapis" +
                      ".com/compute/v1beta13/projects/myproject/disks")
              .addHeader("Accept", "application/json")
View Full Code Here

      return payload;
   }


   public void testGetFirewallResponseIs4xx() throws Exception {
      HttpRequest get = HttpRequest
              .builder()
              .method("GET")
              .endpoint("https://www.googleapis" +
                      ".com/compute/v1beta13/projects/myproject/firewalls/jclouds-test")
              .addHeader("Accept", "application/json")
View Full Code Here

      assertNull(api.get("jclouds-test"));
   }

   public void testInsertFirewallResponseIs2xx() throws IOException {

      HttpRequest request = HttpRequest
              .builder()
              .method("POST")
              .endpoint("https://www.googleapis.com/compute/v1beta13/projects/myproject/firewalls")
              .addHeader("Accept", "application/json")
              .addHeader("Authorization", "Bearer " + TOKEN)
View Full Code Here

                      .addTargetTag("tag2")), new ParseOperationTest().expected());

   }

   public void testUpdateFirewallResponseIs2xx() throws IOException {
      HttpRequest update = HttpRequest
              .builder()
              .method("PUT")
              .endpoint("https://www.googleapis.com/compute/v1beta13/projects/myproject/firewalls/myfw")
              .addHeader("Accept", "application/json")
              .addHeader("Authorization", "Bearer " + TOKEN)
View Full Code Here

                      .addSourceRange("10.0.1.0/32")
                      .addTargetTag("tag2")), new ParseOperationTest().expected());
   }

   public void testPatchFirewallResponseIs2xx() throws IOException {
      HttpRequest update = HttpRequest
              .builder()
              .method("PATCH")
              .endpoint("https://www.googleapis.com/compute/v1beta13/projects/myproject/firewalls/myfw")
              .addHeader("Accept", "application/json")
              .addHeader("Authorization", "Bearer " + TOKEN)
View Full Code Here

                      .addSourceRange("10.0.1.0/32")
                      .addTargetTag("tag2")), new ParseOperationTest().expected());
   }

   public void testDeleteFirewallResponseIs2xx() {
      HttpRequest delete = HttpRequest
              .builder()
              .method("DELETE")
              .endpoint("https://www.googleapis" +
                      ".com/compute/v1beta13/projects/myproject/firewalls/default-allow-internal")
              .addHeader("Accept", "application/json")
View Full Code Here

TOP

Related Classes of org.jclouds.http.HttpRequest$ConcreteBuilder

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.