JCLOUDS-778 Remove OS support tests from TemplateBuilderLiveTest, as people are ignoring failures,

This commit is contained in:
Adrian Cole 2014-11-16 19:17:17 -08:00 committed by Adrian Cole
parent 52445de74e
commit 278a735272
24 changed files with 26 additions and 744 deletions

View File

@ -32,7 +32,7 @@ public class StubTemplateBuilderIntegrationTest extends BaseTemplateBuilderLiveT
@Override
protected Set<String> getIso3166Codes() {
return ImmutableSet.<String> of();
return ImmutableSet.of();
}
}

View File

@ -20,38 +20,24 @@ import static org.jclouds.compute.util.ComputeServiceUtils.getCores;
import static org.testng.Assert.assertEquals;
import java.io.IOException;
import java.util.Map;
import java.util.Map.Entry;
import java.util.NoSuchElementException;
import java.util.Properties;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import org.jclouds.compute.ComputeServiceContext;
import org.jclouds.compute.config.BaseComputeServiceContextModule;
import org.jclouds.compute.domain.Hardware;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.domain.TemplateBuilder;
import org.jclouds.compute.reference.ComputeServiceConstants;
import org.jclouds.domain.Location;
import org.jclouds.domain.LocationScope;
import org.jclouds.domain.LoginCredentials;
import org.jclouds.json.Json;
import org.jclouds.json.config.GsonModule;
import org.jclouds.rest.config.CredentialStoreModule;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.base.Splitter;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.common.collect.Sets;
import com.google.common.io.ByteSource;
import com.google.inject.Guice;
import com.google.inject.Module;
@Test(groups = "integration,live")
@ -64,10 +50,6 @@ public abstract class BaseTemplateBuilderLiveTest extends BaseComputeServiceCont
Hardware fastest = view.getComputeService().templateBuilder().fastest().build().getHardware();
Hardware biggest = view.getComputeService().templateBuilder().biggest().build().getHardware();
System.out.printf("smallest %s%n", smallest);
System.out.printf("fastest %s%n", fastest);
System.out.printf("biggest %s%n", biggest);
assertEquals(defaultSize, smallest);
assert getCores(smallest) <= getCores(fastest) : String.format("%s ! <= %s", smallest, fastest);
@ -86,66 +68,6 @@ public abstract class BaseTemplateBuilderLiveTest extends BaseComputeServiceCont
defaultTemplate.toString());
}
@DataProvider(name = "osSupported")
public Object[][] osSupported() {
return convertToArray(Sets.filter(provideAllOperatingSystems(),
Predicates.not(defineUnsupportedOperatingSystems())));
}
protected Object[][] convertToArray(Set<OsFamilyVersion64Bit> supportedOperatingSystems) {
Object[][] returnVal = new Object[supportedOperatingSystems.size()][1];
int i = 0;
for (OsFamilyVersion64Bit config : supportedOperatingSystems)
returnVal[i++][0] = config;
return returnVal;
}
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.alwaysFalse();
}
@DataProvider(name = "osNotSupported")
public Object[][] osNotSupported() {
return convertToArray(Sets.filter(provideAllOperatingSystems(), defineUnsupportedOperatingSystems()));
}
protected Set<OsFamilyVersion64Bit> provideAllOperatingSystems() {
Map<OsFamily, Map<String, String>> map = new BaseComputeServiceContextModule() {
}.provideOsVersionMap(new ComputeServiceConstants.ReferenceData(), Guice.createInjector(new GsonModule())
.getInstance(Json.class));
Set<OsFamilyVersion64Bit> supportedOperatingSystems = Sets.newHashSet();
for (Entry<OsFamily, Map<String, String>> osVersions : map.entrySet()) {
for (String version : Sets.newHashSet(osVersions.getValue().values())) {
supportedOperatingSystems.add(new OsFamilyVersion64Bit(osVersions.getKey(), version, false));
supportedOperatingSystems.add(new OsFamilyVersion64Bit(osVersions.getKey(), version, true));
}
}
return supportedOperatingSystems;
}
@Test(dataProvider = "osSupported")
public void testTemplateBuilderCanFind(OsFamilyVersion64Bit matrix) throws InterruptedException {
TemplateBuilder builder = view.getComputeService().templateBuilder().osFamily(matrix.family)
.os64Bit(matrix.is64Bit);
if (!matrix.version.equals(""))
builder.osVersionMatches("^" + matrix.version + "$");
Template template = builder.build();
if (!matrix.version.equals(""))
assertEquals(template.getImage().getOperatingSystem().getVersion(), matrix.version);
assertEquals(template.getImage().getOperatingSystem().is64Bit(), matrix.is64Bit);
assertEquals(template.getImage().getOperatingSystem().getFamily(), matrix.family);
}
@Test(dataProvider = "osNotSupported", expectedExceptions = NoSuchElementException.class)
public void testTemplateBuilderCannotFind(OsFamilyVersion64Bit matrix) throws InterruptedException {
TemplateBuilder builder = view.getComputeService().templateBuilder().osFamily(matrix.family)
.os64Bit(matrix.is64Bit);
if (!matrix.version.equals(""))
builder.osVersionMatches("^" + matrix.version + "$");
builder.build();
}
@Test
public void testTemplateBuilderCanUseImageId() throws Exception {
Template defaultTemplate = view.getComputeService().templateBuilder().build();
@ -173,7 +95,6 @@ public abstract class BaseTemplateBuilderLiveTest extends BaseComputeServiceCont
public void testGetAssignableLocations() throws Exception {
assertProvider(view.unwrap());
for (Location location : view.getComputeService().listAssignableLocations()) {
System.err.printf("location %s%n", location);
assert location.getId() != null : location;
assert location != location.getParent() : location;
assert location.getScope() != null : location;

View File

@ -31,7 +31,6 @@ import org.jclouds.aws.ec2.AWSEC2Api;
import org.jclouds.aws.ec2.reference.AWSEC2Constants;
import org.jclouds.compute.ComputeServiceContext;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.ec2.EC2Api;
import org.jclouds.ec2.compute.EC2TemplateBuilderLiveTest;
@ -48,8 +47,6 @@ import org.jclouds.location.reference.LocationConstants;
import org.jclouds.logging.log4j.config.Log4JLoggingModule;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Lists;
import com.google.inject.Module;
@ -61,33 +58,6 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest {
provider = "aws-ec2";
}
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return true;
case DEBIAN:
return true;
case RHEL:
return input.version.equals("5.6") || input.version.equals("")
|| (input.version.matches("[56].0") && input.is64Bit);
case CENTOS:
return input.version.matches("5.[0246]") || (input.version.equals("6.0") && input.is64Bit)
|| input.version.equals("");
case WINDOWS:
return input.version.matches("200[38]") || (input.version.equals("7") && !input.is64Bit)
|| input.version.equals("");
default:
return false;
}
}
});
}
@Test
public void testTemplateBuilderM1MEDIUMWithNegativeLookaroundDoesntMatchTestImages() {
@ -357,7 +327,7 @@ public class AWSEC2TemplateBuilderLiveTest extends EC2TemplateBuilderLiveTest {
@Override
protected Set<String> getIso3166Codes() {
return ImmutableSet.<String> of("US-VA", "US-CA", "US-OR", "BR-SP", "IE", "SG", "AU-NSW", "JP-13");
return ImmutableSet.of("US-VA", "US-CA", "US-OR", "BR-SP", "IE", "SG", "AU-NSW", "JP-13");
}
}

View File

@ -22,13 +22,10 @@ import static org.testng.Assert.assertEquals;
import java.util.Set;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
@Test(groups = "live")
@ -37,32 +34,6 @@ public class CloudServersUKTemplateBuilderLiveTest extends BaseTemplateBuilderLi
public CloudServersUKTemplateBuilderLiveTest() {
provider = "cloudservers-uk";
}
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return (input.version.equals("") || input.version.matches("(10.04)|(12.04)|(12.10)|(13.04)"))
&& input.is64Bit;
case DEBIAN:
return input.is64Bit && !input.version.equals("5.0");
case CENTOS:
return (input.version.equals("") || input.version.equals("5.6") || 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;
}
}
});
}
@Test
public void testTemplateBuilder() {

View File

@ -22,13 +22,10 @@ import static org.testng.Assert.assertEquals;
import java.util.Set;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
@Test(groups = "live")
@ -38,32 +35,6 @@ public class CloudServersUSTemplateBuilderLiveTest extends BaseTemplateBuilderLi
provider = "cloudservers-us";
}
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return (input.version.equals("") || input.version.matches("(10.04)|(12.04)|(12.10)|(13.04)"))
&& input.is64Bit;
case DEBIAN:
return input.is64Bit && !input.version.equals("5.0");
case CENTOS:
return (input.version.equals("") || input.version.matches("(5.6)|(5.8)|(5.9)|(6.0)|(6.2)|(6.3)|(6.4)"))
&& input.is64Bit;
case WINDOWS:
return input.version.equals("2008 SP2") || input.version.equals("")
|| (input.version.equals("2008 R2") && input.is64Bit);
default:
return false;
}
}
});
}
@Test
public void testTemplateBuilder() {
Template defaultTemplate = this.view.getComputeService().templateBuilder().build();
@ -76,6 +47,6 @@ public class CloudServersUSTemplateBuilderLiveTest extends BaseTemplateBuilderLi
@Override
protected Set<String> getIso3166Codes() {
return ImmutableSet.<String> of("US-IL", "US-TX", "AU-NSW");
return ImmutableSet.of("US-IL", "US-TX", "AU-NSW");
}
}

