Package org.jclouds.openstack.glance.v1_0.features

Examples of org.jclouds.openstack.glance.v1_0.features.ImageApi


            list, listResponse);

      assertEquals(apiWhenExist.getConfiguredZones(), ImmutableSet.of("az-1.region-a.geo-1"));

      assertEquals(apiWhenExist.getImageApiForZone("az-1.region-a.geo-1").list().concat().toString(),
            new ParseImagesTest().expected().toString());
   }
View Full Code Here


      GlanceApi apiWhenExist = requestsSendResponses(keystoneAuthWithUsernameAndPassword,
            responseWithKeystoneAccess, versionNegotiationRequest, versionNegotiationResponse,
            list, listResponse);

      assertEquals(apiWhenExist.getImageApiForZone("az-1.region-a.geo-1").list().concat().toString(),
            new ParseImagesTest().expected().toString());
   }
View Full Code Here

      GlanceApi apiWhenExist = requestsSendResponses(keystoneAuthWithUsernameAndPassword,
            localResponseWithKeystoneAccess, versionNegotiationRequest, versionNegotiationResponse,
            list, listResponse);

      assertEquals(apiWhenExist.getImageApiForZone("az-1.region-a.geo-1").list().concat().toString(),
            new ParseImagesTest().expected().toString());
   }
View Full Code Here

         }
      }
   }
  
   protected String imageIdForZone(String zoneId) {
      ImageApi imageApi = api.getImageApiForZone(zoneId);
      return Iterables.getLast(imageApi.list().concat()).getId();
   }
View Full Code Here

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

      @Override
      protected Function<Object, IterableWithMarker<Image>> markerToNextForCallingArg0(final String zone) {
         final ImageApi imageApi = api.getImageApiForZone(zone);
         return new Function<Object, IterableWithMarker<Image>>() {

            @SuppressWarnings("unchecked")
            @Override
            public IterableWithMarker<Image> apply(Object input) {
               return IterableWithMarker.class.cast(imageApi.listInDetail(marker(input.toString())));
            }

            @Override
            public String toString() {
               return "listInDetail()";
View Full Code Here

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

      @Override
      protected Function<Object, IterableWithMarker<Resource>> markerToNextForCallingArg0(final String zone) {
         final ImageApi imageApi = api.getImageApiForZone(zone);
         return new Function<Object, IterableWithMarker<Resource>>() {

            @SuppressWarnings("unchecked")
            @Override
            public IterableWithMarker<Resource> apply(Object input) {
               return IterableWithMarker.class.cast(imageApi.list(marker(input.toString())));
            }

            @Override
            public String toString() {
               return "list()";
View Full Code Here

         }
      }
   }

   protected String imageIdForZone(String zoneId) {
      ImageApi imageApi = api.getImageApiForZone(zoneId);

      // Get the first image from the list as it tends to be "lighter" and faster to start
      return Iterables.get(imageApi.list().concat(), 0).getId();
   }
View Full Code Here

  }

  @Override
  public List<Image> doRequest(NovaApi api) {
    List<Image> images = Lists.newArrayList();
    ImageApi imageApi = api.getImageApiForZone(getAccount().getRegion());
    Iterable<? extends Image> regionImages = imageApi.listInDetail()
        .concat();
    Iterables.addAll(images, regionImages);
    return images;
  }
View Full Code Here

         }
      }
   }
  
   protected String imageIdForZone(String zoneId) {
      ImageApi imageApi = api.getImageApiForZone(zoneId);
      return Iterables.getLast(imageApi.list().concat()).getId();
   }
View Full Code Here

      }

      @Override
      protected Function<Object, IterableWithMarker<Image>> markerToNextForArg0(Optional<Object> arg0) {
         String zone = arg0.get().toString();
         final ImageApi imageApi = api.getImageApiForZone(zone);
         return new Function<Object, IterableWithMarker<Image>>() {

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

            @Override
            public String toString() {
               return "listInDetail()";
View Full Code Here

TOP

Related Classes of org.jclouds.openstack.glance.v1_0.features.ImageApi

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.