Issue 961:add cloudservers-nova-us

This commit is contained in:
Adrian Cole 2012-06-06 23:39:09 -07:00
parent 8f84608fe7
commit 5c56e0b9c8
30 changed files with 1583 additions and 0 deletions

121
labs/cloudidentity/pom.xml Normal file
View File

@ -0,0 +1,121 @@
<?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</groupId>
<artifactId>jclouds-project</artifactId>
<version>1.5.0-SNAPSHOT</version>
<relativePath>../../project/pom.xml</relativePath>
</parent>
<groupId>org.jclouds.labs</groupId>
<artifactId>cloudidentity</artifactId>
<name>jcloud cloudidentity api</name>
<description>jclouds components to access an implementation of Rackspace Cloud Identity</description>
<packaging>bundle</packaging>
<properties>
<!-- keystone endpoint -->
<test.cloudidentity.endpoint>https://identity.api.rackspacecloud.com</test.cloudidentity.endpoint>
<!-- keystone version -->
<test.cloudidentity.api-version>2.0</test.cloudidentity.api-version>
<test.cloudidentity.build-version></test.cloudidentity.build-version>
<test.cloudidentity.identity>413274:${test.rackspace-us.identity}</test.cloudidentity.identity>
<test.cloudidentity.credential>${test.rackspace-us.credential}</test.cloudidentity.credential>
<test.jclouds.keystone.credential-type>RAX-KSKEY:apiKeyCredentials</test.jclouds.keystone.credential-type>
<jclouds.osgi.export>org.jclouds.cloudidentity.v2_0*;version="${project.version}"</jclouds.osgi.export>
<jclouds.osgi.import>
org.jclouds.rest.internal;version="${project.version}",
org.jclouds*;version="${project.version}",
*
</jclouds.osgi.import>
</properties>
<dependencies>
<dependency>
<groupId>org.jclouds.api</groupId>
<artifactId>openstack-keystone</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-core</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds.api</groupId>
<artifactId>openstack-keystone</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds.driver</groupId>
<artifactId>jclouds-slf4j</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.0.0</version>
<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.cloudidentity.endpoint>${test.cloudidentity.endpoint}</test.cloudidentity.endpoint>
<test.cloudidentity.api-version>${test.cloudidentity.api-version}</test.cloudidentity.api-version>
<test.cloudidentity.build-version>${test.cloudidentity.build-version}</test.cloudidentity.build-version>
<test.cloudidentity.identity>${test.cloudidentity.identity}</test.cloudidentity.identity>
<test.cloudidentity.credential>${test.cloudidentity.credential}</test.cloudidentity.credential>
<test.jclouds.keystone.credential-type>${test.jclouds.keystone.credential-type}</test.jclouds.keystone.credential-type>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@ -0,0 +1,103 @@
package org.jclouds.cloudidentity.v2_0;
/**
* 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.
*/
import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE;
import java.net.URI;
import java.util.Properties;
import org.jclouds.apis.ApiMetadata;
import org.jclouds.cloudidentity.v2_0.config.CloudIdentityCredentialTypes;
import org.jclouds.cloudidentity.v2_0.config.CloudIdentityRestClientModule;
import org.jclouds.openstack.keystone.v2_0.KeystoneApiMetadata;
import org.jclouds.openstack.keystone.v2_0.KeystoneAsyncClient;
import org.jclouds.openstack.keystone.v2_0.KeystoneClient;
import org.jclouds.rest.RestContext;
import com.google.common.collect.ImmutableSet;
import com.google.common.reflect.TypeToken;
import com.google.inject.Module;
/**
* Implementation of {@link ApiMetadata} for the Rackspace Cloud Identity Service
*
* @author Adrian Cole
*/
public class CloudIdentityApiMetadata extends KeystoneApiMetadata {
/** The serialVersionUID */
private static final long serialVersionUID = -1572520638079261710L;
public static final TypeToken<RestContext<KeystoneClient, KeystoneAsyncClient>> CONTEXT_TOKEN = new TypeToken<RestContext<KeystoneClient, KeystoneAsyncClient>>() {
private static final long serialVersionUID = -5070937833892503232L;
};
private static Builder builder() {
return new Builder();
}
@Override
public Builder toBuilder() {
return builder().fromApiMetadata(this);
}
public CloudIdentityApiMetadata() {
this(builder());
}
protected CloudIdentityApiMetadata(Builder builder) {
super(builder);
}
public static Properties defaultProperties() {
Properties properties = KeystoneApiMetadata.defaultProperties();
properties.setProperty(CREDENTIAL_TYPE, CloudIdentityCredentialTypes.API_KEY_CREDENTIALS);
return properties;
}
public static class Builder extends KeystoneApiMetadata.Builder {
protected Builder(){
super(KeystoneClient.class, KeystoneAsyncClient.class);
id("cloudidentity")
.name("Rackspace Cloud Identity Service")
.defaultEndpoint("https://identity.api.rackspacecloud.com")
.identityName("username")
.credentialName("API Key")
.defaultProperties(CloudIdentityApiMetadata.defaultProperties())
.context(CONTEXT_TOKEN)
.documentation(URI.create("http://docs.rackspace.com/auth/api/v2.0/auth-client-devguide/"))
.defaultModules(ImmutableSet.<Class<? extends Module>>of(CloudIdentityRestClientModule.class));
}
@Override
public CloudIdentityApiMetadata build() {
return new CloudIdentityApiMetadata(this);
}
@Override
public Builder fromApiMetadata(ApiMetadata in) {
super.fromApiMetadata(in);
return this;
}
}
}

