Package org.jclouds.compute.domain

Examples of org.jclouds.compute.domain.NodeMetadataBuilder.imageId()


      builder.name(from.getName());
      Location location = Iterables.find(locations.get(), LocationPredicates.idEquals(from.getDatacenter().getId() + ""));
      builder.location(location);
      builder.group(nodeNamingConvention.groupInUniqueNameOrNull(from.getName()));
      builder.hardware(parseHardware(from));
      builder.imageId(from.getImage().getId() + "");

      Image image = parseImage(from);
      if (image != null)
         builder.operatingSystem(image.getOperatingSystem());
View Full Code Here


         String decoded = new String(base16().lowerCase().decode(from.getDescription()), UTF_8);
         addMetadataAndParseTagsFromCommaDelimitedValue(builder,
                  Splitter.on('\n').withKeyValueSeparator("=").split(decoded));
      }

      builder.imageId(from.getTemplateName() + "");
      builder.operatingSystem(parseOperatingSystem(from));
      builder.hardware(new HardwareBuilder().ids(from.getId() + "").ram(from.getMemorySizeMB())
            .processors(ImmutableList.of(new Processor(from.getCpuCores(), 1.0)))
            .volumes(ImmutableList.<Volume> of(new VolumeImpl((float) from.getDiskSizeGB(), true, true)))
            .hypervisor(from.getPlatform()).build());
View Full Code Here

      builder.publicAddresses(filter(addresses, not(IsPrivateIPAddress.INSTANCE)));
      builder.privateAddresses(filter(addresses, IsPrivateIPAddress.INSTANCE));
      builder.hardware(parseHardware(instance));
      Location location = getLocationForAvailabilityZoneOrRegion(instance);
      builder.location(location);
      builder.imageId(instance.getRegion() + "/" + instance.getImageId());

      // extract the operating system from the image
      RegionAndName regionAndName = new RegionAndName(instance.getRegion(), instance.getImageId());
      try {
         Image image = imageMap.get().getUnchecked(regionAndName);
View Full Code Here

            // either location free image (location is null) or in the same zone as the VM
                  && (input.getLocation() == null || input.getId().equals(from.getZoneId() + ""));
         }
      }).orNull();
      if (image != null) {
         builder.imageId(image.getId());
         builder.operatingSystem(image.getOperatingSystem());
      }

      builder.hardware(new HardwareBuilder()
        .ids(from.getServiceOfferingId() + "")
View Full Code Here

      builder.hostname(from.getName());
      builder.location(from.getHostId() != null ? new LocationBuilder().scope(LocationScope.HOST).id(from.getHostId())
            .description(from.getHostId()).parent(zone).build() : zone);
      addMetadataAndParseTagsFromCommaDelimitedValue(builder, from.getMetadata());
      builder.group(nodeNamingConvention.groupInUniqueNameOrNull(from.getName()));
      builder.imageId(ZoneAndId.fromZoneAndId(serverInZone.getZone(), from.getImage().getId()).slashEncode());
      builder.operatingSystem(findOperatingSystemForServerOrNull(serverInZone));
      builder.hardware(findHardwareForServerOrNull(serverInZone));
      builder.status(toPortableNodeStatus.get(from.getStatus()));
      builder.publicAddresses(filter(
            transform(filter(from.getAddresses().values(), Predicates.not(isPrivateAddress)),
View Full Code Here

      builder.hostname(from.getName());
      builder.location(new LocationBuilder().scope(LocationScope.HOST).id(from.getHostId()).description(
               from.getHostId()).parent(location.get()).build());
      addMetadataAndParseTagsFromCommaDelimitedValue(builder, from.getMetadata());
      builder.group(nodeNamingConvention.groupInUniqueNameOrNull(from.getName()));
      builder.imageId(from.getImageId() + "");
      builder.operatingSystem(parseOperatingSystem(from));
      builder.hardware(parseHardware(from));
      builder.status(serverToNodeStatus.get(from.getStatus()));
      builder.publicAddresses(from.getAddresses().getPublicAddresses());
      builder.privateAddresses(from.getAddresses().getPrivateAddresses());
View Full Code Here

      builder.hardware(getHardware(input.getSizeId()));
      builder.location(getLocation(input.getRegionId()));

      Optional<? extends Image> image = findImage(input.getImageId());
      if (image.isPresent()) {
         builder.imageId(image.get().getId());
         builder.operatingSystem(image.get().getOperatingSystem());
      } else {
         logger.info(">> image with id %s for droplet %s was not found. "
               + "This might be because the image that was used to create the droplet has a new id.",
               input.getImageId(), input.getId());
View Full Code Here

            Map<URI, ? extends Image> imagesMap = images.get();

            Image image = checkNotNull(imagesMap.get(imageUri),
                                       "no image for %s. images: %s", imageUri,
                                       imagesMap.values());
            builder.imageId(image.getId());
         } catch (IllegalArgumentException e) {
            // Swallow any exception here - it just means we don't actually have a valid image URI, so we skip it.
         }
      }
View Full Code Here

            // either location free image (location is null) or in the same zone as the VM
                  && (input.getLocation() == null || input.getId().equals(from.getZoneId() + ""));
         }
      }).orNull();
      if (image != null) {
         builder.imageId(image.getId());
         builder.operatingSystem(image.getOperatingSystem());
      }

      builder.hardware(new HardwareBuilder()
        .ids(from.getServiceOfferingId() + "")
View Full Code Here

            .description(from.getHostId()).parent(region).build() : region);
      builder.group(groupFromMapOrName(from.getMetadata(), from.getName(), nodeNamingConvention));
      addMetadataAndParseTagsFromCommaDelimitedValue(builder, from.getMetadata());

      if (from.getImage() != null) {
         builder.imageId(RegionAndId.fromRegionAndId(serverInRegion.getRegion(), from.getImage().getId()).slashEncode());
      }

      builder.operatingSystem(findOperatingSystemForServerOrNull(serverInRegion));
      builder.hardware(findHardwareForServerOrNull(serverInRegion));
      builder.status(toPortableNodeStatus.get(from.getStatus()));
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.