View File

@ -24,13 +24,10 @@ import java.io.IOException;
import java.util.Set;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
@Test(groups = "live", testName = "ElasticHostsAmsterdamTemplateBuilderLiveTest")
@ -40,32 +37,6 @@ public class ElasticHostsAmsterdamTemplateBuilderLiveTest extends BaseTemplateBu
provider = "elastichosts-ams-e";
}
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(final OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return (input.version.equals("") || input.version.equals("12.04.1") || input.version.equals("13.10") || input.version
.equals("14.04")) && input.is64Bit;
case DEBIAN:
return (input.version.equals("") || input.version.matches("7.4")) && input.is64Bit;
case CENTOS:
return (input.version.equals("") || input.version.equals("6.5")) && input.is64Bit;
case WINDOWS:
return (input.version.equals("") || input.version.equals("2008 R2")
|| input.version.equals("2008 R2 + SQL") || input.version.equals("2012") || input.version
.equals("2012 R2 + SQL")) && input.is64Bit;
default:
return false;
}
}
});
}
@Override
public void testDefaultTemplateBuilder() throws IOException {
Template defaultTemplate = view.getComputeService().templateBuilder().build();

View File

@ -24,13 +24,10 @@ import java.io.IOException;
import java.util.Set;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
@Test(groups = "live", testName = "ElasticHostsHongKongTemplateBuilderLiveTest")
@ -40,32 +37,6 @@ public class ElasticHostsHongKongTemplateBuilderLiveTest extends BaseTemplateBui
provider = "elastichosts-hkg-e";
}
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(final OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return (input.version.equals("") || input.version.equals("12.04.1") || input.version.equals("13.10") || input.version
.equals("14.04")) && input.is64Bit;
case DEBIAN:
return (input.version.equals("") || input.version.matches("7.4")) && input.is64Bit;
case CENTOS:
return (input.version.equals("") || input.version.equals("6.5")) && input.is64Bit;
case WINDOWS:
return (input.version.equals("") || input.version.equals("2008 R2")
|| input.version.equals("2008 R2 + SQL") || input.version.equals("2012") || input.version
.equals("2012 R2 + SQL")) && input.is64Bit;
default:
return false;
}
}
});
}
@Override
public void testDefaultTemplateBuilder() throws IOException {
Template defaultTemplate = view.getComputeService().templateBuilder().build();
@ -77,6 +48,6 @@ public class ElasticHostsHongKongTemplateBuilderLiveTest extends BaseTemplateBui
@Override
protected Set<String> getIso3166Codes() {
return ImmutableSet.<String> of("HK");
return ImmutableSet.of("HK");
}
}

