Package org.jclouds.compute.domain

Examples of org.jclouds.compute.domain.ImageBuilder.location()


      ImageBuilder builder = new ImageBuilder().ids(template.getId() + "").name(template.getName())
            .description(template.getDisplayText()).operatingSystem(os);

      if (!template.isCrossZones())
         builder.location(FluentIterable.from(locations.get()).firstMatch(idEquals(template.getZoneId())).orNull());

      //TODO: implement status mapping!!!
      builder.status(Status.AVAILABLE);
      return builder.build();
   }
View Full Code Here


      ImageBuilder builder = new ImageBuilder();
      builder.ids(from.getHref().toASCIIString());
      builder.uri(from.getHref());
      builder.name(from.getName());
      if (from.getVDC() != null) {
         builder.location(findLocationForResource.apply(from.getVDC()));
      } else {
         // otherwise, it could be in a public catalog, which is not assigned to a VDC
      }
      builder.description(from.getDescription() != null ? from.getDescription() : from.getName());
      builder.operatingSystem(CIMOperatingSystem.toComputeOs(ovf));
View Full Code Here

      reviseParsedImage.reviseParsedImage(from, builder, family, osBuilder);

      builder.defaultCredentials(credentialProvider.apply(from));

      try {
         builder.location(Iterables.find(locations.get(), new Predicate<Location>() {

            @Override
            public boolean apply(Location input) {
               return input.getId().equals(from.getRegion());
            }
View Full Code Here

            }

         }));
      } catch (NoSuchElementException e) {
         logger.error("unknown region %s for image %s; not in %s", from.getRegion(), from.getId(), locations);
         builder.location(new LocationBuilder().scope(LocationScope.REGION).id(from.getRegion()).description(
                  from.getRegion()).parent(defaultLocation.get()).build());
      }
      builder.operatingSystem(osBuilder.build());
      builder.status(toPortableImageStatus.get(from.getImageState()));
      builder.backendStatus(from.getRawState());
View Full Code Here

      ImageBuilder builder = new ImageBuilder().ids(template.getId() + "").name(template.getName())
            .description(template.getDisplayText()).operatingSystem(os);

      if (!template.isCrossZones())
         builder.location(FluentIterable.from(locations.get()).firstMatch(idEquals(template.getZoneId())).orNull());

      //TODO: implement status mapping!!!
      builder.status(Status.AVAILABLE);
      return builder.build();
   }
View Full Code Here

      ImageBuilder builder = new ImageBuilder();
      builder.ids(from.getHref().toASCIIString());
      builder.uri(from.getHref());
      builder.name(from.getName());
      if (from.getVDC() != null) {
         builder.location(findLocationForResource.apply(from.getVDC()));
      } else {
         // otherwise, it could be in a public catalog, which is not assigned to a VDC
      }
      builder.description(from.getDescription() != null ? from.getDescription() : from.getName());
      builder.operatingSystem(CIMOperatingSystem.toComputeOs(ovf));
View Full Code Here

      reviseParsedImage.reviseParsedImage(from, builder, family, osBuilder);

      builder.defaultCredentials(credentialProvider.apply(from));

      try {
         builder.location(Iterables.find(locations.get(), new Predicate<Location>() {

            @Override
            public boolean apply(Location input) {
               return input.getId().equals(from.getRegion());
            }
View Full Code Here

            }

         }));
      } catch (NoSuchElementException e) {
         logger.error("unknown region %s for image %s; not in %s", from.getRegion(), from.getId(), locations);
         builder.location(new LocationBuilder().scope(LocationScope.REGION).id(from.getRegion()).description(
                  from.getRegion()).parent(defaultLocation.get()).build());
      }
      builder.operatingSystem(osBuilder.build());
      builder.status(toPortableImageStatus.get(from.getImageState()));
      builder.backendStatus(from.getRawState());
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.