Package org.jclouds.compute.domain

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


      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());
      builder.status(serverStatusToNodeStatus.get(from.status));
      builder.publicAddresses(ImmutableSet.<String> of(from.publicAddress));
      builder.privateAddresses(ImmutableSet.<String> of(from.privateAddress));
      builder.credentials(LoginCredentials.fromCredentials(credentialStore.get(from.id + "")));
View Full Code Here


      builder.group(nodeNamingConvention.groupInUniqueNameOrNull(from.getHostname()));

      Image image = images.getImage(from);
      if (image != null) {
         builder.imageId(image.getId());
         builder.operatingSystem(image.getOperatingSystem());
      }

      builder.hardware(hardware.getHardware(from));

      builder.status(serverStateToNodeStatus.get(from.getPowerState().getKeyName()));
View Full Code Here

      builder.name(from.getName());
      builder.hostname(from.getName());
      Location vdcLocation = findLocationForResourceInVDC.apply(from.getVDC());
      builder.location(vdcLocation);
      if (from.getOsType() != null && OSType.fromValue(from.getOsType()) != OSType.UNRECOGNIZED) {
         builder.operatingSystem(new CIMOperatingSystem(OSType.fromValue(from.getOsType()), "", null, from
                  .getOperatingSystemDescription()));
      } else if (from.getOperatingSystemDescription() != null) {
         OperatingSystem.Builder osBuilder = new OperatingSystem.Builder();
         if (from.getOsType() != null)
            osBuilder.name(from.getOsType() + "");
View Full Code Here

            osBuilder.name(from.getOsType() + "");
         osBuilder.family(ComputeServiceUtils.parseOsFamilyOrUnrecognized(from.getOperatingSystemDescription()));
         osBuilder.version("");
         osBuilder.is64Bit(from.getOperatingSystemDescription().indexOf("64") != -1);
         osBuilder.description(from.getOperatingSystemDescription());
         builder.operatingSystem(osBuilder.build());
      }
      builder.hardware(hardwareForVCloudExpressVApp.apply(from));
      builder.status(vAppStatusToNodeStatus.get(from.getStatus()));
      builder.publicAddresses(computeClient.getPublicAddresses(from.getHref()));
      builder.privateAddresses(computeClient.getPrivateAddresses(from.getHref()));
View Full Code Here

         builder.providerId(from.getID() + "");
         builder.name(from.getName());
         builder.location(findLocationForDomain.apply(from));
         builder.group(parseGroupFromName(from.getName()));

         builder.operatingSystem(new OperatingSystemBuilder().description(from.getOSType()).build());
         builder.hardware(findHardwareForDomain.apply(from));

         builder.state(domainStateToNodeState.get(from.getInfo().state));
         // builder.publicAddresses(ImmutableSet.<String> of(from.publicAddress));
         // builder.privateAddresses(ImmutableSet.<String> of(from.privateAddress));
View Full Code Here

      builder.hardware(parseHardware(from));
      builder.imageId(from.getImage().getId() + "");

      Image image = parseImage(from);
      if (image != null)
         builder.operatingSystem(image.getOperatingSystem());

      builder.status(serverStateToNodeStatus.get(from.getState()));
      builder.publicAddresses(ImmutableSet.of(from.getIp().getIp()));
      return builder.build();
   }
View Full Code Here

         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());
      builder.status(serverStateToNodeStatus.get(from.getState()));
View Full Code Here

      // extract the operating system from the image
      RegionAndName regionAndName = new RegionAndName(instance.getRegion(), instance.getImageId());
      try {
         Image image = imageMap.get().getUnchecked(regionAndName);
         if (image != null)
            builder.operatingSystem(image.getOperatingSystem());
      } catch (CacheLoader.InvalidCacheLoadException e) {
         logger.debug("image not found for %s: %s", regionAndName, e);
      } catch (UncheckedExecutionException e) {
         logger.debug("error getting image for %s: %s", regionAndName, e);
      }
View Full Code Here

                  && (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() + "")
        .name(from.getServiceOfferingName() + "")
View Full Code Here

      String imageId = getImageIdFromServer.apply(from);
      if (imageId != null) {
         Optional<? extends Image> image = FluentIterable.from(images.get()).firstMatch(idEquals(imageId));
         if (image.isPresent()) {
            builder.operatingSystem(image.get().getOperatingSystem());
         }
      }
      builder.hardware(new HardwareBuilder().ids(from.getUuid()).hypervisor("kvm")
            .processors(ImmutableList.of(new Processor(1, from.getCpu()))).ram(from.getMem())
            .volumes(Iterables.transform(from.getDevices().values(), deviceToVolume)).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.