View File

@ -24,13 +24,10 @@ import java.io.IOException;
import java.util.Set;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
@Test(groups = "live")
@ -40,32 +37,6 @@ public class ElasticHostsPeer1LosAngelesTemplateBuilderLiveTest extends BaseTemp
provider = "elastichosts-lax-p";
}
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(final OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return (input.version.equals("") || input.version.equals("12.04.1") || input.version.equals("13.10") || input.version
.equals("14.04")) && input.is64Bit;
case DEBIAN:
return (input.version.equals("") || input.version.matches("7.4")) && input.is64Bit;
case CENTOS:
return (input.version.equals("") || input.version.equals("6.5")) && input.is64Bit;
case WINDOWS:
return (input.version.equals("") || input.version.equals("2008 R2")
|| input.version.equals("2008 R2 + SQL") || input.version.equals("2012") || input.version
.equals("2012 R2 + SQL")) && input.is64Bit;
default:
return false;
}
}
});
}
@Override
public void testDefaultTemplateBuilder() throws IOException {
Template defaultTemplate = view.getComputeService().templateBuilder().build();
@ -77,6 +48,6 @@ public class ElasticHostsPeer1LosAngelesTemplateBuilderLiveTest extends BaseTemp
@Override
protected Set<String> getIso3166Codes() {
return ImmutableSet.<String> of("US-CA");
return ImmutableSet.of("US-CA");
}
}

