diff --git a/core/src/main/resources/rest.properties b/core/src/main/resources/rest.properties index c4167f6770..21fa5249d3 100644 --- a/core/src/main/resources/rest.properties +++ b/core/src/main/resources/rest.properties @@ -107,6 +107,9 @@ bluelock-vcloud-zone01.propertiesbuilder=org.jclouds.bluelock.vcloud.zone01.Blue stratogen-vcloud-mycloud.contextbuilder=org.jclouds.stratogen.vcloud.mycloud.StratoGenVCloudMyCloudContextBuilder stratogen-vcloud-mycloud.propertiesbuilder=org.jclouds.stratogen.vcloud.mycloud.StratoGenVCloudMyCloudPropertiesBuilder +greenhousedata-element-vcloud.contextbuilder=org.jclouds.greenhousedata.element.vcloud.GreenHouseDataElementVCloudContextBuilder +greenhousedata-element-vcloud.propertiesbuilder=org.jclouds.greenhousedata.element.vcloud.GreenHouseDataElementVCloudPropertiesBuilder + gogrid.propertiesbuilder=org.jclouds.gogrid.GoGridPropertiesBuilder gogrid.contextbuilder=org.jclouds.gogrid.GoGridContextBuilder diff --git a/sandbox-providers/greenhousedata-element-vcloud/pom.xml b/sandbox-providers/greenhousedata-element-vcloud/pom.xml new file mode 100644 index 0000000000..7d193bf18f --- /dev/null +++ b/sandbox-providers/greenhousedata-element-vcloud/pom.xml @@ -0,0 +1,164 @@ + + + + + 4.0.0 + + org.jclouds + jclouds-project + 1.1.0-SNAPSHOT + ../../project/pom.xml + + org.jclouds.provider + greenhousedata-element-vcloud + jclouds Green House Data Element vCloud provider + vCloud implementation targeted to Green House Data Element + bundle + + + https://mycloud.greenhousedata.com/api + 1.0 + FIXME_IDENTITY + FIXME_CREDENTIAL + + + + + org.jclouds.api + vcloud + ${project.version} + + + org.jclouds.common + vcloud-common + ${project.version} + test-jar + test + + + org.jclouds.api + vcloud + ${project.version} + test-jar + test + + + org.jclouds + jclouds-core + ${project.version} + test-jar + test + + + org.jclouds + jclouds-compute + ${project.version} + test-jar + test + + + org.jclouds.driver + jclouds-log4j + ${project.version} + test + + + org.jclouds.driver + jclouds-jsch + ${project.version} + test + + + com.jcraft + jsch + test + + + log4j + log4j + 1.2.16 + test + + + + + + live + + + + org.apache.maven.plugins + maven-surefire-plugin + + + integration + integration-test + + test + + + + + test.greenhousedata-element-vcloud.endpoint + ${test.greenhousedata-element-vcloud.endpoint} + + + test.greenhousedata-element-vcloud.apiversion + ${test.greenhousedata-element-vcloud.apiversion} + + + test.greenhousedata-element-vcloud.identity + ${test.greenhousedata-element-vcloud.identity} + + + test.greenhousedata-element-vcloud.credential + ${test.greenhousedata-element-vcloud.credential} + + + + + + + + + + + + + + + org.apache.felix + maven-bundle-plugin + + + ${project.artifactId} + org.jclouds.greenhousedata.element.vcloud.*;version="${project.version}" + org.jclouds.*;version="${project.version}",* + + + + + + + + diff --git a/sandbox-providers/greenhousedata-element-vcloud/src/main/java/org/jclouds/greenhousedata/element/vcloud/GreenHouseDataElementVCloudContextBuilder.java b/sandbox-providers/greenhousedata-element-vcloud/src/main/java/org/jclouds/greenhousedata/element/vcloud/GreenHouseDataElementVCloudContextBuilder.java new file mode 100644 index 0000000000..632826ad8b --- /dev/null +++ b/sandbox-providers/greenhousedata-element-vcloud/src/main/java/org/jclouds/greenhousedata/element/vcloud/GreenHouseDataElementVCloudContextBuilder.java @@ -0,0 +1,51 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed 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.greenhousedata.element.vcloud; + +import java.util.List; +import java.util.Properties; + +import org.jclouds.greenhousedata.element.vcloud.config.GreenHouseDataElementVCloudComputeServiceContextModule; +import org.jclouds.greenhousedata.element.vcloud.config.GreenHouseDataElementVCloudRestClientModule; +import org.jclouds.vcloud.VCloudContextBuilder; + +import com.google.inject.Module; + +/** + * {@inheritDoc} + * + * @author Adrian Cole + */ +public class GreenHouseDataElementVCloudContextBuilder extends VCloudContextBuilder { + + public GreenHouseDataElementVCloudContextBuilder(Properties props) { + super(props); + } + + @Override + protected void addContextModule(List modules) { + modules.add(new GreenHouseDataElementVCloudComputeServiceContextModule()); + } + + @Override + protected void addClientModule(List modules) { + modules.add(new GreenHouseDataElementVCloudRestClientModule()); + } + +} diff --git a/sandbox-providers/greenhousedata-element-vcloud/src/main/java/org/jclouds/greenhousedata/element/vcloud/GreenHouseDataElementVCloudPropertiesBuilder.java b/sandbox-providers/greenhousedata-element-vcloud/src/main/java/org/jclouds/greenhousedata/element/vcloud/GreenHouseDataElementVCloudPropertiesBuilder.java new file mode 100644 index 0000000000..f709e70dcd --- /dev/null +++ b/sandbox-providers/greenhousedata-element-vcloud/src/main/java/org/jclouds/greenhousedata/element/vcloud/GreenHouseDataElementVCloudPropertiesBuilder.java @@ -0,0 +1,46 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed 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.greenhousedata.element.vcloud; + +import static org.jclouds.Constants.PROPERTY_ENDPOINT; +import static org.jclouds.Constants.PROPERTY_ISO3166_CODES; +import static org.jclouds.vcloud.reference.VCloudConstants.PROPERTY_VCLOUD_DEFAULT_NETWORK; + +import java.util.Properties; + +import org.jclouds.vcloud.VCloudPropertiesBuilder; + +/** + * + * @author Adrian Cole + */ +public class GreenHouseDataElementVCloudPropertiesBuilder extends VCloudPropertiesBuilder { + @Override + protected Properties defaultProperties() { + Properties properties = super.defaultProperties(); + properties.setProperty(PROPERTY_ISO3166_CODES, "US-WY"); + properties.setProperty(PROPERTY_ENDPOINT, "https://mycloud.greenhousedata.com/api"); + properties.setProperty(PROPERTY_VCLOUD_DEFAULT_NETWORK, "orgNet-.*-Internal-Routed"); + return properties; + } + + public GreenHouseDataElementVCloudPropertiesBuilder(Properties properties) { + super(properties); + } +} diff --git a/sandbox-providers/greenhousedata-element-vcloud/src/main/java/org/jclouds/greenhousedata/element/vcloud/GreenHouseDataElementVCloudProviderMetadata.java b/sandbox-providers/greenhousedata-element-vcloud/src/main/java/org/jclouds/greenhousedata/element/vcloud/GreenHouseDataElementVCloudProviderMetadata.java new file mode 100644 index 0000000000..4e3f09fa65 --- /dev/null +++ b/sandbox-providers/greenhousedata-element-vcloud/src/main/java/org/jclouds/greenhousedata/element/vcloud/GreenHouseDataElementVCloudProviderMetadata.java @@ -0,0 +1,116 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed 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.greenhousedata.element.vcloud; + +import com.google.common.collect.ImmutableSet; + +import java.net.URI; +import java.util.Set; + +import org.jclouds.providers.BaseProviderMetadata; +import org.jclouds.providers.ProviderMetadata; + +/** + * Implementation of {@link org.jclouds.types.ProviderMetadata} for Green House Data Element vCloud + * + * @author Adrian Cole + */ +public class GreenHouseDataElementVCloudProviderMetadata extends BaseProviderMetadata { + + /** + * {@inheritDoc} + */ + @Override + public String getId() { + return "greenhousedata-element-vcloud"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getType() { + return ProviderMetadata.COMPUTE_TYPE; + } + + /** + * {@inheritDoc} + */ + @Override + public String getName() { + return "Green House Data Element vCloud"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getIdentityName() { + return "User at Organization (user@org)"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getCredentialName() { + return "Password"; + } + + /** + * {@inheritDoc} + */ + @Override + public URI getHomepage() { + return URI.create("http://www.greenhousedata.com/element-cloud-hosting/vcloud-services/"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getConsole() { + return URI.create("https://mycloud.greenhousedata.com/cloud/"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getApiDocumentation() { + return URI.create("http://www.greenhousedata.com/element-cloud-hosting/vcloud-services/"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getLinkedServices() { + return ImmutableSet.of("greenhousedata-element-vcloud"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getIso3166Codes() { + return ImmutableSet.of("US-WY"); + } + +} diff --git a/sandbox-providers/greenhousedata-element-vcloud/src/main/java/org/jclouds/greenhousedata/element/vcloud/config/GreenHouseDataElementVCloudComputeServiceContextModule.java b/sandbox-providers/greenhousedata-element-vcloud/src/main/java/org/jclouds/greenhousedata/element/vcloud/config/GreenHouseDataElementVCloudComputeServiceContextModule.java new file mode 100644 index 0000000000..495d018c5e --- /dev/null +++ b/sandbox-providers/greenhousedata-element-vcloud/src/main/java/org/jclouds/greenhousedata/element/vcloud/config/GreenHouseDataElementVCloudComputeServiceContextModule.java @@ -0,0 +1,39 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed 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.greenhousedata.element.vcloud.config; + +import org.jclouds.compute.domain.OsFamily; +import org.jclouds.compute.domain.TemplateBuilder; +import org.jclouds.vcloud.compute.config.VCloudComputeServiceContextModule; + +import com.google.inject.Injector; + +/** + * per docs, we are to use pool mode. + * + * @author Adrian Cole + */ +public class GreenHouseDataElementVCloudComputeServiceContextModule extends VCloudComputeServiceContextModule { + + //CentOS template matches Linux incorrectly + @Override + protected TemplateBuilder provideTemplate(Injector injector, TemplateBuilder template) { + return template.osFamily(OsFamily.LINUX); + } +} diff --git a/sandbox-providers/greenhousedata-element-vcloud/src/main/java/org/jclouds/greenhousedata/element/vcloud/config/GreenHouseDataElementVCloudRestClientModule.java b/sandbox-providers/greenhousedata-element-vcloud/src/main/java/org/jclouds/greenhousedata/element/vcloud/config/GreenHouseDataElementVCloudRestClientModule.java new file mode 100644 index 0000000000..1f40ae3270 --- /dev/null +++ b/sandbox-providers/greenhousedata-element-vcloud/src/main/java/org/jclouds/greenhousedata/element/vcloud/config/GreenHouseDataElementVCloudRestClientModule.java @@ -0,0 +1,34 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed 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.greenhousedata.element.vcloud.config; + +import org.jclouds.http.RequiresHttp; +import org.jclouds.rest.ConfiguresRestClient; +import org.jclouds.vcloud.config.VCloudRestClientModule; + +/** + * Configures the VCloud authentication service connection, including logging and http transport. + * + * @author Adrian Cole + */ +@RequiresHttp +@ConfiguresRestClient +public class GreenHouseDataElementVCloudRestClientModule extends VCloudRestClientModule { + +} diff --git a/sandbox-providers/greenhousedata-element-vcloud/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/sandbox-providers/greenhousedata-element-vcloud/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata new file mode 100644 index 0000000000..84a4ce28d1 --- /dev/null +++ b/sandbox-providers/greenhousedata-element-vcloud/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata @@ -0,0 +1 @@ +org.jclouds.greenhousedata.element.vcloud.GreenHouseDataElementVCloudProviderMetadata diff --git a/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/DeprecatedGreenHouseDataElementVCloudClientLiveTest.java b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/DeprecatedGreenHouseDataElementVCloudClientLiveTest.java new file mode 100644 index 0000000000..65d601f6f2 --- /dev/null +++ b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/DeprecatedGreenHouseDataElementVCloudClientLiveTest.java @@ -0,0 +1,35 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed 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.greenhousedata.element.vcloud; + +import org.jclouds.vcloud.DeprecatedVCloudClientLiveTest; +import org.testng.annotations.Test; + +/** + * + * @author Adrian Cole + */ +@Deprecated +@Test(groups = "live", singleThreaded = true, testName = "DeprecatedGreenHouseDataElementVCloudClientLiveTest") +public class DeprecatedGreenHouseDataElementVCloudClientLiveTest extends DeprecatedVCloudClientLiveTest { + public DeprecatedGreenHouseDataElementVCloudClientLiveTest() { + provider = "greenhousedata-element-vcloud"; + } + +} diff --git a/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/GreenHouseDataElementVCloudProviderTest.java b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/GreenHouseDataElementVCloudProviderTest.java new file mode 100644 index 0000000000..6a43fc95d6 --- /dev/null +++ b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/GreenHouseDataElementVCloudProviderTest.java @@ -0,0 +1,35 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed 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.greenhousedata.element.vcloud; + +import org.jclouds.providers.BaseProviderMetadataTest; +import org.jclouds.providers.ProviderMetadata; +import org.testng.annotations.Test; + +/** + * + * @author Adrian Cole + */ +@Test(groups = "unit", testName = "GreenHouseDataElementVCloudProviderTest") +public class GreenHouseDataElementVCloudProviderTest extends BaseProviderMetadataTest { + + public GreenHouseDataElementVCloudProviderTest() { + super(new GreenHouseDataElementVCloudProviderMetadata(), ProviderMetadata.COMPUTE_TYPE); + } +} diff --git a/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/compute/GreenHouseDataElementVCloudComputeServiceLiveTest.java b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/compute/GreenHouseDataElementVCloudComputeServiceLiveTest.java new file mode 100644 index 0000000000..41eab617cb --- /dev/null +++ b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/compute/GreenHouseDataElementVCloudComputeServiceLiveTest.java @@ -0,0 +1,70 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed 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.greenhousedata.element.vcloud.compute; + +import static org.jclouds.compute.util.ComputeServiceUtils.getCores; +import static org.testng.Assert.assertEquals; + +import org.jclouds.compute.domain.Image; +import org.jclouds.compute.domain.OsFamily; +import org.jclouds.compute.domain.Template; +import org.jclouds.compute.domain.TemplateBuilder; +import org.jclouds.compute.predicates.OperatingSystemPredicates; +import org.jclouds.vcloud.compute.VCloudComputeServiceLiveTest; +import org.testng.annotations.Test; + +/** + * + * + * @author Adrian Cole + */ +@Test(groups = "live", enabled = true, singleThreaded = true, testName = "GreenHouseDataElementVCloudComputeServiceLiveTest") +public class GreenHouseDataElementVCloudComputeServiceLiveTest extends VCloudComputeServiceLiveTest { + public GreenHouseDataElementVCloudComputeServiceLiveTest() { + provider = "greenhousedata-element-vcloud"; + // vcloud requires instantiate before deploy, which takes longer than 30 seconds + nonBlockDurationSeconds = 300; + } + + @Override + public void setServiceDefaults() { + group = "director"; + } + + @Test + public void testTemplateBuilder() { + Template defaultTemplate = client.templateBuilder().build(); + assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); + assert OperatingSystemPredicates.supportsApt().apply(defaultTemplate.getImage().getOperatingSystem()); + assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); + assertEquals(defaultTemplate.getImage().getOperatingSystem().getDescription(), "Ubuntu Linux (64-bit)"); + assert defaultTemplate.getLocation().getId() != null : defaultTemplate.getLocation(); + assertEquals(getCores(defaultTemplate.getHardware()), 1.0d); + System.out.println(defaultTemplate.getHardware()); + } + + @Override + protected Template buildTemplate(TemplateBuilder templateBuilder) { + Template template = super.buildTemplate(templateBuilder); + Image image = template.getImage(); + assert image.getDefaultCredentials().credential != null : image; + return template; + } + +} diff --git a/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/compute/GreenHouseDataElementVCloudTemplateBuilderLiveTest.java b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/compute/GreenHouseDataElementVCloudTemplateBuilderLiveTest.java new file mode 100644 index 0000000000..8de5f13d76 --- /dev/null +++ b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/compute/GreenHouseDataElementVCloudTemplateBuilderLiveTest.java @@ -0,0 +1,72 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed 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.greenhousedata.element.vcloud.compute; + +import static org.jclouds.compute.util.ComputeServiceUtils.getCores; +import static org.testng.Assert.assertEquals; + +import java.io.IOException; +import java.util.Set; + +import org.jclouds.compute.BaseTemplateBuilderLiveTest; +import org.jclouds.compute.domain.OsFamily; +import org.jclouds.compute.domain.OsFamilyVersion64Bit; +import org.jclouds.compute.domain.Template; +import org.testng.annotations.Test; + +import com.google.common.base.Predicate; +import com.google.common.collect.ImmutableSet; + +/** + * + * @author Adrian Cole + */ +@Test(groups = "live", testName = "GreenHouseDataElementVCloudTemplateBuilderLiveTest") +public class GreenHouseDataElementVCloudTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest { + + public GreenHouseDataElementVCloudTemplateBuilderLiveTest() { + provider = "greenhousedata-element-vcloud"; + } + + @Override + protected Predicate defineUnsupportedOperatingSystems() { + return new Predicate() { + + @Override + public boolean apply(OsFamilyVersion64Bit input) { + return true; + } + + }; + } + + @Override + public void testDefaultTemplateBuilder() throws IOException { + Template defaultTemplate = context.getComputeService().templateBuilder().build(); + assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), ""); + assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true); + assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.LINUX); + assertEquals(getCores(defaultTemplate.getHardware()), 2.0d); + } + + @Override + protected Set getIso3166Codes() { + return ImmutableSet. of("US-WY"); + } +} diff --git a/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudCatalogClientLiveTest.java b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudCatalogClientLiveTest.java new file mode 100644 index 0000000000..6d071f7f5c --- /dev/null +++ b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudCatalogClientLiveTest.java @@ -0,0 +1,35 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed 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.greenhousedata.element.vcloud.features; + +import org.jclouds.vcloud.features.CatalogClientLiveTest; +import org.testng.annotations.Test; + +/** + * + * + * @author Adrian Cole + */ +@Test(groups = "live", enabled = true, singleThreaded = true, testName = "GreenHouseDataElementVCloudCatalogClientLiveTest") +public class GreenHouseDataElementVCloudCatalogClientLiveTest extends CatalogClientLiveTest { + + public GreenHouseDataElementVCloudCatalogClientLiveTest() { + provider = "greenhousedata-element-vcloud"; + } +} diff --git a/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudNetworkClientLiveTest.java b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudNetworkClientLiveTest.java new file mode 100644 index 0000000000..2f354c34ee --- /dev/null +++ b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudNetworkClientLiveTest.java @@ -0,0 +1,35 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed 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.greenhousedata.element.vcloud.features; + +import org.jclouds.vcloud.features.NetworkClientLiveTest; +import org.testng.annotations.Test; + +/** + * + * + * @author Adrian Cole + */ +@Test(groups = "live", enabled = true, singleThreaded = true, testName = "GreenHouseDataElementVCloudNetworkClientLiveTest") +public class GreenHouseDataElementVCloudNetworkClientLiveTest extends NetworkClientLiveTest { + + public GreenHouseDataElementVCloudNetworkClientLiveTest() { + provider = "greenhousedata-element-vcloud"; + } +} diff --git a/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudOrgClientLiveTest.java b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudOrgClientLiveTest.java new file mode 100644 index 0000000000..02ab0fb483 --- /dev/null +++ b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudOrgClientLiveTest.java @@ -0,0 +1,35 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed 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.greenhousedata.element.vcloud.features; + +import org.jclouds.vcloud.features.OrgClientLiveTest; +import org.testng.annotations.Test; + +/** + * + * + * @author Adrian Cole + */ +@Test(groups = "live", enabled = true, singleThreaded = true, testName = "GreenHouseDataElementVCloudOrgClientLiveTest") +public class GreenHouseDataElementVCloudOrgClientLiveTest extends OrgClientLiveTest { + + public GreenHouseDataElementVCloudOrgClientLiveTest() { + provider = "greenhousedata-element-vcloud"; + } +} diff --git a/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudTaskClientLiveTest.java b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudTaskClientLiveTest.java new file mode 100644 index 0000000000..23e83fd1c4 --- /dev/null +++ b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudTaskClientLiveTest.java @@ -0,0 +1,35 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed 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.greenhousedata.element.vcloud.features; + +import org.jclouds.vcloud.features.TaskClientLiveTest; +import org.testng.annotations.Test; + +/** + * + * + * @author Adrian Cole + */ +@Test(groups = "live", enabled = true, singleThreaded = true, testName = "GreenHouseDataElementVCloudTaskClientLiveTest") +public class GreenHouseDataElementVCloudTaskClientLiveTest extends TaskClientLiveTest { + + public GreenHouseDataElementVCloudTaskClientLiveTest() { + provider = "greenhousedata-element-vcloud"; + } +} diff --git a/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudVAppClientLiveTest.java b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudVAppClientLiveTest.java new file mode 100644 index 0000000000..07ed4db972 --- /dev/null +++ b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudVAppClientLiveTest.java @@ -0,0 +1,35 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed 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.greenhousedata.element.vcloud.features; + +import org.jclouds.vcloud.features.VAppClientLiveTest; +import org.testng.annotations.Test; + +/** + * + * + * @author Adrian Cole + */ +@Test(groups = "live", enabled = true, singleThreaded = true, testName = "GreenHouseDataElementVCloudVAppClientLiveTest") +public class GreenHouseDataElementVCloudVAppClientLiveTest extends VAppClientLiveTest { + + public GreenHouseDataElementVCloudVAppClientLiveTest() { + provider = "greenhousedata-element-vcloud"; + } +} diff --git a/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudVAppTemplateClientLiveTest.java b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudVAppTemplateClientLiveTest.java new file mode 100644 index 0000000000..c164abe3f0 --- /dev/null +++ b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudVAppTemplateClientLiveTest.java @@ -0,0 +1,35 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed 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.greenhousedata.element.vcloud.features; + +import org.jclouds.vcloud.features.VAppTemplateClientLiveTest; +import org.testng.annotations.Test; + +/** + * + * + * @author Adrian Cole + */ +@Test(groups = "live", enabled = true, singleThreaded = true, testName = "GreenHouseDataElementVCloudVAppTemplateClientLiveTest") +public class GreenHouseDataElementVCloudVAppTemplateClientLiveTest extends VAppTemplateClientLiveTest { + + public GreenHouseDataElementVCloudVAppTemplateClientLiveTest() { + provider = "greenhousedata-element-vcloud"; + } +} diff --git a/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudVDCClientLiveTest.java b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudVDCClientLiveTest.java new file mode 100644 index 0000000000..fe4f9dbe70 --- /dev/null +++ b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudVDCClientLiveTest.java @@ -0,0 +1,35 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed 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.greenhousedata.element.vcloud.features; + +import org.jclouds.vcloud.features.VDCClientLiveTest; +import org.testng.annotations.Test; + +/** + * + * + * @author Adrian Cole + */ +@Test(groups = "live", enabled = true, singleThreaded = true, testName = "GreenHouseDataElementVCloudVDCClientLiveTest") +public class GreenHouseDataElementVCloudVDCClientLiveTest extends VDCClientLiveTest { + + public GreenHouseDataElementVCloudVDCClientLiveTest() { + provider = "greenhousedata-element-vcloud"; + } +} diff --git a/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudVmClientLiveTest.java b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudVmClientLiveTest.java new file mode 100644 index 0000000000..736e6b0902 --- /dev/null +++ b/sandbox-providers/greenhousedata-element-vcloud/src/test/java/org/jclouds/greenhousedata/element/vcloud/features/GreenHouseDataElementVCloudVmClientLiveTest.java @@ -0,0 +1,39 @@ +/** + * + * Copyright (C) 2011 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed 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.greenhousedata.element.vcloud.features; + +import org.jclouds.vcloud.features.VmClientLiveTest; +import org.testng.annotations.Test; + +/** + * + * + * @author Adrian Cole + */ +@Test(groups = "live", enabled = true, singleThreaded = true, testName = "GreenHouseDataElementVCloudVmClientLiveTest") +public class GreenHouseDataElementVCloudVmClientLiveTest extends VmClientLiveTest { + + public GreenHouseDataElementVCloudVmClientLiveTest() { + provider = "greenhousedata-element-vcloud"; + } + + protected void checkApiOutput(String apiOutput) { + checkApiOutput1_0_0(apiOutput); + } +} diff --git a/sandbox-providers/greenhousedata-element-vcloud/src/test/resources/log4j.xml b/sandbox-providers/greenhousedata-element-vcloud/src/test/resources/log4j.xml new file mode 100644 index 0000000000..c1e74e57ff --- /dev/null +++ b/sandbox-providers/greenhousedata-element-vcloud/src/test/resources/log4j.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +