Skip to content
Permalink
Browse files
organized aws code into its own subdir
  • Loading branch information
adriancole committed Apr 29, 2013
0 parents commit 9768315fa1d9d94f4547f4f9a34c2f34481686b4
Show file tree
Hide file tree
Showing 252 changed files with 22,839 additions and 0 deletions.
@@ -0,0 +1,27 @@
====
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.
====

#
# The jclouds provider for Amazon's Elastic Load Balancing (http://aws.amazon.com/elasticloadbalancing/).
#
# Expects the jclouds elb API to be present on your application's classpath.
#
# TODO: Implementation status.
# TODO: Supported features.
# TODO: Usage example.
@@ -0,0 +1,157 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to jclouds, Inc. (jclouds) under one or more
contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. jclouds licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jclouds.labs</groupId>
<artifactId>jclouds-labs-aws</artifactId>
<version>1.7.0-SNAPSHOT</version>
</parent>

<!-- TODO: when out of labs, switch to org.jclouds.provider -->
<groupId>org.jclouds.labs</groupId>
<artifactId>aws-elb</artifactId>
<name>jclouds Amazon Elastic Load Balancer provider</name>
<description>Elastic Load Balancer implementation targeted to Amazon Web Services</description>
<packaging>bundle</packaging>

<properties>
<test.aws-elb.endpoint>https://elasticloadbalancing.us-east-1.amazonaws.com</test.aws-elb.endpoint>
<test.aws-elb.api-version>2012-06-01</test.aws-elb.api-version>
<test.aws-elb.build-version />
<test.aws-elb.identity>${test.aws.identity}</test.aws-elb.identity>
<test.aws-elb.credential>${test.aws.credential}</test.aws-elb.credential>
<test.aws-elb.compute.provider>aws-ec2</test.aws-elb.compute.provider>
<test.aws-elb.compute.endpoint />
<test.aws-elb.compute.api-version />
<test.aws-elb.compute.build-version />
<test.aws-elb.compute.identity>${test.aws.identity}</test.aws-elb.compute.identity>
<test.aws-elb.compute.credential>${test.aws.credential}</test.aws-elb.compute.credential>
<test.aws-elb.compute.template />

<jclouds.osgi.export>org.jclouds.aws.elb*;version="${project.version}"</jclouds.osgi.export>
<jclouds.osgi.import>
org.jclouds.labs*;version="${project.version}",
org.jclouds*;version="${jclouds.version}",
*
</jclouds.osgi.import>
</properties>

<dependencies>
<dependency>
<groupId>org.jclouds.labs</groupId>
<artifactId>elb</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jclouds.labs</groupId>
<artifactId>elb</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-core</artifactId>
<version>${jclouds.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-loadbalancer</artifactId>
<version>${jclouds.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-compute</artifactId>
<version>${jclouds.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds.provider</groupId>
<artifactId>aws-ec2</artifactId>
<version>${jclouds.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds.driver</groupId>
<artifactId>jclouds-sshj</artifactId>
<version>${jclouds.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds.driver</groupId>
<artifactId>jclouds-slf4j</artifactId>
<version>${jclouds.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
<profile>
<id>live</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>integration</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<systemPropertyVariables>
<test.aws-elb.endpoint>${test.aws-elb.endpoint}</test.aws-elb.endpoint>
<test.aws-elb.api-version>${test.aws-elb.api-version}</test.aws-elb.api-version>
<test.aws-elb.build-version>${test.aws-elb.build-version}</test.aws-elb.build-version>
<test.aws-elb.identity>${test.aws-elb.identity}</test.aws-elb.identity>
<test.aws-elb.credential>${test.aws-elb.credential}</test.aws-elb.credential>
<test.aws-elb.compute.provider>${test.aws-elb.compute.provider}</test.aws-elb.compute.provider>
<test.aws-elb.compute.endpoint>${test.aws-elb.compute.endpoint}</test.aws-elb.compute.endpoint>
<test.aws-elb.compute.build-version>${test.aws-elb.compute.build-version}</test.aws-elb.compute.build-version>
<test.aws-elb.compute.api-version>${test.aws-elb.compute.api-version}</test.aws-elb.compute.api-version>
<test.aws-elb.compute.identity>${test.aws-elb.compute.identity}</test.aws-elb.compute.identity>
<test.aws-elb.compute.credential>${test.aws-elb.compute.credential}</test.aws-elb.compute.credential>
<test.aws-elb.compute.template>${test.aws-elb.compute.template}</test.aws-elb.compute.template>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
@@ -0,0 +1,109 @@
/**
* 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.elb;

import static org.jclouds.aws.domain.Region.AP_NORTHEAST_1;
import static org.jclouds.aws.domain.Region.AP_SOUTHEAST_1;
import static org.jclouds.aws.domain.Region.AP_SOUTHEAST_2;
import static org.jclouds.aws.domain.Region.EU_WEST_1;
import static org.jclouds.aws.domain.Region.SA_EAST_1;
import static org.jclouds.aws.domain.Region.US_EAST_1;
import static org.jclouds.aws.domain.Region.US_WEST_1;
import static org.jclouds.aws.domain.Region.US_WEST_2;
import static org.jclouds.aws.reference.AWSConstants.PROPERTY_ZONECLIENT_ENDPOINT;
import static org.jclouds.location.reference.LocationConstants.PROPERTY_REGION;

import java.net.URI;
import java.util.Properties;

import org.jclouds.aws.domain.Region;
import org.jclouds.elb.ELBApiMetadata;
import org.jclouds.providers.ProviderMetadata;
import org.jclouds.providers.internal.BaseProviderMetadata;

/**
* Implementation of @ link org.jclouds.types.ProviderMetadata} for Amazon's Elastic Load Balancing
* provider.
*
* @author Adrian Cole
*/
public class AWSELBProviderMetadata extends BaseProviderMetadata {

public static Builder builder() {
return new Builder();
}

@Override
public Builder toBuilder() {
return Builder.class.cast(builder().fromProviderMetadata(this));
}

public AWSELBProviderMetadata() {
super(builder());
}

public AWSELBProviderMetadata(Builder builder) {
super(builder);
}

public static Properties defaultProperties() {
Properties properties = new Properties();
properties.putAll(Region.regionProperties());
properties.setProperty(PROPERTY_REGION + "." + US_EAST_1 + ".endpoint",
"https://elasticloadbalancing.us-east-1.amazonaws.com");