View File

@ -24,13 +24,10 @@ import java.io.IOException;
import java.util.Set;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
@Test(groups = "live")
@ -40,32 +37,6 @@ public class ElasticHostsBlueSquareLondonTemplateBuilderLiveTest extends BaseTem
provider = "elastichosts-lon-b";
}
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(final OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return (input.version.equals("") || input.version.equals("12.04.1") || input.version.equals("13.10") || input.version
.equals("14.04")) && input.is64Bit;
case DEBIAN:
return (input.version.equals("") || input.version.matches("7.4")) && input.is64Bit;
case CENTOS:
return (input.version.equals("") || input.version.equals("6.5")) && input.is64Bit;
case WINDOWS:
return (input.version.equals("") || input.version.equals("2008 R2")
|| input.version.equals("2008 R2 + SQL") || input.version.equals("2012") || input.version
.equals("2012 R2 + SQL")) && input.is64Bit;
default:
return false;
}
}
});
}
@Override
public void testDefaultTemplateBuilder() throws IOException {
Template defaultTemplate = view.getComputeService().templateBuilder().build();

View File

@ -24,13 +24,10 @@ import java.io.IOException;
import java.util.Set;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
@Test(groups = "live")
@ -40,32 +37,6 @@ public class ElasticHostsPeer1LondonTemplateBuilderLiveTest extends BaseTemplate
provider = "elastichosts-lon-p";
}
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(final OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return (input.version.equals("") || input.version.equals("12.04.1") || input.version.equals("13.10") || input.version
.equals("14.04")) && input.is64Bit;
case DEBIAN:
return (input.version.equals("") || input.version.matches("7.4")) && input.is64Bit;
case CENTOS:
return (input.version.equals("") || input.version.equals("6.5")) && input.is64Bit;
case WINDOWS:
return (input.version.equals("") || input.version.equals("2008 R2")
|| input.version.equals("2008 R2 + SQL") || input.version.equals("2012") || input.version
.equals("2012 R2 + SQL")) && input.is64Bit;
default:
return false;
}
}
});
}
@Override
public void testDefaultTemplateBuilder() throws IOException {
Template defaultTemplate = view.getComputeService().templateBuilder().build();
@ -77,6 +48,6 @@ public class ElasticHostsPeer1LondonTemplateBuilderLiveTest extends BaseTemplate
@Override
protected Set<String> getIso3166Codes() {
return ImmutableSet.<String> of("GB-LND");
return ImmutableSet.of("GB-LND");
}
}

View File

@ -24,13 +24,10 @@ import java.io.IOException;
import java.util.Set;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
@Test(groups = "live")
@ -40,32 +37,6 @@ public class ElasticHostsPeer1SanAntonioTemplateBuilderLiveTest extends BaseTemp
provider = "elastichosts-sat-p";
}
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(final OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return (input.version.equals("") || input.version.equals("12.04.1") || input.version.equals("13.10") || input.version
.equals("14.04")) && input.is64Bit;
case DEBIAN:
return (input.version.equals("") || input.version.matches("7.4")) && input.is64Bit;
case CENTOS:
return (input.version.equals("") || input.version.equals("6.5")) && input.is64Bit;
case WINDOWS:
return (input.version.equals("") || input.version.equals("2008 R2")
|| input.version.equals("2008 R2 + SQL") || input.version.equals("2012") || input.version
.equals("2012 R2 + SQL")) && input.is64Bit;
default:
return false;
}
}
});
}
@Override
public void testDefaultTemplateBuilder() throws IOException {
Template defaultTemplate = view.getComputeService().templateBuilder().build();
@ -77,6 +48,6 @@ public class ElasticHostsPeer1SanAntonioTemplateBuilderLiveTest extends BaseTemp
@Override
protected Set<String> getIso3166Codes() {
return ImmutableSet.<String> of("US-TX");
return ImmutableSet.of("US-TX");
}
}

View File

