diff --git a/README.txt b/README.txt index 2dda1e16fe..292ddfb81a 100644 --- a/README.txt +++ b/README.txt @@ -39,6 +39,8 @@ our loadbalancer api supports: cloudloadbalancers-us * note * the pom dependency org.jclouds/jclouds-allloadbalancer gives you access to to all of these providers +we also have aws-cloudwatch support. + we also have support for: ibmdev, mezeo, nirvanix, boxdotnet, openstack nova, scality ring, hosteurope-storage, tiscali-storage, scaleup-storage, googlestorage, azurequeue, simpledb, cloudstack as well as a async-http-client diff --git a/all/pom.xml b/all/pom.xml index ff9372db45..e9d9983726 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -30,6 +30,11 @@ jclouds-all all + + org.jclouds.provider + aws-cloudwatch + ${project.version} + ${project.groupId} jclouds-allloadbalancer diff --git a/sandbox-apis/cloudwatch/pom.xml b/apis/cloudwatch/pom.xml similarity index 100% rename from sandbox-apis/cloudwatch/pom.xml rename to apis/cloudwatch/pom.xml diff --git a/sandbox-apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchAsyncClient.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchAsyncClient.java similarity index 100% rename from sandbox-apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchAsyncClient.java rename to apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchAsyncClient.java diff --git a/sandbox-apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchClient.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchClient.java similarity index 100% rename from sandbox-apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchClient.java rename to apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchClient.java diff --git a/sandbox-apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchContextBuilder.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchContextBuilder.java similarity index 100% rename from sandbox-apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchContextBuilder.java rename to apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchContextBuilder.java diff --git a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchPropertiesBuilder.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchPropertiesBuilder.java new file mode 100644 index 0000000000..b641d2c2e5 --- /dev/null +++ b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchPropertiesBuilder.java @@ -0,0 +1,53 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.cloudwatch; + +import static org.jclouds.Constants.PROPERTY_API_VERSION; +import static org.jclouds.aws.reference.AWSConstants.PROPERTY_AUTH_TAG; +import static org.jclouds.aws.reference.AWSConstants.PROPERTY_HEADER_TAG; + +import java.util.Properties; + +import org.jclouds.PropertiesBuilder; + +/** + * Builds properties used in Cloud Watch Clients + * + * @author Adrian Cole + */ +public class CloudWatchPropertiesBuilder extends PropertiesBuilder { + + @Override + protected Properties defaultProperties() { + Properties properties = super.defaultProperties(); + properties.setProperty(PROPERTY_AUTH_TAG, "AWS"); + properties.setProperty(PROPERTY_HEADER_TAG, "amz"); + properties.setProperty(PROPERTY_API_VERSION, CloudWatchAsyncClient.VERSION); + return properties; + } + + public CloudWatchPropertiesBuilder() { + super(); + } + + public CloudWatchPropertiesBuilder(Properties properties) { + super(properties); + } + +} diff --git a/sandbox-apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/config/CloudWatchRestClientModule.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/config/CloudWatchRestClientModule.java similarity index 100% rename from sandbox-apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/config/CloudWatchRestClientModule.java rename to apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/config/CloudWatchRestClientModule.java diff --git a/sandbox-apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/Datapoint.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/Datapoint.java similarity index 100% rename from sandbox-apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/Datapoint.java rename to apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/Datapoint.java diff --git a/sandbox-apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/StandardUnit.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/StandardUnit.java similarity index 100% rename from sandbox-apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/StandardUnit.java rename to apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/domain/StandardUnit.java diff --git a/sandbox-apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/functions/ISO8601Format.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/functions/ISO8601Format.java similarity index 100% rename from sandbox-apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/functions/ISO8601Format.java rename to apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/functions/ISO8601Format.java diff --git a/sandbox-apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/xml/DatapointHandler.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/xml/DatapointHandler.java similarity index 100% rename from sandbox-apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/xml/DatapointHandler.java rename to apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/xml/DatapointHandler.java diff --git a/sandbox-apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/xml/GetMetricStatisticsResponseHandler.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/xml/GetMetricStatisticsResponseHandler.java similarity index 100% rename from sandbox-apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/xml/GetMetricStatisticsResponseHandler.java rename to apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/xml/GetMetricStatisticsResponseHandler.java diff --git a/sandbox-apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/CloudWatchAsyncClientTest.java b/apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/CloudWatchAsyncClientTest.java similarity index 96% rename from sandbox-apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/CloudWatchAsyncClientTest.java rename to apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/CloudWatchAsyncClientTest.java index 3b487604c1..4ed613b2b7 100644 --- a/sandbox-apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/CloudWatchAsyncClientTest.java +++ b/apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/CloudWatchAsyncClientTest.java @@ -109,7 +109,9 @@ public class CloudWatchAsyncClientTest extends RestClientTest createContextSpec() { - return new RestContextFactory().createContextSpec("cloudwatch", "identity", "credential", new Properties()); + Properties props = new Properties(); + props.setProperty("cloudwatch.endpoint", "https://monitoring.us-east-1.amazonaws.com"); + return new RestContextFactory().createContextSpec("cloudwatch", "identity", "credential", props); } @Override diff --git a/sandbox-apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/CloudWatchClientLiveTest.java b/apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/CloudWatchClientLiveTest.java similarity index 90% rename from sandbox-apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/CloudWatchClientLiveTest.java rename to apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/CloudWatchClientLiveTest.java index 87278c20f2..f7755ae9c4 100644 --- a/sandbox-apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/CloudWatchClientLiveTest.java +++ b/apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/CloudWatchClientLiveTest.java @@ -25,7 +25,6 @@ import java.util.Date; import java.util.Properties; import org.jclouds.Constants; -import org.jclouds.aws.domain.Region; import org.jclouds.logging.log4j.config.Log4JLoggingModule; import org.jclouds.rest.RestContext; import org.jclouds.rest.RestContextFactory; @@ -55,7 +54,7 @@ public class CloudWatchClientLiveTest { protected void setupCredentials() { identity = checkNotNull(System.getProperty("test." + provider + ".identity"), "test." + provider + ".identity"); credential = checkNotNull(System.getProperty("test." + provider + ".credential"), "test." + provider - + ".credential"); + + ".credential"); endpoint = System.getProperty("test." + provider + ".endpoint", null); apiversion = System.getProperty("test." + provider + ".apiversion", null); } @@ -78,17 +77,19 @@ public class CloudWatchClientLiveTest { setupCredentials(); Properties overrides = setupProperties(); context = new RestContextFactory().createContext(provider, ImmutableSet. of(new Log4JLoggingModule()), - overrides); + overrides); client = context.getApi(); } @Test - void testGetMetricStatisticsInRegion() { + protected void testGetMetricStatisticsInRegion() { + getMetricStatisticsInRegion(null); + } + + protected void getMetricStatisticsInRegion(String region) { Calendar cal = Calendar.getInstance(); cal.add(Calendar.MINUTE, -1); - for (String region : Region.DEFAULT_REGIONS) { - assert client.getMetricStatisticsInRegion(region, "CPUUtilization", cal.getTime(), new Date(), 60, "Average") != null; - } + assert client.getMetricStatisticsInRegion(region, "CPUUtilization", cal.getTime(), new Date(), 60, "Average") != null; } @AfterTest diff --git a/sandbox-apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/xml/GetMetricStatisticsResponseHandlerTest.java b/apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/xml/GetMetricStatisticsResponseHandlerTest.java similarity index 100% rename from sandbox-apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/xml/GetMetricStatisticsResponseHandlerTest.java rename to apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/xml/GetMetricStatisticsResponseHandlerTest.java diff --git a/sandbox-apis/cloudwatch/src/test/resources/get_metric_statistics.xml b/apis/cloudwatch/src/test/resources/get_metric_statistics.xml similarity index 100% rename from sandbox-apis/cloudwatch/src/test/resources/get_metric_statistics.xml rename to apis/cloudwatch/src/test/resources/get_metric_statistics.xml diff --git a/sandbox-apis/cloudwatch/src/test/resources/log4j.xml b/apis/cloudwatch/src/test/resources/log4j.xml similarity index 100% rename from sandbox-apis/cloudwatch/src/test/resources/log4j.xml rename to apis/cloudwatch/src/test/resources/log4j.xml diff --git a/apis/pom.xml b/apis/pom.xml index ab9e16a797..8fbb299ae3 100644 --- a/apis/pom.xml +++ b/apis/pom.xml @@ -46,5 +46,6 @@ elasticstack atmos nova + cloudwatch diff --git a/core/src/main/java/org/jclouds/providers/ProviderMetadata.java b/core/src/main/java/org/jclouds/providers/ProviderMetadata.java index 98fde7499f..3fec3088bc 100644 --- a/core/src/main/java/org/jclouds/providers/ProviderMetadata.java +++ b/core/src/main/java/org/jclouds/providers/ProviderMetadata.java @@ -36,6 +36,7 @@ public interface ProviderMetadata { public static final String LOADBALANCER_TYPE = "loadbalancer"; public static final String TABLE_TYPE = "table"; public static final String QUEUE_TYPE = "queue"; + public static final String MONITOR_TYPE = "monitor"; /** * diff --git a/core/src/main/resources/rest.properties b/core/src/main/resources/rest.properties index bd4e1ab76a..23c8facee5 100644 --- a/core/src/main/resources/rest.properties +++ b/core/src/main/resources/rest.properties @@ -29,6 +29,9 @@ aws-elb.propertiesbuilder=org.jclouds.aws.elb.AWSELBPropertiesBuilder cloudwatch.contextbuilder=org.jclouds.cloudwatch.CloudWatchContextBuilder cloudwatch.propertiesbuilder=org.jclouds.cloudwatch.CloudWatchPropertiesBuilder +aws-cloudwatch.contextbuilder=org.jclouds.cloudwatch.CloudWatchContextBuilder +aws-cloudwatch.propertiesbuilder=org.jclouds.aws.cloudwatch.AWSCloudWatchPropertiesBuilder + aws-s3.contextbuilder=org.jclouds.aws.s3.AWSS3ContextBuilder aws-s3.propertiesbuilder=org.jclouds.aws.s3.AWSS3PropertiesBuilder diff --git a/providers/aws-cloudwatch/pom.xml b/providers/aws-cloudwatch/pom.xml new file mode 100644 index 0000000000..e4e3533415 --- /dev/null +++ b/providers/aws-cloudwatch/pom.xml @@ -0,0 +1,157 @@ + + + + 4.0.0 + + org.jclouds + jclouds-project + 1.2.0-SNAPSHOT + ../../project/pom.xml + + org.jclouds.provider + aws-cloudwatch + jclouds Amazon Elastic Load Balancer provider + Elastic Load Balancer implementation targeted to Amazon Web Services + bundle + + + https://monitoring.us-east-1.amazonaws.com + 2009-05-15 + ${test.aws.identity} + ${test.aws.credential} + + + + + org.jclouds.api + cloudwatch + ${project.version} + jar + + + org.jclouds.api + cloudwatch + ${project.version} + test-jar + test + + + org.jclouds + jclouds-core + ${project.version} + test-jar + test + + + org.jclouds.provider + aws-ec2 + ${project.version} + test + + + org.jclouds.driver + jclouds-log4j + ${project.version} + test + + + + + + live + + + + org.apache.maven.plugins + maven-surefire-plugin + + + integration + integration-test + + test + + + + + test.aws-cloudwatch.endpoint + ${test.aws-cloudwatch.endpoint} + + + test.aws-cloudwatch.apiversion + ${test.aws-cloudwatch.apiversion} + + + test.aws-cloudwatch.identity + ${test.aws-cloudwatch.identity} + + + test.aws-cloudwatch.credential + ${test.aws-cloudwatch.credential} + + + test.aws-cloudwatch.compute.provider + ${test.aws-cloudwatch.compute.provider} + + + test.aws-cloudwatch.compute.endpoint + ${test.aws-cloudwatch.compute.endpoint} + + + test.aws-cloudwatch.compute.apiversion + ${test.aws-cloudwatch.compute.apiversion} + + + test.aws-cloudwatch.compute.identity + ${test.aws-cloudwatch.compute.identity} + + + test.aws-cloudwatch.compute.credential + ${test.aws-cloudwatch.compute.credential} + + + + + + + + + + + + + + + org.apache.felix + maven-bundle-plugin + + + ${project.artifactId} + org.jclouds.aws.cloudwatch.*;version="${project.version}" + org.jclouds.*;version="${project.version}",* + + + + + + + diff --git a/sandbox-apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchPropertiesBuilder.java b/providers/aws-cloudwatch/src/main/java/org/jclouds/aws/cloudwatch/AWSCloudWatchPropertiesBuilder.java similarity index 86% rename from sandbox-apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchPropertiesBuilder.java rename to providers/aws-cloudwatch/src/main/java/org/jclouds/aws/cloudwatch/AWSCloudWatchPropertiesBuilder.java index 179f089668..ee801adf12 100644 --- a/sandbox-apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/CloudWatchPropertiesBuilder.java +++ b/providers/aws-cloudwatch/src/main/java/org/jclouds/aws/cloudwatch/AWSCloudWatchPropertiesBuilder.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.jclouds.cloudwatch; +package org.jclouds.aws.cloudwatch; import static org.jclouds.Constants.PROPERTY_API_VERSION; import static org.jclouds.Constants.PROPERTY_ENDPOINT; @@ -26,15 +26,16 @@ import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGION; import java.util.Properties; -import org.jclouds.PropertiesBuilder; import org.jclouds.aws.domain.Region; +import org.jclouds.cloudwatch.CloudWatchAsyncClient; +import org.jclouds.cloudwatch.CloudWatchPropertiesBuilder; /** - * Builds properties used in Cloud Watch Clients + * Builds properties used in CloudWatch Clients * * @author Adrian Cole */ -public class CloudWatchPropertiesBuilder extends PropertiesBuilder { +public class AWSCloudWatchPropertiesBuilder extends CloudWatchPropertiesBuilder { @Override protected Properties defaultProperties() { @@ -57,11 +58,11 @@ public class CloudWatchPropertiesBuilder extends PropertiesBuilder { return properties; } - public CloudWatchPropertiesBuilder() { + public AWSCloudWatchPropertiesBuilder() { super(); } - public CloudWatchPropertiesBuilder(Properties properties) { + public AWSCloudWatchPropertiesBuilder(Properties properties) { super(properties); } diff --git a/providers/aws-cloudwatch/src/main/java/org/jclouds/aws/cloudwatch/AWSCloudWatchProviderMetadata.java b/providers/aws-cloudwatch/src/main/java/org/jclouds/aws/cloudwatch/AWSCloudWatchProviderMetadata.java new file mode 100644 index 0000000000..dac2845e30 --- /dev/null +++ b/providers/aws-cloudwatch/src/main/java/org/jclouds/aws/cloudwatch/AWSCloudWatchProviderMetadata.java @@ -0,0 +1,115 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.aws.cloudwatch; + +import java.net.URI; +import java.util.Set; + +import org.jclouds.providers.BaseProviderMetadata; +import org.jclouds.providers.ProviderMetadata; + +import com.google.common.collect.ImmutableSet; + +/** + * Implementation of @ link org.jclouds.types.ProviderMetadata} for Amazon's CloudWatch + * provider. + * + * @author Adrian Cole + */ +public class AWSCloudWatchProviderMetadata extends BaseProviderMetadata { + + /** + * {@inheritDoc} + */ + @Override + public String getId() { + return "aws-cloudwatch"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getType() { + return ProviderMetadata.MONITOR_TYPE; + } + + /** + * {@inheritDoc} + */ + @Override + public String getName() { + return "Amazon CloudWatch"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getIdentityName() { + return "Access Key ID"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getCredentialName() { + return "Secret Access Key"; + } + + /** + * {@inheritDoc} + */ + @Override + public URI getHomepage() { + return URI.create("http://aws.amazon.com/cloudwatch"); + } + + /** + * {@inheritDoc} + */ + @Override + public URI getConsole() { + return URI.create("https://console.aws.amazon.com/cloudwatch/home"); + } + /** + * {@inheritDoc} + */ + @Override + public URI getApiDocumentation() { + return URI.create("http://docs.amazonwebservices.com/AmazonCloudWatch/latest/APIReference/"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getLinkedServices() { + return ImmutableSet.of("aws-s3", "aws-ec2", "aws-cloudwatch", "aws-simpledb"); + } + + /** + * {@inheritDoc} + */ + @Override + public Set getIso3166Codes() { + return ImmutableSet.of("US-VA", "US-CA", "IE", "SG", "JP-13"); + } +} diff --git a/providers/aws-cloudwatch/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata b/providers/aws-cloudwatch/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata new file mode 100644 index 0000000000..553504a806 --- /dev/null +++ b/providers/aws-cloudwatch/src/main/resources/META-INF/services/org.jclouds.providers.ProviderMetadata @@ -0,0 +1 @@ +org.jclouds.aws.cloudwatch.AWSCloudWatchProviderMetadata diff --git a/providers/aws-cloudwatch/src/test/java/org/jclouds/aws/cloudwatch/AWSCloudWatchClientLiveTest.java b/providers/aws-cloudwatch/src/test/java/org/jclouds/aws/cloudwatch/AWSCloudWatchClientLiveTest.java new file mode 100644 index 0000000000..e494ad5403 --- /dev/null +++ b/providers/aws-cloudwatch/src/test/java/org/jclouds/aws/cloudwatch/AWSCloudWatchClientLiveTest.java @@ -0,0 +1,42 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.aws.cloudwatch; + +import org.jclouds.aws.domain.Region; +import org.jclouds.cloudwatch.CloudWatchClientLiveTest; +import org.testng.annotations.Test; + +/** + * Tests behavior of {@code CloudWatchClient} + * + * @author Adrian Cole + */ +@Test(groups = "live", singleThreaded = true, testName = "AWSCloudWatchClientLiveTest") +public class AWSCloudWatchClientLiveTest extends CloudWatchClientLiveTest { + public AWSCloudWatchClientLiveTest() { + provider = "aws-cloudwatch"; + } + + @Test + public void testGetMetricStatisticsInRegion() { + for (String region : Region.DEFAULT_REGIONS) { + getMetricStatisticsInRegion(region); + } + } +} diff --git a/providers/aws-cloudwatch/src/test/java/org/jclouds/aws/cloudwatch/AWSCloudWatchProviderTest.java b/providers/aws-cloudwatch/src/test/java/org/jclouds/aws/cloudwatch/AWSCloudWatchProviderTest.java new file mode 100644 index 0000000000..83fb1f3883 --- /dev/null +++ b/providers/aws-cloudwatch/src/test/java/org/jclouds/aws/cloudwatch/AWSCloudWatchProviderTest.java @@ -0,0 +1,36 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.aws.cloudwatch; + +import org.jclouds.providers.BaseProviderMetadataTest; +import org.jclouds.providers.ProviderMetadata; +import org.testng.annotations.Test; + +/** + * The AWSCloudWatchProviderTest tests the org.jclouds.providers.AWSCloudWatchProvider class. + * + * @author Adrian Cole + */ +@Test(groups = "unit", testName = "AWSCloudWatchProviderTest") +public class AWSCloudWatchProviderTest extends BaseProviderMetadataTest { + + public AWSCloudWatchProviderTest() { + super(new AWSCloudWatchProviderMetadata(), ProviderMetadata.MONITOR_TYPE); + } +} diff --git a/providers/pom.xml b/providers/pom.xml index 782fefd730..6515b61fd2 100644 --- a/providers/pom.xml +++ b/providers/pom.xml @@ -62,5 +62,6 @@ skalicloud-sdg-my savvis-symphonyvpdc greenhousedata-element-vcloud + aws-cloudwatch