Package org.jclouds.compute.domain

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


      builder.name(name);
      // using a predictable name so tests will pass
      builder.hostname(group);
      builder.tags(template.getOptions().getTags());
      builder.userMetadata(template.getOptions().getUserMetadata());
      builder.group(group);
      builder.location(location.get());
      builder.imageId(template.getImage().getId());
      builder.operatingSystem(template.getImage().getOperatingSystem());
      builder.status(Status.PENDING);
      builder.publicAddresses(ImmutableSet.<String> of(publicIpPrefix + id));
View Full Code Here


            // no op
         }
      }
      builder.hostname(from.getName());
      builder.location(findLocationForResourceInVDC.apply(from.getVDC()));
      builder.group(nodeNamingConvention.groupInUniqueNameOrNull(from.getName()));
      builder.operatingSystem(toComputeOs(from, null));
      builder.hardware(hardwareForVApp.apply(from));
      builder.status(vAppStatusToNodeStatus.get(from.getStatus()));
      Set<String> addresses = getIpsFromVApp(from);
      builder.publicAddresses(filter(addresses, not(IsPrivateIPAddress.INSTANCE)));
View Full Code Here

   public NodeMetadata apply(Droplet input) {
      NodeMetadataBuilder builder = new NodeMetadataBuilder();
      builder.ids(String.valueOf(input.getId()));
      builder.name(input.getName());
      builder.hostname(input.getName());
      builder.group(groupNamingConvention.extractGroup(input.getName()));

      builder.hardware(hardwares.get().get(String.valueOf(input.getSizeId())));

      final String regionIdPattern = input.getRegionId() + "/";
      builder.location(find(locations.get(), new Predicate<Location>() {
View Full Code Here

   public NodeMetadata apply(final VirtualMachine vm) {
      NodeMetadataBuilder builder = new NodeMetadataBuilder();
      builder.ids(vm.getId().toString());
      builder.uri(vm.getURI());
      builder.name(vm.getNameLabel());
      builder.group(vm.getVirtualAppliance().getName());

      // TODO: Node credentials still not present in Abiquo template metadata
      // Will be added in Abiquo 2.4:
      // http://jira.abiquo.com/browse/ABICLOUDPREMIUM-3647
View Full Code Here

      //
      // we set displayName to the same value as name, but this could be wrong
      // on hosts not started with jclouds
      builder.hostname(from.getDisplayName());
      builder.location(FluentIterable.from(locations.get()).firstMatch(idEquals(from.getZoneId())).orNull());
      builder.group(nodeNamingConvention.groupInUniqueNameOrNull(from.getDisplayName()));
      Image image = FluentIterable.from(images.get()).firstMatch(new Predicate<Image>() {
         @Override
         public boolean apply(Image input) {
            return input.getProviderId().equals(from.getTemplateId() + "")
            // either location free image (location is null) or in the same zone as the VM
View Full Code Here

      builder.ids(from.getId() + "");
      builder.name(from.getHostname());
      builder.hostname(from.getHostname());
      Location location = FluentIterable.from(locations.get()).firstMatch(idEquals(from.getDatacenter())).orNull();
      checkState(location != null, "no location matched ServerDetails %s", from);
      builder.group(nodeNamingConvention.groupInUniqueNameOrNull(from.getHostname()));
     
      // TODO: get glesys to stop stripping out equals and commas!
      if (!isNullOrEmpty(from.getDescription()) && from.getDescription().matches("^[0-9A-Fa-f]+$")) {
         String decoded = new String(base16().lowerCase().decode(from.getDescription()), UTF_8);
         addMetadataAndParseTagsFromCommaDelimitedValue(builder,
View Full Code Here

      builder.name(from.getHostname());
      builder.hostname(from.getHostname());
      if (from.getDatacenter() != null)
         builder.location(from(locations.get()).firstMatch(
               LocationPredicates.idEquals(from.getDatacenter().getId() + "")).orNull());
      builder.group(nodeNamingConvention.groupInUniqueNameOrNull(from.getHostname()));

      Image image = images.getImage(from);
      if (image != null) {
         builder.imageId(image.getId());
         builder.operatingSystem(image.getOperatingSystem());
View Full Code Here

      }
      builder.hardware(hardwareForVCloudExpressVApp.apply(from));
      builder.status(vAppStatusToNodeStatus.get(from.getStatus()));
      builder.publicAddresses(computeClient.getPublicAddresses(from.getHref()));
      builder.privateAddresses(computeClient.getPrivateAddresses(from.getHref()));
      builder.group(nodeNamingConvention.groupInUniqueNameOrNull(from.getName()));
      builder.credentials(LoginCredentials.fromCredentials(credentialStore
               .get("node#" + from.getHref().toASCIIString())));
      return builder.build();
   }
}
View Full Code Here

      builder.name(from.getName());
      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(
View Full Code Here

   public NodeMetadata apply(Droplet input) {
      NodeMetadataBuilder builder = new NodeMetadataBuilder();
      builder.ids(String.valueOf(input.getId()));
      builder.name(input.getName());
      builder.hostname(input.getName());
      builder.group(groupNamingConvention.extractGroup(input.getName()));

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

      Optional<? extends Image> image = findImage(input.getImageId());
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.