mirror of https://github.com/apache/jclouds.git
Issue 619:support parsing ubuntu oneiric
This commit is contained in:
parent
58fb1c54e0
commit
7c1bf8b057
|
@ -52,7 +52,7 @@ public class DeltacloudTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTe
|
|||
public boolean apply(OsFamilyVersion64Bit input) {
|
||||
switch (input.family) {
|
||||
case UBUNTU:
|
||||
return !(input.version.equals("11.04") || input.version.equals("8.04")) && input.is64Bit;
|
||||
return !(input.version.startsWith("11") || input.version.equals("8.04")) && input.is64Bit;
|
||||
case DEBIAN:
|
||||
return !(input.version.equals("6.0")) && input.is64Bit;
|
||||
case CENTOS:
|
||||
|
|
|
@ -57,7 +57,7 @@ public interface ComputeServiceConstants {
|
|||
public static class ReferenceData {
|
||||
@Inject(optional = true)
|
||||
@Named(PROPERTY_OS_VERSION_MAP_JSON)
|
||||
public String osVersionMapJson = "{\"suse\":{\"\":\"\",\"11\":\"11\",\"11 SP1\":\"11 SP1\"},\"debian\":{\"\":\"\",\"lenny\":\"5.0\",\"squeeze\":\"6.0\"},\"centos\":{\"\":\"\",\"5\":\"5.0\",\"5.2\":\"5.2\",\"5.3\":\"5.3\",\"5.4\":\"5.4\",\"5.5\":\"5.5\"},\"rhel\":{\"\":\"\",\"5\":\"5.0\",\"5.2\":\"5.2\",\"5.3\":\"5.3\",\"5.4\":\"5.4\",\"5.5\":\"5.5\"},\"solaris\":{\"\":\"\",\"10\":\"10\"},\"ubuntu\":{\"\":\"\",\"hardy\":\"8.04\",\"karmic\":\"9.10\",\"lucid\":\"10.04\",\"10.04.1\":\"10.04\",\"maverick\":\"10.10\",\"natty\":\"11.04\"},\"windows\":{\"\":\"\",\"2003\":\"2003\",\"2003 Standard\":\"2003\",\"2003 R2\":\"2003 R2\",\"2008\":\"2008\",\"2008 Web\":\"2008\",\"2008 Server\":\"2008\",\"Server 2008\":\"2008\",\"2008 R1\":\"2008 R1\",\"2008 R2\":\"2008 R2\",\"Server 2008 R2\":\"2008 R2\",\"2008 Server R2\":\"2008 R2\",\"2008 SP2\":\"2008 SP2\",\"Server 2008 SP2\":\"2008 SP2\"}}";
|
||||
public String osVersionMapJson = "{\"suse\":{\"\":\"\",\"11\":\"11\",\"11 SP1\":\"11 SP1\"},\"debian\":{\"\":\"\",\"lenny\":\"5.0\",\"squeeze\":\"6.0\"},\"centos\":{\"\":\"\",\"5\":\"5.0\",\"5.2\":\"5.2\",\"5.3\":\"5.3\",\"5.4\":\"5.4\",\"5.5\":\"5.5\"},\"rhel\":{\"\":\"\",\"5\":\"5.0\",\"5.2\":\"5.2\",\"5.3\":\"5.3\",\"5.4\":\"5.4\",\"5.5\":\"5.5\"},\"solaris\":{\"\":\"\",\"10\":\"10\"},\"ubuntu\":{\"\":\"\",\"hardy\":\"8.04\",\"karmic\":\"9.10\",\"lucid\":\"10.04\",\"10.04.1\":\"10.04\",\"maverick\":\"10.10\",\"natty\":\"11.04\",\"oneiric\":\"11.10\"},\"windows\":{\"\":\"\",\"2003\":\"2003\",\"2003 Standard\":\"2003\",\"2003 R2\":\"2003 R2\",\"2008\":\"2008\",\"2008 Web\":\"2008\",\"2008 Server\":\"2008\",\"Server 2008\":\"2008\",\"2008 R1\":\"2008 R1\",\"2008 R2\":\"2008 R2\",\"Server 2008 R2\":\"2008 R2\",\"2008 Server R2\":\"2008 R2\",\"2008 SP2\":\"2008 SP2\",\"Server 2008 SP2\":\"2008 SP2\"}}";
|
||||
}
|
||||
|
||||
@Singleton
|
||||
|
|
|
@ -55,7 +55,6 @@ import java.util.Map.Entry;
|
|||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.jclouds.Constants;
|
||||
import org.jclouds.compute.domain.ComputeMetadata;
|
||||
|
|
|
@ -84,7 +84,7 @@ public class AWSEC2TemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest {
|
|||
.osVersionMatches("1[10].[10][04]").imageDescriptionMatches("ubuntu-images").osFamily(OsFamily.UBUNTU).build();
|
||||
|
||||
assert (template.getImage().getProviderId().startsWith("ami-")) : template;
|
||||
assertEquals(template.getImage().getOperatingSystem().getVersion(), "11.04");
|
||||
assertEquals(template.getImage().getOperatingSystem().getVersion(), "11.10");
|
||||
assertEquals(template.getImage().getOperatingSystem().is64Bit(), false);
|
||||
assertEquals(template.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
|
||||
assertEquals(template.getImage().getUserMetadata().get("rootDeviceType"), "instance-store");
|
||||
|
|
|
@ -52,7 +52,7 @@ public class CloudServersUKTemplateBuilderLiveTest extends BaseTemplateBuilderLi
|
|||
public boolean apply(OsFamilyVersion64Bit input) {
|
||||
switch (input.family) {
|
||||
case UBUNTU:
|
||||
return !(input.version.equals("11.04") || input.version.equals("8.04")) && input.is64Bit;
|
||||
return !(input.version.startsWith("11") || input.version.equals("8.04")) && input.is64Bit;
|
||||
case DEBIAN:
|
||||
return !(input.version.equals("6.0")) && input.is64Bit;
|
||||
case CENTOS:
|
||||
|
|
|
@ -52,7 +52,7 @@ public class CloudServersUSTemplateBuilderLiveTest extends BaseTemplateBuilderLi
|
|||
public boolean apply(OsFamilyVersion64Bit input) {
|
||||
switch (input.family) {
|
||||
case UBUNTU:
|
||||
return !(input.version.equals("11.04") || input.version.equals("8.04")) && input.is64Bit;
|
||||
return !(input.version.startsWith("11") || input.version.equals("8.04")) && input.is64Bit;
|
||||
case DEBIAN:
|
||||
return !(input.version.equals("6.0")) && input.is64Bit;
|
||||
case CENTOS:
|
||||
|
|
|
@ -52,8 +52,10 @@ public class CloudSigmaTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTe
|
|||
public boolean apply(OsFamilyVersion64Bit input) {
|
||||
switch (input.family) {
|
||||
case UBUNTU:
|
||||
return (input.version.equals("") || input.version.equals("10.04"))
|
||||
|| !(input.version.matches("^[89].*")) && input.is64Bit;
|
||||
return !input.version.equals("11.10")
|
||||
&& ((input.version.equals("") || input.version.equals("10.04")) || !(input.version
|
||||
.matches("^[89].*"))
|
||||
&& input.is64Bit);
|
||||
case DEBIAN:
|
||||
return input.is64Bit;
|
||||
case CENTOS:
|
||||
|
|
|
@ -51,7 +51,7 @@ public class RimuHostingTemplateBuilderLiveTest extends BaseTemplateBuilderLiveT
|
|||
public boolean apply(OsFamilyVersion64Bit input) {
|
||||
switch (input.family) {
|
||||
case UBUNTU:
|
||||
return input.version.matches("^[89].*");
|
||||
return input.version.matches("^[89].*") || input.version.equals("11.10");
|
||||
case DEBIAN:
|
||||
return false;
|
||||
case CENTOS:
|
||||
|
|
|
@ -55,7 +55,7 @@ public class SlicehostTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTes
|
|||
case UBUNTU:
|
||||
return input.version.equals("") || input.version.startsWith("10") || input.version.equals("9.10");
|
||||
case DEBIAN:
|
||||
return !input.version.equals("6.0");
|
||||
return !(input.version.equals("6.0") && !input.is64Bit);
|
||||
case RHEL:
|
||||
return input.version.equals("") && input.is64Bit;
|
||||
case CENTOS:
|
||||
|
|
Loading…
Reference in New Issue