View File

@ -0,0 +1,71 @@
/**
* 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.cloudidentity.v2_0;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.core.MediaType;
import org.jclouds.cloudidentity.v2_0.domain.ApiKeyCredentials;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.openstack.keystone.v2_0.AuthenticationAsyncClient;
import org.jclouds.openstack.keystone.v2_0.binders.BindAuthToJsonPayload;
import org.jclouds.openstack.keystone.v2_0.domain.Access;
import org.jclouds.rest.annotations.MapBinder;
import org.jclouds.rest.annotations.PayloadParam;
import org.jclouds.rest.annotations.SelectJson;
import com.google.common.util.concurrent.ListenableFuture;
/**
* Provides asynchronous access to Service via their REST API.
* <p/>
*
* @see AuthenticationClient
* @see <a href="http://docs.openstack.org/api/openstack-identity-service/2.0/content/Service_API_Client_Operations.html"
* />
* @author Adrian Cole
*/
@Path("/v2.0")
public interface CloudIdentityAuthenticationAsyncClient extends AuthenticationAsyncClient {
/**
* @see CloudIdentityAuthenticationAsyncClient#authenticateWithTenantNameAndCredentials(String,ApiKeyCredentials)
*/
@POST
@SelectJson("access")
@Consumes(MediaType.APPLICATION_JSON)
@Path("/tokens")
@MapBinder(BindAuthToJsonPayload.class)
ListenableFuture<Access> authenticateWithTenantNameAndCredentials(@Nullable @PayloadParam("tenantName") String tenantName,
ApiKeyCredentials apiKeyCredentials);
/**
* @see CloudIdentityAuthenticationAsyncClient#authenticateWithTenantIdAndCredentials(String,ApiKeyCredentials)
*/
@POST
@SelectJson("access")
@Consumes(MediaType.APPLICATION_JSON)
@Path("/tokens")
@MapBinder(BindAuthToJsonPayload.class)
ListenableFuture<Access> authenticateWithTenantIdAndCredentials(@Nullable @PayloadParam("tenantId") String tenantId,
ApiKeyCredentials apiKeyCredentials);
}

View File

@ -0,0 +1,56 @@
/**
* 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.cloudidentity.v2_0;
import java.util.concurrent.TimeUnit;
import org.jclouds.cloudidentity.v2_0.domain.ApiKeyCredentials;
import org.jclouds.concurrent.Timeout;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.openstack.keystone.v2_0.AuthenticationAsyncClient;
import org.jclouds.openstack.keystone.v2_0.AuthenticationClient;
import org.jclouds.openstack.keystone.v2_0.domain.Access;
/**
* Provides synchronous access to the KeyStone Service API.
* <p/>
*
* @see AuthenticationAsyncClient
* @see <a href="http://docs.openstack.org/api/openstack-identity-service/2.0/content/Service_API_Client_Operations.html"
* />
* @author Adrian Cole
*/
@Timeout(duration = 30, timeUnit = TimeUnit.SECONDS)
public interface CloudIdentityAuthenticationClient extends AuthenticationClient {
/**
* Authenticate to generate a token.
*
* @return access with token
*/
Access authenticateWithTenantNameAndCredentials(@Nullable String tenantId, ApiKeyCredentials apiKeyCredentials);
/**
* Authenticate to generate a token.
*
* @return access with token
*/
Access authenticateWithTenantIdAndCredentials(@Nullable String tenantId, ApiKeyCredentials apiKeyCredentials);
}

View File

