Package org.jclouds.openstack.nova.v2_0.features

Examples of org.jclouds.openstack.nova.v2_0.features.FlavorApi


      ImageApi imageApi = api.getImageApiForZone(zoneId);
      return Iterables.getLast(imageApi.list().concat()).getId();
   }

   protected String flavorRefForZone(String zoneId) {
      FlavorApi flavorApi = api.getFlavorApiForZone(zoneId);
      return DEFAULT_FLAVOR_ORDERING.min(flavorApi.listInDetail().concat()).getId();
   }
View Full Code Here


      }

      @Override
      protected Function<Object, IterableWithMarker<Resource>> markerToNextForArg0(Optional<Object> arg0) {
         String zone = arg0.get().toString();
         final FlavorApi flavorApi = api.getFlavorApiForZone(zone);
         return new Function<Object, IterableWithMarker<Resource>>() {

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

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

      }

      @Override
      protected Function<Object, IterableWithMarker<Flavor>> markerToNextForArg0(Optional<Object> arg0) {
         String zone = arg0.get().toString();
         final FlavorApi flavorApi = api.getFlavorApiForZone(zone);
         return new Function<Object, IterableWithMarker<Flavor>>() {

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

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

      // 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();
   }

   protected String flavorRefForZone(String zoneId) {
      FlavorApi flavorApi = api.getFlavorApiForZone(zoneId);
      return DEFAULT_FLAVOR_ORDERING.min(flavorApi.listInDetail().concat()).getId();
   }
View Full Code Here

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

      @Override
      protected Function<Object, IterableWithMarker<Resource>> markerToNextForCallingArg0(final String zone) {
         final FlavorApi flavorApi = api.getFlavorApiForZone(zone);
         return new Function<Object, IterableWithMarker<Resource>>() {

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

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

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

      @Override
      protected Function<Object, IterableWithMarker<Flavor>> markerToNextForCallingArg0(final String zone) {
         final FlavorApi flavorApi = api.getFlavorApiForZone(zone);
         return new Function<Object, IterableWithMarker<Flavor>>() {

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

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

      ImageApi imageApi = api.getImageApiForZone(zoneId);
      return Iterables.getLast(imageApi.list().concat()).getId();
   }

   protected String flavorRefForZone(String zoneId) {
      FlavorApi flavorApi = api.getFlavorApiForZone(zoneId);
      return DEFAULT_FLAVOR_ORDERING.min(flavorApi.listInDetail().concat()).getId();
   }
View Full Code Here

      }

      @Override
      protected Function<Object, IterableWithMarker<Resource>> markerToNextForArg0(Optional<Object> arg0) {
         String zone = arg0.get().toString();
         final FlavorApi flavorApi = api.getFlavorApiForZone(zone);
         return new Function<Object, IterableWithMarker<Resource>>() {

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

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

      }

      @Override
      protected Function<Object, IterableWithMarker<Flavor>> markerToNextForArg0(Optional<Object> arg0) {
         String zone = arg0.get().toString();
         final FlavorApi flavorApi = api.getFlavorApiForZone(zone);
         return new Function<Object, IterableWithMarker<Flavor>>() {

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

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

      }

      @Override
      protected Function<Object, IterableWithMarker<Resource>> markerToNextForArg0(Optional<Object> arg0) {
         String region = arg0.get().toString();
         final FlavorApi flavorApi = api.getFlavorApi(region);
         return new Function<Object, IterableWithMarker<Resource>>() {

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

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

TOP

Related Classes of org.jclouds.openstack.nova.v2_0.features.FlavorApi

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.