@ -24,13 +24,10 @@ import java.io.IOException;
import java.util.Set;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
@Test(groups = "live", testName = "ElasticHostsSanJoseTemplateBuilderLiveTest")
@ -40,32 +37,6 @@ public class ElasticHostsSanJoseTemplateBuilderLiveTest extends BaseTemplateBuil
provider = "elastichosts-sjc-c";
}
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(final OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return (input.version.equals("") || input.version.equals("12.04.1") || input.version.equals("13.10") || input.version
.equals("14.04")) && input.is64Bit;
case DEBIAN:
return (input.version.equals("") || input.version.matches("7.4")) && input.is64Bit;
case CENTOS:
return (input.version.equals("") || input.version.equals("6.5")) && input.is64Bit;
case WINDOWS:
return (input.version.equals("") || input.version.equals("2008 R2")
|| input.version.equals("2008 R2 + SQL") || input.version.equals("2012") || input.version
.equals("2012 R2 + SQL")) && input.is64Bit;
default:
return false;
}
}
});
}
@Override
public void testDefaultTemplateBuilder() throws IOException {
Template defaultTemplate = view.getComputeService().templateBuilder().build();

View File

@ -24,13 +24,10 @@ import java.io.IOException;
import java.util.Set;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
@Test(groups = "live", testName = "ElasticHostsSydneyTemplateBuilderLiveTest")
@ -40,32 +37,6 @@ public class ElasticHostsSydneyTemplateBuilderLiveTest extends BaseTemplateBuild
provider = "elastichosts-syd-v";
}
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(final OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return (input.version.equals("") || input.version.equals("12.04.1") || input.version.equals("13.10") || input.version
.equals("14.04")) && input.is64Bit;
case DEBIAN:
return (input.version.equals("") || input.version.matches("7.4")) && input.is64Bit;
case CENTOS:
return (input.version.equals("") || input.version.equals("6.5")) && input.is64Bit;
case WINDOWS:
return (input.version.equals("") || input.version.equals("2008 R2")
|| input.version.equals("2008 R2 + SQL") || input.version.equals("2012") || input.version
.equals("2012 R2 + SQL")) && input.is64Bit;
default:
return false;
}
}
});
}
@Override
public void testDefaultTemplateBuilder() throws IOException {
Template defaultTemplate = view.getComputeService().templateBuilder().build();

View File

@ -24,13 +24,10 @@ import java.io.IOException;
import java.util.Set;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
@Test(groups = "live")
@ -40,32 +37,6 @@ public class ElasticHostsPeer1TorontoTemplateBuilderLiveTest extends BaseTemplat
provider = "elastichosts-tor-p";
}
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(final OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return (input.version.equals("") || input.version.equals("12.04.1") || input.version.equals("13.10") || input.version
.equals("14.04")) && input.is64Bit;
case DEBIAN:
return (input.version.equals("") || input.version.matches("7.4")) && input.is64Bit;
case CENTOS:
return (input.version.equals("") || input.version.equals("6.5")) && input.is64Bit;
case WINDOWS:
return (input.version.equals("") || input.version.equals("2008 R2")
|| input.version.equals("2008 R2 + SQL") || input.version.equals("2012") || input.version
.equals("2012 R2 + SQL")) && input.is64Bit;
default:
return false;
}
}
});
}
@Override
public void testDefaultTemplateBuilder() throws IOException {
Template defaultTemplate = view.getComputeService().templateBuilder().build();

View File

@ -24,15 +24,12 @@ import java.io.IOException;
import java.util.Set;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.domain.Volume;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.jclouds.glesys.compute.options.GleSYSTemplateOptions;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
@Test(groups = "live", testName = "GleSYSTemplateBuilderLiveTest")
@ -42,38 +39,6 @@ public class GleSYSTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest {
provider = "glesys";
}
// / allows us to break when a new os is added
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return input.version.equals("")
|| input.version.equals("10.04")
|| input.version.equals("12.04")
|| ((input.version.equals("8.04") || input.version.equals("11.04") || input.version
.equals("10.10")) && input.is64Bit);
case DEBIAN:
return input.version.equals("") || input.version.matches("[56].0");
case FEDORA:
return input.version.equals("") || input.version.equals("13") || input.version.equals("15");
case CENTOS:
return input.version.equals("") || input.version.equals("5") || input.version.equals("5.5")
|| input.version.equals("5.0") || input.version.equals("6.0");
case WINDOWS:
return (input.version.equals("") || input.version.equals("2008")
|| input.version.equals("2008 R2")) && input.is64Bit;
default:
return false;
}
}
});
}
@Test
public void testDefaultTemplateBuilder() throws IOException {
Template defaultTemplate = view.getComputeService().templateBuilder().build();
@ -92,6 +57,6 @@ public class GleSYSTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest {
@Override
protected Set<String> getIso3166Codes() {
return ImmutableSet.<String> of("NL-NH", "SE-N", "US-NY", "SE-AB");
return ImmutableSet.of("NL-NH", "SE-N", "US-NY", "SE-AB");
}
}

View File

@ -23,13 +23,10 @@ import java.io.IOException;
import java.util.Set;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
@Test(groups = "live")
@ -39,27 +36,6 @@ public class Go2CloudJohannesburg1TemplateBuilderLiveTest extends BaseTemplateBu
provider = "go2cloud-jhb1";
}
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return (input.version.equals("") || input.version.equals("10.10")) && input.is64Bit;
case DEBIAN:
return (input.version.equals("") || input.version.equals("6.0")) && input.is64Bit;
case WINDOWS:
return input.version.equals("") && input.is64Bit;
default:
return false;
}
}
});
}
@Test
public void testDefaultTemplateBuilder() throws IOException {
Template defaultTemplate = this.view.getComputeService().templateBuilder().build();
@ -72,6 +48,6 @@ public class Go2CloudJohannesburg1TemplateBuilderLiveTest extends BaseTemplateBu
@Override
protected Set<String> getIso3166Codes() {
return ImmutableSet.<String> of("ZA-GP");
return ImmutableSet.of("ZA-GP");
}
}

