Package org.jclouds.compute.domain

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


      builder.id(instance.getRegion() + "/" + instance.getId());
      String group = getGroupForInstance(instance);
      builder.group(group);
      // standard convention from aws-ec2, which might not be re-used outside.
      if (instance.getPrivateDnsName() != null)
         builder.hostname(instance.getPrivateDnsName().replaceAll("\\..*", ""));
      addCredentialsForInstance(builder, instance);
      builder.status(instanceToNodeStatus.get(instance.getInstanceState()));
      builder.backendStatus(instance.getRawState());

      // collect all ip addresses into one bundle in case the api mistakenly put a private address
View Full Code Here


   @Override
   public NodeMetadata apply(ServerDetails from) {
      NodeMetadataBuilder builder = new NodeMetadataBuilder();
      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);

      Map<String, String> metadataMap;
View Full Code Here

      // but wrong API response was returned to the user
      // http://bugs.cloud.com/show_bug.cgi?id=11664
      //
      // 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());
      if (from.getGroup() != null) {
         builder.group(from.getGroup());
      } else if (from.getDisplayName() != null) {
         builder.group(nodeNamingConvention.groupInUniqueNameOrNull(from.getDisplayName()));
View Full Code Here

      NodeMetadataBuilder builder = new NodeMetadataBuilder();
      builder.id(serverInZone.slashEncode());
      builder.providerId(from.getId());
      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);
      builder.group(groupFromMapOrName(from.getMetadata(), from.getName(), nodeNamingConvention));
      addMetadataAndParseTagsFromCommaDelimitedValue(builder, from.getMetadata());
      builder.imageId(ZoneAndId.fromZoneAndId(serverInZone.getZone(), from.getImage().getId()).slashEncode());
View Full Code Here

   public NodeMetadata apply(VirtualGuest from) {
      // convert the result object to a jclouds NodeMetadata
      NodeMetadataBuilder builder = new NodeMetadataBuilder();
      builder.ids(from.getId() + "");
      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()));
View Full Code Here

      NodeMetadataBuilder builder = new NodeMetadataBuilder();
      builder.id(machineInDatacenter.slashEncode());
      builder.providerId(from.getId());
      builder.name(from.getName());
      builder.hostname(from.getId());
      builder.location(zone);
      addMetadataAndParseTagsFromCommaDelimitedValue(builder, filterKeys(from.getMetadata(), new Predicate<String>() {

         @Override
         public boolean apply(String input) {
View Full Code Here

            metadataMap = ImmutableMap.of();
         }
      } else {
         metadataMap = ImmutableMap.of();
      }
      builder.hostname(from.getName());
      builder.location(findLocationForResourceInVDC.apply(from.getVDC()));
      builder.group(groupFromMapOrName(metadataMap, from.getName(), nodeNamingConvention));
      builder.operatingSystem(toComputeOs(from, null));
      builder.hardware(hardwareForVApp.apply(from));
      builder.status(vAppStatusToNodeStatus.get(from.getStatus()));
View Full Code Here

      NodeMetadataBuilder builder = new NodeMetadataBuilder();
      String id = idProvider.get() + "";
      builder.ids(id);
      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());
View Full Code Here

   @Override
   public NodeMetadata apply(Server from) {
      NodeMetadataBuilder builder = new NodeMetadataBuilder();
      builder.ids(from.getId() + "");
      builder.name(from.getName());
      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(groupFromMapOrName(from.getMetadata(), from.getName(), nodeNamingConvention));
      builder.imageId(from.getImageId() + "");
View Full Code Here

   public NodeMetadata apply(Node from) {
      NodeMetadataBuilder builder = new NodeMetadataBuilder();
      builder.ids(from.getId());
      builder.name(from.getName());
      builder.loginPort(from.getLoginPort());
      builder.hostname(from.getHostname());
      builder.location(findLocationWithId(from.getLocationId()));
      builder.group(from.getGroup());
      builder.tags(from.getTags());
      builder.userMetadata(from.getMetadata());
      builder.operatingSystem(OperatingSystem.builder().arch(from.getOsArch()).family(
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.