mirror of https://github.com/apache/jclouds.git
Issue 758:new endpoint for cloudsigma-zrh
This commit is contained in:
parent
4c835851de
commit
6823659613
|
@ -37,6 +37,10 @@ public class CloudSigmaPropertiesBuilder extends PropertiesBuilder {
|
||||||
Properties properties = super.defaultProperties();
|
Properties properties = super.defaultProperties();
|
||||||
properties.setProperty(PROPERTY_API_VERSION, "1.0");
|
properties.setProperty(PROPERTY_API_VERSION, "1.0");
|
||||||
properties.setProperty(PROPERTY_VNC_PASSWORD, "IL9vs34d");
|
properties.setProperty(PROPERTY_VNC_PASSWORD, "IL9vs34d");
|
||||||
|
// passwords are set post-boot, so auth failures are possible
|
||||||
|
// from a race condition applying the password set script
|
||||||
|
properties.setProperty("jclouds.ssh.max-retries", "7");
|
||||||
|
properties.setProperty("jclouds.ssh.retry-auth", "true");
|
||||||
return properties;
|
return properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@ import org.jclouds.compute.domain.OperatingSystem;
|
||||||
import org.jclouds.compute.domain.OperatingSystem.Builder;
|
import org.jclouds.compute.domain.OperatingSystem.Builder;
|
||||||
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
|
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
|
||||||
import org.jclouds.domain.Location;
|
import org.jclouds.domain.Location;
|
||||||
import org.jclouds.domain.LoginCredentials;
|
|
||||||
|
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
import com.google.common.base.Supplier;
|
import com.google.common.base.Supplier;
|
||||||
|
@ -61,7 +60,6 @@ public class PreinstalledDiskToImage implements Function<DriveInfo, Image> {
|
||||||
.family(parsed.family);
|
.family(parsed.family);
|
||||||
return new ImageBuilder().ids(drive.getUuid())
|
return new ImageBuilder().ids(drive.getUuid())
|
||||||
.userMetadata(ImmutableMap.<String, String> of("size", drive.getSize() / 1024 / 1024 / 1024 + ""))
|
.userMetadata(ImmutableMap.<String, String> of("size", drive.getSize() / 1024 / 1024 / 1024 + ""))
|
||||||
.defaultCredentials(new LoginCredentials("cloudsigma", "cloudsigma", null, true))
|
|
||||||
.location(locationSupplier.get()).name(drive.getName()).description(description)
|
.location(locationSupplier.get()).name(drive.getName()).description(description)
|
||||||
.operatingSystem(builder.build()).version("").build();
|
.operatingSystem(builder.build()).version("").build();
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<packaging>bundle</packaging>
|
<packaging>bundle</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<test.cloudsigma-zrh.endpoint>https://api.cloudsigma.com</test.cloudsigma-zrh.endpoint>
|
<test.cloudsigma-zrh.endpoint>https://api.zrh.cloudsigma.com</test.cloudsigma-zrh.endpoint>
|
||||||
<test.cloudsigma-zrh.apiversion>1.0</test.cloudsigma-zrh.apiversion>
|
<test.cloudsigma-zrh.apiversion>1.0</test.cloudsigma-zrh.apiversion>
|
||||||
<test.cloudsigma-zrh.identity>FIXME</test.cloudsigma-zrh.identity>
|
<test.cloudsigma-zrh.identity>FIXME</test.cloudsigma-zrh.identity>
|
||||||
<test.cloudsigma-zrh.credential>FIXME</test.cloudsigma-zrh.credential>
|
<test.cloudsigma-zrh.credential>FIXME</test.cloudsigma-zrh.credential>
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class CloudSigmaZurichPropertiesBuilder extends CloudSigmaPropertiesBuild
|
||||||
protected Properties defaultProperties() {
|
protected Properties defaultProperties() {
|
||||||
Properties properties = super.defaultProperties();
|
Properties properties = super.defaultProperties();
|
||||||
properties.setProperty(PROPERTY_ISO3166_CODES, "CH-ZH");
|
properties.setProperty(PROPERTY_ISO3166_CODES, "CH-ZH");
|
||||||
properties.setProperty(PROPERTY_ENDPOINT, "https://api.cloudsigma.com");
|
properties.setProperty(PROPERTY_ENDPOINT, "https://api.zrh.cloudsigma.com");
|
||||||
return properties;
|
return properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ public class CloudSigmaZurichProviderMetadata extends BaseProviderMetadata {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public URI getConsole() {
|
public URI getConsole() {
|
||||||
return URI.create("https://cs.cloudsigma.com/");
|
return URI.create("https://gui.zrh.cloudsigma.com/");
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
|
|
|
@ -52,19 +52,17 @@ public class CloudSigmaZurichTemplateBuilderLiveTest extends BaseTemplateBuilder
|
||||||
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("10.04") && !input.is64Bit)
|
return (input.version.equals("") || input.version.matches("1[01].04") || input.version.equals("10.10"))
|
||||||
|| (input.version.equals("10.10") && input.is64Bit) || input.version.equals("");
|
&& input.is64Bit;
|
||||||
case SOLARIS:
|
case SOLARIS:
|
||||||
return !input.is64Bit;
|
return input.version.equals("") && input.is64Bit;
|
||||||
case DEBIAN:
|
case DEBIAN:
|
||||||
return input.is64Bit;
|
return (input.version.equals("") || input.version.equals("5.0")) && input.is64Bit;
|
||||||
case CENTOS:
|
case CENTOS:
|
||||||
return input.version.equals("5.5") || input.version.equals("")
|
return input.version.equals("") || (input.version.equals("5.7") && input.is64Bit);
|
||||||
|| (input.version.matches("5.0") && input.is64Bit)
|
|
||||||
|| (input.version.matches("6.0") && !input.is64Bit);
|
|
||||||
case WINDOWS:
|
case WINDOWS:
|
||||||
return input.version.equals("2008 R2") || (input.version.equals("2008") && !input.is64Bit)
|
return input.version.equals("")
|
||||||
|| input.version.equals("") || (input.version.equals("2003"));
|
|| ((input.version.equals("2008") || input.version.equals("2003")) && !input.is64Bit);
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -78,9 +76,9 @@ public class CloudSigmaZurichTemplateBuilderLiveTest extends BaseTemplateBuilder
|
||||||
Template defaultTemplate = context.getComputeService().templateBuilder().build();
|
Template defaultTemplate = context.getComputeService().templateBuilder().build();
|
||||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "11.04");
|
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "11.04");
|
||||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true);
|
assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true);
|
||||||
assertEquals(defaultTemplate.getImage().getId(), "7fad4fe1-daf3-4cb8-a847-082aae4d8506");
|
assertEquals(defaultTemplate.getImage().getId(), "331f8cff-99c9-4fa9-9069-8f699795ef7e");
|
||||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
|
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
|
||||||
assertEquals(defaultTemplate.getImage().getDefaultCredentials().identity, "cloudsigma");
|
assertEquals(defaultTemplate.getImage().getDefaultCredentials().identity, "root");
|
||||||
assertEquals(getCores(defaultTemplate.getHardware()), 1.0d);
|
assertEquals(getCores(defaultTemplate.getHardware()), 1.0d);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue