mirror of https://github.com/apache/jclouds.git
Issue 724:add ubuntu precise to the supported versions
This commit is contained in:
parent
bf584390e0
commit
2d704bde59
|
@ -162,7 +162,7 @@ public abstract class BaseComputeServiceContextModule extends AbstractModule {
|
|||
@Provides
|
||||
@Named("DEFAULT")
|
||||
protected TemplateBuilder provideTemplate(Injector injector, TemplateBuilder template) {
|
||||
return template.osFamily(UBUNTU).osVersionMatches("1[10].[10][04]").os64Bit(true);
|
||||
return template.osFamily(UBUNTU).osVersionMatches("1[012].[01][04]").os64Bit(true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -132,7 +132,7 @@ public class RunScriptData {
|
|||
normalizeHostAndDNSConfig(),//
|
||||
exec("apt-get update -qq"),
|
||||
exec("which curl || " + aptInstall + " curl"),//
|
||||
exec(aptInstall + " openjdk-7-jdk" + "||" + aptInstall + " openjdk-6-jdk"),//
|
||||
exec(aptInstall + " openjdk-6-jdk"),//
|
||||
exec("echo \"export PATH=\\\"\\$JAVA_HOME/bin/:\\$PATH\\\"\" >> $HOME/.bashrc"));
|
||||
|
||||
public static String yumInstall = "yum --nogpgcheck -y install";
|
||||
|
@ -140,12 +140,12 @@ public class RunScriptData {
|
|||
public static final Statement YUM_RUN_SCRIPT = newStatementList(//
|
||||
normalizeHostAndDNSConfig(),//
|
||||
exec("which curl || " + yumInstall + " curl"),//
|
||||
exec(yumInstall + " java-1.7.0-openjdk-devel" + "||" + yumInstall + " java-1.6.0-openjdk-devel"),//
|
||||
exec(yumInstall + " java-1.6.0-openjdk-devel"),//
|
||||
exec("echo \"export PATH=\\\"\\$JAVA_HOME/bin/:\\$PATH\\\"\" >> /etc/bashrc"));
|
||||
|
||||
public static final Statement ZYPPER_RUN_SCRIPT = newStatementList(//
|
||||
normalizeHostAndDNSConfig(),//
|
||||
exec("which curl || zypper install curl"),//
|
||||
exec("zypper install java-1.7.0-openjdk" + "||" + "zypper install java-1.6.0-openjdk"),//
|
||||
exec("zypper install java-1.6.0-openjdk"),//
|
||||
exec("echo \"export PATH=\\\"\\$JAVA_HOME/bin/:\\$PATH\\\"\" >> /etc/bashrc"));
|
||||
}
|
||||
|
|
|
@ -181,9 +181,10 @@ public class AWSEC2TemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest {
|
|||
assertEquals(fastestTemplate.getImage().getOperatingSystem().getArch(), "hvm");
|
||||
|
||||
fastestTemplate = context.getComputeService().templateBuilder().fastest().build();
|
||||
System.out.println(fastestTemplate.getImage());
|
||||
assert (fastestTemplate.getImage().getProviderId().startsWith("ami-")) : fastestTemplate;
|
||||
assertEquals(fastestTemplate.getHardware().getProviderId(), InstanceType.CC1_4XLARGE);
|
||||
assertEquals(fastestTemplate.getImage().getOperatingSystem().getVersion(), "11.10");
|
||||
assertEquals(fastestTemplate.getImage().getOperatingSystem().getVersion(), "12.04");
|
||||
assertEquals(fastestTemplate.getImage().getOperatingSystem().is64Bit(), true);
|
||||
assertEquals(fastestTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
|
||||
assertEquals(fastestTemplate.getImage().getUserMetadata().get("rootDeviceType"), "ebs");
|
||||
|
|
|
@ -52,7 +52,9 @@ public class CloudServersUKTemplateBuilderLiveTest extends BaseTemplateBuilderLi
|
|||
public boolean apply(OsFamilyVersion64Bit input) {
|
||||
switch (input.family) {
|
||||
case UBUNTU:
|
||||
return !(input.version.startsWith("11.10") || input.version.equals("8.04")) && input.is64Bit;
|
||||
return !(input.version.startsWith("12.04") || input.version.startsWith("11.10") || input.version
|
||||
.equals("8.04"))
|
||||
&& input.is64Bit;
|
||||
case DEBIAN:
|
||||
return input.is64Bit;
|
||||
case CENTOS:
|
||||
|
|
|
@ -52,7 +52,9 @@ public class CloudServersUSTemplateBuilderLiveTest extends BaseTemplateBuilderLi
|
|||
public boolean apply(OsFamilyVersion64Bit input) {
|
||||
switch (input.family) {
|
||||
case UBUNTU:
|
||||
return !(input.version.startsWith("11.10") || input.version.equals("8.04")) && input.is64Bit;
|
||||
return !(input.version.startsWith("12.04") || input.version.startsWith("11.10") || input.version
|
||||
.equals("8.04"))
|
||||
&& input.is64Bit;
|
||||
case DEBIAN:
|
||||
return input.is64Bit;
|
||||
case CENTOS:
|
||||
|
|
Loading…
Reference in New Issue