Examples of PaginationOptions


Examples of org.jclouds.openstack.v2_0.options.PaginationOptions

               responseWithKeystoneAccess,
               authenticatedGET().endpoint(endpoint + "/v2.0/tenants").build(),
               HttpResponse.builder().statusCode(200).payload(
                        payloadFromResourceWithContentType("/tenant_list.json", APPLICATION_JSON)).build())
               .getTenantApi().get();
      Set<? extends Tenant> tenants = api.list(new PaginationOptions()).toSet();
      assertNotNull(tenants);
      assertFalse(tenants.isEmpty());

      assertEquals(tenants, expectedTenants);
   }
View Full Code Here

Examples of org.jclouds.openstack.v2_0.options.PaginationOptions

      UserApi api = requestsSendResponses(
            keystoneAuthWithUsernameAndPasswordAndTenantName, responseWithKeystoneAccess,
            authenticatedGET().endpoint(endpoint + "/v2.0/users").build(),
            HttpResponse.builder().statusCode(200).payload(payloadFromResourceWithContentType("/user_list.json", APPLICATION_JSON)).build())
            .getUserApi().get();
      PaginatedCollection<? extends User> users = api.list(new PaginationOptions());
      assertNotNull(users);
      assertFalse(users.isEmpty());


      assertEquals(users.toSet(), expectedUsers);
View Full Code Here

Examples of org.jclouds.openstack.v2_0.options.PaginationOptions

   public void testListUsersNotFound() {
      UserApi api = requestsSendResponses(
            keystoneAuthWithUsernameAndPasswordAndTenantName, responseWithKeystoneAccess,
            authenticatedGET().endpoint(endpoint + "/v2.0/users").build(),
            HttpResponse.builder().statusCode(404).build()).getUserApi().get();
      assertEquals( api.list(new PaginationOptions()).size(), 0);
   }
View Full Code Here

Examples of org.jclouds.openstack.v2_0.options.PaginationOptions

   public void testListUsersFailNotAuth() {
      UserApi api = requestsSendResponses(
            keystoneAuthWithUsernameAndPasswordAndTenantName, responseWithKeystoneAccess,
            authenticatedGET().endpoint(endpoint + "/v2.0/users").build(),
            HttpResponse.builder().statusCode(401).build()).getUserApi().get();
      api.list(new PaginationOptions());
   }
View Full Code Here

Examples of org.jclouds.openstack.v2_0.options.PaginationOptions

        
         return new Function<Object, IterableWithMarker<LoadBalancerUsage>>() {

            @Override
            public IterableWithMarker<LoadBalancerUsage> apply(Object input) {
               PaginationOptions paginationOptions = PaginationOptions.class.cast(input);
               IterableWithMarker<LoadBalancerUsage> list = reportApi.listLoadBalancerUsage(paginationOptions);
               return list;
            }

            @Override
View Full Code Here

Examples of org.jclouds.openstack.v2_0.options.PaginationOptions

         this.api = checkNotNull(api, "api");
         this.domainId = domainId;
      }

      public PaginatedCollection<Subdomain> apply(Object input) {
         PaginationOptions paginationOptions = (PaginationOptions) input;

         return api.listSubdomains(domainId, paginationOptions);
      }
View Full Code Here

Examples of org.jclouds.openstack.v2_0.options.PaginationOptions

      protected ListRecordsAtMarker(RecordApi api) {
         this.api = checkNotNull(api, "api");
      }

      public PaginatedCollection<RecordDetail> apply(Object input) {
         PaginationOptions paginationOptions = (PaginationOptions) input;

         return api.list(paginationOptions);
      }
View Full Code Here

Examples of org.jclouds.rackspace.cloudidentity.v2_0.options.PaginationOptions

      return Optional.absent();
   }

   private Object toPaginationOptions(Link link) {
      Multimap<String, String> queryParams = queryParser().apply(link.getHref().getRawQuery());
      PaginationOptions paginationOptions = PaginationOptions.Builder.queryParameters(queryParams);

      return paginationOptions;
   }
View Full Code Here

Examples of org.jclouds.rackspace.cloudidentity.v2_0.options.PaginationOptions

         this.api = checkNotNull(api, "api");
         this.domainId = domainId;
      }

      public PaginatedCollection<Subdomain> apply(Object input) {
         PaginationOptions paginationOptions = (PaginationOptions) input;

         return api.listSubdomains(domainId, paginationOptions);
      }
View Full Code Here

Examples of org.jclouds.rackspace.cloudidentity.v2_0.options.PaginationOptions

      protected ListRecordsAtMarker(RecordApi api) {
         this.api = checkNotNull(api, "api");
      }

      public PaginatedCollection<RecordDetail> apply(Object input) {
         PaginationOptions paginationOptions = (PaginationOptions) input;

         return api.list(paginationOptions);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.