@ -0,0 +1,95 @@
/**
* 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.cloudidentity.v2_0.config;
import static org.jclouds.rest.config.BinderUtils.bindClientAndAsyncClient;
import java.util.Map;
import org.jclouds.cloudidentity.v2_0.CloudIdentityAuthenticationAsyncClient;
import org.jclouds.cloudidentity.v2_0.CloudIdentityAuthenticationClient;
import org.jclouds.cloudidentity.v2_0.functions.AuthenticateApiKeyCredentials;
import org.jclouds.domain.Credentials;
import org.jclouds.openstack.keystone.v2_0.AuthenticationAsyncClient;
import org.jclouds.openstack.keystone.v2_0.AuthenticationClient;
import org.jclouds.openstack.keystone.v2_0.config.CredentialTypes;
import org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule;
import org.jclouds.openstack.keystone.v2_0.domain.Access;
import org.jclouds.openstack.keystone.v2_0.functions.AuthenticatePasswordCredentials;
import com.google.common.base.Function;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSet.Builder;
import com.google.inject.Injector;
import com.google.inject.Module;
import com.google.inject.Scopes;
/**
*
* @author Adrian Cole
*/
public class CloudIdentityAuthenticationModule extends KeystoneAuthenticationModule {
public CloudIdentityAuthenticationModule() {
this(new RegionModule());
}
protected CloudIdentityAuthenticationModule(Module locationModule) {
super(locationModule);
}
public static class CloudIdentityAuthenticationModuleForRegions extends CloudIdentityAuthenticationModule {
public CloudIdentityAuthenticationModuleForRegions() {
super(new RegionModule());
}
}
public static Module forRegions() {
return new CloudIdentityAuthenticationModuleForRegions();
}
public static class CloudIdentityAuthenticationModuleForZones extends CloudIdentityAuthenticationModule {
public CloudIdentityAuthenticationModuleForZones() {
super(new ZoneModule());
}
}
public static Module forZones() {
return new CloudIdentityAuthenticationModuleForZones();
}
@Override
protected void bindAuthenticationClient() {
// AuthenticationClient is used directly for filters and retry handlers, so let's bind it
// explicitly
bindClientAndAsyncClient(binder(), CloudIdentityAuthenticationClient.class,
CloudIdentityAuthenticationAsyncClient.class);
bind(AuthenticationClient.class).to(CloudIdentityAuthenticationClient.class).in(Scopes.SINGLETON);
bind(AuthenticationAsyncClient.class).to(CloudIdentityAuthenticationAsyncClient.class).in(Scopes.SINGLETON);
}
@Override
protected Map<String, Function<Credentials, Access>> authenticationMethods(Injector i) {
Builder<Function<Credentials, Access>> fns = ImmutableSet.<Function<Credentials, Access>> builder();
fns.add(i.getInstance(AuthenticatePasswordCredentials.class));
fns.add(i.getInstance(AuthenticateApiKeyCredentials.class));
return CredentialTypes.indexByCredentialType(fns.build());
}
}

View File

@ -0,0 +1,32 @@
/**
* 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.cloudidentity.v2_0.config;
import org.jclouds.openstack.keystone.v2_0.config.CredentialTypes;
/**
*
* @author Adrian Cole
*/
public class CloudIdentityCredentialTypes extends CredentialTypes {
public static final String API_KEY_CREDENTIALS = "RAX-KSKEY:apiKeyCredentials";
}

View File

@ -0,0 +1,25 @@
package org.jclouds.cloudidentity.v2_0.config;
import org.jclouds.location.config.LocationModule;
import org.jclouds.openstack.keystone.v2_0.KeystoneAsyncClient;
import org.jclouds.openstack.keystone.v2_0.KeystoneClient;
import org.jclouds.openstack.keystone.v2_0.config.KeystoneRestClientModule;
import org.jclouds.rest.ConfiguresRestClient;
/**
* Configures the Keystone connection.
*
* @author Adam Lowe
*/
@ConfiguresRestClient
public class CloudIdentityRestClientModule extends KeystoneRestClientModule<KeystoneClient, KeystoneAsyncClient> {
@Override
protected void installLocations() {
// TODO: select this from KeystoneProperties.VERSION; note you select from
// a guice provided property, so it will have to come from somewhere else, maybe we move
// this to the the ContextBuilder
install(CloudIdentityAuthenticationModule.forRegions());
install(new LocationModule());
}
}

View File

