mirror of https://github.com/apache/jclouds.git
Merge branch 'master' of git@github.com:jclouds/jclouds
* 'master' of git@github.com:jclouds/jclouds: Removed explicit references to the Maven2 repo (http://repo2.maven.org/maven2) as Sonatype advise against it, and corrected the URL for the jboss repo since they've now also moved to Nexus ( http://repository.jboss.org/nexus/content/groups/public-jboss). Issue 344: setup our maven repository to sync with central Line endings
This commit is contained in:
commit
f98af108bb
1
pom.xml
1
pom.xml
|
@ -129,6 +129,7 @@ pageTracker._trackPageview();
|
|||
<!-- top-level only -->
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.2-beta-5</version>
|
||||
<inherited>false</inherited>
|
||||
<executions>
|
||||
<execution>
|
||||
|
|
178
project/pom.xml
178
project/pom.xml
|
@ -22,6 +22,11 @@
|
|||
|
||||
<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.sonatype.oss</groupId>
|
||||
<artifactId>oss-parent</artifactId>
|
||||
<version>4</version>
|
||||
</parent>
|
||||
<groupId>org.jclouds</groupId>
|
||||
<artifactId>jclouds-project</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
@ -57,7 +62,7 @@
|
|||
<archive>http://groups.google.com/group/jclouds-contributors</archive>
|
||||
</mailingList>
|
||||
<mailingList>
|
||||
<name>SVN Commits</name>
|
||||
<name>Repository Commits</name>
|
||||
<subscribe>http://groups.google.com/group/jclouds-commits</subscribe>
|
||||
<unsubscribe>http://groups.google.com/group/jclouds-commits</unsubscribe>
|
||||
<post>jclouds-commits@googlegroups.com</post>
|
||||
|
@ -66,19 +71,12 @@
|
|||
</mailingLists>
|
||||
|
||||
<scm>
|
||||
<connection>scm:svn:http://jclouds.googlecode.com/svn/trunk</connection>
|
||||
<developerConnection>scm:svn:https://jclouds.googlecode.com/svn/trunk</developerConnection>
|
||||
<url>http://jclouds.googlecode.com/svn/trunk</url>
|
||||
<connection>scm:git:git://github.com/jclouds/jclouds.git</connection>
|
||||
<developerConnection>scm:git:ssh://git@github.com/jclouds/jclouds.git</developerConnection>
|
||||
<url>http://github.com/jclouds/jclouds</url>
|
||||
</scm>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>repo2</id>
|
||||
<url>http://repo2.maven.org/maven2</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>jclouds-googlecode-deploy</id>
|
||||
<url>http://jclouds.googlecode.com/svn/repo</url>
|
||||
|
@ -95,7 +93,7 @@
|
|||
</repository>
|
||||
<repository>
|
||||
<id>jboss</id>
|
||||
<url>http://repository.jboss.org/maven2/</url>
|
||||
<url>http://repository.jboss.org/nexus/content/groups/public-jboss</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
|
@ -131,15 +129,6 @@
|
|||
</repositories>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>jclouds-googlecode-deploy</id>
|
||||
<url>dav:https://jclouds.googlecode.com/svn/repo</url>
|
||||
<uniqueVersion>false</uniqueVersion>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>jclouds-rimu-snapshots-nexus</id>
|
||||
<url>http://jclouds.rimuhosting.com:8081/nexus/content/repositories/snapshots</url>
|
||||
</snapshotRepository>
|
||||
<site>
|
||||
<id>website</id>
|
||||
<name>website</name>
|
||||
|
@ -147,13 +136,6 @@
|
|||
</site>
|
||||
</distributionManagement>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>central</id>
|
||||
<url>http://repo1.maven.org/maven2</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>jclouds-googlecode-deploy</id>
|
||||
<url>http://jclouds.googlecode.com/svn/repo</url>
|
||||
|
@ -230,7 +212,6 @@
|
|||
</developers>
|
||||
|
||||
<properties>
|
||||
<sourceEncoding>UTF-8</sourceEncoding>
|
||||
<maven.compile.source>1.6</maven.compile.source>
|
||||
<maven.compile.target>1.6</maven.compile.target>
|
||||
<maven.compile.optimize>true</maven.compile.optimize>
|
||||
|
@ -289,23 +270,23 @@
|
|||
</dependencies>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/clojure</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
<testResources>
|
||||
<testResource>
|
||||
<directory>src/test/clojure</directory>
|
||||
</testResource>
|
||||
<testResource>
|
||||
<directory>src/test/resources</directory>
|
||||
</testResource>
|
||||
</testResources>
|
||||
<plugins>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/clojure</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
<testResources>
|
||||
<testResource>
|
||||
<directory>src/test/clojure</directory>
|
||||
</testResource>
|
||||
<testResource>
|
||||
<directory>src/test/resources</directory>
|
||||
</testResource>
|
||||
</testResources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.theoryinpractise</groupId>
|
||||
<artifactId>clojure-maven-plugin</artifactId>
|
||||
|
@ -334,6 +315,7 @@
|
|||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>integration</id>
|
||||
|
@ -414,6 +396,7 @@
|
|||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.7</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>javadoc</id>
|
||||
|
@ -425,7 +408,7 @@
|
|||
</executions>
|
||||
<configuration>
|
||||
<additionalJOption>-J-Xmx128m</additionalJOption>
|
||||
<encoding>${sourceEncoding}</encoding>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
<quiet>true</quiet>
|
||||
<links>
|
||||
<link>http://download.oracle.com/javase/6/docs/api/</link>
|
||||
|
@ -446,6 +429,7 @@ pageTracker._trackPageview();
|
|||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<version>1.0-beta-1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-banned-dependencies</id>
|
||||
|
@ -482,20 +466,23 @@ pageTracker._trackPageview();
|
|||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3</version>
|
||||
<configuration>
|
||||
<encoding>${sourceEncoding}</encoding>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
<source>${maven.compile.source}</source>
|
||||
<target>${maven.compile.target}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.4.2</version>
|
||||
<configuration>
|
||||
<encoding>${sourceEncoding}</encoding>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.3.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
@ -506,21 +493,34 @@ pageTracker._trackPageview();
|
|||
<configuration>
|
||||
<archive>
|
||||
<manifestEntries>
|
||||
<Specification-Title>jclouds ${pom.name}</Specification-Title>
|
||||
<Specification-Title>jclouds ${project.name}</Specification-Title>
|
||||
<Specification-Vendor>jclouds</Specification-Vendor>
|
||||
<Implementation-Vendor>jclouds</Implementation-Vendor>
|
||||
<Implementation-Vendor-Id>org.jclouds.aws.s3</Implementation-Vendor-Id>
|
||||
<Implementation-Version>${pom.version}</Implementation-Version>
|
||||
<Implementation-Version>${project.version}</Implementation-Version>
|
||||
<X-Compile-Source-JDK>${maven.compile.source}</X-Compile-Source-JDK>
|
||||
<X-Compile-Target-JDK>${maven.compile.target}</X-Compile-Target-JDK>
|
||||
</manifestEntries>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>2.1</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<version>2.3</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
|
@ -529,6 +529,7 @@ pageTracker._trackPageview();
|
|||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>integration</id>
|
||||
|
@ -568,7 +569,7 @@ pageTracker._trackPageview();
|
|||
-->
|
||||
<property>
|
||||
<name>file.encoding</name>
|
||||
<value>${sourceEncoding}</value>
|
||||
<value>${project.build.sourceEncoding}</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>jclouds.test.initializer</name>
|
||||
|
@ -657,28 +658,50 @@ pageTracker._trackPageview();
|
|||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>clojure-1.1</id>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.clojure</groupId>
|
||||
<artifactId>clojure</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.clojure</groupId>
|
||||
<artifactId>clojure-contrib</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
<!-- modifies the plugin config inherited from oss-parent -->
|
||||
<profile>
|
||||
<id>sonatype-release-profile-extension</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>performRelease</name>
|
||||
<value>true</value>
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<configuration>
|
||||
<executable>${gpg.command}</executable>
|
||||
<passphrase>${gpg.passphrase}</passphrase>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>clojure-1.1</id>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.clojure</groupId>
|
||||
<artifactId>clojure</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.clojure</groupId>
|
||||
<artifactId>clojure-contrib</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
<reporting>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>2.1.2</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
|
@ -700,7 +723,7 @@ pageTracker._trackPageview();
|
|||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<configuration>
|
||||
<encoding>${sourceEncoding}</encoding>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
<quiet>true</quiet>
|
||||
</configuration>
|
||||
<reportSets>
|
||||
|
@ -713,21 +736,25 @@ pageTracker._trackPageview();
|
|||
</reportSets>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<groupId>org.sonatype.maven.plugin</groupId>
|
||||
<artifactId>emma-maven-plugin</artifactId>
|
||||
<version>1.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>surefire-report-maven-plugin</artifactId>
|
||||
<version>2.0-beta-1</version>
|
||||
<inherited>true</inherited>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>rat-maven-plugin</artifactId>
|
||||
<version>1.0-alpha-3</version>
|
||||
<inherited>true</inherited>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
<configuration>
|
||||
<targetJdk>${maven.compile.source}</targetJdk>
|
||||
</configuration>
|
||||
|
@ -736,6 +763,7 @@ pageTracker._trackPageview();
|
|||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>findbugs-maven-plugin</artifactId>
|
||||
<version>2.3.1</version>
|
||||
<configuration>
|
||||
<xmlOutput>true</xmlOutput>
|
||||
</configuration>
|
||||
|
|
|
@ -33,4 +33,17 @@
|
|||
<modules>
|
||||
<module>resteasy-jaxrs-client</module>
|
||||
</modules>
|
||||
|
||||
<distributionManagement>
|
||||
<!-- third-party projects not in org.jclouds can't be deployed to Sonatype -->
|
||||
<repository>
|
||||
<id>jclouds-googlecode-deploy</id>
|
||||
<url>dav:https://jclouds.googlecode.com/svn/repo</url>
|
||||
<uniqueVersion>false</uniqueVersion>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>jclouds-rimu-snapshots-nexus</id>
|
||||
<url>http://jclouds.rimuhosting.com:8081/nexus/content/repositories/snapshots</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
</project>
|
||||
|
|
|
@ -1,62 +1,62 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||
*
|
||||
* ====================================================================
|
||||
* 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.vcloud.bluelock.compute;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import org.jclouds.compute.domain.NodeState;
|
||||
import org.jclouds.compute.strategy.PopulateDefaultLoginCredentialsForImageStrategy;
|
||||
import org.jclouds.domain.Credentials;
|
||||
import org.jclouds.vcloud.VCloudClient;
|
||||
import org.jclouds.vcloud.compute.internal.VCloudComputeClientImpl;
|
||||
import org.jclouds.vcloud.domain.Status;
|
||||
import org.jclouds.vcloud.domain.VApp;
|
||||
import org.jclouds.vcloud.domain.VAppTemplate;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Singleton
|
||||
public class BlueLockVCloudDirectorComputeClient extends VCloudComputeClientImpl {
|
||||
private final PopulateDefaultLoginCredentialsForImageStrategy credentialsProvider;
|
||||
|
||||
@Inject
|
||||
protected BlueLockVCloudDirectorComputeClient(PopulateDefaultLoginCredentialsForImageStrategy credentialsProvider,
|
||||
VCloudClient client, Predicate<URI> successTester, Map<Status, NodeState> vAppStatusToNodeState) {
|
||||
super(client, successTester, vAppStatusToNodeState);
|
||||
this.credentialsProvider = credentialsProvider;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Map<String, String> parseAndValidateResponse(VAppTemplate template, VApp vAppResponse) {
|
||||
Credentials credentials = credentialsProvider.execute(template);
|
||||
Map<String, String> toReturn = super.parseResponse(template, vAppResponse);
|
||||
toReturn.put("username", credentials.identity);
|
||||
toReturn.put("password", credentials.credential);
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||
*
|
||||
* ====================================================================
|
||||
* 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.vcloud.bluelock.compute;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import org.jclouds.compute.domain.NodeState;
|
||||
import org.jclouds.compute.strategy.PopulateDefaultLoginCredentialsForImageStrategy;
|
||||
import org.jclouds.domain.Credentials;
|
||||
import org.jclouds.vcloud.VCloudClient;
|
||||
import org.jclouds.vcloud.compute.internal.VCloudComputeClientImpl;
|
||||
import org.jclouds.vcloud.domain.Status;
|
||||
import org.jclouds.vcloud.domain.VApp;
|
||||
import org.jclouds.vcloud.domain.VAppTemplate;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Singleton
|
||||
public class BlueLockVCloudDirectorComputeClient extends VCloudComputeClientImpl {
|
||||
private final PopulateDefaultLoginCredentialsForImageStrategy credentialsProvider;
|
||||
|
||||
@Inject
|
||||
protected BlueLockVCloudDirectorComputeClient(PopulateDefaultLoginCredentialsForImageStrategy credentialsProvider,
|
||||
VCloudClient client, Predicate<URI> successTester, Map<Status, NodeState> vAppStatusToNodeState) {
|
||||
super(client, successTester, vAppStatusToNodeState);
|
||||
this.credentialsProvider = credentialsProvider;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Map<String, String> parseAndValidateResponse(VAppTemplate template, VApp vAppResponse) {
|
||||
Credentials credentials = credentialsProvider.execute(template);
|
||||
Map<String, String> toReturn = super.parseResponse(template, vAppResponse);
|
||||
toReturn.put("username", credentials.identity);
|
||||
toReturn.put("password", credentials.credential);
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,63 +1,63 @@
|
|||
/**
|
||||
*
|
||||
* Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||
*
|
||||
* ====================================================================
|
||||
* 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.vcloud.bluelock.compute;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import org.jclouds.compute.domain.NodeState;
|
||||
import org.jclouds.compute.strategy.PopulateDefaultLoginCredentialsForImageStrategy;
|
||||
import org.jclouds.domain.Credentials;
|
||||
import org.jclouds.vcloud.VCloudExpressClient;
|
||||
import org.jclouds.vcloud.compute.internal.VCloudExpressComputeClientImpl;
|
||||
import org.jclouds.vcloud.domain.Status;
|
||||
import org.jclouds.vcloud.domain.VCloudExpressVApp;
|
||||
import org.jclouds.vcloud.domain.VCloudExpressVAppTemplate;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Singleton
|
||||
public class BlueLockVCloudExpressComputeClient extends VCloudExpressComputeClientImpl {
|
||||
private final PopulateDefaultLoginCredentialsForImageStrategy credentialsProvider;
|
||||
|
||||
@Inject
|
||||
protected BlueLockVCloudExpressComputeClient(PopulateDefaultLoginCredentialsForImageStrategy credentialsProvider,
|
||||
VCloudExpressClient client, Predicate<URI> successTester, Map<Status, NodeState> vAppStatusToNodeState) {
|
||||
super(client, successTester, vAppStatusToNodeState);
|
||||
this.credentialsProvider = credentialsProvider;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Map<String, String> parseAndValidateResponse(VCloudExpressVAppTemplate template,
|
||||
VCloudExpressVApp vAppResponse) {
|
||||
Credentials credentials = credentialsProvider.execute(template);
|
||||
Map<String, String> toReturn = super.parseResponse(template, vAppResponse);
|
||||
toReturn.put("username", credentials.identity);
|
||||
toReturn.put("password", credentials.credential);
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||
*
|
||||
* ====================================================================
|
||||
* 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.vcloud.bluelock.compute;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import org.jclouds.compute.domain.NodeState;
|
||||
import org.jclouds.compute.strategy.PopulateDefaultLoginCredentialsForImageStrategy;
|
||||
import org.jclouds.domain.Credentials;
|
||||
import org.jclouds.vcloud.VCloudExpressClient;
|
||||
import org.jclouds.vcloud.compute.internal.VCloudExpressComputeClientImpl;
|
||||
import org.jclouds.vcloud.domain.Status;
|
||||
import org.jclouds.vcloud.domain.VCloudExpressVApp;
|
||||
import org.jclouds.vcloud.domain.VCloudExpressVAppTemplate;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
|
||||
/**
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Singleton
|
||||
public class BlueLockVCloudExpressComputeClient extends VCloudExpressComputeClientImpl {
|
||||
private final PopulateDefaultLoginCredentialsForImageStrategy credentialsProvider;
|
||||
|
||||
@Inject
|
||||
protected BlueLockVCloudExpressComputeClient(PopulateDefaultLoginCredentialsForImageStrategy credentialsProvider,
|
||||
VCloudExpressClient client, Predicate<URI> successTester, Map<Status, NodeState> vAppStatusToNodeState) {
|
||||
super(client, successTester, vAppStatusToNodeState);
|
||||
this.credentialsProvider = credentialsProvider;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Map<String, String> parseAndValidateResponse(VCloudExpressVAppTemplate template,
|
||||
VCloudExpressVApp vAppResponse) {
|
||||
Credentials credentials = credentialsProvider.execute(template);
|
||||
Map<String, String> toReturn = super.parseResponse(template, vAppResponse);
|
||||
toReturn.put("username", credentials.identity);
|
||||
toReturn.put("password", credentials.credential);
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue