Repository: jclouds
Updated Branches:
  refs/heads/master 07e64a2d0 -> 99c5b9ace


Adding elastichosts Dallas and Miami providers


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/c3f17751
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/c3f17751
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/c3f17751

Branch: refs/heads/master
Commit: c3f1775123667d8938abf6f5aa153fd9b88ffffa
Parents: 07e64a2
Author: Stuart Hendren <[email protected]>
Authored: Sun May 24 13:45:40 2015 +0100
Committer: Ignasi Barrera <[email protected]>
Committed: Wed Oct 7 20:39:36 2015 +0200

----------------------------------------------------------------------
 providers/elastichosts-dal-a/README.txt         |   6 +
 providers/elastichosts-dal-a/pom.xml            | 130 +++++++++++++++++++
 .../ElasticHostsDallasMetadata.java             |  82 ++++++++++++
 .../ElasticHostsDallasApiLiveTest.java          |  27 ++++
 .../ElasticHostsDallasProviderTest.java         |  29 +++++
 ...lasticHostsDallasComputeServiceLiveTest.java |  30 +++++
 ...asticHostsDallasTemplateBuilderLiveTest.java |  53 ++++++++
 providers/elastichosts-mmi-a/README.txt         |   6 +
 providers/elastichosts-mmi-a/pom.xml            | 130 +++++++++++++++++++
 .../elastichosts/ElasticHostsMiamiMetadata.java |  83 ++++++++++++
 .../ElasticHostsMiamiApiLiveTest.java           |  27 ++++
 .../ElasticHostsMiamiProviderTest.java          |  29 +++++
 ...ElasticHostsMiamiComputeServiceLiveTest.java |  30 +++++
 ...lasticHostsMiamiTemplateBuilderLiveTest.java |  53 ++++++++
 providers/pom.xml                               |   2 +
 15 files changed, 717 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/c3f17751/providers/elastichosts-dal-a/README.txt