@ -0,0 +1,125 @@
/**
* 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.cloudidentity.v2_0.domain;
import static com.google.common.base.Objects.equal;
import static com.google.common.base.Objects.toStringHelper;
import static com.google.common.base.Preconditions.checkNotNull;
import org.jclouds.cloudidentity.v2_0.config.CloudIdentityCredentialTypes;
import org.jclouds.openstack.keystone.v2_0.config.CredentialType;
import com.google.common.base.Objects;
/**
* ApiKey Credentials
*
* @see <a href="http://docs.rackspace.com/servers/api/v2/cs-devguide/content/curl_auth.html">docs</a>
* @author Adrian Cole
*/
@CredentialType(CloudIdentityCredentialTypes.API_KEY_CREDENTIALS)
public class ApiKeyCredentials {
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return builder().fromApiKeyCredentials(this);
}
public static ApiKeyCredentials createWithUsernameAndApiKey(String username, String apiKey) {
return builder().apiKey(apiKey).username(username).build();
}
public static class Builder {
protected String username;
protected String apiKey;
/**
* @see ApiKeyCredentials#getUsername()
*/
protected Builder apiKey(String apiKey) {
this.apiKey = apiKey;
return this;
}
/**
* @see ApiKeyCredentials#getApiKey()
*/
public Builder username(String username) {
this.username = username;
return this;
}
public ApiKeyCredentials build() {
return new ApiKeyCredentials(username, apiKey);
}
public Builder fromApiKeyCredentials(ApiKeyCredentials from) {
return username(from.getUsername()).apiKey(from.getApiKey());
}
}
protected final String username;
protected final String apiKey;
protected ApiKeyCredentials(String username, String apiKey) {
this.username = checkNotNull(username, "username");
this.apiKey = checkNotNull(apiKey, "apiKey");
}
/**
* @return the username
*/
public String getUsername() {
return username;
}
/**
* @return the apiKey
*/
public String getApiKey() {
return apiKey;
}
@Override
public boolean equals(Object object) {
if (this == object) {
return true;
}
if (object instanceof ApiKeyCredentials) {
final ApiKeyCredentials other = ApiKeyCredentials.class.cast(object);
return equal(username, other.username) && equal(apiKey, other.apiKey);
} else {
return false;
}
}
@Override
public int hashCode() {
return Objects.hashCode(username, apiKey);
}
@Override
public String toString() {
return toStringHelper("").add("username", username).add("apiKey", apiKey).toString();
}
}

View File

@ -0,0 +1,66 @@
/**
* 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.cloudidentity.v2_0.functions;
import javax.inject.Inject;
import javax.inject.Singleton;
import org.jclouds.cloudidentity.v2_0.CloudIdentityAuthenticationClient;
import org.jclouds.cloudidentity.v2_0.config.CloudIdentityCredentialTypes;
import org.jclouds.cloudidentity.v2_0.domain.ApiKeyCredentials;
import org.jclouds.openstack.keystone.v2_0.config.CredentialType;
import org.jclouds.openstack.keystone.v2_0.domain.Access;
import org.jclouds.openstack.keystone.v2_0.functions.internal.BaseAuthenticator;
/**
*
* @author Adrian Cole
* @see <a
* href="http://docs.rackspace.com/servers/api/v2/cs-devguide/content/curl_auth.html">docs</a>
*/
@CredentialType(CloudIdentityCredentialTypes.API_KEY_CREDENTIALS)
@Singleton
public class AuthenticateApiKeyCredentials extends BaseAuthenticator<ApiKeyCredentials> {
protected final CloudIdentityAuthenticationClient client;
@Inject
public AuthenticateApiKeyCredentials(CloudIdentityAuthenticationClient client) {
this.client = client;
}
@Override
protected Access authenticateWithTenantNameOrNull(String tenantId, ApiKeyCredentials apiKeyCredentials) {
return client.authenticateWithTenantNameAndCredentials(tenantId, apiKeyCredentials);
}
@Override
protected Access authenticateWithTenantId(String tenantId, ApiKeyCredentials apiKeyCredentials) {
return client.authenticateWithTenantIdAndCredentials(tenantId, apiKeyCredentials);
}
@Override
public ApiKeyCredentials createCredentials(String identity, String credential) {
return ApiKeyCredentials.createWithUsernameAndApiKey(identity, credential);
}
@Override
public String toString() {
return "authenticateApiKeyCredentials()";
}
}

View File

@ -0,0 +1 @@
org.jclouds.cloudidentity.v2_0.CloudIdentityApiMetadata

View File

