mirror of https://github.com/apache/jclouds.git
JCLOUDS-778 Remove OS support tests from TemplateBuilderLiveTest, as people are ignoring failures,
This commit is contained in:
parent
4b813ce096
commit
aec64012ee
|
@ -37,7 +37,7 @@ public class StubTemplateBuilderIntegrationTest extends BaseTemplateBuilderLiveT
|
|||
|
||||
@Override
|
||||
protected Set<String> getIso3166Codes() {
|
||||
return ImmutableSet.<String> of();
|
||||
return ImmutableSet.of();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -29,13 +29,9 @@ 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;
|
||||
|
@ -43,11 +39,8 @@ import org.jclouds.io.CopyInputStreamInputSupplierMap;
|
|||
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;
|
||||
|
@ -70,10 +63,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);
|
||||
|
@ -92,66 +81,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();
|
||||
|
@ -179,7 +108,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;
|
||||
|
|
|
@ -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;
|
||||
|
@ -65,33 +62,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() {
|
||||
|
||||
|
@ -361,7 +331,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");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -41,32 +38,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() {
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -42,32 +39,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();
|
||||
|
@ -80,6 +51,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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -43,32 +40,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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -43,32 +40,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();
|
||||
|
@ -80,6 +51,6 @@ public class ElasticHostsHongKongTemplateBuilderLiveTest extends BaseTemplateBui
|
|||
|
||||
@Override
|
||||
protected Set<String> getIso3166Codes() {
|
||||
return ImmutableSet.<String> of("HK");
|
||||
return ImmutableSet.of("HK");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -44,32 +41,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();
|
||||
|
@ -81,6 +52,6 @@ public class ElasticHostsPeer1LosAngelesTemplateBuilderLiveTest extends BaseTemp
|
|||
|
||||
@Override
|
||||
protected Set<String> getIso3166Codes() {
|
||||
return ImmutableSet.<String> of("US-CA");
|
||||
return ImmutableSet.of("US-CA");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -43,32 +40,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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -44,32 +41,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();
|
||||
|
@ -81,6 +52,6 @@ public class ElasticHostsPeer1LondonTemplateBuilderLiveTest extends BaseTemplate
|
|||
|
||||
@Override
|
||||
protected Set<String> getIso3166Codes() {
|
||||
return ImmutableSet.<String> of("GB-LND");
|
||||
return ImmutableSet.of("GB-LND");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -44,32 +41,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();
|
||||
|
@ -81,6 +52,6 @@ public class ElasticHostsPeer1SanAntonioTemplateBuilderLiveTest extends BaseTemp
|
|||
|
||||
@Override
|
||||
protected Set<String> getIso3166Codes() {
|
||||
return ImmutableSet.<String> of("US-TX");
|
||||
return ImmutableSet.of("US-TX");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -43,32 +40,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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -43,32 +40,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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -44,32 +41,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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -46,38 +43,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();
|
||||
|
@ -96,6 +61,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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -43,27 +40,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();
|
||||
|
@ -76,6 +52,6 @@ public class Go2CloudJohannesburg1TemplateBuilderLiveTest extends BaseTemplateBu
|
|||
|
||||
@Override
|
||||
protected Set<String> getIso3166Codes() {
|
||||
return ImmutableSet.<String> of("ZA-GP");
|
||||
return ImmutableSet.of("ZA-GP");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -44,29 +41,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();
|
||||
|
@ -78,6 +52,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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -44,29 +41,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();
|
||||
|
@ -84,6 +58,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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -43,29 +40,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();
|
||||
|
@ -78,6 +52,6 @@ public class OpenHostingEast1TemplateBuilderLiveTest extends BaseTemplateBuilder
|
|||
|
||||
@Override
|
||||
protected Set<String> getIso3166Codes() {
|
||||
return ImmutableSet.<String> of("US-VA");
|
||||
return ImmutableSet.of("US-VA");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -44,31 +41,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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -44,31 +41,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();
|
||||
|
@ -87,6 +59,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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -42,29 +39,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();
|
||||
|
@ -77,6 +51,6 @@ public class ServerloveManchesterTemplateBuilderLiveTest extends BaseTemplateBui
|
|||
|
||||
@Override
|
||||
protected Set<String> getIso3166Codes() {
|
||||
return ImmutableSet.<String> of("GB-MAN");
|
||||
return ImmutableSet.of("GB-MAN");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -37,38 +34,12 @@ import com.google.common.collect.ImmutableSet;
|
|||
* @author Adrian Cole
|
||||
*/
|
||||
@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();
|
||||
|
@ -81,6 +52,6 @@ public class SkaliCloudMalaysiaTemplateBuilderLiveTest
|
|||
|
||||
@Override
|
||||
protected Set<String> getIso3166Codes() {
|
||||
return ImmutableSet.<String> of("MY-10");
|
||||
return ImmutableSet.of("MY-10");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@ import java.util.Set;
|
|||
|
||||
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;
|
||||
|
@ -51,35 +50,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");
|
||||
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");
|
||||
case CENTOS:
|
||||
return input.version.equals("") || input.version.equals("5") || input.version.equals("6.0");
|
||||
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();
|
||||
|
@ -212,5 +182,4 @@ public class SoftLayerTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTes
|
|||
protected Set<String> getIso3166Codes() {
|
||||
return ImmutableSet.<String> of("SG", "US-CA", "US-TX", "US-VA", "US-WA", "NL");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue