Updated Branches: refs/heads/1.7.x fa91a5474 -> 839ba25b7
Add CloudSigma v2 Washington DC provider Project: http://git-wip-us.apache.org/repos/asf/jclouds-labs/repo Commit: http://git-wip-us.apache.org/repos/asf/jclouds-labs/commit/839ba25b Tree: http://git-wip-us.apache.org/repos/asf/jclouds-labs/tree/839ba25b Diff: http://git-wip-us.apache.org/repos/asf/jclouds-labs/diff/839ba25b Branch: refs/heads/1.7.x Commit: 839ba25b7ee45b77f78441c1f996c68a99d9f9e1 Parents: fa91a54 Author: Vladimir Shevchenko <[email protected]> Authored: Fri Jan 10 01:43:35 2014 +0700 Committer: Ignasi Barrera <[email protected]> Committed: Tue Jan 14 12:25:33 2014 +0100 ---------------------------------------------------------------------- cloudsigma2-wdc/pom.xml | 126 +++++++++++++++++++ .../CloudSigma2WashingtonProviderMetadata.java | 79 ++++++++++++ .../org.jclouds.providers.ProviderMetadata | 1 + .../CloudSigma2WashingtonLiveTest.java | 29 +++++ pom.xml | 1 + 5 files changed, 236 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/839ba25b/cloudsigma2-wdc/pom.xml ---------------------------------------------------------------------- diff --git a/cloudsigma2-wdc/pom.xml b/cloudsigma2-wdc/pom.xml new file mode 100644 index 0000000..8130d98 --- /dev/null +++ b/cloudsigma2-wdc/pom.xml @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF 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.apache.jclouds.labs</groupId> + <artifactId>jclouds-labs</artifactId> + <version>1.7.1-SNAPSHOT</version> + </parent> + + <!-- TODO: when out of labs, switch to org.apache.jclouds.provider --> + <groupId>org.apache.jclouds.labs</groupId> + <artifactId>cloudsigma2-wdc</artifactId> + <version>1.7.1-SNAPSHOT</version> + <name>jclouds CloudSigma v2 Washington DC Provider</name> + <description>ComputeService binding to the CloudSigma datacenter in Washington DC</description> + <packaging>bundle</packaging> + + <properties> + <test.cloudsigma2-wdc.endpoint>https://wdc.cloudsigma.com/api/2.0/</test.cloudsigma2-wdc.endpoint> + <test.cloudsigma2-wdc.api-version>2.0</test.cloudsigma2-wdc.api-version> + <test.cloudsigma2-wdc.build-version /> + <test.cloudsigma2-wdc.identity>FIXME</test.cloudsigma2-wdc.identity> + <test.cloudsigma2-wdc.credential>FIXME</test.cloudsigma2-wdc.credential> + <test.cloudsigma2-wdc.template /> + <jclouds.osgi.export>org.jclouds.cloudsigma2*;version="${project.version}"</jclouds.osgi.export> + <jclouds.osgi.import> + org.jclouds.compute.internal;version="${project.version}", + org.jclouds.rest.internal;version="${project.version}", + org.jclouds*;version="${project.version}", + * + </jclouds.osgi.import> + </properties> + + <dependencies> + <dependency> + <groupId>org.apache.jclouds.labs</groupId> + <artifactId>cloudsigma2</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.jclouds.labs</groupId> + <artifactId>cloudsigma2</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.jclouds</groupId> + <artifactId>jclouds-core</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.jclouds</groupId> + <artifactId>jclouds-compute</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.jclouds.driver</groupId> + <artifactId>jclouds-log4j</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.jclouds.driver</groupId> + <artifactId>jclouds-sshj</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> + <systemPropertyVariables> + <test.cloudsigma2-wdc.endpoint>${test.cloudsigma2-wdc.endpoint}</test.cloudsigma2-wdc.endpoint> + <test.cloudsigma2-wdc.api-version>${test.cloudsigma2-wdc.api-version}</test.cloudsigma2-wdc.api-version> + <test.cloudsigma2-wdc.build-version>${test.cloudsigma2-wdc.build-version}</test.cloudsigma2-wdc.build-version> + <test.cloudsigma2-wdc.identity>${test.cloudsigma2-wdc.identity}</test.cloudsigma2-wdc.identity> + <test.cloudsigma2-wdc.credential>${test.cloudsigma2-wdc.credential}</test.cloudsigma2-wdc.credential> + <test.cloudsigma2-wdc.template>${test.cloudsigma2-wdc.template}</test.cloudsigma2-wdc.template> + </systemPropertyVariables> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> + +</project> http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/839ba25b/cloudsigma2-wdc/src/main/java/org/jclouds/cloudsigma2/CloudSigma2WashingtonProviderMetadata.java ---------------------------------------------------------------------- diff --git a/cloudsigma2-wdc/src/main/java/org/jclouds/cloudsigma2/CloudSigma2WashingtonProviderMetadata.java b/cloudsigma2-wdc/src/main/java/org/jclouds/cloudsigma2/CloudSigma2WashingtonProviderMetadata.java new file mode 100644 index 0000000..578df20 --- /dev/null +++ b/cloudsigma2-wdc/src/main/java/org/jclouds/cloudsigma2/CloudSigma2WashingtonProviderMetadata.java @@ -0,0 +1,79 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF 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. + */ +package org.jclouds.cloudsigma2; + +import org.jclouds.providers.ProviderMetadata; +import org.jclouds.providers.internal.BaseProviderMetadata; + +import java.net.URI; +import java.util.Properties; + +/** + * Implementation of {@link org.jclouds.providers.internal.BaseProviderMetadata} for CloudSigma Washington DC. + * + * @author Vladimir Shevchenko + */ +public class CloudSigma2WashingtonProviderMetadata extends BaseProviderMetadata { + + public static Builder builder() { + return new Builder(); + } + + @Override + public Builder toBuilder() { + return builder().fromProviderMetadata(this); + } + + public CloudSigma2WashingtonProviderMetadata() { + super(builder()); + } + + public CloudSigma2WashingtonProviderMetadata(Builder builder) { + super(builder); + } + + public static Properties defaultProperties() { + Properties properties = new Properties(); + return properties; + } + + public static class Builder extends BaseProviderMetadata.Builder { + + protected Builder() { + id("cloudsigma2-wdc") + .name("CloudSigma 2 Washington DC") + .apiMetadata(new CloudSigma2ApiMetadata()) + .homepage(URI.create("http://www.cloudsigma.com/en/our-cloud/features")) + .console(URI.create("https://gui.wdc.cloudsigma.com/")) + .iso3166Codes("US-DC") + .endpoint("https://wdc.cloudsigma.com/api/2.0/") + .defaultProperties(CloudSigma2WashingtonProviderMetadata.defaultProperties()); + } + + @Override + public CloudSigma2WashingtonProviderMetadata build() { + return new CloudSigma2WashingtonProviderMetadata(this); + } + + @Override + public Builder fromProviderMetadata(ProviderMetadata in) { + super.fromProviderMetadata(in); + return this; + } + + } +} http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/839ba25b/cloudsigma2-wdc/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata ---------------------------------------------------------------------- diff --git a/cloudsigma2-wdc/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/cloudsigma2-wdc/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata new file mode 100644 index 0000000..383b696 --- /dev/null +++ b/cloudsigma2-wdc/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata @@ -0,0 +1 @@ +org.jclouds.cloudsigma2.CloudSigma2WashingtonProviderMetadata http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/839ba25b/cloudsigma2-wdc/src/test/java/org/jclouds/cloudsigma2/CloudSigma2WashingtonLiveTest.java ---------------------------------------------------------------------- diff --git a/cloudsigma2-wdc/src/test/java/org/jclouds/cloudsigma2/CloudSigma2WashingtonLiveTest.java b/cloudsigma2-wdc/src/test/java/org/jclouds/cloudsigma2/CloudSigma2WashingtonLiveTest.java new file mode 100644 index 0000000..93ad16e --- /dev/null +++ b/cloudsigma2-wdc/src/test/java/org/jclouds/cloudsigma2/CloudSigma2WashingtonLiveTest.java @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF 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. + */ +package org.jclouds.cloudsigma2; + +import org.testng.annotations.Test; + +/** + * @author Vladimir Shevchenko + */ +@Test(groups = {"live"}) +public class CloudSigma2WashingtonLiveTest extends CloudSigma2ApiLiveTest { + public CloudSigma2WashingtonLiveTest() { + provider = "cloudsigma2-wdc"; + } +} http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/839ba25b/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index fa1a227..5805829 100644 --- a/pom.xml +++ b/pom.xml @@ -71,6 +71,7 @@ <module>cdmi</module> <module>cloudsigma2</module> <module>cloudsigma2-lvs</module> + <module>cloudsigma2-wdc</module> <module>cloudsigma2-zrh</module> <module>joyent-cloudapi</module> <module>joyentcloud</module>