@ -0,0 +1,39 @@
/**
* 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.cloudidentity.v2_0;
import org.jclouds.View;
import org.jclouds.rest.internal.BaseRestApiMetadataTest;
import org.testng.annotations.Test;
import com.google.common.collect.ImmutableSet;
import com.google.common.reflect.TypeToken;
/**
*
* @author Adrian Cole
*/
@Test(groups = "unit", testName = "CloudIdentityApiMetadataTest")
public class CloudIdentityApiMetadataTest extends BaseRestApiMetadataTest {
// no identity abstraction, yet
public CloudIdentityApiMetadataTest() {
super(new CloudIdentityApiMetadata(), ImmutableSet.<TypeToken<? extends View>> of());
}
}

View File

@ -0,0 +1,33 @@
/**
* 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 1.1 (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-1.1
*
* 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.cloudidentity.v2_0;
import org.jclouds.openstack.keystone.v2_0.KeystoneClientLiveTest;
import org.testng.annotations.Test;
/**
*
* @author Adrian Cole
*/
@Test(groups = "live", testName = "CloudIdentityClientLiveTest", singleThreaded = true)
public class CloudIdentityClientLiveTest extends KeystoneClientLiveTest {
public CloudIdentityClientLiveTest() {
provider = "cloudidentity";
}
}

View File

@ -0,0 +1,33 @@
/**
* 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 1.1 (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-1.1
*
* 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.cloudidentity.v2_0.features;
import org.jclouds.openstack.keystone.v2_0.features.TenantClientLiveTest;
import org.testng.annotations.Test;
/**
*
* @author Adrian Cole
*/
@Test(groups = "live", testName = "CloudIdentityTenantClientLiveTest", singleThreaded = true)
public class CloudIdentityTenantClientLiveTest extends TenantClientLiveTest {
public CloudIdentityTenantClientLiveTest() {
provider = "cloudidentity";
}
}

View File

@ -0,0 +1,33 @@
/**
* 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 1.1 (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-1.1
*
* 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.cloudidentity.v2_0.features;
import org.jclouds.openstack.keystone.v2_0.features.TokenClientLiveTest;
import org.testng.annotations.Test;
/**
*
* @author Adrian Cole
*/
@Test(groups = "live", testName = "CloudIdentityTokenClientLiveTest", singleThreaded = true)
public class CloudIdentityTokenClientLiveTest extends TokenClientLiveTest {
public CloudIdentityTokenClientLiveTest() {
provider = "cloudidentity";
}
}

View File

@ -0,0 +1,33 @@
/**
* 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 1.1 (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-1.1
*
* 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.cloudidentity.v2_0.features;
import org.jclouds.openstack.keystone.v2_0.features.UserClientLiveTest;
import org.testng.annotations.Test;
/**
*
* @author Adrian Cole
*/
@Test(groups = "live", testName = "CloudIdentityUserClientLiveTest", singleThreaded = true)
public class CloudIdentityUserClientLiveTest extends UserClientLiveTest {
public CloudIdentityUserClientLiveTest() {
provider = "cloudidentity";
}
}

View File

