Examples of providerId()


Examples of com.opengamma.master.position.ManageablePosition.providerId()

      }
      mtrade.setAttributes(trade.getAttributes());
      manageableTrades.add(mtrade);
    }
    manageablePosition.setTrades(manageableTrades);
    final String providerIdFieldName = manageablePosition.providerId().name();
    if (position.getAttributes().containsKey(providerIdFieldName)) {
      // this is here to preserve the provider id when round-tripping to and from the resolved vs managed positions.
      manageablePosition.setProviderId(ExternalId.parse(position.getAttributes().get(providerIdFieldName)));
    } else {
      manageablePosition.setProviderId(position.getUniqueId().toExternalId());
View Full Code Here

Examples of org.jclouds.compute.domain.ComputeMetadataBuilder.providerId()

            && !blackListVAppNames.contains(resource.getName());
   }

   private ComputeMetadata convertVAppToComputeMetadata(ReferenceType vdc, ReferenceType resource) {
      ComputeMetadataBuilder builder = new ComputeMetadataBuilder(ComputeType.NODE);
      builder.providerId(resource.getHref().toASCIIString());
      builder.name(resource.getName());
      builder.id(resource.getHref().toASCIIString());
      builder.location(findLocationForResourceInVDC.apply(vdc));
      return builder.build();
   }
View Full Code Here

Examples of org.jclouds.compute.domain.ComputeMetadataBuilder.providerId()

            && !blackListVAppNames.contains(resource.getName());
   }

   private ComputeMetadata convertVAppToComputeMetadata(ReferenceType vdc, ReferenceType resource) {
      ComputeMetadataBuilder builder = new ComputeMetadataBuilder(ComputeType.NODE);
      builder.providerId(resource.getHref().toASCIIString());
      builder.name(resource.getName());
      builder.id(resource.getHref().toASCIIString());
      builder.location(findLocationForResourceInVDC.apply(vdc));
      return builder.build();
   }
View Full Code Here

Examples of org.jclouds.compute.domain.HardwareBuilder.providerId()

   public Hardware apply(final VirtualMachineTemplateInVirtualDatacenter templateInVirtualDatacenter) {
      VirtualMachineTemplate template = templateInVirtualDatacenter.getTemplate();
      VirtualDatacenter virtualDatacenter = templateInVirtualDatacenter.getZone();

      HardwareBuilder builder = new HardwareBuilder();
      builder.providerId(template.getId().toString());
      builder.id(template.getId().toString() + "/" + virtualDatacenter.getId());
      builder.uri(template.getURI());

      builder.name(template.getName());
      builder.processor(new Processor(template.getCpuRequired(), DEFAULT_CORE_SPEED));
View Full Code Here

Examples of org.jclouds.compute.domain.HardwareBuilder.providerId()

   @Override
   public Hardware apply(Size input) {
      HardwareBuilder builder = new HardwareBuilder();
      builder.id(input.getSlug());
      builder.providerId(String.valueOf(input.getId()));
      builder.name(input.getName());
      builder.ram(input.getMemory());
      // DigitalOcean does not provide the processor speed. We configure it to
      // make the bigger template the faster.
      builder.processor(new Processor(input.getCpu(), input.getCpu()));
View Full Code Here

Examples of org.jclouds.compute.domain.HardwareBuilder.providerId()

   public Hardware apply(final VirtualMachineTemplateInVirtualDatacenter templateInVirtualDatacenter) {
      VirtualMachineTemplate template = templateInVirtualDatacenter.getTemplate();
      VirtualDatacenter virtualDatacenter = templateInVirtualDatacenter.getZone();

      HardwareBuilder builder = new HardwareBuilder();
      builder.providerId(template.getId().toString());
      builder.id(template.getId().toString() + "/" + virtualDatacenter.getId());
      builder.uri(template.getURI());

      builder.name(template.getName());
      builder.processor(new Processor(template.getCpuRequired(), DEFAULT_CORE_SPEED));
View Full Code Here

Examples of org.jclouds.compute.domain.HardwareBuilder.providerId()

  public Hardware apply(Domain from) {
    HardwareBuilder builder = new HardwareBuilder();

    try {
      builder.id(from.getUUIDString());
      builder.providerId(from.getID() + "");
      builder.name(from.getName());
      List<Processor> processors = Lists.newArrayList();
      for (int i = 0; i < from.getInfo().nrVirtCpu; i++) {
        processors.add(new Processor(i + 1, 1));
      }
View Full Code Here

Examples of org.jclouds.compute.domain.HardwareBuilder.providerId()

   @Override
   public Hardware apply(Size input) {
      HardwareBuilder builder = new HardwareBuilder();
      builder.id(input.getSlug());
      builder.providerId(String.valueOf(input.getId()));
      builder.name(input.getName());
      builder.ram(input.getMemory());
      // DigitalOcean does not provide the processor speed. We configure it to
      // make the bigger template the faster.
      builder.processor(new Processor(input.getCpu(), input.getCpu()));
View Full Code Here

Examples of org.jclouds.compute.domain.ImageBuilder.providerId()

   @Override
   public org.jclouds.compute.domain.Image apply(final Image input) {
      ImageBuilder builder = new ImageBuilder();
      // Private images don't have a slug
      builder.id(input.getSlug() != null ? input.getSlug() : String.valueOf(input.getId()));
      builder.providerId(String.valueOf(input.getId()));
      builder.name(input.getName());
      builder.description(input.getName());
      builder.status(Status.AVAILABLE);

      OperatingSystem os = input.getOs();
View Full Code Here

Examples of org.jclouds.compute.domain.ImageBuilder.providerId()

   public Image apply(final org.jclouds.ec2.domain.Image from) {
      if (from.getImageType() != ImageType.MACHINE) {
         return null;
      }
      ImageBuilder builder = new ImageBuilder();
      builder.providerId(from.getId());
      builder.id(from.getRegion() + "/" + from.getId());
      builder.name(from.getName());
      builder.description(from.getDescription() != null ? from.getDescription() : from.getImageLocation());
      builder.userMetadata(ImmutableMap.<String, String> builder().put("owner", from.getImageOwnerId()).put(
               "rootDeviceType", from.getRootDeviceType().value()).put("virtualizationType",
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.