Package org.jclouds.compute.domain.internal

Examples of org.jclouds.compute.domain.internal.VolumeImpl


   public static EC2HardwareBuilder cg1_4xlarge() {
      return new EC2HardwareBuilder(InstanceType.CG1_4XLARGE)
            .ram(22 * 1024)
            .processors(ImmutableList.of(new Processor(4.0, 4.0), new Processor(4.0, 4.0)))
            .volumes(
                  ImmutableList.<Volume> of(new VolumeImpl(10.0f, "/dev/sda1", true, false), new VolumeImpl(840.0f,
                        "/dev/sdb", false, false), new VolumeImpl(840.0f, "/dev/sdc", false, false)))
            .virtualizationType(VirtualizationType.HVM);
   }
View Full Code Here


   public static EC2HardwareBuilder cc1_4xlarge() {
      return new EC2HardwareBuilder(InstanceType.CC1_4XLARGE)
            .ram(23 * 1024)
            .processors(ImmutableList.of(new Processor(4.0, 4.0), new Processor(4.0, 4.0)))
            .volumes(
                  ImmutableList.<Volume> of(new VolumeImpl(10.0f, "/dev/sda1", true, false), new VolumeImpl(840.0f,
                        "/dev/sdb", false, false), new VolumeImpl(840.0f, "/dev/sdc", false, false)))
            .virtualizationType(VirtualizationType.HVM);
   }
View Full Code Here

   public static EC2HardwareBuilder cc2_8xlarge() {
      return new EC2HardwareBuilder(InstanceType.CC2_8XLARGE)
            .ram(60 * 1024 + 512)
            .processors(ImmutableList.of(new Processor(8.0, 5.5), new Processor(8.0, 5.5)))
            .volumes(
                  ImmutableList.<Volume> of(new VolumeImpl(10.0f, "/dev/sda1", true, false), new VolumeImpl(840.0f,
                        "/dev/sdb", false, false), new VolumeImpl(840.0f, "/dev/sdc", false, false), new VolumeImpl(
                        840.0f, "/dev/sdb", false, false), new VolumeImpl(840.0f, "/dev/sdc", false, false)))
            .virtualizationType(VirtualizationType.HVM);
   }
View Full Code Here

   public static EC2HardwareBuilder hi1_4xlarge() {
      return new EC2HardwareBuilder(InstanceType.HI1_4XLARGE)
            .ram(60 * 1024 + 512)
            .processors(ImmutableList.of(new Processor(16.0, 2.1875)))
            .volumes(ImmutableList.<Volume> of(new VolumeImpl(1024.0f, "/dev/sda1", true, false),
                  new VolumeImpl(1024.0f, "/dev/sdb", false, false)))
            .virtualizationType(VirtualizationType.HVM);
   }
View Full Code Here

   }
  
   public static EC2HardwareBuilder hs1_8xlarge() {
      float twoTB = 2048.0f * 1024.0f;
      Builder<Volume> all24Volumes = ImmutableList.<Volume>builder();
      all24Volumes.add(new VolumeImpl(twoTB, "/dev/sda1", true, false));
      for (char letter : ImmutableSet.of('b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
            'q', 'r', 's', 't', 'u', 'v', 'w', 'x')) {
         all24Volumes.add(new VolumeImpl(twoTB, "/dev/sd" + letter, false, false));
      }
      return new EC2HardwareBuilder(InstanceType.HS1_8XLARGE)
            .ram(117 * 1024)
            .processors(ImmutableList.of(new Processor(16.0, 2.1875)))
            .volumes(all24Volumes.build())
View Full Code Here

               public String toString() {
                  return "sizeLessThanOrEqual(" + size + ")";
               }

            }).ids(id).ram(ram).processors(ImmutableList.of(new Processor(1, cpu))).hypervisor("kvm")
                  .volumes(ImmutableList.<Volume> of(new VolumeImpl(size, true, true))).build());
         }
      return hardware.build();
   }
View Full Code Here

      Iterable<Volume> ebsVolumes = Iterables.transform(instance.getEbsBlockDevices().entrySet(),
               new Function<Entry<String, BlockDevice>, Volume>() {

                  @Override
                  public Volume apply(Entry<String, BlockDevice> from) {
                     return new VolumeImpl(from.getValue().getVolumeId(), Volume.Type.SAN, null, from.getKey(),
                              instance.getRootDeviceName() != null
                                       && instance.getRootDeviceName().equals(from.getKey()), true);
                  }
               });
View Full Code Here

               public String toString() {
                  return "sizeLessThanOrEqual(" + size + ")";
               }

            }).ids(id).ram(ram).processors(ImmutableList.of(new Processor(1, cpu))).hypervisor("kvm")
                  .volumes(ImmutableList.<Volume>of(new VolumeImpl(size, true, true))).build());
         }
      return hardware.build();
   }
View Full Code Here

   }

   static Hardware stub(String type, int cores, int ram, float disk) {
      return new org.jclouds.compute.domain.HardwareBuilder().ids(type).name(type)
            .processors(ImmutableList.of(new Processor(cores, 1.0))).ram(ram)
            .volumes(ImmutableList.<Volume> of(new VolumeImpl(disk, true, false))).build();
   }
View Full Code Here

               }));
      return builder;
   }

   public Volume apply(ResourceAllocationSettingData from) {
      return new VolumeImpl(from.getAddressOnParent() + "", Volume.Type.LOCAL, from.getVirtualQuantity() == null ? null
               : from.getVirtualQuantity().longValue() / (float) (1024 * 1024), null, "0".equals(from.getAddressOnParent())
               || ResourceType.BASE_PARTITIONABLE_UNIT.equals(from.getResourceType()), true);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.compute.domain.internal.VolumeImpl

Copyright © 2018 www.massapicom. 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.