From d2f60e49a434e79c88bd21ec56343d5370ab0a47 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Fri, 11 Nov 2011 12:42:39 +0200 Subject: [PATCH] updated templates for rackspace --- ...CloudServersUKTemplateBuilderLiveTest.java | 22 ++++++++--------- ...CloudServersUSTemplateBuilderLiveTest.java | 24 +++++++++---------- 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/providers/cloudservers-uk/src/test/java/org/jclouds/rackspace/cloudservers/compute/CloudServersUKTemplateBuilderLiveTest.java b/providers/cloudservers-uk/src/test/java/org/jclouds/rackspace/cloudservers/compute/CloudServersUKTemplateBuilderLiveTest.java index 921ac4e4ce..39a93439cb 100644 --- a/providers/cloudservers-uk/src/test/java/org/jclouds/rackspace/cloudservers/compute/CloudServersUKTemplateBuilderLiveTest.java +++ b/providers/cloudservers-uk/src/test/java/org/jclouds/rackspace/cloudservers/compute/CloudServersUKTemplateBuilderLiveTest.java @@ -51,17 +51,17 @@ public class CloudServersUKTemplateBuilderLiveTest extends BaseTemplateBuilderLi @Override public boolean apply(OsFamilyVersion64Bit input) { switch (input.family) { - case UBUNTU: - return !(input.version.startsWith("12.04") || input.version.startsWith("11.10")) && input.is64Bit; - case DEBIAN: - return input.is64Bit; - case CENTOS: - return !(input.version.matches("5.[0237]") || input.version.equals("6.0")) && input.is64Bit; - case WINDOWS: - return input.version.equals("2008 SP2") || input.version.equals("") - || (input.version.equals("2008 R2") && input.is64Bit); - default: - return false; + case UBUNTU: + return !(input.version.startsWith("12.04") || input.version.startsWith("11.10")) && input.is64Bit; + case DEBIAN: + return input.is64Bit && !input.version.matches("[56].0"); + case CENTOS: + return !(input.version.matches("5.[0237]") || input.version.equals("6.0")) && input.is64Bit; + case WINDOWS: + return input.version.equals("2008 SP2") || input.version.equals("") + || (input.version.equals("2008 R2") && input.is64Bit); + default: + return false; } } diff --git a/providers/cloudservers-us/src/test/java/org/jclouds/rackspace/cloudservers/compute/CloudServersUSTemplateBuilderLiveTest.java b/providers/cloudservers-us/src/test/java/org/jclouds/rackspace/cloudservers/compute/CloudServersUSTemplateBuilderLiveTest.java index 098d946eec..56f3d08bea 100644 --- a/providers/cloudservers-us/src/test/java/org/jclouds/rackspace/cloudservers/compute/CloudServersUSTemplateBuilderLiveTest.java +++ b/providers/cloudservers-us/src/test/java/org/jclouds/rackspace/cloudservers/compute/CloudServersUSTemplateBuilderLiveTest.java @@ -51,19 +51,17 @@ public class CloudServersUSTemplateBuilderLiveTest extends BaseTemplateBuilderLi @Override public boolean apply(OsFamilyVersion64Bit input) { switch (input.family) { - case UBUNTU: - return !(input.version.startsWith("12.04") || input.version.startsWith("11.10") || input.version - .equals("8.04")) - && input.is64Bit; - case DEBIAN: - return input.is64Bit; - case CENTOS: - return !(input.version.matches("5.[0237]") || input.version.equals("6.0")) && input.is64Bit; - case WINDOWS: - return input.version.equals("2008 SP2") || input.version.equals("") - || (input.version.equals("2008 R2") && input.is64Bit); - default: - return false; + case UBUNTU: + return !(input.version.startsWith("12.04") || input.version.startsWith("11.10")) && input.is64Bit; + case DEBIAN: + return input.is64Bit && !input.version.matches("[56].0"); + case CENTOS: + return !(input.version.matches("5.[0237]") || input.version.equals("6.0")) && input.is64Bit; + case WINDOWS: + return input.version.equals("2008 SP2") || input.version.equals("") + || (input.version.equals("2008 R2") && input.is64Bit); + default: + return false; } }