Examples of VolumeImpl


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

   }

   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

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

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

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

               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

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

                        hardwareToReturn.add(new HardwareBuilder()
                              .ids(String.format(
                                    "datacenter(%s)platform(%s)cpuCores(%d)memorySizeMB(%d)diskSizeGB(%d)", datacenter,
                                    platformToArgs.getKey(), cpuCores, memorySizeMB, diskSizeGB)).ram(memorySizeMB)
                              .processors(ImmutableList.of(new Processor(cpuCores, 1.0)))
                              .volumes(ImmutableList.<Volume> of(new VolumeImpl((float) diskSizeGB, true, true)))
                              .hypervisor(platformToArgs.getKey())
                              .location(find(locationsSet, LocationPredicates.idEquals(datacenter)))
                              .supportsImage(ImagePredicates.idIn(templatesSupported)).build());
                  }
View Full Code Here

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

      builder.imageId(from.getTemplateName() + "");
      builder.operatingSystem(parseOperatingSystem(from));
      builder.hardware(new HardwareBuilder().ids(from.getId() + "").ram(from.getMemorySizeMB())
            .processors(ImmutableList.of(new Processor(from.getCpuCores(), 1.0)))
            .volumes(ImmutableList.<Volume> of(new VolumeImpl((float) from.getDiskSizeGB(), true, true)))
            .hypervisor(from.getPlatform()).build());
      builder.status(serverStateToNodeStatus.get(from.getState()));
      Iterable<String> addresses = Iterables.filter(Iterables.transform(from.getIps(), new Function<Ip, String>() {

         @Override
View Full Code Here

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

                  Iterables.transform(filter(items, categoryCodeMatches(diskCategoryRegex)),
                        new Function<ProductItem, Volume>() {
                           @Override
                           public Volume apply(ProductItem item) {
                              float volumeSize = ProductItems.capacity().apply(item);
                              return new VolumeImpl(
                                       item.getId() + "",
                                       item.getDescription().indexOf(STORAGE_AREA_NETWORK) != -1 ? Volume.Type.SAN : Volume.Type.LOCAL,
                                       volumeSize, null, categoryCode(FIRST_GUEST_DISK).apply(item), false);
                           }
                        })).build();
View Full Code Here

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

      Set<Hardware> hardware = Sets.newHashSet();
      for (int cpus : new int[] { 1, 2, 4, 8 })
         for (int ram : new int[] { 512, 1024, 2048, 4096, 8192, 16384 }) {
            String id = String.format("cpu=%d,ram=%s,disk=%d", cpus, ram, 10);
            hardware.add(new HardwareBuilder().ids(id).ram(ram).processors(ImmutableList.of(new Processor(cpus, 1.0)))
                     .volumes(ImmutableList.<Volume> of(new VolumeImpl(10f, true, true))).hypervisor("VMware").build());
         }
      return hardware;
   }
View Full Code Here

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

    public EC2HardwareBuilder t1_nano() {
        return new EC2HardwareBuilder("t1.nano")
                .ram(256)
                .processors(ImmutableList.of(new Processor(1, 1)))
                .volumes(ImmutableList.<Volume>of(new VolumeImpl(10.0f, true, true)));
    }
View Full Code Here

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

    public EC2HardwareBuilder t1_micro() {
        return new EC2HardwareBuilder("t1.micro")
                .ram(512)
                .processors(ImmutableList.of(new Processor(1, 1)))
                .volumes(ImmutableList.<Volume>of(new VolumeImpl(20.0f, true, true)));
    }
View Full Code Here

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

    public EC2HardwareBuilder t1_milli() {
        return new EC2HardwareBuilder("t1.milli")
                .ram(1024)
                .processors(ImmutableList.of(new Processor(1, 1)))
                .volumes(ImmutableList.<Volume>of(new VolumeImpl(40.0f, true, true)));
    }
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.