mirror of https://github.com/apache/jclouds.git
template changes in cloudsigma
This commit is contained in:
parent
25185090c9
commit
7719dad8d0
|
@ -78,7 +78,7 @@ public class CloudSigmaComputeServiceContextModule
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected TemplateBuilder provideTemplate(Injector injector, TemplateBuilder template) {
|
protected TemplateBuilder provideTemplate(Injector injector, TemplateBuilder template) {
|
||||||
return template.osFamily(OsFamily.UBUNTU).imageNameMatches(".*automated SSH Access.*");
|
return template.osFamily(OsFamily.UBUNTU).imageNameMatches(".*[Aa]utomated SSH Access.*").os64Bit(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
|
|
|
@ -53,14 +53,15 @@ public class CloudSigmaLasVegasTemplateBuilderLiveTest extends BaseTemplateBuild
|
||||||
switch (input.family) {
|
switch (input.family) {
|
||||||
case UBUNTU:
|
case UBUNTU:
|
||||||
return (input.version.equals("11.04") && input.is64Bit)
|
return (input.version.equals("11.04") && input.is64Bit)
|
||||||
|| (input.version.equals("10.04") && !input.is64Bit) || input.version.equals("");
|
|| (input.version.equals("11.10") && !input.is64Bit) || input.version.equals("")
|
||||||
|
|| input.version.equals("10.04");
|
||||||
case SOLARIS:
|
case SOLARIS:
|
||||||
return input.version.equals("") && input.is64Bit;
|
return input.version.equals("") && input.is64Bit;
|
||||||
case DEBIAN:
|
case DEBIAN:
|
||||||
return false;
|
return false;
|
||||||
case CENTOS:
|
case CENTOS:
|
||||||
return (input.version.equals("") || input.version.equals("6.0"))
|
return (input.version.equals("") || input.version.equals("5.7") || input.version.equals("6.0"))
|
||||||
|| (input.version.matches("5.[57]") && input.is64Bit);
|
&& input.is64Bit;
|
||||||
case WINDOWS:
|
case WINDOWS:
|
||||||
return (input.version.equals("2008 R2") || (input.version.equals("2003") || input.version.equals(""))
|
return (input.version.equals("2008 R2") || (input.version.equals("2003") || input.version.equals(""))
|
||||||
&& input.is64Bit)
|
&& input.is64Bit)
|
||||||
|
|
|
@ -38,7 +38,7 @@ import com.google.common.collect.ImmutableSet;
|
||||||
*
|
*
|
||||||
* @author Adrian Cole
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
@Test(groups = "live", testName = "CloudSigmaZurichTemplateBuilderLiveTest")
|
@Test(groups = "live", singleThreaded = true, testName = "CloudSigmaZurichTemplateBuilderLiveTest")
|
||||||
public class CloudSigmaZurichTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest {
|
public class CloudSigmaZurichTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest {
|
||||||
|
|
||||||
public CloudSigmaZurichTemplateBuilderLiveTest() {
|
public CloudSigmaZurichTemplateBuilderLiveTest() {
|
||||||
|
@ -53,17 +53,15 @@ public class CloudSigmaZurichTemplateBuilderLiveTest extends BaseTemplateBuilder
|
||||||
switch (input.family) {
|
switch (input.family) {
|
||||||
case UBUNTU:
|
case UBUNTU:
|
||||||
return input.version.equals("") || input.version.equals("10.04")
|
return input.version.equals("") || input.version.equals("10.04")
|
||||||
|| ((input.version.equals("11.04") || input.version.equals("10.10")) && input.is64Bit);
|
|| (input.version.equals("10.10") && input.is64Bit)
|
||||||
case SOLARIS:
|
|| (input.version.equals("11.04") && !input.is64Bit);
|
||||||
return input.version.equals("") && input.is64Bit;
|
|
||||||
case DEBIAN:
|
case DEBIAN:
|
||||||
return input.version.equals("") || input.version.equals("5.0");
|
return (input.version.equals("") || input.version.equals("6.0")) && input.is64Bit;
|
||||||
case CENTOS:
|
case CENTOS:
|
||||||
return input.version.equals("") || (input.version.equals("5.7") && input.is64Bit);
|
return (input.version.equals("") || input.version.equals("5.7")) && input.is64Bit;
|
||||||
case WINDOWS:
|
case WINDOWS:
|
||||||
return input.version.equals("") || input.version.equals("2003")
|
return input.version.equals("") || input.version.matches("200[38]")
|
||||||
|| (input.version.equals("2008 R2") && input.is64Bit)
|
|| (input.version.equals("2008 R2") && input.is64Bit);
|
||||||
|| (input.version.equals("2008") && !input.is64Bit);
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -75,9 +73,9 @@ public class CloudSigmaZurichTemplateBuilderLiveTest extends BaseTemplateBuilder
|
||||||
@Override
|
@Override
|
||||||
public void testDefaultTemplateBuilder() throws IOException {
|
public void testDefaultTemplateBuilder() throws IOException {
|
||||||
Template defaultTemplate = context.getComputeService().templateBuilder().build();
|
Template defaultTemplate = context.getComputeService().templateBuilder().build();
|
||||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "11.04");
|
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "");
|
||||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true);
|
assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true);
|
||||||
assertEquals(defaultTemplate.getImage().getId(), "331f8cff-99c9-4fa9-9069-8f699795ef7e");
|
assertEquals(defaultTemplate.getImage().getId(), "c9df6b90-420c-4c46-b7f2-8d9e99929a09");
|
||||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
|
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
|
||||||
assertEquals(defaultTemplate.getImage().getDefaultCredentials().identity, "root");
|
assertEquals(defaultTemplate.getImage().getDefaultCredentials().identity, "root");
|
||||||
assertEquals(getCores(defaultTemplate.getHardware()), 1.0d);
|
assertEquals(getCores(defaultTemplate.getHardware()), 1.0d);
|
||||||
|
|
Loading…
Reference in New Issue