Issue 712:add support for CloudSigma Las Vegas

This commit is contained in:
Adrian Cole 2011-10-06 18:59:23 -07:00
parent 9adcd47bdb
commit 809a1b051c
129 changed files with 771 additions and 47 deletions

View File

@ -15,13 +15,13 @@ check out our examples site! https://github.com/jclouds/jclouds-examples
our compute api supports: aws-ec2, gogrid, cloudservers-us, stub (in-memory), deltacloud, our compute api supports: aws-ec2, gogrid, cloudservers-us, stub (in-memory), deltacloud,
cloudservers-uk, vcloud (generic), ec2 (generic), byon, nova, cloudservers-uk, vcloud (generic), ec2 (generic), byon, nova,
trmk-ecloud, trmk-vcloudexpress, eucalyptus (generic), trmk-ecloud, trmk-vcloudexpress, eucalyptus (generic)
cloudsigma-zrh, elasticstack(generic), go2cloud-jhb1, cloudsigma-zrh, elasticstack(generic), go2cloud-jhb1, cloudsigma-lvs,
bluelock-vcloud-zone01, stratogen-vcloud-mycloud, rimuhosting, bluelock-vcloud-zone01, stratogen-vcloud-mycloud, rimuhosting,
slicehost, eucalyptus-partnercloud-ec2, elastichosts-lon-p (Peer 1), slicehost, eucalyptus-partnercloud-ec2, elastichosts-lon-p (Peer 1),
elastichosts-sat-p (Peer 1), elastichosts-lon-b (BlueSquare), elastichosts-sat-p (Peer 1), elastichosts-lon-b (BlueSquare),
openhosting-east1, serverlove-z1-man, skalicloud-sdg-my, openhosting-east1, serverlove-z1-man, skalicloud-sdg-my,
greenhousedata-element-vcloud, softlayer greenhousedata-element-vcloud, softlayer, cloudsigma (generic)
* note * the pom dependency org.jclouds/jclouds-allcompute gives you access to * note * the pom dependency org.jclouds/jclouds-allcompute gives you access to
to all of these providers to all of these providers

View File

@ -95,6 +95,11 @@
<artifactId>vcloud</artifactId> <artifactId>vcloud</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.jclouds.api</groupId>
<artifactId>cloudsigma</artifactId>
<version>${project.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.jclouds.provider</groupId> <groupId>org.jclouds.provider</groupId>
<artifactId>trmk-vcloudexpress</artifactId> <artifactId>trmk-vcloudexpress</artifactId>
@ -165,6 +170,11 @@
<artifactId>cloudsigma-zrh</artifactId> <artifactId>cloudsigma-zrh</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.jclouds.provider</groupId>
<artifactId>cloudsigma-lvs</artifactId>
<version>${project.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.jclouds.provider</groupId> <groupId>org.jclouds.provider</groupId>
<artifactId>go2cloud-jhb1</artifactId> <artifactId>go2cloud-jhb1</artifactId>

139
apis/cloudsigma/pom.xml Normal file
View File

@ -0,0 +1,139 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to jclouds, Inc. (jclouds) under one or more
contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. jclouds licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-project</artifactId>
<version>1.2.0-SNAPSHOT</version>
<relativePath>../../project/pom.xml</relativePath>
</parent>
<groupId>org.jclouds.api</groupId>
<artifactId>cloudsigma</artifactId>
<name>jclouds CloudSigma API</name>
<description>ComputeService binding to the CloudSigma API</description>
<packaging>bundle</packaging>
<properties>
<test.cloudsigma.endpoint>https://api.cloudsigma.com</test.cloudsigma.endpoint>
<test.cloudsigma.apiversion>1.0</test.cloudsigma.apiversion>
<test.cloudsigma.identity>FIXME</test.cloudsigma.identity>
<test.cloudsigma.credential>FIXME</test.cloudsigma.credential>
</properties>
<dependencies>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-compute</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jclouds.driver</groupId>
<artifactId>jclouds-sshj</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-core</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-compute</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds.driver</groupId>
<artifactId>jclouds-log4j</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>live</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>integration</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<systemProperties>
<property>
<name>test.cloudsigma.endpoint</name>
<value>${test.cloudsigma.endpoint}</value>
</property>
<property>
<name>test.cloudsigma.apiversion</name>
<value>${test.cloudsigma.apiversion}</value>
</property>
<property>
<name>test.cloudsigma.identity</name>
<value>${test.cloudsigma.identity}</value>
</property>
<property>
<name>test.cloudsigma.credential</name>
<value>${test.cloudsigma.credential}</value>
</property>
<property>
<name>jclouds.compute.blacklist-nodes</name>
<value>${jclouds.compute.blacklist-nodes}</value>
</property>
</systemProperties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Export-Package>org.jclouds.cloudsigma.*;version="${project.version}"</Export-Package>
<Import-Package>org.jclouds.*;version="${project.version}",*</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -42,6 +42,7 @@ import org.jclouds.compute.config.ComputeServiceAdapterContextModule;
import org.jclouds.compute.domain.Hardware; import org.jclouds.compute.domain.Hardware;
import org.jclouds.compute.domain.Image; import org.jclouds.compute.domain.Image;
import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.compute.domain.NodeMetadata;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit; import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.TemplateBuilder; import org.jclouds.compute.domain.TemplateBuilder;
import org.jclouds.compute.domain.Volume; import org.jclouds.compute.domain.Volume;
@ -76,11 +77,7 @@ public class CloudSigmaComputeServiceContextModule
@Override @Override
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 return template.osFamily(OsFamily.UBUNTU).imageNameMatches(".*automated SSH Access.*");
// drives are ssh boot
return template.imageId("f3c7c665-cd54-4a78-8fd2-7ec2f028cf29").minRam(1024);
// return
// template.osFamily(UBUNTU).osVersionMatches("1[10].[10][04]").os64Bit(true).minRam(1024);
} }
@SuppressWarnings({ "unchecked", "rawtypes" }) @SuppressWarnings({ "unchecked", "rawtypes" })

