Package org.jclouds.cloudsigma2.options

Examples of org.jclouds.cloudsigma2.options.PaginationOptions


   @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


   }

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

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

   @Test
   public void testEditVLAN() throws Exception {
      Map<String, String> meta = Maps.newHashMap();
      meta.put("test", "test data");

      VLANInfo vlanInfo = new VLANInfo.Builder()
            .meta(meta)
            .build();

      if (api.listVLANs().size() > 0) {
         checkVlAN(vlanInfo, api.editVLAN(api.listVLANs().concat().get(0).getUuid(), vlanInfo));
View Full Code Here

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

      VLANInfo result = api.getVLANInfo(uuid);
      assertNotNull(result);
   }
View Full Code Here

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

      VLANInfo result = api.editVLAN(uuid, new VLANInfo.Builder().meta(meta).build());
      assertNotNull(result);
   }
View Full Code Here

   @Test
   public void testEditVLAN() throws Exception {
      Map<String, String> meta = Maps.newHashMap();
      meta.put("test", "test data");

      VLANInfo vlanInfo = new VLANInfo.Builder()
            .meta(meta)
            .build();

      if (api.listVLANs().size() > 0) {
         checkVlAN(vlanInfo, api.editVLAN(api.listVLANs().concat().get(0).getUuid(), vlanInfo));
View Full Code Here

      @Override
      protected Function<Object, IterableWithMarker<IPInfo>> markerToNextForArgs(List<Object> args) {
         return new Function<Object, IterableWithMarker<IPInfo>>() {
            @Override
            public IterableWithMarker<IPInfo> apply(Object input) {
               PaginationOptions paginationOptions = PaginationOptions.class.cast(input);
               return api.listIPInfo(paginationOptions);
            }
         };
      }
View Full Code Here

      @Override
      protected Function<Object, IterableWithMarker<ServerInfo>> markerToNextForArgs(List<Object> args) {
         return new Function<Object, IterableWithMarker<ServerInfo>>() {
            @Override
            public IterableWithMarker<ServerInfo> apply(Object input) {
               PaginationOptions paginationOptions = PaginationOptions.class.cast(input);
               return api.listServersInfo(paginationOptions);
            }
         };
      }
View Full Code Here

      @Override
      protected Function<Object, IterableWithMarker<IP>> markerToNextForArgs(List<Object> args) {
         return new Function<Object, IterableWithMarker<IP>>() {
            @Override
            public IterableWithMarker<IP> apply(Object input) {
               PaginationOptions paginationOptions = PaginationOptions.class.cast(input);
               return api.listIPs(paginationOptions);
            }
         };
      }
View Full Code Here

      @Override
      protected Function<Object, IterableWithMarker<Tag>> markerToNextForArgs(List<Object> args) {
         return new Function<Object, IterableWithMarker<Tag>>() {
            @Override
            public IterableWithMarker<Tag> apply(Object input) {
               PaginationOptions paginationOptions = PaginationOptions.class.cast(input);
               return api.listTags(paginationOptions);
            }
         };
      }
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.