Examples of volumes()


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

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

      return builder.build();
   }
}
View Full Code Here

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

public class HardwareBuilderFromResourceAllocations implements
         Function<Iterable<? extends ResourceAllocationSettingData>, HardwareBuilder> {
   @Override
   public HardwareBuilder apply(Iterable<? extends ResourceAllocationSettingData> from) {
      HardwareBuilder builder = new HardwareBuilder();
      builder.volumes(transform(filter(from, CIMPredicates.resourceTypeIn(ResourceType.DISK_DRIVE,
               ResourceType.BASE_PARTITIONABLE_UNIT, ResourceType.PARTITIONABLE_UNIT)),
               new Function<ResourceAllocationSettingData, Volume>() {

                  @Override
                  public Volume apply(ResourceAllocationSettingData from) {
View Full Code Here

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

public class HardwareBuilderFromResourceAllocations implements
         Function<Iterable<? extends ResourceAllocationSettingData>, HardwareBuilder> {
   @Override
   public HardwareBuilder apply(Iterable<? extends ResourceAllocationSettingData> from) {
      HardwareBuilder builder = new HardwareBuilder();
      builder.volumes(transform(filter(from, CIMPredicates.resourceTypeIn(ResourceType.DISK_DRIVE,
               ResourceType.BASE_PARTITIONABLE_UNIT, ResourceType.PARTITIONABLE_UNIT)),
               new Function<ResourceAllocationSettingData, Volume>() {

                  @Override
                  public Volume apply(ResourceAllocationSettingData from) {
View Full Code Here

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

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

      return builder.build();
   }
}
View Full Code Here

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

public class HardwareBuilderFromResourceAllocations implements
         Function<Iterable<? extends ResourceAllocationSettingData>, HardwareBuilder> {
   @Override
   public HardwareBuilder apply(Iterable<? extends ResourceAllocationSettingData> from) {
      HardwareBuilder builder = new HardwareBuilder();
      builder.volumes(transform(filter(from, CIMPredicates.resourceTypeIn(ResourceType.DISK_DRIVE,
               ResourceType.BASE_PARTITIONABLE_UNIT, ResourceType.PARTITIONABLE_UNIT)),
               new Function<ResourceAllocationSettingData, Volume>() {

                  @Override
                  public Volume apply(ResourceAllocationSettingData from) {
View Full Code Here

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

      HardwareBuilder builder = new HardwareBuilder();
      builder.ids(from.id + "");
      builder.name(from.name);
      builder.processors(ImmutableList.of(new Processor(from.cores, 1.0)));
      builder.ram(from.ram);
      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.volumes()

      HardwareBuilder builder = new HardwareBuilder();
      builder.ids(from.id + "");
      builder.name(from.name);
      builder.processors(ImmutableList.of(new Processor(from.cores, 1.0)));
      builder.ram(from.ram);
      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.volumes()

public class HardwareBuilderFromResourceAllocations implements
         Function<Iterable<? extends ResourceAllocationSettingData>, HardwareBuilder> {
   @Override
   public HardwareBuilder apply(Iterable<? extends ResourceAllocationSettingData> from) {
      HardwareBuilder builder = new HardwareBuilder();
      builder.volumes(transform(filter(from, CIMPredicates.resourceTypeIn(ResourceType.DISK_DRIVE,
               ResourceType.BASE_PARTITIONABLE_UNIT, ResourceType.PARTITIONABLE_UNIT)),
               new Function<ResourceAllocationSettingData, Volume>() {

                  @Override
                  public Volume apply(ResourceAllocationSettingData from) {
View Full Code Here

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

        StorageVol storageVol = from.getConnect().storageVolLookupByPath(diskFileName);
        String id = storageVol.getKey();
        float size = Long.valueOf(storageVol.getInfo().capacity).floatValue();
        volumes.add(new VolumeImpl(id, Volume.Type.LOCAL, size, null, true, false));
      }
      builder.volumes((List<Volume>) volumes);
    } catch (LibvirtException e) {
      Throwables.propagate(e);
    } catch (XPathExpressionException e) {
      Throwables.propagate(e);
    } catch (ParserConfigurationException e) {
View Full Code Here

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

public class HardwareBuilderFromResourceAllocations implements
         Function<Iterable<? extends ResourceAllocationSettingData>, HardwareBuilder> {
   @Override
   public HardwareBuilder apply(Iterable<? extends ResourceAllocationSettingData> from) {
      HardwareBuilder builder = new HardwareBuilder();
      builder.volumes(transform(filter(from, CIMPredicates.resourceTypeIn(ResourceType.DISK_DRIVE,
               ResourceType.BASE_PARTITIONABLE_UNIT, ResourceType.PARTITIONABLE_UNIT)),
               new Function<ResourceAllocationSettingData, Volume>() {

                  @Override
                  public Volume apply(ResourceAllocationSettingData from) {
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.