View File

@ -651,6 +651,8 @@ public class CloudSigmaAsyncClientTest extends RestClientTest<CloudSigmaAsyncCli
@Override @Override
public RestContextSpec<CloudSigmaClient, CloudSigmaAsyncClient> createContextSpec() { public RestContextSpec<CloudSigmaClient, CloudSigmaAsyncClient> createContextSpec() {
return new RestContextFactory().createContextSpec("cloudsigma-zrh", "foo", "bar", new Properties()); Properties props = new Properties();
props.setProperty("cloudsigma.endpoint", "https://api.cloudsigma.com");
return new RestContextFactory().createContextSpec("cloudsigma", "foo", "bar", props);
} }
} }

View File

@ -78,11 +78,12 @@ public class CloudSigmaClientLiveTest {
protected long driveSize = 8 * 1024 * 1024 * 1024l; protected long driveSize = 8 * 1024 * 1024 * 1024l;
protected int maxDriveImageTime = 300; protected int maxDriveImageTime = 300;
protected String vncPassword = "Il0veVNC"; protected String vncPassword = "Il0veVNC";
protected String bootDrive = "f3c7c665-cd54-4a78-8fd2-7ec2f028cf29";
protected CloudSigmaClient client; protected CloudSigmaClient client;
protected RestContext<CloudSigmaClient, CloudSigmaAsyncClient> context; protected RestContext<CloudSigmaClient, CloudSigmaAsyncClient> context;
protected Predicate<IPSocket> socketTester; protected Predicate<IPSocket> socketTester;
protected String provider = "cloudsigma-zrh"; protected String provider = "cloudsigma";
protected String identity; protected String identity;
protected String credential; protected String credential;
protected String endpoint; protected String endpoint;
@ -460,7 +461,7 @@ public class CloudSigmaClientLiveTest {
protected void prepareDrive() { protected void prepareDrive() {
client.destroyDrive(drive.getUuid()); client.destroyDrive(drive.getUuid());
drive = client.cloneDrive("f3c7c665-cd54-4a78-8fd2-7ec2f028cf29", drive.getName(), drive = client.cloneDrive(bootDrive, drive.getName(),
new CloneDriveOptions().size(driveSize)); new CloneDriveOptions().size(driveSize));
assert driveNotClaimed.apply(drive) : client.getDriveInfo(drive.getUuid()); assert driveNotClaimed.apply(drive) : client.getDriveInfo(drive.getUuid());
System.err.println("after prepare" + client.getDriveInfo(drive.getUuid())); System.err.println("after prepare" + client.getDriveInfo(drive.getUuid()));

View File

@ -32,7 +32,7 @@ import com.google.inject.Module;
@Test(groups = "live") @Test(groups = "live")
public class CloudSigmaComputeServiceLiveTest extends BaseComputeServiceLiveTest { public class CloudSigmaComputeServiceLiveTest extends BaseComputeServiceLiveTest {
public CloudSigmaComputeServiceLiveTest() { public CloudSigmaComputeServiceLiveTest() {
provider = "cloudsigma-zrh"; provider = "cloudsigma";
} }
@Override @Override

Some files were not shown because too many files have changed in this diff Show More