@ -0,0 +1,150 @@
<?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</groupId>
<artifactId>jclouds-project</artifactId>
<version>1.5.0-SNAPSHOT</version>
<relativePath>../../project/pom.xml</relativePath>
</parent>
<groupId>org.jclouds.labs</groupId>
<artifactId>cloudservers-nova-us</artifactId>
<name>jclouds Rackspace Next Generation Cloud Servers provider</name>
<description>OpenStack Nova implementation targeted to Rackspace Next Generation Cloud Servers</description>
<packaging>bundle</packaging>
<properties>
<test.cloudservers-nova-us.endpoint>https://identity.api.rackspacecloud.com</test.cloudservers-nova-us.endpoint>
<test.cloudservers-nova-us.api-version>2</test.cloudservers-nova-us.api-version>
<test.cloudservers-nova-us.build-version></test.cloudservers-nova-us.build-version>
<test.cloudservers-nova-us.identity>${test.rackspace-us.identity}</test.cloudservers-nova-us.identity>
<test.cloudservers-nova-us.credential>${test.rackspace-us.credential}</test.cloudservers-nova-us.credential>
<test.cloudservers-nova-us.image-id></test.cloudservers-nova-us.image-id>
<test.cloudservers-nova-us.image.login-user></test.cloudservers-nova-us.image.login-user>
<test.cloudservers-nova-us.image.authenticate-sudo></test.cloudservers-nova-us.image.authenticate-sudo>
<jclouds.osgi.export>org.jclouds.cloudservers_nova.us*;version="${project.version}"</jclouds.osgi.export>
<jclouds.osgi.import>
org.jclouds.compute.internal;version="${project.version}",
org.jclouds.rest.internal;version="${project.version}",
org.jclouds*;version="${project.version}",
*
</jclouds.osgi.import>
</properties>
<dependencies>
<dependency>
<groupId>org.jclouds.labs</groupId>
<artifactId>cloudidentity</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jclouds.api</groupId>
<artifactId>openstack-nova</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-core</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-compute</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds.labs</groupId>
<artifactId>cloudidentity</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds.api</groupId>
<artifactId>openstack-nova</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds.driver</groupId>
<artifactId>jclouds-slf4j</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jclouds.driver</groupId>
<artifactId>jclouds-sshj</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.0.0</version>
<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>
<threadCount>1</threadCount>
<systemPropertyVariables>
<test.cloudservers-nova-us.endpoint>${test.cloudservers-nova-us.endpoint}</test.cloudservers-nova-us.endpoint>
<test.cloudservers-nova-us.api-version>${test.cloudservers-nova-us.api-version}</test.cloudservers-nova-us.api-version>
<test.cloudservers-nova-us.build-version>${test.cloudservers-nova-us.build-version}</test.cloudservers-nova-us.build-version>
<test.cloudservers-nova-us.identity>${test.cloudservers-nova-us.identity}</test.cloudservers-nova-us.identity>
<test.cloudservers-nova-us.credential>${test.cloudservers-nova-us.credential}</test.cloudservers-nova-us.credential>
<test.cloudservers-nova-us.image-id>${test.cloudservers-nova-us.image-id}</test.cloudservers-nova-us.image-id>
<test.cloudservers-nova-us.image.login-user>${test.cloudservers-nova-us.image.login-user}</test.cloudservers-nova-us.image.login-user>
<test.cloudservers-nova-us.image.authenticate-sudo>${test.cloudservers-nova-us.image.authenticate-sudo}</test.cloudservers-nova-us.image.authenticate-sudo>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@ -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.cloudservers_nova.us;
import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_NODE_TERMINATED;
import static org.jclouds.openstack.keystone.v2_0.config.KeystoneProperties.CREDENTIAL_TYPE;
import static org.jclouds.openstack.nova.v1_1.config.NovaProperties.AUTO_ALLOCATE_FLOATING_IPS;
import static org.jclouds.openstack.nova.v1_1.config.NovaProperties.AUTO_GENERATE_KEYPAIRS;
import java.net.URI;
import java.util.Properties;
import org.jclouds.cloudidentity.v2_0.config.CloudIdentityCredentialTypes;
import org.jclouds.cloudidentity.v2_0.config.CloudIdentityAuthenticationModule.CloudIdentityAuthenticationModuleForZones;
import org.jclouds.openstack.nova.v1_1.NovaApiMetadata;
import org.jclouds.openstack.nova.v1_1.compute.config.NovaComputeServiceContextModule;
import org.jclouds.openstack.nova.v1_1.config.NovaRestClientModule;
import org.jclouds.providers.ProviderMetadata;
import org.jclouds.providers.internal.BaseProviderMetadata;
import com.google.common.collect.ImmutableSet;
import com.google.inject.Module;
/**
* Implementation of {@link org.jclouds.types.ProviderMetadata} for Rackspace Next Generation Cloud Servers.
*
* @author Adrian Cole
*/
public class CloudServersUSProviderMetadata extends BaseProviderMetadata {
/** The serialVersionUID */
private static final long serialVersionUID = -300987074165012648L;
public static Builder builder() {
return new Builder();
}
@Override
public Builder toBuilder() {
return builder().fromProviderMetadata(this);
}
public CloudServersUSProviderMetadata() {
super(builder());
}
public CloudServersUSProviderMetadata(Builder builder) {
super(builder);
}
public static Properties defaultProperties() {
Properties properties = new Properties();
properties.setProperty(CREDENTIAL_TYPE, CloudIdentityCredentialTypes.API_KEY_CREDENTIALS);
// deallocating ip addresses can take a while
properties.setProperty(TIMEOUT_NODE_TERMINATED, 60 * 1000 + "");
properties.setProperty(AUTO_ALLOCATE_FLOATING_IPS, "true");
properties.setProperty(AUTO_GENERATE_KEYPAIRS, "true");
return properties;
}
public static class Builder extends BaseProviderMetadata.Builder {
protected Builder(){
id("cloudservers-nova-us")
.name("Rackspace Next Generation Cloud Servers")
.apiMetadata(new NovaApiMetadata().toBuilder()
.identityName("username")
.credentialName("API Key")
.version("2")
.documentation(URI.create("http://docs.rackspace.com/servers/api/v2/cs-devguide/content/ch_preface.html#webhelp-currentid"))
.defaultModules(ImmutableSet.<Class<? extends Module>>of(CloudIdentityAuthenticationModuleForZones.class, NovaRestClientModule.class, NovaComputeServiceContextModule.class))
.build())
.homepage(URI.create("http://www.rackspace.com/cloud/nextgen"))
.console(URI.create("https://mycloud.rackspace.com"))
.linkedServices("cloudservers-nova-us", "cloudfiles-swift-us")
.iso3166Codes("US-IL", "US-TX")
.endpoint("https://identity.api.rackspacecloud.com")
.defaultProperties(CloudServersUSProviderMetadata.defaultProperties());
}
@Override
public CloudServersUSProviderMetadata build() {
return new CloudServersUSProviderMetadata(this);
}
@Override
public Builder fromProviderMetadata(ProviderMetadata in) {
super.fromProviderMetadata(in);
return this;
}
}
}

