Package org.jclouds.compute.domain

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


      builder.ids(from.getHref().toASCIIString());
      builder.uri(from.getHref());
      builder.name(from.getName());
      Link vdc = Iterables.find(checkNotNull(from, "from").getLinks(), LinkPredicates.typeEquals(VCloudDirectorMediaType.VDC));
      if (vdc != null) {
         builder.location(findLocationForResource.apply(vdc));
      } 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


      builder.name(template.getName());
      builder.description(template.getDescription());

      // Location information
      Datacenter region = regionMap.get().get(template.unwrap().getIdFromLink(ParentLinkName.DATACENTER));
      builder.location(datacenterToLocation.apply(region));

      // Only conversions have a status
      builder.status(Status.AVAILABLE);
      builder.backendStatus(Status.AVAILABLE.name()); // Abiquo images do not
                                                      // have a status
View Full Code Here

         return null;
      ImageBuilder builder = new ImageBuilder();
      builder.ids(from.getHref().toASCIIString());
      builder.uri(from.getHref());
      builder.name(from.getName());
      builder.location(findLocationForResource.apply(checkNotNull(parent, "parent")));
      builder.description(from.getDescription() != null ? from.getDescription() : from.getName());
      builder.operatingSystem(osParser.apply(from.getName()));
      builder.status(toPortableImageStatus.get(from.getStatus()));
      builder.defaultCredentials(credentialsProvider.apply(from));
      return builder.build();
View Full Code Here

      builder.name(template.getName());
      builder.description(template.getDescription());

      // Location information
      Datacenter region = regionMap.get().get(template.unwrap().getIdFromLink(ParentLinkName.DATACENTER));
      builder.location(datacenterToLocation.apply(region));

      // Only conversions have a status
      builder.status(Status.AVAILABLE);
      builder.backendStatus(Status.AVAILABLE.name()); // Abiquo images do not
                                                      // have a status
View Full Code Here

      builder.ids(from.getHref().toASCIIString());
      builder.uri(from.getHref());
      builder.name(from.getName());
      Link vdc = Iterables.find(checkNotNull(from, "from").getLinks(), LinkPredicates.typeEquals(VCloudDirectorMediaType.VDC));
      if (vdc != null) {
         builder.location(findLocationForResource.apply(vdc));
      } 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

         return null;
      ImageBuilder builder = new ImageBuilder();
      builder.ids(from.getHref().toASCIIString());
      builder.uri(from.getHref());
      builder.name(from.getName());
      builder.location(findLocationForResource.apply(checkNotNull(parent, "parent")));
      builder.description(from.getDescription() != null ? from.getDescription() : from.getName());
      builder.operatingSystem(osParser.apply(from.getName()));
      builder.status(toPortableImageStatus.get(from.getStatus()));
      builder.defaultCredentials(credentialsProvider.apply(from));
      return builder.build();
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.