Package org.jclouds.compute.domain

Examples of org.jclouds.compute.domain.VolumeBuilder


   public static EC2HardwareBuilder i2_xlarge() {
      return new EC2HardwareBuilder(InstanceType.I2_XLARGE)
              .ram(30 * 1024 + 512)
              .processors(ImmutableList.of(new Processor(4.0, 3.5)))
              .volumes(ImmutableList.<Volume> of(
                    new VolumeBuilder().type(LOCAL).size(10.0f).device("/dev/sda1").bootDevice(true).durable(false).build(),
                    new VolumeBuilder().type(LOCAL).size(800.0f).device("/dev/sdb").bootDevice(false).durable(false).build()))
              .virtualizationType(VirtualizationType.HVM);
   }
View Full Code Here


   public static EC2HardwareBuilder i2_2xlarge() {
      return new EC2HardwareBuilder(InstanceType.I2_2XLARGE)
              .ram(61 * 1024)
              .processors(ImmutableList.of(new Processor(8.0, 3.375)))
              .volumes(ImmutableList.<Volume> of(
                    new VolumeBuilder().type(LOCAL).size(10.0f).device("/dev/sda1").bootDevice(true).durable(false).build(),
                    new VolumeBuilder().type(LOCAL).size(800.0f).device("/dev/sdb").bootDevice(false).durable(false).build(),
                    new VolumeBuilder().type(LOCAL).size(800.0f).device("/dev/sdc").bootDevice(false).durable(false).build()))
              .virtualizationType(VirtualizationType.HVM);
   }
View Full Code Here

   public static EC2HardwareBuilder i2_4xlarge() {
      return new EC2HardwareBuilder(InstanceType.I2_4XLARGE)
              .ram(122 * 1024)
              .processors(ImmutableList.of(new Processor(16.0, 3.3125)))
              .volumes(ImmutableList.<Volume> of(
                    new VolumeBuilder().type(LOCAL).size(10.0f).device("/dev/sda1").bootDevice(true).durable(false).build(),
                    new VolumeBuilder().type(LOCAL).size(800.0f).device("/dev/sdb").bootDevice(false).durable(false).build(),
                    new VolumeBuilder().type(LOCAL).size(800.0f).device("/dev/sdc").bootDevice(false).durable(false).build(),
                    new VolumeBuilder().type(LOCAL).size(800.0f).device("/dev/sdd").bootDevice(false).durable(false).build(),
                    new VolumeBuilder().type(LOCAL).size(800.0f).device("/dev/sde").bootDevice(false).durable(false).build()))
              .virtualizationType(VirtualizationType.HVM);
   }
View Full Code Here

   public static EC2HardwareBuilder i2_8xlarge() {
      return new EC2HardwareBuilder(InstanceType.I2_8XLARGE)
              .ram(244 * 1024)
              .processors(ImmutableList.of(new Processor(32.0, 3.25)))
              .volumes(ImmutableList.<Volume> of(
                    new VolumeBuilder().type(LOCAL).size(10.0f).device("/dev/sda1").bootDevice(true).durable(false).build(),
                    new VolumeBuilder().type(LOCAL).size(800.0f).device("/dev/sdb").bootDevice(false).durable(false).build(),
                    new VolumeBuilder().type(LOCAL).size(800.0f).device("/dev/sdc").bootDevice(false).durable(false).build(),
                    new VolumeBuilder().type(LOCAL).size(800.0f).device("/dev/sdd").bootDevice(false).durable(false).build(),
                    new VolumeBuilder().type(LOCAL).size(800.0f).device("/dev/sde").bootDevice(false).durable(false).build(),
                    new VolumeBuilder().type(LOCAL).size(800.0f).device("/dev/sdf").bootDevice(false).durable(false).build(),
                    new VolumeBuilder().type(LOCAL).size(800.0f).device("/dev/sdg").bootDevice(false).durable(false).build(),
                    new VolumeBuilder().type(LOCAL).size(800.0f).device("/dev/sdh").bootDevice(false).durable(false).build(),
                    new VolumeBuilder().type(LOCAL).size(800.0f).device("/dev/sdi").bootDevice(false).durable(false).build()))
              .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 VolumeBuilder().type(LOCAL).size(1024.0f).device("/dev/sda1").bootDevice(true).durable(false).build(),
                  new VolumeBuilder().type(LOCAL).size(1024.0f).device("/dev/sdb").bootDevice(false).durable(false).build()))
            .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 VolumeBuilder().type(LOCAL).size(twoTB).device("/dev/sda1").bootDevice(true).durable(false).build());
      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 VolumeBuilder().type(LOCAL).size(twoTB).device("/dev/sd" + letter).bootDevice(false).durable(false).build());
      }
      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

         this.cache = checkNotNull(cache, "cache");
      }

      @Override
      public Volume apply(Device input) {
         VolumeBuilder builder = new VolumeBuilder();
         builder.id(input.getId());
         try {
            DriveInfo drive = cache.getUnchecked(input.getDriveUuid());
            builder.size((float) drive.getSize());
         } catch (NullPointerException e) {
            logger.debug("drive %s not found", input.getDriveUuid());
         } catch (UncheckedExecutionException e) {
            logger.warn(e, "error finding drive %s: %s", input.getDriveUuid(), e.getMessage());
         }
         return builder.durable(true).type(Volume.Type.NAS).build();
      }
View Full Code Here

   }

   private Iterable<Volume> collectVolumes(MachineType input) {
      ImmutableSet.Builder<Volume> volumes = ImmutableSet.builder();
      for (MachineType.ScratchDisk disk : input.getScratchDisks()) {
         volumes.add(new VolumeBuilder()
                 .type(Volume.Type.LOCAL)
                 .size(new Integer(disk.getDiskGb()).floatValue())
                 .bootDevice(true)
                 .durable(false).build());
      }
View Full Code Here

   @Test
   public void test() throws UnknownHostException {
      assertEquals(convertFlavor(), new HardwareBuilder().ids("1").name("256 MB Server").processors(
               ImmutableList.of(new Processor(1.0, 1.0))).ram(256).volumes(
               ImmutableList.of(new VolumeBuilder().type(Volume.Type.LOCAL).size(10.0f).durable(true).bootDevice(true)
                        .build())).build());
   }
View Full Code Here

                              .ids("1")
                              .name("256 MB Server")
                              .processors(ImmutableList.of(new Processor(1.0, 1.0)))
                              .ram(256)
                              .volumes(
                                    ImmutableList.of(new VolumeBuilder().type(Volume.Type.LOCAL).size(10.0f)
                                          .durable(true).bootDevice(true).build())).build())
                  .operatingSystem(
                        new OperatingSystem.Builder().family(OsFamily.CENTOS).description("CentOS 5.2").version("5.2")
                              .is64Bit(true).build())
                  .id("1234")
View Full Code Here

TOP

Related Classes of org.jclouds.compute.domain.VolumeBuilder

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.