Package org.jclouds.openstack.v2_0.functions

Examples of org.jclouds.openstack.v2_0.functions.PresentWhenExtensionAnnotationNamespaceEqualsAnyNamespaceInExtensionsSetTest


      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


   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

   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

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

            @SuppressWarnings("unchecked")
            @Override
            public IterableWithMarker<ImageDetails> apply(Object input) {
               PaginationOptions paginationOptions = PaginationOptions.class.cast(input);
               Collection<String> markers = paginationOptions.buildQueryParameters().get("marker");

               if (!markers.isEmpty()) {
                  return IterableWithMarker.class.cast(imageApi.listInDetail(marker(getOnlyElement(markers))));
               }
               else {
View Full Code Here

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

            @SuppressWarnings("unchecked")
            @Override
            public IterableWithMarker<Image> apply(Object input) {
               PaginationOptions paginationOptions = PaginationOptions.class.cast(input);
               Collection<String> markers = paginationOptions.buildQueryParameters().get("marker");

               if (!markers.isEmpty()) {
                  return IterableWithMarker.class.cast(imageApi.listInDetail(marker(getOnlyElement(markers))));
               }
               else {
View Full Code Here

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

            @SuppressWarnings("unchecked")
            @Override
            public IterableWithMarker<Subnet> apply(Object input) {
               PaginationOptions paginationOptions = PaginationOptions.class.cast(input);
               return IterableWithMarker.class.cast(subnetApi.listInDetail(paginationOptions));
            }

            @Override
            public String toString() {
View Full Code Here

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

            @SuppressWarnings("unchecked")
            @Override
            public IterableWithMarker<ReferenceWithName> apply(Object input) {
               PaginationOptions paginationOptions = PaginationOptions.class.cast(input);
               return IterableWithMarker.class.cast(networkApi.list(paginationOptions));
            }

            @Override
            public String toString() {
View Full Code Here

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

            @SuppressWarnings("unchecked")
            @Override
            public IterableWithMarker<ReferenceWithName> apply(Object input) {
               PaginationOptions paginationOptions = PaginationOptions.class.cast(input);
               return IterableWithMarker.class.cast(portApi.listInDetail(paginationOptions));
            }

            @Override
            public String toString() {
View Full Code Here

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

            @SuppressWarnings("unchecked")
            @Override
            public IterableWithMarker<ReferenceWithName> apply(Object input) {
               PaginationOptions paginationOptions = PaginationOptions.class.cast(input);
               return IterableWithMarker.class.cast(portApi.list(paginationOptions));
            }

            @Override
            public String toString() {
View Full Code Here

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

            @SuppressWarnings("unchecked")
            @Override
            public IterableWithMarker<ReferenceWithName> apply(Object input) {
               PaginationOptions paginationOptions = PaginationOptions.class.cast(input);
               return IterableWithMarker.class.cast(subnetApi.list(paginationOptions));
            }

            @Override
            public String toString() {
View Full Code Here

TOP

Related Classes of org.jclouds.openstack.v2_0.functions.PresentWhenExtensionAnnotationNamespaceEqualsAnyNamespaceInExtensionsSetTest

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.