public FlavorInZone(Flavor image, String zoneId) { super(zoneId, checkNotNull(image, "image").getId()); this.image = image; }
public Flavor build() { return new Flavor(id, name, links, ram, disk, vcpus, swap, rxtxFactor, ephemeral); }
@Override public Hardware apply(FlavorInRegion flavorInRegion) { Location location = locationIndex.get().get(flavorInRegion.getRegion()); checkState(location != null, "location %s not in locationIndex: %s", flavorInRegion.getRegion(), locationIndex.get()); Flavor flavor = flavorInRegion.getFlavor(); return new HardwareBuilder().id(flavorInRegion.slashEncode()).providerId(flavor.getId()).name(flavor.getName()) .ram(flavor.getRam()).processor(new Processor(flavor.getVcpus(), 1.0)).volume( new VolumeImpl(Float.valueOf(flavor.getDisk()), true, true)).location(location).build(); } }
public T fromFlavor(Flavor in) { return super.fromResource(in) .ram(in.getRam()) .disk(in.getDisk()) .vcpus(in.getVcpus()) .swap(in.getSwap().orNull()) .rxtxFactor(in.getRxtxFactor().orNull()) .ephemeral(in.getEphemeral().orNull()); } }
@Override public Hardware apply(FlavorInZone flavorInZone) { Location location = locationIndex.get().get(flavorInZone.getZone()); checkState(location != null, "location %s not in locationIndex: %s", flavorInZone.getZone(), locationIndex.get()); Flavor flavor = flavorInZone.getFlavor(); return new HardwareBuilder().id(flavorInZone.slashEncode()).providerId(flavor.getId()).name(flavor.getName()) .ram(flavor.getRam()).processor(new Processor(flavor.getVcpus(), 1.0)).volume( new VolumeImpl(Float.valueOf(flavor.getDisk()), true, true)).location(location).build(); } }
public T fromFlavor(Flavor in) { return super.fromResource(in) .ram(in.getRam()) .disk(in.getDisk()) .vcpus(in.getVcpus()) .swap(in.getSwap().orNull()) .rxtxFactor(in.getRxtxFactor().orNull()) .ephemeral(in.getEphemeral().orNull()); } }
@Override public Hardware apply(FlavorInZone flavorInZone) { Location location = locationIndex.get().get(flavorInZone.getZone()); checkState(location != null, "location %s not in locationIndex: %s", flavorInZone.getZone(), locationIndex.get()); Flavor flavor = flavorInZone.getFlavor(); return new HardwareBuilder().id(flavorInZone.slashEncode()).providerId(flavor.getId()).name(flavor.getName()) .ram(flavor.getRam()).processor(new Processor(flavor.getVcpus(), 1.0)).volume( new VolumeImpl(Float.valueOf(flavor.getDisk()), true, true)).location(location).build(); } }
public T fromFlavor(Flavor in) { return super.fromResource(in) .ram(in.getRam()) .disk(in.getDisk()) .vcpus(in.getVcpus()) .swap(in.getSwap().orNull()) .rxtxFactor(in.getRxtxFactor().orNull()) .ephemeral(in.getEphemeral().orNull()); } }
public FlavorInRegion(Flavor flavor, String regionId) { super(regionId, checkNotNull(flavor, "flavor").getId()); this.flavor = flavor; }
public Flavor build() { return new Flavor(id, name, links, ram, disk, vcpus, swap, rxtxFactor, ephemeral); }
@Override public Hardware apply(FlavorInZone flavorInZone) { Location location = locationIndex.get().get(flavorInZone.getZone()); checkState(location != null, "location %s not in locationIndex: %s", flavorInZone.getZone(), locationIndex.get()); Flavor flavor = flavorInZone.getFlavor(); return new HardwareBuilder().id(flavorInZone.slashEncode()).providerId(flavor.getId()).name(flavor.getName()) .ram(flavor.getRam()).processor(new Processor(flavor.getVcpus(), 1.0)).volume( new VolumeImpl(Float.valueOf(flavor.getDisk()), true, true)).location(location).build(); } }
public T fromFlavor(Flavor in) { return super.fromResource(in) .ram(in.getRam()) .disk(in.getDisk()) .vcpus(in.getVcpus()) .swap(in.getSwap().orNull()) .rxtxFactor(in.getRxtxFactor().orNull()) .ephemeral(in.getEphemeral().orNull()); } }
public FlavorInRegion(Flavor flavor, String regionId) { super(regionId, checkNotNull(flavor, "image").getId()); this.flavor = flavor; }
public Flavor build() { return new Flavor(id, name, links, ram, disk, vcpus, swap, rxtxFactor, ephemeral); }
@Override public Hardware apply(FlavorInRegion flavorInRegion) { Location location = locationIndex.get().get(flavorInRegion.getRegion()); checkState(location != null, "location %s not in locationIndex: %s", flavorInRegion.getRegion(), locationIndex.get()); Flavor flavor = flavorInRegion.getFlavor(); return new HardwareBuilder().id(flavorInRegion.slashEncode()).providerId(flavor.getId()).name(flavor.getName()) .ram(flavor.getRam()).processor(new Processor(flavor.getVcpus(), 1.0)).volume( new VolumeImpl(Float.valueOf(flavor.getDisk()), true, true)).location(location).build(); } }
public T fromFlavor(Flavor in) { return super.fromResource(in) .ram(in.getRam()) .disk(in.getDisk()) .vcpus(in.getVcpus()) .swap(in.getSwap().orNull()) .rxtxFactor(in.getRxtxFactor().orNull()) .ephemeral(in.getEphemeral().orNull()); } }
public FlavorInRegion(Flavor flavor, String regionId) { super(regionId, checkNotNull(flavor, "flavor").getId()); this.flavor = flavor; }