mirror of https://github.com/apache/jclouds.git
Issue 692: cloudsigma nodes working with ubuntu 10.04
This commit is contained in:
parent
5d102ea0bb
commit
b0e2dccd43
|
@ -78,7 +78,7 @@ public class CloudSigmaComputeServiceContextModule
|
||||||
protected TemplateBuilder provideTemplate(Injector injector, TemplateBuilder template) {
|
protected TemplateBuilder provideTemplate(Injector injector, TemplateBuilder template) {
|
||||||
// until there is a way to query by drive info that can suggest which
|
// until there is a way to query by drive info that can suggest which
|
||||||
// drives are ssh boot
|
// 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
|
// return
|
||||||
// template.osFamily(UBUNTU).osVersionMatches("1[10].[10][04]").os64Bit(true).minRam(1024);
|
// template.osFamily(UBUNTU).osVersionMatches("1[10].[10][04]").os64Bit(true).minRam(1024);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
package org.jclouds.cloudsigma.compute;
|
package org.jclouds.cloudsigma.compute;
|
||||||
|
|
||||||
import org.jclouds.compute.BaseComputeServiceLiveTest;
|
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.jclouds.sshj.config.SshjSshClientModule;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
|
@ -37,5 +39,14 @@ public class CloudSigmaComputeServiceLiveTest extends BaseComputeServiceLiveTest
|
||||||
protected Module getSshModule() {
|
protected Module getSshModule() {
|
||||||
return new SshjSshClientModule();
|
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.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,9 +52,8 @@ public class CloudSigmaTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTe
|
||||||
public boolean apply(OsFamilyVersion64Bit input) {
|
public boolean apply(OsFamilyVersion64Bit input) {
|
||||||
switch (input.family) {
|
switch (input.family) {
|
||||||
case UBUNTU:
|
case UBUNTU:
|
||||||
return input.version.equals("11.04") || (input.version.equals("11.04") && !input.is64Bit)
|
return input.version.equals("11.04") || (input.version.equals("10.04") && !input.is64Bit)
|
||||||
|| !input.version.equals("11.10")
|
|| (input.version.equals("10.10") && input.is64Bit) || input.version.equals("");
|
||||||
&& (input.version.equals("") || !(input.version.matches("^[89].*")) && input.is64Bit);
|
|
||||||
case SOLARIS:
|
case SOLARIS:
|
||||||
return !input.is64Bit;
|
return !input.is64Bit;
|
||||||
case DEBIAN:
|
case DEBIAN:
|
||||||
|
@ -77,8 +76,8 @@ public class CloudSigmaTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTe
|
||||||
@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(), "10.04");
|
||||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true);
|
assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), false);
|
||||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
|
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
|
||||||
assertEquals(getCores(defaultTemplate.getHardware()), 1.0d);
|
assertEquals(getCores(defaultTemplate.getHardware()), 1.0d);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue