Issue 692: cloudsigma nodes working with ubuntu 10.04

This commit is contained in:
Adrian Cole 2011-09-22 10:41:19 -07:00
parent 5d102ea0bb
commit b0e2dccd43
3 changed files with 17 additions and 7 deletions

View File

@ -78,7 +78,7 @@ public class CloudSigmaComputeServiceContextModule
protected TemplateBuilder provideTemplate(Injector injector, TemplateBuilder template) {
// until there is a way to query by drive info that can suggest which
// drives are ssh boot
return template.imageId("a3011b07-3f04-467e-9390-f9a85d859de1").minRam(1024);
return template.imageId("f3c7c665-cd54-4a78-8fd2-7ec2f028cf29").minRam(1024);
// return
// template.osFamily(UBUNTU).osVersionMatches("1[10].[10][04]").os64Bit(true).minRam(1024);
}

View File

@ -19,6 +19,8 @@
package org.jclouds.cloudsigma.compute;
import org.jclouds.compute.BaseComputeServiceLiveTest;
import org.jclouds.compute.domain.ExecResponse;
import org.jclouds.compute.domain.NodeMetadata;
import org.jclouds.sshj.config.SshjSshClientModule;
import org.testng.annotations.Test;
@ -38,4 +40,13 @@ public class CloudSigmaComputeServiceLiveTest extends BaseComputeServiceLiveTest
return new SshjSshClientModule();
}
protected void checkResponseEqualsHostname(ExecResponse execResponse, NodeMetadata node1) {
// hostname is not predictable based on node metadata
assert execResponse.getOutput().trim().equals("ubuntu");
}
@Override
public void testOptionToNotBlock() {
// start call has to block until we have a pool of reserved pre-cloned drives.
}
}

View File

@ -52,9 +52,8 @@ public class CloudSigmaTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTe
public boolean apply(OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return input.version.equals("11.04") || (input.version.equals("11.04") && !input.is64Bit)
|| !input.version.equals("11.10")
&& (input.version.equals("") || !(input.version.matches("^[89].*")) && input.is64Bit);
return input.version.equals("11.04") || (input.version.equals("10.04") && !input.is64Bit)
|| (input.version.equals("10.10") && input.is64Bit) || input.version.equals("");
case SOLARIS:
return !input.is64Bit;
case DEBIAN:
@ -77,8 +76,8 @@ public class CloudSigmaTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTe
@Override
public void testDefaultTemplateBuilder() throws IOException {
Template defaultTemplate = context.getComputeService().templateBuilder().build();
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "11.04");
assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true);
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "10.04");
assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), false);
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
assertEquals(getCores(defaultTemplate.getHardware()), 1.0d);
}