----------------------------------------------------------------------
diff --git a/providers/elastichosts-dal-a/README.txt 
b/providers/elastichosts-dal-a/README.txt
new file mode 100644
index 0000000..b0a81c5
--- /dev/null
+++ b/providers/elastichosts-dal-a/README.txt
@@ -0,0 +1,6 @@
+#
+# The jclouds provider for ElasticHosts' Dallas ElasticStack  
(http://www.elastichosts.com/).
+#
+# Expects the jclouds elasticstack API to be present on your application's 
classpath.
+#
+

http://git-wip-us.apache.org/repos/asf/jclouds/blob/c3f17751/providers/elastichosts-dal-a/pom.xml
----------------------------------------------------------------------
diff --git a/providers/elastichosts-dal-a/pom.xml 
b/providers/elastichosts-dal-a/pom.xml
new file mode 100644
index 0000000..270a0c3
--- /dev/null
+++ b/providers/elastichosts-dal-a/pom.xml
@@ -0,0 +1,130 @@
+<?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</groupId>
+    <artifactId>jclouds-project</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+    <relativePath>../../project/pom.xml</relativePath>
+  </parent>
+  <groupId>org.apache.jclouds.provider</groupId>
+  <artifactId>elastichosts-dal-a</artifactId>
+  <name>jclouds ElasticHosts Dallas provider</name>
+  <description>ElasticHosts implementation targeted to Dallas</description>
+  <packaging>bundle</packaging>
+
+  <properties>
+    
<test.elastichosts-dal-a.endpoint>https://api-dal-a.elastichosts.com</test.elastichosts-dal-a.endpoint>
+    
<test.elastichosts-dal-a.api-version>2.0</test.elastichosts-dal-a.api-version>
+    <test.elastichosts-dal-a.build-version />
+    
<test.elastichosts-dal-a.identity>FIXME_IDENTITY</test.elastichosts-dal-a.identity>
+    
<test.elastichosts-dal-a.credential>FIXME_CREDENTIAL</test.elastichosts-dal-a.credential>
+    <test.elastichosts-dal-a.template />
+
+    
<jclouds.osgi.export>org.jclouds.elastichosts*;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.api</groupId>
+      <artifactId>elasticstack</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.jclouds.api</groupId>
+      <artifactId>elasticstack</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>
+    <dependency>
+      <groupId>com.google.auto.service</groupId>
+      <artifactId>auto-service</artifactId>
+      <optional>true</optional>
+    </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.elastichosts-dal-a.endpoint>${test.elastichosts-dal-a.endpoint}</test.elastichosts-dal-a.endpoint>
+                    
<test.elastichosts-dal-a.api-version>${test.elastichosts-dal-a.api-version}</test.elastichosts-dal-a.api-version>
+                    
<test.elastichosts-dal-a.build-version>${test.elastichosts-dal-a.build-version}</test.elastichosts-dal-a.build-version>
+                    
<test.elastichosts-dal-a.identity>${test.elastichosts-dal-a.identity}</test.elastichosts-dal-a.identity>
+                    
<test.elastichosts-dal-a.credential>${test.elastichosts-dal-a.credential}</test.elastichosts-dal-a.credential>
+                    
<test.elastichosts-dal-a.template>${test.elastichosts-dal-a.template}</test.elastichosts-dal-a.template>
+                  </systemPropertyVariables>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+</project>
+

http://git-wip-us.apache.org/repos/asf/jclouds/blob/c3f17751/providers/elastichosts-dal-a/src/main/java/org/jclouds/elastichosts/ElasticHostsDallasMetadata.java
----------------------------------------------------------------------
diff --git 
a/providers/elastichosts-dal-a/src/main/java/org/jclouds/elastichosts/ElasticHostsDallasMetadata.java
 
b/providers/elastichosts-dal-a/src/main/java/org/jclouds/elastichosts/ElasticHostsDallasMetadata.java
new file mode 100644
index 0000000..7444f12
--- /dev/null
+++ 
b/providers/elastichosts-dal-a/src/main/java/org/jclouds/elastichosts/ElasticHostsDallasMetadata.java
@@ -0,0 +1,82 @@
+/*
+ * 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.elastichosts;
+
+import static org.jclouds.compute.config.ComputeServiceProperties.TEMPLATE;
+
+import java.net.URI;
+import java.util.Properties;
+
+import org.jclouds.elasticstack.ElasticStackApiMetadata;
+import org.jclouds.providers.ProviderMetadata;
+import org.jclouds.providers.internal.BaseProviderMetadata;
+
+import com.google.auto.service.AutoService;
+
+/**
+ * Implementation of {@link ProviderMetadata} for ElasticHosts Dallas.
+ */
+@AutoService(ProviderMetadata.class)
+public class ElasticHostsDallasMetadata extends BaseProviderMetadata {
+
+   public static Builder builder() {
+      return new Builder();
+   }
+
+   @Override
+   public Builder toBuilder() {
+      return builder().fromProviderMetadata(this);
+   }
+
+   public ElasticHostsDallasMetadata() {
+      super(builder());
+   }
+
+   public ElasticHostsDallasMetadata(Builder builder) {
+      super(builder);
+   }
+
+   public static Properties defaultProperties() {
+      Properties properties = new Properties();
+      properties.setProperty(TEMPLATE, 
"osFamily=UBUNTU,osVersionMatches=1[01234].[01][04],os64Bit=true");
+      return properties;
+   }
+
+   public static class Builder extends BaseProviderMetadata.Builder {
+
+      protected Builder() {
+         id("elastichosts-dal-a").name("ElasticHosts Dallas")
+               .apiMetadata(new 
ElasticStackApiMetadata().toBuilder().version("2.0").build())
+               .homepage(URI.create("https://dal-a.elastichosts.com";))
+               
.console(URI.create("https://dal-a.elastichosts.com/accounts";)).iso3166Codes("US-TX")
+               .endpoint("https://api-dal-a.elastichosts.com";)
+               
.defaultProperties(ElasticHostsDallasMetadata.defaultProperties());
+      }
+
+      @Override
+      public ElasticHostsDallasMetadata build() {
+         return new ElasticHostsDallasMetadata(this);
+      }
+
+      @Override
+      public Builder fromProviderMetadata(ProviderMetadata in) {
+         super.fromProviderMetadata(in);
+         return this;
+      }
+
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/c3f17751/providers/elastichosts-dal-a/src/test/java/org/jclouds/elastichosts/ElasticHostsDallasApiLiveTest.java
----------------------------------------------------------------------
diff --git 
a/providers/elastichosts-dal-a/src/test/java/org/jclouds/elastichosts/ElasticHostsDallasApiLiveTest.java
 
b/providers/elastichosts-dal-a/src/test/java/org/jclouds/elastichosts/ElasticHostsDallasApiLiveTest.java
new file mode 100644
index 0000000..7fc9132
--- /dev/null
+++ 
b/providers/elastichosts-dal-a/src/test/java/org/jclouds/elastichosts/ElasticHostsDallasApiLiveTest.java
@@ -0,0 +1,27 @@
+/*
+ * 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.elastichosts;
+
+import org.jclouds.elasticstack.ElasticStackApiLiveTest;
+import org.testng.annotations.Test;
+
+@Test(groups = "live", singleThreaded = true, testName = 
"ElasticHostsDallasApiLiveTest")
+public class ElasticHostsDallasApiLiveTest extends ElasticStackApiLiveTest {
+   public ElasticHostsDallasApiLiveTest() {
+      provider = "elastichosts-dal-a";
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/c3f17751/providers/elastichosts-dal-a/src/test/java/org/jclouds/elastichosts/ElasticHostsDallasProviderTest.java
----------------------------------------------------------------------
diff --git 
a/providers/elastichosts-dal-a/src/test/java/org/jclouds/elastichosts/ElasticHostsDallasProviderTest.java
 
b/providers/elastichosts-dal-a/src/test/java/org/jclouds/elastichosts/ElasticHostsDallasProviderTest.java
new file mode 100644
index 0000000..d1db8ec
--- /dev/null
+++ 
b/providers/elastichosts-dal-a/src/test/java/org/jclouds/elastichosts/ElasticHostsDallasProviderTest.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.elastichosts;
+
+import org.jclouds.elasticstack.ElasticStackApiMetadata;
+import org.jclouds.providers.internal.BaseProviderMetadataTest;
+import org.testng.annotations.Test;
+
+@Test(groups = "unit", testName = "ElasticHostsDallasProviderTest")
+public class ElasticHostsDallasProviderTest extends BaseProviderMetadataTest {
+
+   public ElasticHostsDallasProviderTest() {
+      super(new ElasticHostsDallasMetadata(), new ElasticStackApiMetadata());
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/c3f17751/providers/elastichosts-dal-a/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsDallasComputeServiceLiveTest.java
----------------------------------------------------------------------
diff --git 
a/providers/elastichosts-dal-a/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsDallasComputeServiceLiveTest.java
 
b/providers/elastichosts-dal-a/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsDallasComputeServiceLiveTest.java
new file mode 100644
index 0000000..2426a7a
--- /dev/null
+++ 
b/providers/elastichosts-dal-a/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsDallasComputeServiceLiveTest.java
@@ -0,0 +1,30 @@
+/*
+ * 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.elastichosts.compute;
+
+import org.jclouds.elasticstack.compute.ElasticStackComputeServiceLiveTest;
+import org.testng.annotations.Test;
+
+@Test(groups = "live", testName = "ElasticHostsDallasComputeServiceLiveTest")
+public class ElasticHostsDallasComputeServiceLiveTest extends 
ElasticStackComputeServiceLiveTest {
+
+   public ElasticHostsDallasComputeServiceLiveTest() {
+      provider = "elastichosts-dal-a";
+      group = "elastichosts";
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/c3f17751/providers/elastichosts-dal-a/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsDallasTemplateBuilderLiveTest.java
----------------------------------------------------------------------
diff --git 
a/providers/elastichosts-dal-a/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsDallasTemplateBuilderLiveTest.java
 
b/providers/elastichosts-dal-a/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsDallasTemplateBuilderLiveTest.java
new file mode 100644
index 0000000..0ba8e2a
--- /dev/null
+++ 
b/providers/elastichosts-dal-a/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsDallasTemplateBuilderLiveTest.java
@@ -0,0 +1,53 @@
+/*
+ * 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.elastichosts.compute;
+
+import static org.jclouds.compute.util.ComputeServiceUtils.getCores;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.Set;
+
+import org.jclouds.compute.domain.OsFamily;
+import org.jclouds.compute.domain.Template;
+import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
+import org.testng.annotations.Test;
+
+import com.google.common.collect.ImmutableSet;
+
+@Test(groups = "live", testName = "ElasticHostsDallasTemplateBuilderLiveTest")
+public class ElasticHostsDallasTemplateBuilderLiveTest extends 
BaseTemplateBuilderLiveTest {
+
+   public ElasticHostsDallasTemplateBuilderLiveTest() {
+      provider = "elastichosts-dal-a";
+   }
+
+   @Override
+   public void testDefaultTemplateBuilder() throws IOException {
+      Template defaultTemplate = 
view.getComputeService().templateBuilder().build();
+      
assertTrue(defaultTemplate.getImage().getOperatingSystem().getVersion().matches("1[01234].[01][04]"));
+      assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), 
true);
+      
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), 
OsFamily.UBUNTU);
+      assertEquals(getCores(defaultTemplate.getHardware()), 1.0d);
+   }
+
+   @Override
+   protected Set<String> getIso3166Codes() {
+      return ImmutableSet.<String> of("US-TX");
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/c3f17751/providers/elastichosts-mmi-a/README.txt
----------------------------------------------------------------------
diff --git a/providers/elastichosts-mmi-a/README.txt 
b/providers/elastichosts-mmi-a/README.txt
new file mode 100644
index 0000000..f630668
--- /dev/null
+++ b/providers/elastichosts-mmi-a/README.txt
@@ -0,0 +1,6 @@
+#
+# The jclouds provider for ElasticHosts' Miami ElasticStack  
(http://www.elastichosts.com/).
+#
+# Expects the jclouds elasticstack API to be present on your application's 
classpath.
+#
+

http://git-wip-us.apache.org/repos/asf/jclouds/blob/c3f17751/providers/elastichosts-mmi-a/pom.xml
----------------------------------------------------------------------
diff --git a/providers/elastichosts-mmi-a/pom.xml 
b/providers/elastichosts-mmi-a/pom.xml
new file mode 100644
index 0000000..7c76691
--- /dev/null
+++ b/providers/elastichosts-mmi-a/pom.xml
@@ -0,0 +1,130 @@
+<?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</groupId>
+    <artifactId>jclouds-project</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+    <relativePath>../../project/pom.xml</relativePath>
+  </parent>
+  <groupId>org.apache.jclouds.provider</groupId>
+  <artifactId>elastichosts-mmi-a</artifactId>
+  <name>jclouds ElasticHosts Miami provider</name>
+  <description>ElasticHosts implementation targeted to Miami</description>
+  <packaging>bundle</packaging>
+
+  <properties>
+    
<test.elastichosts-mmi-a.endpoint>https://api-mmi-a.elastichosts.com</test.elastichosts-mmi-a.endpoint>
+    
<test.elastichosts-mmi-a.api-version>2.0</test.elastichosts-mmi-a.api-version>
+    <test.elastichosts-mmi-a.build-version />
+    
<test.elastichosts-mmi-a.identity>FIXME_IDENTITY</test.elastichosts-mmi-a.identity>
+    
<test.elastichosts-mmi-a.credential>FIXME_CREDENTIAL</test.elastichosts-mmi-a.credential>
+    <test.elastichosts-mmi-a.template />
+
+    
<jclouds.osgi.export>org.jclouds.elastichosts*;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.api</groupId>
+      <artifactId>elasticstack</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.jclouds.api</groupId>
+      <artifactId>elasticstack</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>
+    <dependency>
+      <groupId>com.google.auto.service</groupId>
+      <artifactId>auto-service</artifactId>
+      <optional>true</optional>
+    </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.elastichosts-mmi-a.endpoint>${test.elastichosts-mmi-a.endpoint}</test.elastichosts-mmi-a.endpoint>
+                    
<test.elastichosts-mmi-a.api-version>${test.elastichosts-mmi-a.api-version}</test.elastichosts-mmi-a.api-version>
+                    
<test.elastichosts-mmi-a.build-version>${test.elastichosts-mmi-a.build-version}</test.elastichosts-mmi-a.build-version>
+                    
<test.elastichosts-mmi-a.identity>${test.elastichosts-mmi-a.identity}</test.elastichosts-mmi-a.identity>
+                    
<test.elastichosts-mmi-a.credential>${test.elastichosts-mmi-a.credential}</test.elastichosts-mmi-a.credential>
+                    
<test.elastichosts-mmi-a.template>${test.elastichosts-mmi-a.template}</test.elastichosts-mmi-a.template>
+                  </systemPropertyVariables>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+</project>
+

http://git-wip-us.apache.org/repos/asf/jclouds/blob/c3f17751/providers/elastichosts-mmi-a/src/main/java/org/jclouds/elastichosts/ElasticHostsMiamiMetadata.java
----------------------------------------------------------------------
diff --git 
a/providers/elastichosts-mmi-a/src/main/java/org/jclouds/elastichosts/ElasticHostsMiamiMetadata.java
 
b/providers/elastichosts-mmi-a/src/main/java/org/jclouds/elastichosts/ElasticHostsMiamiMetadata.java
new file mode 100644
index 0000000..93b2180
--- /dev/null
+++ 
b/providers/elastichosts-mmi-a/src/main/java/org/jclouds/elastichosts/ElasticHostsMiamiMetadata.java
@@ -0,0 +1,83 @@
+/*
+ * 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.elastichosts;
+
+import static org.jclouds.compute.config.ComputeServiceProperties.TEMPLATE;
+
+import java.net.URI;
+import java.util.Properties;
+
+import org.jclouds.elasticstack.ElasticStackApiMetadata;
+import org.jclouds.providers.ProviderMetadata;
+import org.jclouds.providers.internal.BaseProviderMetadata;
+
+import com.google.auto.service.AutoService;
+
+/**
+ * Implementation of {@link ProviderMetadata} for ElasticHosts Miami.
+ */
+@AutoService(ProviderMetadata.class)
+public class ElasticHostsMiamiMetadata extends BaseProviderMetadata {
+
+   public static Builder builder() {
+      return new Builder();
+   }
+
+   @Override
+   public Builder toBuilder() {
+      return builder().fromProviderMetadata(this);
+   }
+
+   public ElasticHostsMiamiMetadata() {
+      super(builder());
+   }
+
+   public ElasticHostsMiamiMetadata(Builder builder) {
+      super(builder);
+   }
+
+   public static Properties defaultProperties() {
+      Properties properties = new Properties();
+      properties.setProperty(TEMPLATE, 
"osFamily=UBUNTU,osVersionMatches=1[01234].[01][04],os64Bit=true");
+      return properties;
+   }
+
+   public static class Builder extends BaseProviderMetadata.Builder {
+
+      protected Builder() {
+         id("elastichosts-mmi-a").name("ElasticHosts Miami")
+               .apiMetadata(new 
ElasticStackApiMetadata().toBuilder().version("2.0").build())
+               .homepage(URI.create("https://mmi-a.elastichosts.com";))
+               .console(URI.create("https://mmi-a.elastichosts.com/accounts";))
+               .iso3166Codes("US-FL")
+               .endpoint("https://api-mmi-a.elastichosts.com";)
+               
.defaultProperties(ElasticHostsMiamiMetadata.defaultProperties());
+      }
+
+      @Override
+      public ElasticHostsMiamiMetadata build() {
+         return new ElasticHostsMiamiMetadata(this);
+      }
+
+      @Override
+      public Builder fromProviderMetadata(ProviderMetadata in) {
+         super.fromProviderMetadata(in);
+         return this;
+      }
+
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/c3f17751/providers/elastichosts-mmi-a/src/test/java/org/jclouds/elastichosts/ElasticHostsMiamiApiLiveTest.java
----------------------------------------------------------------------
diff --git 
a/providers/elastichosts-mmi-a/src/test/java/org/jclouds/elastichosts/ElasticHostsMiamiApiLiveTest.java
 
b/providers/elastichosts-mmi-a/src/test/java/org/jclouds/elastichosts/ElasticHostsMiamiApiLiveTest.java
new file mode 100644
index 0000000..340a7ca
--- /dev/null
+++ 
b/providers/elastichosts-mmi-a/src/test/java/org/jclouds/elastichosts/ElasticHostsMiamiApiLiveTest.java
@@ -0,0 +1,27 @@
+/*
+ * 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.elastichosts;
+
+import org.jclouds.elasticstack.ElasticStackApiLiveTest;
+import org.testng.annotations.Test;
+
+@Test(groups = "live", singleThreaded = true, testName = 
"ElasticHostsMiamiApiLiveTest")
+public class ElasticHostsMiamiApiLiveTest extends ElasticStackApiLiveTest {
+   public ElasticHostsMiamiApiLiveTest() {
+      provider = "elastichosts-mmi-a";
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/c3f17751/providers/elastichosts-mmi-a/src/test/java/org/jclouds/elastichosts/ElasticHostsMiamiProviderTest.java
----------------------------------------------------------------------
diff --git 
a/providers/elastichosts-mmi-a/src/test/java/org/jclouds/elastichosts/ElasticHostsMiamiProviderTest.java
 
b/providers/elastichosts-mmi-a/src/test/java/org/jclouds/elastichosts/ElasticHostsMiamiProviderTest.java
new file mode 100644
index 0000000..1daaf44
--- /dev/null
+++ 
b/providers/elastichosts-mmi-a/src/test/java/org/jclouds/elastichosts/ElasticHostsMiamiProviderTest.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.elastichosts;
+
+import org.jclouds.elasticstack.ElasticStackApiMetadata;
+import org.jclouds.providers.internal.BaseProviderMetadataTest;
+import org.testng.annotations.Test;
+
+@Test(groups = "unit", testName = "ElasticHostsMiamiProviderTest")
+public class ElasticHostsMiamiProviderTest extends BaseProviderMetadataTest {
+
+   public ElasticHostsMiamiProviderTest() {
+      super(new ElasticHostsMiamiMetadata(), new ElasticStackApiMetadata());
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/c3f17751/providers/elastichosts-mmi-a/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsMiamiComputeServiceLiveTest.java
----------------------------------------------------------------------
diff --git 
a/providers/elastichosts-mmi-a/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsMiamiComputeServiceLiveTest.java
 
b/providers/elastichosts-mmi-a/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsMiamiComputeServiceLiveTest.java
new file mode 100644
index 0000000..b3d310b
--- /dev/null
+++ 
b/providers/elastichosts-mmi-a/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsMiamiComputeServiceLiveTest.java
@@ -0,0 +1,30 @@
+/*
+ * 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.elastichosts.compute;
+
+import org.jclouds.elasticstack.compute.ElasticStackComputeServiceLiveTest;
+import org.testng.annotations.Test;
+
+@Test(groups = "live", testName = "ElasticHostsMiamiComputeServiceLiveTest")
+public class ElasticHostsMiamiComputeServiceLiveTest extends 
ElasticStackComputeServiceLiveTest {
+
+   public ElasticHostsMiamiComputeServiceLiveTest() {
+      provider = "elastichosts-mmi-a";
+      group = "elastichosts";
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/c3f17751/providers/elastichosts-mmi-a/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsMiamiTemplateBuilderLiveTest.java
----------------------------------------------------------------------
diff --git 
a/providers/elastichosts-mmi-a/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsMiamiTemplateBuilderLiveTest.java
 
b/providers/elastichosts-mmi-a/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsMiamiTemplateBuilderLiveTest.java
new file mode 100644
index 0000000..9b3057d
--- /dev/null
+++ 
b/providers/elastichosts-mmi-a/src/test/java/org/jclouds/elastichosts/compute/ElasticHostsMiamiTemplateBuilderLiveTest.java
@@ -0,0 +1,53 @@
+/*
+ * 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.elastichosts.compute;
+
+import static org.jclouds.compute.util.ComputeServiceUtils.getCores;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.Set;
+
+import org.jclouds.compute.domain.OsFamily;
+import org.jclouds.compute.domain.Template;
+import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
+import org.testng.annotations.Test;
+
+import com.google.common.collect.ImmutableSet;
+
+@Test(groups = "live", testName = "ElasticHostsMiamiTemplateBuilderLiveTest")
+public class ElasticHostsMiamiTemplateBuilderLiveTest extends 
BaseTemplateBuilderLiveTest {
+
+   public ElasticHostsMiamiTemplateBuilderLiveTest() {
+      provider = "elastichosts-mmi-a";
+   }
+
+   @Override
+   public void testDefaultTemplateBuilder() throws IOException {
+      Template defaultTemplate = 
view.getComputeService().templateBuilder().build();
+      
assertTrue(defaultTemplate.getImage().getOperatingSystem().getVersion().matches("1[01234].[01][04]"));
+      assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), 
true);
+      
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), 
OsFamily.UBUNTU);
+      assertEquals(getCores(defaultTemplate.getHardware()), 1.0d);
+   }
+
+   @Override
+   protected Set<String> getIso3166Codes() {
+      return ImmutableSet.<String> of("US-FL");
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds/blob/c3f17751/providers/pom.xml
----------------------------------------------------------------------
diff --git a/providers/pom.xml b/providers/pom.xml
index 77bf0e2..6edcaa5 100644
--- a/providers/pom.xml
+++ b/providers/pom.xml
@@ -45,6 +45,8 @@
     <module>elastichosts-sjc-c</module>
     <module>elastichosts-hkg-e</module>
     <module>elastichosts-syd-v</module>
+    <module>elastichosts-mmi-a</module>
+    <module>elastichosts-dal-a</module>
     <module>openhosting-east1</module>
     <module>serverlove-z1-man</module>
     <module>skalicloud-sdg-my</module>

Reply via email to