Package org.jclouds.compute.domain

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


   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


   public NodeMetadata apply(VServerMetadata from) {
      NodeMetadataBuilder builder = new NodeMetadataBuilder();

      builder.ids(from.getId());
      builder.name(from.getName());
      builder.group(nodeNamingConvention.groupInUniqueNameOrNull(from
            .getName()));
      if (from.getStatus() == null)
         System.out.println("status null for: " + from.getId() + ": "
               + from.getName());
View Full Code Here

      NodeMetadataBuilder builder = new NodeMetadataBuilder();
      builder.ids(from.getHref().toASCIIString());
      builder.name(from.getName());
      String locationId = Iterables.get(from.getNetworkSection().getNetworks(), 0).getName();
      builder.location(from(locations.get()).firstMatch(LocationPredicates.idEquals(locationId)).orNull());
      builder.group(nodeNamingConvention.groupInUniqueNameOrNull(from.getName()));
      try {
         builder.operatingSystem(CIMOperatingSystem.toComputeOs(from.getOperatingSystemSection()));
      } catch (NullPointerException e) {
         // os section was null
      }
View Full Code Here

      builder.uri(from.getHref());
      builder.name(from.getName());
      builder.hostname(from.getName());
      builder.location(findLocationForResourceInVDC.apply(
            Iterables.find(from.getLinks(), LinkPredicates.typeEquals(VCloudDirectorMediaType.VDC))));
      builder.group(nodeNamingConvention.groupInUniqueNameOrNull(from.getName()));
      builder.operatingSystem(toComputeOs(from));
      builder.hardware(hardwareForVm.apply(from));
      builder.status(vAppStatusToNodeStatus.get(from.getStatus()));
      Set<String> addresses = getIpsFromVm(from);
      builder.publicAddresses(filter(addresses, not(IsPrivateIPAddress.INSTANCE)));
View Full Code Here

      // convert the result object to a jclouds NodeMetadata
      NodeMetadataBuilder builder = new NodeMetadataBuilder();
      builder.ids(from.getUuid() + "");
      builder.name(from.getAlias());
      builder.location(from(locations.get()).firstMatch(LocationPredicates.idEquals(from.getUuid() + "")).orNull());
      builder.group(nodeNamingConvention.groupInUniqueNameOrNull(from.getType()));
      builder.imageId(from.getType() + "");
      Image image = from(images.get()).firstMatch(ImagePredicates.idEquals(from.getUuid() + "")).orNull();
      if (image != null)
         builder.operatingSystem(image.getOperatingSystem());
      builder.hardware(from(hardware.get()).firstMatch(HardwarePredicates.idEquals(from.getUuid() + "")).orNull());
View Full Code Here

         }

      });
      addMetadataAndParseTagsFromCommaDelimitedValue(builder, metadataMap);

      builder.group(groupFromMapOrName(metadataMap, from.getName(), nodeNamingConvention));

      builder.imageId(DatacenterAndName.fromDatacenterAndName(machineInDatacenter.getDatacenter(), from.getDatasetURN())
            .slashEncode());
      builder.operatingSystem(findOperatingSystemForMachineOrNull(machineInDatacenter));
      builder.hardware(findHardwareForMachineOrNull(machineInDatacenter));
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.name(instance.getTags().get("Name"));
      addMetadataAndParseTagsFromValuesOfEmptyString(builder, instance.getTags());
      builder.providerId(instance.getId());
      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()));
View Full Code Here

   public NodeMetadata apply(ServerInfo from) {
      NodeMetadataBuilder builder = new NodeMetadataBuilder();
      builder.ids(from.getUuid());
      builder.name(from.getName());
      builder.location(locationSupplier.get());
      builder.group(nodeNamingConvention.groupInUniqueNameOrNull(from.getName()));

      String imageId = getImageIdFromServer.apply(from);
      if (imageId != null) {
         Optional<? extends Image> image = FluentIterable.from(images.get()).firstMatch(idEquals(imageId));
         if (image.isPresent()) {
View Full Code Here

      // convert the result object to a jclouds NodeMetadata
      NodeMetadataBuilder builder = new NodeMetadataBuilder();
      builder.ids(from.id + "");
      builder.name(from.name);
      builder.location(from(locations.get()).firstMatch(LocationPredicates.idEquals(from.datacenter)).orNull());
      builder.group(nodeNamingConvention.groupInUniqueNameOrNull(from.name));
      builder.imageId(from.imageId + "");
      Image image = from(images.get()).firstMatch(ImagePredicates.idEquals(from.imageId + "")).orNull();
      if (image != null)
         builder.operatingSystem(image.getOperatingSystem());
      builder.hardware(from(hardware.get()).firstMatch(HardwarePredicates.idEquals(from.hardwareId + "")).orNull());
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.