View File

@ -0,0 +1 @@
org.jclouds.cloudservers_nova.us.CloudServersUSProviderMetadata

View File

@ -0,0 +1,52 @@
/**
* 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 computee 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.
*/
/**
*
*
* ====================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not computee 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.cloudservers_nova.us;
import org.jclouds.openstack.nova.v1_1.NovaApiMetadata;
import org.jclouds.providers.internal.BaseProviderMetadataTest;
import org.testng.annotations.Test;
/**
*
* @author Adrian Cole
*/
@Test(groups = "unit", testName = "CloudServersUSProviderTest")
public class CloudServersUSProviderTest extends BaseProviderMetadataTest {
public CloudServersUSProviderTest() {
super(new CloudServersUSProviderMetadata(), new NovaApiMetadata());
}
}

View File

@ -0,0 +1,34 @@
/**
* 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 computee 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.cloudservers_nova.us.compute;
import org.jclouds.openstack.nova.v1_1.compute.NovaComputeServiceLiveTest;
import org.testng.annotations.Test;
/**
*
* @author Adrian Cole
*/
@Test(groups = "live", singleThreaded = true, testName = "CloudServersUSComputeServiceLiveTest")
public class CloudServersUSComputeServiceLiveTest extends NovaComputeServiceLiveTest {
public CloudServersUSComputeServiceLiveTest() {
provider = "cloudservers-nova-us";
}
}

View File

@ -0,0 +1,89 @@
/**
* 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 computee 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.cloudservers_nova.us.compute;
import static org.jclouds.compute.util.ComputeServiceUtils.getCores;
import static org.testng.Assert.assertEquals;
import java.util.Set;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
import org.jclouds.openstack.nova.v1_1.compute.options.NovaTemplateOptions;
import org.testng.annotations.Test;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableSet;
/**
*
* @author Adrian Cole
*/
@Test(groups = "live", singleThreaded = true, testName = "CloudServersUSTemplateBuilderLiveTest")
public class CloudServersUSTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest {
public CloudServersUSTemplateBuilderLiveTest() {
provider = "cloudservers-nova-us";
}
@Override
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
@Override
public boolean apply(OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return (input.version.equals("") || input.version.equals("12.04") || input.version.matches("^1[01].*")) && input.is64Bit;
case DEBIAN:
return input.is64Bit && !input.version.equals("5.0");
case CENTOS:
return (input.version.equals("") || input.version.equals("5.6") || input.version.equals("6.0"))
&& input.is64Bit;
default:
return false;
}
}
});
}
@Test
public void testTemplateBuilder() {
Template defaultTemplate = this.view.getComputeService().templateBuilder().build();
assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true);
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "12.04");
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
assertEquals(defaultTemplate.getImage().getName(), "Ubuntu Precise 12.04 LTS Server 64-bit 20120424");
assertEquals(defaultTemplate.getImage().getDefaultCredentials().getUser(), "ubuntu");
assertEquals(defaultTemplate.getLocation().getId(), "az-2.region-a.geo-1");
assertEquals(defaultTemplate.getImage().getLocation().getId(), "az-2.region-a.geo-1");
assertEquals(defaultTemplate.getHardware().getLocation().getId(), "az-2.region-a.geo-1");
assertEquals(defaultTemplate.getOptions().as(NovaTemplateOptions.class).shouldAutoAssignFloatingIp(), true);
assertEquals(getCores(defaultTemplate.getHardware()), 1.0d);
}
@Override
protected Set<String> getIso3166Codes() {
return ImmutableSet.<String> of("US-NV");
}
}

View File