View File

@ -23,13 +23,10 @@ import java.io.IOException;
import java.util.Set;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
//NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
@ -40,29 +37,6 @@ public class GoGridTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest {
provider = "gogrid";
}
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(OsFamilyVersion64Bit input) {
switch (input.family) {
case RHEL:
return input.version.equals("") || input.version.matches("5.[67]");
case DEBIAN:
return input.version.equals("") || input.version.matches("[56].0");
case UBUNTU:
return input.version.equals("") || input.version.equals("10.04");
case CENTOS:
return input.version.equals("") || input.version.matches("5.[06]") || input.version.equals("6.0");
case WINDOWS:
return input.version.equals("") || input.version.matches("200[38]");
default:
return false;
}
}
});
}
@Test
public void testDefaultTemplateBuilder() throws IOException {
Template defaultTemplate = view.getComputeService().templateBuilder().build();
@ -74,6 +48,6 @@ public class GoGridTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest {
@Override
protected Set<String> getIso3166Codes() {
return ImmutableSet.<String> of("US-CA", "US-VA", "NL-NH");
return ImmutableSet.of("US-CA", "US-VA", "NL-NH");
}
}

View File

@ -23,14 +23,11 @@ import static org.testng.Assert.assertTrue;
import java.util.Set;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.jclouds.openstack.nova.v2_0.compute.options.NovaTemplateOptions;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
@Test(groups = "live", singleThreaded = true, testName = "HPCloudComputeTemplateBuilderLiveTest")
@ -40,29 +37,6 @@ public class HPCloudComputeTemplateBuilderLiveTest extends BaseTemplateBuilderLi
provider = "hpcloud-compute";
}
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return (input.version.equals("") || input.version.matches("(10.04)|(11.10)|(12.04)|(12.10)|(13.04)|(13.10)")) && input.is64Bit;
case DEBIAN:
return input.is64Bit && !input.version.matches("(5.[0-9])|(6.[0-9])|(7.[0-9])");
case CENTOS:
return (input.version.equals("") || input.version.matches("(5.0)|(5.8)|(6.3)|(6.5)")) && input.is64Bit;
case WINDOWS:
return input.version.equals("") || input.version.equals("2008") || (input.version.equals("2008 R2") && input.is64Bit);
default:
return false;
}
}
});
}
@Test
public void testTemplateBuilder() {
Template defaultTemplate = this.view.getComputeService().templateBuilder().build();
@ -80,6 +54,6 @@ public class HPCloudComputeTemplateBuilderLiveTest extends BaseTemplateBuilderLi
@Override
protected Set<String> getIso3166Codes() {
return ImmutableSet.<String> of("US-NV", "US-VA");
return ImmutableSet.of("US-NV", "US-VA");
}
}

View File

