Examples of VolumeBuilder


Examples of org.jclouds.compute.domain.VolumeBuilder

   public static EC2HardwareBuilder c1_medium() {
      return new EC2HardwareBuilder(InstanceType.C1_MEDIUM)
            .ram(1740)
            .processors(ImmutableList.of(new Processor(2.0, 2.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(340.0f).device("/dev/sda2").bootDevice(false).durable(false).build()));
   }
View Full Code Here

Examples of org.jclouds.compute.domain.VolumeBuilder

   public static EC2HardwareBuilder c1_xlarge() {
      return new EC2HardwareBuilder(InstanceType.C1_XLARGE)
            .ram(7168)
            .processors(ImmutableList.of(new Processor(8.0, 2.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(420.0f).device("/dev/sdb").bootDevice(false).durable(false).build(),
                  new VolumeBuilder().type(LOCAL).size(420.0f).device("/dev/sdc").bootDevice(false).durable(false).build(),
                  new VolumeBuilder().type(LOCAL).size(420.0f).device("/dev/sdd").bootDevice(false).durable(false).build(),
                  new VolumeBuilder().type(LOCAL).size(420.0f).device("/dev/sde").bootDevice(false).durable(false).build()))
            .is64Bit(true);
   }
View Full Code Here

Examples of org.jclouds.compute.domain.VolumeBuilder

   public static EC2HardwareBuilder c3_large() {
      return new EC2HardwareBuilder(InstanceType.C3_LARGE)
              .ram(3750)
              .processors(ImmutableList.of(new Processor(2.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(16.0f).device("/dev/sdb").bootDevice(false).durable(false).build(),
                    new VolumeBuilder().type(LOCAL).size(16.0f).device("/dev/sdc").bootDevice(false).durable(false).build()))
              .is64Bit(true);
   }
View Full Code Here

Examples of org.jclouds.compute.domain.VolumeBuilder

   public static EC2HardwareBuilder c3_xlarge() {
      return new EC2HardwareBuilder(InstanceType.C3_XLARGE)
              .ram(7168)
              .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(40.0f).device("/dev/sdb").bootDevice(false).durable(false).build(),
                    new VolumeBuilder().type(LOCAL).size(40.0f).device("/dev/sdc").bootDevice(false).durable(false).build()))
              .is64Bit(true);
   }
View Full Code Here

Examples of org.jclouds.compute.domain.VolumeBuilder

      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()
            .size(Float.valueOf(input.getDisk()))
            .type(Type.LOCAL)
            .build());

      ImmutableMap.Builder<String, String> metadata = ImmutableMap.builder();
View Full Code Here

Examples of org.jclouds.compute.domain.VolumeBuilder

                  OperatingSystem.builder().name("Ubuntu 14.04 x86_64").description("Ubuntu").family(OsFamily.UBUNTU)
                        .version("10.04").arch("x86_64").is64Bit(true).build()).build());

      hardwares = ImmutableSet.of(new HardwareBuilder().id("2gb").providerId("1").name("mock hardware")
            .processor(new Processor(1.0, 1.0)).ram(2048)
            .volume(new VolumeBuilder().size(20f).type(Type.LOCAL).build()).build());

      locations = ImmutableSet.of(new LocationBuilder()
            .id("1")
            .description("1/mock location")
            .scope(LocationScope.REGION)
View Full Code Here

Examples of org.jclouds.compute.domain.VolumeBuilder

   @Test
   public void testConvertSize() {
      Size size = new Size(1, "Medium", "2gb", 2048, 1, 20, "0.05", "10");
      Hardware expected = new HardwareBuilder().id("2gb").providerId("1").name("Medium")
            .processor(new Processor(1.0, 1.0)).ram(2048)
            .volume(new VolumeBuilder().size(20f).type(Type.LOCAL).build())
            .userMetadata(ImmutableMap.of("costPerHour", "0.05", "costPerMonth", "10")).build();

      SizeToHardware function = new SizeToHardware();
      assertEquals(function.apply(size), expected);
   }
View Full Code Here

Examples of org.jclouds.compute.domain.VolumeBuilder

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

      VolumeBuilder volumeBuilder = new VolumeBuilder();
      volumeBuilder.bootDevice(true);
      volumeBuilder.size(toGb(template.getHdRequired()));
      volumeBuilder.type(Volume.Type.LOCAL);
      volumeBuilder.durable(false);
      builder.volume(volumeBuilder.build());

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

Examples of org.jclouds.compute.domain.VolumeBuilder

   @Override
   public Volume apply(Disk disk) {
      checkNotNull(disk, "disk");

      VolumeBuilder builder = new VolumeBuilder();

      builder.size(1000f * Float.valueOf(disk.getSize()));
      // "Disk"'s are additional disks; they can't be booted disk(?)
      builder.bootDevice(false);
      builder.durable(true);
      builder.type(Volume.Type.SAN);
      builder.id("type: " + disk.getType() + " usage: " + disk.getUsage());

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

Examples of org.jclouds.compute.domain.VolumeBuilder

      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());
      builder.hypervisor("VMware");
      return builder.build();
   }
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.