Issue 528:update to support latest gogrid 16GB size

This commit is contained in:
Adrian Cole 2011-04-14 19:09:01 +01:00
parent 7127e5f322
commit f2cc3467ee
2 changed files with 20 additions and 18 deletions

View File

@ -38,24 +38,26 @@ import com.google.common.collect.ImmutableSet;
*/
@Singleton
public class GoGridHardwareSupplier implements Supplier<Set<? extends Hardware>> {
public static final Hardware H16384 = new HardwareBuilder().ids("6").ram(16384)
.processors(ImmutableList.of(new Processor(16, 1.0)))
.volumes(ImmutableList.<Volume> of(new VolumeImpl(800.0f, true, true))).build();
public static final Hardware H8192 = new HardwareBuilder().ids("5").ram(8192)
.processors(ImmutableList.of(new Processor(8, 1.0)))
.volumes(ImmutableList.<Volume> of(new VolumeImpl(400.0f, true, true))).build();
public static final Hardware H4096 = new HardwareBuilder().ids("4").ram(4096)
.processors(ImmutableList.of(new Processor(4, 1.0)))
.volumes(ImmutableList.<Volume> of(new VolumeImpl(200.0f, true, true))).build();
public static final Hardware H2048 = new HardwareBuilder().ids("3").ram(2048)
.processors(ImmutableList.of(new Processor(2, 1.0)))
.volumes(ImmutableList.<Volume> of(new VolumeImpl(100.0f, true, true))).build();
public static final Hardware H1024 = new HardwareBuilder().ids("2").ram(1024)
.processors(ImmutableList.of(new Processor(1, 1.0)))
.volumes(ImmutableList.<Volume> of(new VolumeImpl(50.0f, true, true))).build();
public static final Hardware H512 = new HardwareBuilder().ids("1").ram(512)
.processors(ImmutableList.of(new Processor(0.5, 1.0)))
.volumes(ImmutableList.<Volume> of(new VolumeImpl(25.0f, true, true))).build();
public static final Hardware H8192 = new HardwareBuilder().ids("5").ram(8192).processors(
ImmutableList.of(new Processor(8, 1.0))).volumes(
ImmutableList.<Volume> of(new VolumeImpl(480.0f, true, true))).build();
public static final Hardware H4096 = new HardwareBuilder().ids("4").ram(4096).processors(
ImmutableList.of(new Processor(4, 1.0))).volumes(
ImmutableList.<Volume> of(new VolumeImpl(240.0f, true, true))).build();
public static final Hardware H2048 = new HardwareBuilder().ids("3").ram(2048).processors(
ImmutableList.of(new Processor(2, 1.0))).volumes(
ImmutableList.<Volume> of(new VolumeImpl(120.0f, true, true))).build();
public static final Hardware H1024 = new HardwareBuilder().ids("2").ram(1024).processors(
ImmutableList.of(new Processor(1, 1.0))).volumes(
ImmutableList.<Volume> of(new VolumeImpl(60.0f, true, true))).build();
public static final Hardware H512 = new HardwareBuilder().ids("1").ram(512).processors(
ImmutableList.of(new Processor(0.5, 1.0))).volumes(
ImmutableList.<Volume> of(new VolumeImpl(30.0f, true, true))).build();
public static final ImmutableSet<Hardware> H_ALL = ImmutableSet.of(H512, H1024, H2048, H4096, H8192);
public static final ImmutableSet<Hardware> H_ALL = ImmutableSet.of(H512, H1024, H2048, H4096, H8192, H16384);
@Override
public Set<? extends Hardware> get() {

View File

@ -55,7 +55,7 @@ public class GoGridTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest {
case UBUNTU:
return !input.version.equals("") && !input.version.equals("10.04");
case CENTOS:
return !input.version.equals("") && !input.version.equals("5.3");
return !input.version.equals("") && !input.version.matches("5.[35]");
case WINDOWS:
return !input.version.equals("") && (input.is64Bit && !input.version.matches("200[38]"))
|| (input.version.matches("200[38] [RS]P?2") && !input.is64Bit);