@ -23,13 +23,10 @@ import java.io.IOException;
import java.util.Set;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
@Test(groups = "live")
@ -39,29 +36,6 @@ public class OpenHostingEast1TemplateBuilderLiveTest extends BaseTemplateBuilder
provider = "openhosting-east1";
}
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(OsFamilyVersion64Bit input) {
switch (input.family) {
case WINDOWS:
return (input.version.equals("") || input.version.equals("2008 R2")) && input.is64Bit;
case UBUNTU:
return (input.version.equals("") || input.version.equals("10.04")) && input.is64Bit;
case DEBIAN:
return (input.version.equals("") || input.version.matches("[56].0")) && input.is64Bit;
case CENTOS:
return (input.version.equals("") || input.version.matches("5.[567]")) && input.is64Bit;
default:
return false;
}
}
});
}
@Test
public void testDefaultTemplateBuilder() throws IOException {
Template defaultTemplate = this.view.getComputeService().templateBuilder().build();
@ -74,6 +48,6 @@ public class OpenHostingEast1TemplateBuilderLiveTest extends BaseTemplateBuilder
@Override
protected Set<String> getIso3166Codes() {
return ImmutableSet.<String> of("US-VA");
return ImmutableSet.of("US-VA");
}
}

View File

@ -23,14 +23,11 @@ import static org.testng.Assert.assertNull;
import java.util.Set;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.jclouds.openstack.nova.v2_0.compute.options.NovaTemplateOptions;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
@Test(groups = "live", singleThreaded = true, testName = "CloudServersUKTemplateBuilderLiveTest")
@ -40,31 +37,6 @@ public class CloudServersUKTemplateBuilderLiveTest extends BaseTemplateBuilderLi
provider = "rackspace-cloudservers-uk";
}
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return (input.version.equals("") || input.version.matches("(10.04)|(12.04)|(12.10)|(13.04)"))
&& input.is64Bit;
case DEBIAN:
return input.is64Bit && !input.version.equals("5.0");
case CENTOS:
return (input.version.equals("") || input.version.matches("(5.0)|(5.6)|(5.8)|(5.9)|(6.0)|(6.2)|(6.3)|(6.4)"))
&& input.is64Bit;
case WINDOWS:
return input.is64Bit && input.version.equals("");
default:
return false;
}
}
});
}
@Test
public void testTemplateBuilder() {
Template defaultTemplate = this.view.getComputeService().templateBuilder().build();

View File

@ -23,14 +23,11 @@ import static org.testng.Assert.assertNull;
import java.util.Set;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.jclouds.openstack.nova.v2_0.compute.options.NovaTemplateOptions;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
@Test(groups = "live", singleThreaded = true, testName = "CloudServersUSTemplateBuilderLiveTest")
@ -40,31 +37,6 @@ public class CloudServersUSTemplateBuilderLiveTest extends BaseTemplateBuilderLi
provider = "rackspace-cloudservers-us";
}
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return (input.version.equals("") || input.version.matches("(10.04)|(12.04)|(12.10)|(13.04)"))
&& input.is64Bit;
case DEBIAN:
return input.is64Bit && !input.version.equals("5.0");
case CENTOS:
return (input.version.equals("") || input.version.matches("(5.0)|(5.6)|(5.8)|(5.9)|(6.0)|(6.2)|(6.3)|(6.4)"))
&& input.is64Bit;
case WINDOWS:
return input.is64Bit && input.version.equals("");
default:
return false;
}
}
});
}
@Test
public void testTemplateBuilder() {
Template defaultTemplate = this.view.getComputeService().templateBuilder().build();
@ -83,6 +55,6 @@ public class CloudServersUSTemplateBuilderLiveTest extends BaseTemplateBuilderLi
@Override
protected Set<String> getIso3166Codes() {
return ImmutableSet.<String> of("US-IL", "US-TX", "AU-NSW");
return ImmutableSet.of("US-IL", "US-TX", "AU-NSW");
}
}

View File

@ -22,13 +22,10 @@ import static org.testng.Assert.assertEquals;
import java.util.Set;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
@Test(groups = "live")
@ -38,29 +35,6 @@ public class ServerloveManchesterTemplateBuilderLiveTest extends BaseTemplateBui
provider = "serverlove-z1-man";
}
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return (input.version.equals("") || input.version.equals("10.04") || input.version.equals("12.04")) && input.is64Bit;
case DEBIAN:
return (input.version.equals("") || input.version.equals("6.0")) && input.is64Bit;
case CENTOS:
return (input.version.equals("") || input.version.equals("5.7") || input.version.equals("6.2")) && input.is64Bit;
case WINDOWS:
return (input.version.equals("") || input.version.equals("2008 R2") || input.version.equals("2008 R2 SP1 SQL") || input.version.equals("2012") || input.version.equals("2008 R2 Web") || input.version.equals("2008 R2 SP1 Web SQL")) && input.is64Bit;
default:
return false;
}
}
});
}
@Test
public void testTemplateBuilder() {
Template defaultTemplate = this.view.getComputeService().templateBuilder().build();
@ -73,6 +47,6 @@ public class ServerloveManchesterTemplateBuilderLiveTest extends BaseTemplateBui
@Override
protected Set<String> getIso3166Codes() {
return ImmutableSet.<String> of("GB-MAN");
return ImmutableSet.of("GB-MAN");
}
}

