Package org.jclouds.cloudsigma2.options

Examples of org.jclouds.cloudsigma2.options.PaginationOptions$Builder


                  .build(),
            responseBuilder()
                  .payload(payloadFromResourceWithContentType("/libdrives-single.json", MediaType.APPLICATION_JSON))
                  .build());

      DriveInfo result = api.cloneLibraryDrive(uuid, new LibraryDrive.Builder()
            .media(org.jclouds.cloudsigma2.domain.MediaType.DISK)
            .name("test_drive_0")
            .size(new BigInteger("1024000000"))
            .allowMultimount(false)
            .build());
View Full Code Here


      }
   }

   @Test
   public void testCreateDrive() throws Exception {
      DriveInfo newDrive = new DriveInfo.Builder()
            .name("test drive")
            .size(new BigInteger("2073741824"))
            .media(MediaType.DISK)
            .build();
      createdDrive = api.createDrive(newDrive);
View Full Code Here

      }
   }

   @Test(dependsOnMethods = {"testCreateDrive"})
   public void testEditDrive() throws Exception {
      DriveInfo editedDrive = new DriveInfo.Builder()
            .name("Edited Drive")
            .size(createdDrive.getSize())
            .media(MediaType.DISK)
            .build();
View Full Code Here

   }

   @Override
   public <R extends HttpRequest> R bindToRequest(R request, Object input) {
      checkArgument(input instanceof FirewallPolicy, "this binder is only valid for FirewallPolicy!");
      FirewallPolicy create = FirewallPolicy.class.cast(input);
      JsonObject firewallJsonObject = policyJsonObjectFunction.apply(create);

      request.setPayload(firewallJsonObject.toString());
      request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
      return request;
View Full Code Here

      }
   }

   @Test
   public void testCreateFirewallPolicy() throws Exception {
      FirewallPolicy newFirewallPolicy = new FirewallPolicy.Builder()
            .name("My awesome policy")
            .rules(ImmutableList.of(
                  new FirewallRule.Builder()
                        .action(FirewallAction.DROP)
                        .comment("Drop traffic from the VM to IP address 23.0.0.0/32")
View Full Code Here

      checkFirewallPolicy(newFirewallPolicy, createdFirewallPolicy);
   }

   @Test(dependsOnMethods = {"testCreateFirewallPolicy"})
   public void testEditFirewallPolicy() throws Exception {
      FirewallPolicy editedPolicy = new FirewallPolicy.Builder()
            .name("Edited policy")
            .rules(ImmutableList.of(
                  new FirewallRule.Builder()
                        .action(FirewallAction.ACCEPT)
                        .comment("Edited policy rule comment")
View Full Code Here

                  .build(),
            responseBuilder()
                  .payload(payloadFromResourceWithContentType("/fwpolicies-single.json", MediaType.APPLICATION_JSON))
                  .build());

      FirewallPolicy result = api.createFirewallPolicy(new FirewallPolicy.Builder()
            .name("My awesome policy")
            .rules(ImmutableList.of(
                  new FirewallRule.Builder()
                        .action(FirewallAction.DROP)
                        .comment("Drop traffic from the VM to IP address 23.0.0.0/32")
View Full Code Here

                  .build(),
            responseBuilder()
                  .payload(payloadFromResourceWithContentType("/fwpolicies-single.json", MediaType.APPLICATION_JSON))
                  .build());

      FirewallPolicy result = api.editFirewallPolicy(uuid,
            new FirewallPolicy.Builder()
                  .name("My awesome policy")
                  .rules(ImmutableList.of(
                        new FirewallRule.Builder()
                              .action(FirewallAction.DROP)
View Full Code Here

      }
   }

   @Test
   public void testCreateFirewallPolicy() throws Exception {
      FirewallPolicy newFirewallPolicy = new FirewallPolicy.Builder()
            .name("My awesome policy")
            .rules(ImmutableList.of(
                  new FirewallRule.Builder()
                        .action(FirewallAction.DROP)
                        .comment("Drop traffic from the VM to IP address 23.0.0.0/32")
View Full Code Here

      checkFirewallPolicy(newFirewallPolicy, createdFirewallPolicy);
   }

   @Test(dependsOnMethods = {"testCreateFirewallPolicy"})
   public void testEditFirewallPolicy() throws Exception {
      FirewallPolicy editedPolicy = new FirewallPolicy.Builder()
            .name("Edited policy")
            .rules(ImmutableList.of(
                  new FirewallRule.Builder()
                        .action(FirewallAction.ACCEPT)
                        .comment("Edited policy rule comment")
View Full Code Here

TOP

Related Classes of org.jclouds.cloudsigma2.options.PaginationOptions$Builder

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.