Examples of ram()


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

   public Hardware apply(VMSpec from) {
      HardwareBuilder builder = new HardwareBuilder();
      builder.ids(from.toString());
      for (int i = 0; i < from.getProcessorCount(); i++)
         builder.processor(new Processor(1, 3.0));
      builder.ram(from.getMemoryInGig() * 1024);
      builder.volume(new VolumeBuilder().type(Volume.Type.LOCAL).device(from.getBootDeviceName()).size(
               new Float(from.getBootDiskSize())).bootDevice(true).durable(true).build());
      for (Entry<String, Integer> disk : from.getDataDiskDeviceNameToSizeInGig().entrySet())
         builder.volume(new VolumeBuilder().type(Volume.Type.LOCAL).device(disk.getKey()).size(
                  new Float(disk.getValue())).durable(true).build());
View Full Code Here

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

      checkNotNull(from, "ServerType");
      HardwareBuilder builder = new HardwareBuilder();

      builder.ids(from.getId());
      builder.name(from.getName());
      builder.ram((int) (1000d * Double.valueOf(from.getMemory().getSize())));
      builder.processor(cpuToProcessor.apply(from.getCpu()));
      builder.supportsImage(Predicates.<Image> alwaysTrue());
      // all servers are 64bit. The OS however may be 32 bit.
      builder.is64Bit(true);
      builder.volumes(Iterables.transform(from.getDisks(), diskToVolume));
View Full Code Here

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

   @Override
   public Hardware apply(Size input) {
      HardwareBuilder builder = new HardwareBuilder();
      builder.ids(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()));

      builder.volume(new VolumeBuilder()
View Full Code Here

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

   public Hardware apply(VmSpecification from) {
      HardwareBuilder builder = new HardwareBuilder();
      builder.ids(from.getAlias());
      builder.name(from.getAlias());
      builder.processors(ImmutableList.of(new Processor(1, 1.0)));
      builder.ram(from.getMaxPhysicalMemory());
      // builder.volumes(ImmutableList.<Volume> of(new VolumeImpl(from.disk, true, false)));
      return builder.build();
   }

}
View Full Code Here

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

      builder.id(template.getId().toString() + "/" + virtualDatacenter.getId());
      builder.uri(template.getURI());

      builder.name(template.getName());
      builder.processor(new Processor(template.getCpuRequired(), DEFAULT_CORE_SPEED));
      builder.ram(template.getRamRequired());

      // Location information
      builder.location(virtualDatacenterToLocation.apply(virtualDatacenter));
      builder.hypervisor(virtualDatacenter.getHypervisorType().name());
      builder.supportsImage(ImagePredicates.idEquals(template.getId().toString()));
View Full Code Here

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

                     return HardwareBuilderFromResourceAllocations.this.apply(from);
                  }

               }));

      builder.ram((int) find(from, CIMPredicates.resourceTypeIn(ResourceType.MEMORY)).getVirtualQuantity().longValue());

      builder.processors(transform(filter(from, CIMPredicates.resourceTypeIn(ResourceType.PROCESSOR)),
               new Function<ResourceAllocationSettingData, Processor>() {

                  @Override
View Full Code Here

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

   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()));

      builder.volume(new VolumeBuilder()
View Full Code Here

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

      builder.id(template.getId().toString() + "/" + virtualDatacenter.getId());
      builder.uri(template.getURI());

      builder.name(template.getName());
      builder.processor(new Processor(template.getCpuRequired(), DEFAULT_CORE_SPEED));
      builder.ram(template.getRamRequired());

      // Location information
      builder.location(virtualDatacenterToLocation.apply(virtualDatacenter));
      builder.hypervisor(virtualDatacenter.getHypervisorType().name());
      builder.supportsImage(ImagePredicates.idEquals(template.getId().toString()));
View Full Code Here

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

                     return HardwareBuilderFromResourceAllocations.this.apply(from);
                  }

               }));

      builder.ram((int) find(from, CIMPredicates.resourceTypeIn(ResourceType.MEMORY)).getVirtualQuantity().longValue());

      builder.processors(transform(filter(from, CIMPredicates.resourceTypeIn(ResourceType.PROCESSOR)),
               new Function<ResourceAllocationSettingData, Processor>() {

                  @Override
View Full Code Here

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

      checkNotNull(from, "ServerType");
      HardwareBuilder builder = new HardwareBuilder();

      builder.ids(from.getId());
      builder.name(from.getName());
      builder.ram((int) (1000d * Double.valueOf(from.getMemory().getSize())));
      builder.processor(cpuToProcessor.apply(from.getCpu()));
      builder.supportsImage(Predicates.<Image> alwaysTrue());
      // all servers are 64bit. The OS however may be 32 bit.
      builder.is64Bit(true);
      builder.volumes(Iterables.transform(from.getDisks(), diskToVolume));
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.