View File

@ -23,48 +23,19 @@ import java.io.IOException;
import java.util.Set;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
@Test(groups = "live")
public class SkaliCloudMalaysiaTemplateBuilderLiveTest
extends
BaseTemplateBuilderLiveTest {
public class SkaliCloudMalaysiaTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest {
public SkaliCloudMalaysiaTemplateBuilderLiveTest() {
provider = "skalicloud-sdg-my";
}
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return input.version.equals("") || input.version.matches("10.[01][04]");
case DEBIAN:
return (input.version.equals("") || input.version.equals("5.0"))
|| (input.version.equals("6.0") && input.is64Bit);
case CENTOS:
return input.version.equals("") || input.version.matches("5.[56]");
case WINDOWS:
return (input.version.equals("") || input.version.equals("2008 R2")) && input.is64Bit;
default:
return false;
}
}
});
}
@Override
public void testDefaultTemplateBuilder() throws IOException {
Template defaultTemplate = this.view.getComputeService().templateBuilder().build();
@ -77,6 +48,6 @@ public class SkaliCloudMalaysiaTemplateBuilderLiveTest
@Override
protected Set<String> getIso3166Codes() {
return ImmutableSet.<String> of("MY-10");
return ImmutableSet.of("MY-10");
}
}

View File

@ -16,25 +16,21 @@
*/
package org.jclouds.softlayer.compute;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import org.jclouds.compute.ComputeServiceContext;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.domain.Volume;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.jclouds.softlayer.compute.options.SoftLayerTemplateOptions;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import static org.jclouds.compute.util.ComputeServiceUtils.getCores;
import static org.jclouds.compute.util.ComputeServiceUtils.getSpace;
import static org.testng.Assert.assertEquals;
import java.io.IOException;
import java.util.Properties;
import java.util.Set;
import static org.jclouds.compute.util.ComputeServiceUtils.getCores;
import static org.jclouds.compute.util.ComputeServiceUtils.getSpace;
import static org.testng.Assert.assertEquals;
import org.jclouds.compute.ComputeServiceContext;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.domain.Volume;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.jclouds.softlayer.compute.options.SoftLayerTemplateOptions;
import org.testng.annotations.Test;
@Test(groups = "live", alwaysRun = false)
public class SoftLayerTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest {
@ -45,38 +41,6 @@ public class SoftLayerTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTes
provider = "softlayer";
}
// / allows us to break when a new os is added
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(OsFamilyVersion64Bit input) {
// For each os-type both 32- and 64-bit are supported.
switch (input.family) {
case UBUNTU:
return input.version.equals("") || input.version.equals("10.04") || input.version.equals("12.04") ||
input.version.equals("8.04");
case DEBIAN:
return input.version.equals("") || input.version.matches("[56].0");
case FEDORA:
return input.version.equals("") || input.version.equals("13") || input.version.equals("15");
case RHEL:
return input.version.equals("") || input.version.equals("5") || input.version.equals("6") ||
input.version.equals("6.1") || input.version.equals("5.4") || input.version.equals("5.7");
case CENTOS:
return input.version.equals("") || input.version.equals("5") || input.version.equals("6.0") ||
input.version.equals("6.1") || input.version.equals("6.2") || input.version.equals("6");
case WINDOWS:
return input.version.equals("") || input.version.equals("2003") || input.version.equals("2008");
default:
return false;
}
}
});
}
@Test
public void testDefaultTemplateBuilder() throws IOException {
Template defaultTemplate = view.getComputeService().templateBuilder().build();
@ -164,10 +128,4 @@ public class SoftLayerTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTes
protected Set<String> getIso3166Codes() {
return createProviderMetadata().getIso3166Codes();
}
@BeforeClass(groups = "live")
@Override
public void setupContext() {
super.setupContext();
}
}