@ -0,0 +1,44 @@
/**
* 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.cloudservers_nova.us.compute.extensions;
import org.jclouds.compute.extensions.internal.BaseImageExtensionLiveTest;
import org.jclouds.sshj.config.SshjSshClientModule;
import org.testng.annotations.Test;
import com.google.inject.Module;
/**
*
* @author Adrian Cole
*
*/
@Test(groups = "live", singleThreaded = true, testName = "CloudServersUSImageExtensionLivetest")
public class CloudServersUSImageExtensionLivetest extends BaseImageExtensionLiveTest {
public CloudServersUSImageExtensionLivetest() {
provider = "cloudservers-nova-us";
}
@Override
protected Module getSshModule() {
return new SshjSshClientModule();
}
}

View File

@ -0,0 +1,34 @@
/**
* 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.cloudservers_nova.us.features;
import org.jclouds.openstack.nova.v1_1.features.FlavorClientLiveTest;
import org.testng.annotations.Test;
/**
*
* @author Adrian Cole
*/
@Test(groups = "live", testName = "CloudServersUSFlavorClientLiveTest")
public class CloudServersUSFlavorClientLiveTest extends FlavorClientLiveTest {
public CloudServersUSFlavorClientLiveTest() {
provider = "cloudservers-nova-us";
}
}

View File

@ -0,0 +1,34 @@
/**
* 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.cloudservers_nova.us.features;
import org.jclouds.openstack.nova.v1_1.extensions.FloatingIPClientLiveTest;
import org.testng.annotations.Test;
/**
*
* @author Adrian Cole
*/
@Test(groups = "live", testName = "CloudServersUSFloatingIPClientLiveTest")
public class CloudServersUSFloatingIPClientLiveTest extends FloatingIPClientLiveTest {
public CloudServersUSFloatingIPClientLiveTest() {
provider = "cloudservers-nova-us";
}
}

View File

@ -0,0 +1,33 @@
/**
* 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.cloudservers_nova.us.features;
import org.jclouds.openstack.nova.v1_1.features.ImageClientLiveTest;
import org.testng.annotations.Test;
/**
*
* @author Adrian Cole
*/
@Test(groups = "live", testName = "CloudServersUSImageClientLiveTest")
public class CloudServersUSImageClientLiveTest extends ImageClientLiveTest {
public CloudServersUSImageClientLiveTest() {
provider = "cloudservers-nova-us";
}
}

View File

@ -0,0 +1,34 @@
/**
* 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.cloudservers_nova.us.features;
import org.jclouds.openstack.nova.v1_1.extensions.KeyPairClientLiveTest;
import org.testng.annotations.Test;
/**
*
* @author Adrian Cole
*/
@Test(groups = "live", testName = "CloudServersUSKeyPairClientLiveTest")
public class CloudServersUSKeyPairClientLiveTest extends KeyPairClientLiveTest {
public CloudServersUSKeyPairClientLiveTest() {
provider = "cloudservers-nova-us";
}
}

View File

@ -0,0 +1,33 @@
/**
* 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.cloudservers_nova.us.features;
import org.jclouds.openstack.nova.v1_1.extensions.SecurityGroupClientLiveTest;
import org.testng.annotations.Test;
/**
*
* @author Adrian Cole
*/
@Test(groups = "live", testName = "CloudServersUSSecurityGroupClientLiveTest")
public class CloudServersUSSecurityGroupClientLiveTest extends SecurityGroupClientLiveTest {
public CloudServersUSSecurityGroupClientLiveTest() {
provider = "cloudservers-nova-us";
}
}

View File

@ -0,0 +1,34 @@
/**
* 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.cloudservers_nova.us.features;
import org.jclouds.openstack.nova.v1_1.features.ServerClientLiveTest;
import org.testng.annotations.Test;
/**
*
* @author Adrian Cole
*/
@Test(groups = "live", testName = "CloudServersUSServerClientLiveTest")
public class CloudServersUSServerClientLiveTest extends ServerClientLiveTest {
public CloudServersUSServerClientLiveTest() {
provider = "cloudservers-nova-us";
}
}

View File

@ -0,0 +1,34 @@
/**
* 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.cloudservers_nova.us.features;
import org.jclouds.openstack.nova.v1_1.extensions.VolumeClientLiveTest;
import org.testng.annotations.Test;
/**
*
* @author Adrian Cole
*/
@Test(groups = "live", testName = "CloudServersUSVolumeClientLiveTest")
public class CloudServersUSVolumeClientLiveTest extends VolumeClientLiveTest {
public CloudServersUSVolumeClientLiveTest() {
provider = "cloudservers-nova-us";
}
}

View File

@ -47,5 +47,7 @@
<module>openstack-glance</module>
<module>joyent-sdc</module>
<module>openstack-quantum</module>
<module>cloudidentity</module>
<module>cloudservers-nova-us</module>
</modules>
</project>