Package org.jclouds.cloudsigma2.options

Examples of org.jclouds.cloudsigma2.options.PaginationOptions


                  .endTime(endTime)
                  .resource(SubscriptionResource.VLAN)
                  .discountAmount(10.5d)
                  .build()
      );
      SubscriptionCalculator subscriptionCalculator = api.calculateSubscriptions(subscriptionsToCalculate);
      List<CalcSubscription> calculatedSubscriptions = subscriptionCalculator.getSubscriptions();
      assertEquals(calculatedSubscriptions.size(), subscriptionsToCalculate.size());
      for (int i = 0; i < calculatedSubscriptions.size(); i++) {
         assertEquals(calculatedSubscriptions.get(i).getResource(), subscriptionsToCalculate.get(i).getResource());
      }
   }
View Full Code Here


            responseBuilder()
                  .payload(payloadFromResourceWithContentType("/subscriptioncalculator.json",
                        MediaType.APPLICATION_JSON))
                  .build());

      SubscriptionCalculator subscriptionCalculator = api.calculateSubscriptions(subscriptionsToCalculate);

      assertNotNull(subscriptionCalculator);
      for (int i = 0; i < subscriptionsToCalculate.size(); i++) {
         checkCalcSubscription(subscriptionCalculator.getSubscriptions().get(i), subscriptionsToCalculate.get(i));
      }
   }
View Full Code Here

                  .endTime(endTime)
                  .resource(SubscriptionResource.VLAN)
                  .discountAmount(10.5d)
                  .build()
      );
      SubscriptionCalculator subscriptionCalculator = api.calculateSubscriptions(subscriptionsToCalculate);
      List<CalcSubscription> calculatedSubscriptions = subscriptionCalculator.getSubscriptions();
      assertEquals(calculatedSubscriptions.size(), subscriptionsToCalculate.size());
      for (int i = 0; i < calculatedSubscriptions.size(); i++) {
         assertEquals(calculatedSubscriptions.get(i).getResource(), subscriptionsToCalculate.get(i).getResource());
      }
   }
View Full Code Here

   }

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

      JsonObject serverInfoJson = createTagRequestToJson.apply(create);
      request.setPayload(serverInfoJson.toString());
      request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
      return request;
View Full Code Here

   @Test(dependsOnMethods = {"testCreateDrive"})
   public void testCreateTag() throws Exception {
      Map<String, String> meta = Maps.newHashMap();
      meta.put("description", "Test tag");

      Tag newTag = new Tag.Builder()
            .meta(meta)
            .name("Cloudsigma2 Test tag")
            .meta(Maps.<String, String>newHashMap())
            .resources(ImmutableList.of(
                  new TagResource.Builder()
View Full Code Here

   @Test(dependsOnMethods = {"testCreateTag"})
   public void testEditTag() throws Exception {
      Map<String, String> meta = Maps.newHashMap();
      meta.put("description", "test tag");

      Tag editedTag = new Tag.Builder().meta(meta).name("Edited tag")
            .resources(ImmutableList.of(new TagResource.Builder().uuid(createdDrive.getUuid()).build())).build();

      checkTag(editedTag, api.editTag(createdTag.getUuid(), editedTag));
   }
View Full Code Here

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

      Tag result = api.getTagInfo(uuid);
      assertNotNull(result);
   }
View Full Code Here

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

      Tag result = api.editTag(uuid,
            new Tag.Builder()
                  .name("TagCreatedWithResource")
                  .resources(ImmutableList.of(
                        new TagResource.Builder().uuid("61bcc398-c034-42f1-81c9-f6d7f62c4ea0").build()
                        , new TagResource.Builder().uuid("8ac6ac13-a55e-4b01-bcf4-5eed7b60a3ed").build()
View Full Code Here

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

      Tag result = api.createTag(new Tag.Builder()
            .name("TagCreatedWithResource")
            .resources(ImmutableList.of(
                  new TagResource.Builder().uuid("61bcc398-c034-42f1-81c9-f6d7f62c4ea0").build(),
                  new TagResource.Builder().uuid("8ac6ac13-a55e-4b01-bcf4-5eed7b60a3ed").build(),
                  new TagResource.Builder().uuid("3610d935-514a-4552-acf3-a40dd0a5f961").build(),
View Full Code Here

   @Test(dependsOnMethods = {"testCreateDrive"})
   public void testCreateTag() throws Exception {
      Map<String, String> meta = Maps.newHashMap();
      meta.put("description", "Test tag");

      Tag newTag = new Tag.Builder()
            .meta(meta)
            .name("Cloudsigma2 Test tag")
            .meta(Maps.<String, String>newHashMap())
            .resources(ImmutableList.of(
                  new TagResource.Builder()
View Full Code Here

TOP

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

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.