Issue 293: normalized on identity/credential vocab

This commit is contained in:
Adrian Cole 2010-06-28 11:33:41 -07:00
parent 8df7468af3
commit caceae90bd
134 changed files with 413 additions and 413 deletions

View File

@ -62,8 +62,8 @@
</repositories> </repositories>
<properties> <properties>
<jclouds.test.user>${providerUser}</jclouds.test.user> <jclouds.test.identity>${providerUser}</jclouds.test.identity>
<jclouds.test.key>${providerPassword}</jclouds.test.key> <jclouds.test.credential>${providerPassword}</jclouds.test.credential>
<jclouds.test.endpoint>${providerEndpoint}</jclouds.test.endpoint> <jclouds.test.endpoint>${providerEndpoint}</jclouds.test.endpoint>
</properties> </properties>
<dependencies> <dependencies>

View File

@ -62,8 +62,8 @@
</repositories> </repositories>
<properties> <properties>
<jclouds.test.user>${providerAccount}</jclouds.test.user> <jclouds.test.identity>${providerAccount}</jclouds.test.identity>
<jclouds.test.key>${providerKey}</jclouds.test.key> <jclouds.test.credential>${providerKey}</jclouds.test.credential>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@ -78,8 +78,8 @@ public class ${providerName}ContextModule extends AbstractModule {
@Provides @Provides
@Singleton @Singleton
RestContext<${providerName}Client, ${providerName}AsyncClient> provideContext(Closer closer, ${providerName}AsyncClient asyncApi, RestContext<${providerName}Client, ${providerName}AsyncClient> provideContext(Closer closer, ${providerName}AsyncClient asyncApi,
${providerName}Client syncApi, @${providerName} URI endPoint, @Named(${providerName}Constants.PROPERTY_${ucaseProviderName}_USER) String account) { ${providerName}Client syncApi, @${providerName} URI endPoint, @Named(${providerName}Constants.PROPERTY_${ucaseProviderName}_USER) String identity) {
return new RestContextImpl<${providerName}Client, ${providerName}AsyncClient>(closer, asyncApi, syncApi, endPoint, account); return new RestContextImpl<${providerName}Client, ${providerName}AsyncClient>(closer, asyncApi, syncApi, endPoint, identity);
} }
} }

View File

@ -46,10 +46,10 @@ public class ${providerName}ClientLiveTest {
@BeforeGroups(groups = { "live" }) @BeforeGroups(groups = { "live" })
public void setupClient() { public void setupClient() {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
connection = ${providerName}ContextFactory.createContext(user, password, new Log4JLoggingModule()) connection = ${providerName}ContextFactory.createContext(identity, credential, new Log4JLoggingModule())
.getApi(); .getApi();
} }

View File

@ -32,8 +32,8 @@
<name>jclouds atmosonline components</name> <name>jclouds atmosonline components</name>
<properties> <properties>
<jclouds.test.initializer>org.jclouds.atmosonline.saas.blobstore.integration.AtmosStorageTestInitializer</jclouds.test.initializer> <jclouds.test.initializer>org.jclouds.atmosonline.saas.blobstore.integration.AtmosStorageTestInitializer</jclouds.test.initializer>
<jclouds.test.user>${jclouds.emcsaas.uid}</jclouds.test.user> <jclouds.test.identity>${jclouds.emcsaas.uid}</jclouds.test.identity>
<jclouds.test.key>${jclouds.emcsaas.key}</jclouds.test.key> <jclouds.test.credential>${jclouds.emcsaas.key}</jclouds.test.credential>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@ -116,10 +116,10 @@ public class AtmosStorageClientLiveTest {
@BeforeGroups(groups = { "live" }) @BeforeGroups(groups = { "live" })
public void setupClient() throws InterruptedException, ExecutionException, TimeoutException, public void setupClient() throws InterruptedException, ExecutionException, TimeoutException,
IOException { IOException {
String uid = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String key = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
BlobStoreContext blobStoreContext = new BlobStoreContextFactory().createContext( BlobStoreContext blobStoreContext = new BlobStoreContextFactory().createContext(
"atmosonline", uid, key, ImmutableSet.<Module> of(new Log4JLoggingModule())); "atmosonline", identity, credential, ImmutableSet.<Module> of(new Log4JLoggingModule()));
RestContext<AtmosStorageClient, AtmosStorageAsyncClient> context = blobStoreContext RestContext<AtmosStorageClient, AtmosStorageAsyncClient> context = blobStoreContext
.getProviderSpecificContext(); .getProviderSpecificContext();
connection = context.getApi(); connection = context.getApi();
@ -138,7 +138,7 @@ public class AtmosStorageClientLiveTest {
String privateDirectory; String privateDirectory;
String publicDirectory; String publicDirectory;
String account; String identity;
@Test(timeOut = 5 * 60 * 1000) @Test(timeOut = 5 * 60 * 1000)
public void testCreateDirectory() throws Exception { public void testCreateDirectory() throws Exception {

View File

@ -37,8 +37,8 @@ public class AtmosStorageTestInitializer extends TransientBlobStoreTestInitializ
@Override @Override
protected BlobStoreContext createLiveContext(Module configurationModule, String url, String app, protected BlobStoreContext createLiveContext(Module configurationModule, String url, String app,
String account, String key) throws IOException { String identity, String credential) throws IOException {
return new BlobStoreContextFactory().createContext("atmosonline", account, key, ImmutableSet return new BlobStoreContextFactory().createContext("atmosonline", identity, credential, ImmutableSet
.of(configurationModule, new Log4JLoggingModule()), new Properties()); .of(configurationModule, new Log4JLoggingModule()), new Properties());
} }

View File

@ -271,7 +271,7 @@ public class RunningInstanceToNodeMetadata implements Function<RunningInstance,
.describeImagesInRegion(from.getRegion(), .describeImagesInRegion(from.getRegion(),
DescribeImagesOptions.Builder.imageIds(from.getImageId()))); DescribeImagesOptions.Builder.imageIds(from.getImageId())));
return checkNotNull(credentialProvider.execute(image), "login from image: " return checkNotNull(credentialProvider.execute(image), "login from image: "
+ from.getImageId()).account; + from.getImageId()).identity;
} }
} }

View File

@ -134,7 +134,7 @@ public class Snapshot implements Comparable<Snapshot> {
} }
/** /**
* The AWS account alias (e.g., "amazon", "redhat", "self", etc.) or AWS account ID that owns the * The AWS identity alias (e.g., "amazon", "redhat", "self", etc.) or AWS identity ID that owns the
* AMI. * AMI.
*/ */
public String getOwnerAlias() { public String getOwnerAlias() {

View File

@ -46,7 +46,7 @@ public class UserIdGroupPair implements Comparable<UserIdGroupPair> {
/** /**
* AWS User ID of an account. Cannot be used when specifying a CIDR IP address. * AWS User ID of an identity. Cannot be used when specifying a CIDR IP address.
*/ */
public String getUserId() { public String getUserId() {
return userId; return userId;

View File

@ -79,9 +79,9 @@ public class CreateImageOptions extends BaseEC2RequestOptions {
/** /**
* @see CreateImageOptions#withDescription(String ) * @see CreateImageOptions#withDescription(String )
*/ */
public static CreateImageOptions withDescription(String accountId) { public static CreateImageOptions withDescription(String identityId) {
CreateImageOptions options = new CreateImageOptions(); CreateImageOptions options = new CreateImageOptions();
return options.withDescription(accountId); return options.withDescription(identityId);
} }
/** /**

View File

@ -63,9 +63,9 @@ public class CreateSnapshotOptions extends BaseEC2RequestOptions {
/** /**
* @see CreateSnapshotOptions#withDescription(String ) * @see CreateSnapshotOptions#withDescription(String )
*/ */
public static CreateSnapshotOptions withDescription(String accountId) { public static CreateSnapshotOptions withDescription(String identityId) {
CreateSnapshotOptions options = new CreateSnapshotOptions(); CreateSnapshotOptions options = new CreateSnapshotOptions();
return options.withDescription(accountId); return options.withDescription(identityId);
} }
} }

View File

@ -49,8 +49,8 @@ public class DescribeImagesOptions extends BaseEC2RequestOptions {
* AMIs for which the specified user has explicit launch permissions. * AMIs for which the specified user has explicit launch permissions.
* *
*/ */
public DescribeImagesOptions executableBy(String accountId) { public DescribeImagesOptions executableBy(String identityId) {
formParameters.put("ExecutableBy", checkNotNull(accountId, "accountId")); formParameters.put("ExecutableBy", checkNotNull(identityId, "identityId"));
return this; return this;
} }
@ -87,9 +87,9 @@ public class DescribeImagesOptions extends BaseEC2RequestOptions {
/** /**
* @see DescribeImagesOptions#executableBy(String ) * @see DescribeImagesOptions#executableBy(String )
*/ */
public static DescribeImagesOptions executableBy(String accountId) { public static DescribeImagesOptions executableBy(String identityId) {
DescribeImagesOptions options = new DescribeImagesOptions(); DescribeImagesOptions options = new DescribeImagesOptions();
return options.executableBy(accountId); return options.executableBy(identityId);
} }
/** /**

View File

@ -125,7 +125,7 @@ public interface AMIClient {
* AMIs are tied to the Region where its files are located within Amazon S3. * AMIs are tied to the Region where its files are located within Amazon S3.
* @param imageId * @param imageId
* Unique ID of the AMI which was assigned during registration. To register an AMI, use * Unique ID of the AMI which was assigned during registration. To register an AMI, use
* RegisterImage. To view the AMI IDs of AMIs that belong to your account. use * RegisterImage. To view the AMI IDs of AMIs that belong to your identity. use
* DescribeImages. * DescribeImages.
* *
* @see #describeImages * @see #describeImages

View File

@ -40,7 +40,7 @@ import org.jclouds.concurrent.Timeout;
public interface AvailabilityZoneAndRegionClient { public interface AvailabilityZoneAndRegionClient {
/** /**
* Displays Availability Zones that are currently available to the account and their states. * Displays Availability Zones that are currently available to the identity and their states.
* *
* @see InstanceClient#runInstances * @see InstanceClient#runInstances
* @see #describeRegions * @see #describeRegions
@ -52,7 +52,7 @@ public interface AvailabilityZoneAndRegionClient {
DescribeAvailabilityZonesOptions... options); DescribeAvailabilityZonesOptions... options);
/** /**
* Describes Regions that are currently available to the account. * Describes Regions that are currently available to the identity.
* *
* @see InstanceClient#runInstances * @see InstanceClient#runInstances
* @see #describeAvailabilityZones * @see #describeAvailabilityZones

View File

@ -37,7 +37,7 @@ import org.jclouds.concurrent.Timeout;
public interface ElasticIPAddressClient { public interface ElasticIPAddressClient {
/** /**
* Acquires an elastic IP address for use with your account. * Acquires an elastic IP address for use with your identity.
* *
* @param region * @param region
* Elastic IP addresses are tied to a Region and cannot be mapped across Regions. * Elastic IP addresses are tied to a Region and cannot be mapped across Regions.
@ -88,12 +88,12 @@ public interface ElasticIPAddressClient {
void disassociateAddressInRegion(@Nullable String region, String publicIp); void disassociateAddressInRegion(@Nullable String region, String publicIp);
/** /**
* Releases an elastic IP address associated with your account. * Releases an elastic IP address associated with your identity.
* *
* @param region * @param region
* Elastic IP addresses are tied to a Region and cannot be mapped across Regions. * Elastic IP addresses are tied to a Region and cannot be mapped across Regions.
* @param publicIp * @param publicIp
* The IP address that you are releasing from your account. * The IP address that you are releasing from your identity.
* *
* @see #allocateAddress * @see #allocateAddress
* @see #describeAddresses * @see #describeAddresses
@ -104,7 +104,7 @@ public interface ElasticIPAddressClient {
void releaseAddressInRegion(@Nullable String region, String publicIp); void releaseAddressInRegion(@Nullable String region, String publicIp);
/** /**
* Lists elastic IP addresses assigned to your account or provides information about a specific * Lists elastic IP addresses assigned to your identity or provides information about a specific
* address. * address.
* *
* @param region * @param region

View File

@ -38,7 +38,7 @@ import org.jclouds.concurrent.Timeout;
public interface SecurityGroupClient { public interface SecurityGroupClient {
/** /**
* Creates a new security group. Group names must be unique per account. * Creates a new security group. Group names must be unique per identity.
* *
* @param region * @param region
* Security groups are not copied across Regions. Instances within the Region cannot * Security groups are not copied across Regions. Instances within the Region cannot
@ -112,7 +112,7 @@ public interface SecurityGroupClient {
* communicate with instances outside the Region using group-based firewall rules. * communicate with instances outside the Region using group-based firewall rules.
* Traffic from instances in another Region is seen as WAN bandwidth. * Traffic from instances in another Region is seen as WAN bandwidth.
* @param groupName * @param groupName
* Name of the group to modify. The name must be valid and belong to the account * Name of the group to modify. The name must be valid and belong to the identity
* @param sourceSecurityGroup * @param sourceSecurityGroup
* group to associate with this group. * group to associate with this group.
* *
@ -143,7 +143,7 @@ public interface SecurityGroupClient {
* communicate with instances outside the Region using group-based firewall rules. * communicate with instances outside the Region using group-based firewall rules.
* Traffic from instances in another Region is seen as WAN bandwidth. * Traffic from instances in another Region is seen as WAN bandwidth.
* @param groupName * @param groupName
* Name of the group to modify. The name must be valid and belong to the account * Name of the group to modify. The name must be valid and belong to the identity
* @param ipProtocol * @param ipProtocol
* IP protocol. * IP protocol.
* @param fromPort * @param fromPort
@ -176,7 +176,7 @@ public interface SecurityGroupClient {
* communicate with instances outside the Region using group-based firewall rules. * communicate with instances outside the Region using group-based firewall rules.
* Traffic from instances in another Region is seen as WAN bandwidth. * Traffic from instances in another Region is seen as WAN bandwidth.
* @param groupName * @param groupName
* Name of the group to modify. The name must be valid and belong to the account * Name of the group to modify. The name must be valid and belong to the identity
* @param sourceSecurityGroup * @param sourceSecurityGroup
* group to associate with this group. * group to associate with this group.
* *
@ -208,7 +208,7 @@ public interface SecurityGroupClient {
* communicate with instances outside the Region using group-based firewall rules. * communicate with instances outside the Region using group-based firewall rules.
* Traffic from instances in another Region is seen as WAN bandwidth. * Traffic from instances in another Region is seen as WAN bandwidth.
* @param groupName * @param groupName
* Name of the group to modify. The name must be valid and belong to the account * Name of the group to modify. The name must be valid and belong to the identity
* @param ipProtocol * @param ipProtocol
* IP protocol. * IP protocol.
* @param fromPort * @param fromPort

View File

@ -32,7 +32,7 @@ import java.util.Set;
* Amazon.com, only one person or organization can own a bucket within Amazon S3. Once you create a * Amazon.com, only one person or organization can own a bucket within Amazon S3. Once you create a
* uniquely named bucket in Amazon S3, you can organize and name the objects within the bucket in * uniquely named bucket in Amazon S3, you can organize and name the objects within the bucket in
* any way you like and the bucket will remain yours for as long as you like and as long as you have * any way you like and the bucket will remain yours for as long as you like and as long as you have
* the Amazon S3 account. * the Amazon S3 identity.
* <p/> * <p/>
* The similarities between buckets and domain names is not a coincidence there is a direct mapping * The similarities between buckets and domain names is not a coincidence there is a direct mapping
* between Amazon S3 buckets and subdomains of s3.amazonaws.com. Objects stored in Amazon S3 are * between Amazon S3 buckets and subdomains of s3.amazonaws.com. Objects stored in Amazon S3 are

View File

@ -95,12 +95,12 @@ public class CloudApplicationArchitecturesEC2ClientLiveTest {
public void setupClient() throws InterruptedException, ExecutionException, public void setupClient() throws InterruptedException, ExecutionException,
TimeoutException, TimeoutException,
IOException { IOException {
String user = checkNotNull(System.getProperty("jclouds.test.user"), String identity = checkNotNull(System.getProperty("jclouds.test.identity"),
"jclouds.test.user"); "jclouds.test.identity");
String password = checkNotNull(System.getProperty("jclouds.test.key"), String credential = checkNotNull(System.getProperty("jclouds.test.credential"),
"jclouds.test.key"); "jclouds.test.credential");
Injector injector = new RestContextFactory().createContextBuilder( Injector injector = new RestContextFactory().createContextBuilder(
"ec2", user, password, ImmutableSet.<Module> of(new Log4JLoggingModule())).buildInjector(); "ec2", identity, credential, ImmutableSet.<Module> of(new Log4JLoggingModule())).buildInjector();
client = injector.getInstance(EC2Client.class); client = injector.getInstance(EC2Client.class);
sshFactory = injector.getInstance(SshClient.Factory.class); sshFactory = injector.getInstance(SshClient.Factory.class);
runningTester = new RetryablePredicate<RunningInstance>( runningTester = new RetryablePredicate<RunningInstance>(
@ -427,7 +427,7 @@ public class CloudApplicationArchitecturesEC2ClientLiveTest {
} }
private RunningInstance getInstance(String instanceId) { private RunningInstance getInstance(String instanceId) {
// search my account for the instance I just created // search my identity for the instance I just created
Set<Reservation> reservations = client.getInstanceServices() Set<Reservation> reservations = client.getInstanceServices()
.describeInstancesInRegion(null, instanceId); // last parameter .describeInstancesInRegion(null, instanceId); // last parameter
// (ids) narrows the // (ids) narrows the

View File

@ -120,9 +120,9 @@ public class EBSBootEC2ClientLiveTest {
@BeforeGroups(groups = { "live" }) @BeforeGroups(groups = { "live" })
public void setupClient() throws IOException { public void setupClient() throws IOException {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
Injector injector = new RestContextFactory().createContextBuilder("ec2", user, password, Injector injector = new RestContextFactory().createContextBuilder("ec2", identity, credential,
ImmutableSet.<Module> of(new Log4JLoggingModule())).buildInjector(); ImmutableSet.<Module> of(new Log4JLoggingModule())).buildInjector();
client = injector.getInstance(EC2Client.class); client = injector.getInstance(EC2Client.class);
sshFactory = injector.getInstance(SshClient.Factory.class); sshFactory = injector.getInstance(SshClient.Factory.class);
@ -560,7 +560,7 @@ public class EBSBootEC2ClientLiveTest {
.getId()); .getId());
assert runningTester.apply(instance); assert runningTester.apply(instance);
// search my account for the instance I just created // search my identity for the instance I just created
Set<Reservation> reservations = client.getInstanceServices().describeInstancesInRegion( Set<Reservation> reservations = client.getInstanceServices().describeInstancesInRegion(
instance.getRegion(), instance.getId()); // last instance.getRegion(), instance.getId()); // last
// parameter // parameter

View File

@ -97,7 +97,7 @@ public class EC2ComputeServiceLiveTest extends BaseComputeServiceLiveTest {
options); options);
NodeMetadata first = Iterables.get(nodes, 0); NodeMetadata first = Iterables.get(nodes, 0);
assert first.getCredentials() != null : first; assert first.getCredentials() != null : first;
assert first.getCredentials().account != null : first; assert first.getCredentials().identity != null : first;
startedId = Iterables.getOnlyElement(nodes).getProviderId(); startedId = Iterables.getOnlyElement(nodes).getProviderId();
@ -116,7 +116,7 @@ public class EC2ComputeServiceLiveTest extends BaseComputeServiceLiveTest {
// try to run a script with the original keyPair // try to run a script with the original keyPair
runScriptWithCreds(tag, first.getImage().getOsFamily(), runScriptWithCreds(tag, first.getImage().getOsFamily(),
new Credentials(first.getCredentials().account, result new Credentials(first.getCredentials().identity, result
.getKeyMaterial())); .getKeyMaterial()));
} finally { } finally {
@ -234,7 +234,7 @@ public class EC2ComputeServiceLiveTest extends BaseComputeServiceLiveTest {
NodeMetadata first = Iterables.get(nodes, 0); NodeMetadata first = Iterables.get(nodes, 0);
assert first.getCredentials() != null : first; assert first.getCredentials() != null : first;
assert first.getCredentials().account != null : first; assert first.getCredentials().identity != null : first;
startedId = Iterables.getOnlyElement(nodes).getProviderId(); startedId = Iterables.getOnlyElement(nodes).getProviderId();
nodeId = Iterables.getOnlyElement(nodes).getId(); nodeId = Iterables.getOnlyElement(nodes).getId();

View File

@ -63,7 +63,7 @@ public class EC2LoadBalancerServiceLiveTest extends BaseLoadBalancerServiceLiveT
@BeforeGroups(groups = { "live" }) @BeforeGroups(groups = { "live" })
public void setupELBClient() { public void setupELBClient() {
elbContext = new RestContextFactory().createContext("elb", user, password, elbContext = new RestContextFactory().createContext("elb", identity, credential,
ImmutableSet.of(new Log4JLoggingModule())); ImmutableSet.of(new Log4JLoggingModule()));
} }

View File

@ -51,8 +51,8 @@ public class EC2TemplateBuilderLiveTest {
@BeforeGroups(groups = { "live" }) @BeforeGroups(groups = { "live" })
public void setupClient() throws InterruptedException, ExecutionException, TimeoutException, public void setupClient() throws InterruptedException, ExecutionException, TimeoutException,
IOException { IOException {
user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); user = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); password = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
} }
@Test @Test

View File

@ -61,7 +61,7 @@ import com.google.inject.internal.Lists;
public class AMIClientLiveTest { public class AMIClientLiveTest {
private AMIClient client; private AMIClient client;
private String user; private String identity;
private String imageId = "ami-cdf819a4"; private String imageId = "ami-cdf819a4";
private static final String DEFAULT_MANIFEST = "adrianimages/image.manifest.xml"; private static final String DEFAULT_MANIFEST = "adrianimages/image.manifest.xml";
private static final String DEFAULT_SNAPSHOT = "TODO"; private static final String DEFAULT_SNAPSHOT = "TODO";
@ -71,11 +71,11 @@ public class AMIClientLiveTest {
@BeforeGroups(groups = { "live" }) @BeforeGroups(groups = { "live" })
public void setupClient() throws IOException { public void setupClient() throws IOException {
user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
context = new RestContextFactory().createContext( context = new RestContextFactory().createContext(
"ec2", user, password, ImmutableSet.<Module> of(new Log4JLoggingModule())); "ec2", identity, credential, ImmutableSet.<Module> of(new Log4JLoggingModule()));
client = context.getApi().getAMIServices(); client = context.getApi().getAMIServices();
} }

View File

@ -61,10 +61,10 @@ public class AvailabilityZoneAndRegionClientLiveTest {
@BeforeGroups(groups = { "live" }) @BeforeGroups(groups = { "live" })
public void setupClient() throws IOException { public void setupClient() throws IOException {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
context = new RestContextFactory().createContext("ec2", user, password, ImmutableSet context = new RestContextFactory().createContext("ec2", identity, credential, ImmutableSet
.<Module> of(new Log4JLoggingModule())); .<Module> of(new Log4JLoggingModule()));
client = context.getApi().getAvailabilityZoneAndRegionServices(); client = context.getApi().getAvailabilityZoneAndRegionServices();
} }

View File

@ -65,10 +65,10 @@ public class ElasticBlockStoreClientLiveTest {
@BeforeGroups(groups = { "live" }) @BeforeGroups(groups = { "live" })
public void setupClient() throws IOException { public void setupClient() throws IOException {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
context = new RestContextFactory().createContext("ec2", user, password, ImmutableSet context = new RestContextFactory().createContext("ec2", identity, credential, ImmutableSet
.<Module> of(new Log4JLoggingModule())); .<Module> of(new Log4JLoggingModule()));
client = context.getApi().getElasticBlockStoreServices(); client = context.getApi().getElasticBlockStoreServices();
} }

View File

@ -54,10 +54,10 @@ public class ElasticIPAddressClientLiveTest {
@BeforeGroups(groups = { "live" }) @BeforeGroups(groups = { "live" })
public void setupClient() throws IOException { public void setupClient() throws IOException {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
context = new RestContextFactory().createContext("ec2", user, password, ImmutableSet context = new RestContextFactory().createContext("ec2", identity, credential, ImmutableSet
.<Module> of(new Log4JLoggingModule())); .<Module> of(new Log4JLoggingModule()));
client = context.getApi().getElasticIPAddressServices(); client = context.getApi().getElasticIPAddressServices();
} }

View File

@ -49,14 +49,14 @@ public class InstanceClientLiveTest {
public static final String PREFIX = System.getProperty("user.name") + "-ec2"; public static final String PREFIX = System.getProperty("user.name") + "-ec2";
private InstanceClient client; private InstanceClient client;
private String user; private String identity;
private RestContext<EC2Client, EC2AsyncClient> context; private RestContext<EC2Client, EC2AsyncClient> context;
@BeforeGroups(groups = { "live" }) @BeforeGroups(groups = { "live" })
public void setupClient() throws IOException { public void setupClient() throws IOException {
user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
context = new RestContextFactory().createContext("ec2", user, password, ImmutableSet context = new RestContextFactory().createContext("ec2", identity, credential, ImmutableSet
.<Module> of(new Log4JLoggingModule())); .<Module> of(new Log4JLoggingModule()));
client = context.getApi().getInstanceServices(); client = context.getApi().getInstanceServices();

View File

@ -54,9 +54,9 @@ public class KeyPairClientLiveTest {
@BeforeGroups(groups = { "live" }) @BeforeGroups(groups = { "live" })
public void setupClient() throws IOException { public void setupClient() throws IOException {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
context = new RestContextFactory().createContext("ec2", user, password, ImmutableSet context = new RestContextFactory().createContext("ec2", identity, credential, ImmutableSet
.<Module> of(new Log4JLoggingModule())); .<Module> of(new Log4JLoggingModule()));
client = context.getApi().getKeyPairServices(); client = context.getApi().getKeyPairServices();
} }

View File

@ -50,10 +50,10 @@ public class MonitoringClientLiveTest {
@BeforeGroups(groups = { "live" }) @BeforeGroups(groups = { "live" })
public void setupClient() throws IOException { public void setupClient() throws IOException {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
context = new RestContextFactory().createContext("ec2", user, password, ImmutableSet context = new RestContextFactory().createContext("ec2", identity, credential, ImmutableSet
.<Module> of(new Log4JLoggingModule())); .<Module> of(new Log4JLoggingModule()));
client = context.getApi().getMonitoringServices(); client = context.getApi().getMonitoringServices();
} }

View File

@ -62,9 +62,9 @@ public class SecurityGroupClientLiveTest {
@BeforeGroups(groups = { "live" }) @BeforeGroups(groups = { "live" })
public void setupClient() throws IOException { public void setupClient() throws IOException {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
context = new RestContextFactory().createContext("ec2", user, password, ImmutableSet context = new RestContextFactory().createContext("ec2", identity, credential, ImmutableSet
.<Module> of(new Log4JLoggingModule())); .<Module> of(new Log4JLoggingModule()));
client = context.getApi().getSecurityGroupServices(); client = context.getApi().getSecurityGroupServices();
} }

View File

@ -53,10 +53,10 @@ public class ELBClientLiveTest {
@BeforeGroups(groups = { "live" }) @BeforeGroups(groups = { "live" })
public void setupClient() throws IOException { public void setupClient() throws IOException {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
context = new RestContextFactory().createContext("elb", user, password, ImmutableSet context = new RestContextFactory().createContext("elb", identity, credential, ImmutableSet
.<Module> of(new Log4JLoggingModule())); .<Module> of(new Log4JLoggingModule()));
client = context.getApi(); client = context.getApi();
} }

View File

@ -38,9 +38,9 @@ public class S3TestInitializer extends TransientBlobStoreTestInitializer {
@Override @Override
protected BlobStoreContext createLiveContext(Module configurationModule, String url, String app, protected BlobStoreContext createLiveContext(Module configurationModule, String url, String app,
String account, String key) throws IOException { String identity, String key) throws IOException {
BaseBlobStoreIntegrationTest.SANITY_CHECK_RETURNED_BUCKET_NAME = true; BaseBlobStoreIntegrationTest.SANITY_CHECK_RETURNED_BUCKET_NAME = true;
return new BlobStoreContextFactory().createContext("s3", account, key, ImmutableSet.of( return new BlobStoreContextFactory().createContext("s3", identity, key, ImmutableSet.of(
configurationModule, new Log4JLoggingModule()), new Properties()); configurationModule, new Log4JLoggingModule()), new Properties());
} }

View File

@ -61,10 +61,10 @@ public class SQSClientLiveTest {
@BeforeGroups(groups = { "live" }) @BeforeGroups(groups = { "live" })
public void setupClient() throws IOException { public void setupClient() throws IOException {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
context = new RestContextFactory().createContext("sqs", user, password, ImmutableSet context = new RestContextFactory().createContext("sqs", identity, credential, ImmutableSet
.<Module> of(new Log4JLoggingModule())); .<Module> of(new Log4JLoggingModule()));
this.client = context.getApi(); this.client = context.getApi();
} }

View File

@ -186,11 +186,11 @@
<configuration> <configuration>
<systemProperties> <systemProperties>
<property> <property>
<name>jclouds.test.user</name> <name>jclouds.test.identity</name>
<value>${jclouds.aws.accesskeyid}</value> <value>${jclouds.aws.accesskeyid}</value>
</property> </property>
<property> <property>
<name>jclouds.test.key</name> <name>jclouds.test.credential</name>
<value>${jclouds.aws.secretaccesskey}</value> <value>${jclouds.aws.secretaccesskey}</value>
</property> </property>
<property> <property>

View File

@ -50,12 +50,12 @@ public class GoogleAppEngineLiveTest {
throws Exception { throws Exception {
url = new URL(String.format("http://%s:%s", address, port)); url = new URL(String.format("http://%s:%s", address, port));
Properties props = new Properties(); Properties props = new Properties();
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
props = new S3PropertiesBuilder(props).credentials(user, password).build(); props = new S3PropertiesBuilder(props).credentials(identity, credential).build();
props = new EC2PropertiesBuilder(props).credentials(user, password).build(); props = new EC2PropertiesBuilder(props).credentials(identity, credential).build();
server = new GoogleDevServer(); server = new GoogleDevServer();
server.writePropertiesAndStartServer(address, port, warfile, props); server.writePropertiesAndStartServer(address, port, warfile, props);

View File

@ -87,11 +87,11 @@ public class JCloudsS3ServiceLiveTest extends BaseBlobStoreIntegrationTest {
@BeforeClass(groups = { "live" }, dependsOnMethods = "setUpResourcesOnThisThread") @BeforeClass(groups = { "live" }, dependsOnMethods = "setUpResourcesOnThisThread")
protected void createLiveS3Context(ITestContext testContext) throws S3ServiceException { protected void createLiveS3Context(ITestContext testContext) throws S3ServiceException {
String account = System.getProperty("jclouds.test.user"); String identity = System.getProperty("jclouds.test.identity");
String key = System.getProperty("jclouds.test.key"); String credential = System.getProperty("jclouds.test.credential");
if (account != null) { if (identity != null) {
credentials = new AWSCredentials(account, key); credentials = new AWSCredentials(identity, credential);
service = new JCloudsS3Service(credentials); service = new JCloudsS3Service(credentials);
} else { } else {
assert false : "credentials not present"; assert false : "credentials not present";
@ -200,7 +200,7 @@ public class JCloudsS3ServiceLiveTest extends BaseBlobStoreIntegrationTest {
TimeoutException, S3ServiceException { TimeoutException, S3ServiceException {
String bucketName = getContainerName(); String bucketName = getContainerName();
try { try {
// Ensure there is at least 1 bucket in S3 account to list and compare. // Ensure there is at least 1 bucket in S3 identity to list and compare.
S3Bucket[] jsBuckets = service.listAllBuckets(); S3Bucket[] jsBuckets = service.listAllBuckets();
SortedSet<org.jclouds.aws.s3.domain.BucketMetadata> jcBuckets = getApi() SortedSet<org.jclouds.aws.s3.domain.BucketMetadata> jcBuckets = getApi()

View File

@ -34,8 +34,8 @@
<description>jclouds core components to access azure services</description> <description>jclouds core components to access azure services</description>
<properties> <properties>
<jclouds.test.user>${jclouds.azure.storage.account}</jclouds.test.user> <jclouds.test.identity>${jclouds.azure.storage.account}</jclouds.test.identity>
<jclouds.test.key>${jclouds.azure.storage.key}</jclouds.test.key> <jclouds.test.credential>${jclouds.azure.storage.key}</jclouds.test.credential>
<jclouds.test.initializer>org.jclouds.azure.storage.blob.blobstore.integration.AzureBlobTestInitializer</jclouds.test.initializer> <jclouds.test.initializer>org.jclouds.azure.storage.blob.blobstore.integration.AzureBlobTestInitializer</jclouds.test.initializer>
</properties> </properties>

View File

@ -50,7 +50,7 @@ public interface AzureBlobClient {
public org.jclouds.azure.storage.blob.domain.AzureBlob newBlob(); public org.jclouds.azure.storage.blob.domain.AzureBlob newBlob();
/** /**
* The List Containers operation returns a list of the containers under the specified account. * The List Containers operation returns a list of the containers under the specified identity.
* <p /> * <p />
* The 2009-07-17 version of the List Containers operation times out after 30 seconds. * The 2009-07-17 version of the List Containers operation times out after 30 seconds.
* *
@ -61,7 +61,7 @@ public interface AzureBlobClient {
BoundedSet<ContainerProperties> listContainers(ListOptions... listOptions); BoundedSet<ContainerProperties> listContainers(ListOptions... listOptions);
/** /**
* The Create Container operation creates a new container under the specified account. If the * The Create Container operation creates a new container under the specified identity. If the
* container with the same name already exists, the operation fails. * container with the same name already exists, the operation fails.
* <p/> * <p/>
* The container resource includes metadata and properties for that container. It does not * The container resource includes metadata and properties for that container. It does not
@ -117,7 +117,7 @@ public interface AzureBlobClient {
/** /**
* The root container is a default container that may be inferred from a URL requesting a blob * The root container is a default container that may be inferred from a URL requesting a blob
* resource. The root container makes it possible to reference a blob from the top level of the * resource. The root container makes it possible to reference a blob from the top level of the
* storage account hierarchy, without referencing the container name. * storage identity hierarchy, without referencing the container name.
* <p/> * <p/>
* The container resource includes metadata and properties for that container. It does not * The container resource includes metadata and properties for that container. It does not
* include a list of the blobs contained by the container. * include a list of the blobs contained by the container.

View File

@ -211,7 +211,7 @@ public class AzureAsyncBlobStore extends BaseAsyncBlobStore {
* *
* @param container * @param container
* bucket name * bucket name
* @param key * @param credential
* object key * object key
*/ */
@Override @Override

View File

@ -58,7 +58,7 @@ public class SharedKeyLiteAuthentication implements HttpRequestFilter {
HttpHeaders.CONTENT_TYPE, HttpHeaders.DATE }; HttpHeaders.CONTENT_TYPE, HttpHeaders.DATE };
private final SignatureWire signatureWire; private final SignatureWire signatureWire;
private final String account; private final String identity;
private final byte[] key; private final byte[] key;
private final Provider<String> timeStampProvider; private final Provider<String> timeStampProvider;
private final EncryptionService encryptionService; private final EncryptionService encryptionService;
@ -68,12 +68,12 @@ public class SharedKeyLiteAuthentication implements HttpRequestFilter {
@Inject @Inject
public SharedKeyLiteAuthentication(SignatureWire signatureWire, public SharedKeyLiteAuthentication(SignatureWire signatureWire,
@Named(Constants.PROPERTY_IDENTITY) String account, @Named(Constants.PROPERTY_IDENTITY) String identity,
@Named(Constants.PROPERTY_CREDENTIAL) String encodedKey, @Named(Constants.PROPERTY_CREDENTIAL) String encodedKey,
@TimeStamp Provider<String> timeStampProvider, EncryptionService encryptionService) { @TimeStamp Provider<String> timeStampProvider, EncryptionService encryptionService) {
this.encryptionService = encryptionService; this.encryptionService = encryptionService;
this.signatureWire = signatureWire; this.signatureWire = signatureWire;
this.account = account; this.identity = identity;
this.key = encryptionService.fromBase64String(encodedKey); this.key = encryptionService.fromBase64String(encodedKey);
this.timeStampProvider = timeStampProvider; this.timeStampProvider = timeStampProvider;
} }
@ -104,7 +104,7 @@ public class SharedKeyLiteAuthentication implements HttpRequestFilter {
if (signatureWire.enabled()) if (signatureWire.enabled())
signatureWire.input(Utils.toInputStream(signature)); signatureWire.input(Utils.toInputStream(signature));
request.getHeaders().replaceValues(HttpHeaders.AUTHORIZATION, request.getHeaders().replaceValues(HttpHeaders.AUTHORIZATION,
Collections.singletonList("SharedKeyLite " + account + ":" + signature)); Collections.singletonList("SharedKeyLite " + identity + ":" + signature));
} }
public String signString(String toSign) { public String signString(String toSign) {
@ -149,8 +149,8 @@ public class SharedKeyLiteAuthentication implements HttpRequestFilter {
void appendCanonicalizedResource(HttpRequest request, StringBuilder toSign) { void appendCanonicalizedResource(HttpRequest request, StringBuilder toSign) {
// 1. Beginning with an empty string (""), append a forward slash (/), followed by the name of // 1. Beginning with an empty string (""), append a forward slash (/), followed by the name of
// the account that owns the resource being accessed. // the identity that owns the resource being accessed.
toSign.append("/").append(account); toSign.append("/").append(identity);
appendUriPath(request, toSign); appendUriPath(request, toSign);
} }

View File

@ -53,7 +53,7 @@ import com.google.common.util.concurrent.ListenableFuture;
* Provides asynchronous access to Azure Queue via their REST API. * Provides asynchronous access to Azure Queue via their REST API.
* <p/> * <p/>
* The Queue service stores messages that may be read by any client who has access to the storage * The Queue service stores messages that may be read by any client who has access to the storage
* account. * identity.
* <p/> * <p/>
* A queue can contain an unlimited number of messages, each of which can be up to 8 KB in size. * A queue can contain an unlimited number of messages, each of which can be up to 8 KB in size.
* Messages are generally added to the end of the queue and retrieved from the front of the queue, * Messages are generally added to the end of the queue and retrieved from the front of the queue,

View File

@ -38,7 +38,7 @@ import com.google.common.util.concurrent.ListenableFuture;
* Provides access to Azure Queue via their REST API. * Provides access to Azure Queue via their REST API.
* <p/> * <p/>
* The Queue service stores messages that may be read by any client who has access to the storage * The Queue service stores messages that may be read by any client who has access to the storage
* account. * identity.
* <p/> * <p/>
* A queue can contain an unlimited number of messages, each of which can be up to 8 KB in size. * A queue can contain an unlimited number of messages, each of which can be up to 8 KB in size.
* Messages are generally added to the end of the queue and retrieved from the front of the queue, * Messages are generally added to the end of the queue and retrieved from the front of the queue,
@ -59,7 +59,7 @@ import com.google.common.util.concurrent.ListenableFuture;
public interface AzureQueueClient { public interface AzureQueueClient {
/** /**
* The List Queues operation returns a list of the queues under the specified account. * The List Queues operation returns a list of the queues under the specified identity.
* <p /> * <p />
* The 2009-07-17 version of the List Queues operation times out after 30 seconds. * The 2009-07-17 version of the List Queues operation times out after 30 seconds.
* *
@ -70,7 +70,7 @@ public interface AzureQueueClient {
BoundedSet<QueueMetadata> listQueues(ListOptions... listOptions); BoundedSet<QueueMetadata> listQueues(ListOptions... listOptions);
/** /**
* The Create Queue operation creates a new queue under the specified account. * The Create Queue operation creates a new queue under the specified identity.
* <p/> * <p/>
* You can specify user-defined metadata as name-value pairs on the queue at the time that it is * You can specify user-defined metadata as name-value pairs on the queue at the time that it is
* created. * created.

View File

@ -33,7 +33,7 @@ import com.google.common.collect.Sets;
/** /**
* Parses the following XML document: * Parses the following XML document:
* <p/> * <p/>
* EnumerationResults AccountName="http://myaccount.queue.core.windows.net" * EnumerationResults AccountName="http://myidentity.queue.core.windows.net"
* *
* @see <a href="http://msdn.microsoft.com/en-us/library/dd179352.aspx" /> * @see <a href="http://msdn.microsoft.com/en-us/library/dd179352.aspx" />
* @author Adrian Cole * @author Adrian Cole

View File

@ -71,10 +71,10 @@ public class AzureBlobClientLiveTest {
@BeforeTest @BeforeTest
public void setupClient() throws IOException { public void setupClient() throws IOException {
account = System.getProperty("jclouds.test.user"); identity = System.getProperty("jclouds.test.identity");
String key = System.getProperty("jclouds.test.key"); String credential = System.getProperty("jclouds.test.credential");
client = (AzureBlobClient) new BlobStoreContextFactory().createContext("azureblob", account, client = (AzureBlobClient) new BlobStoreContextFactory().createContext("azureblob", identity,
key, ImmutableSet.<Module> of(new Log4JLoggingModule())).getProviderSpecificContext().getApi(); credential, ImmutableSet.<Module> of(new Log4JLoggingModule())).getProviderSpecificContext().getApi();
} }
@Test @Test
@ -88,7 +88,7 @@ public class AzureBlobClientLiveTest {
String privateContainer; String privateContainer;
String publicContainer; String publicContainer;
String account; String identity;
@Test(timeOut = 5 * 60 * 1000) @Test(timeOut = 5 * 60 * 1000)
public void testCreateContainer() throws Exception { public void testCreateContainer() throws Exception {
@ -111,7 +111,7 @@ public class AzureBlobClientLiveTest {
assertTrue(containerCount >= 1); assertTrue(containerCount >= 1);
ListBlobsResponse list = client.listBlobs(privateContainer); ListBlobsResponse list = client.listBlobs(privateContainer);
assertEquals(list.getUrl(), URI.create(String.format("https://%s.blob.core.windows.net/%s", assertEquals(list.getUrl(), URI.create(String.format("https://%s.blob.core.windows.net/%s",
account, privateContainer))); identity, privateContainer)));
// TODO ... check to see the container actually exists // TODO ... check to see the container actually exists
} }
@ -130,7 +130,7 @@ public class AzureBlobClientLiveTest {
} }
} }
// TODO // TODO
// URL url = new URL(String.format("http://%s.blob.core.windows.net/%s", account, // URL url = new URL(String.format("http://%s.blob.core.windows.net/%s", identity,
// publicContainer)); // publicContainer));
// Utils.toStringAndClose(url.openStream()); // Utils.toStringAndClose(url.openStream());
} }
@ -164,7 +164,7 @@ public class AzureBlobClientLiveTest {
} }
ListBlobsResponse list = client.listBlobs(); ListBlobsResponse list = client.listBlobs();
assertEquals(list.getUrl(), URI.create(String.format( assertEquals(list.getUrl(), URI.create(String.format(
"https://%s.blob.core.windows.net/%%24root", account))); "https://%s.blob.core.windows.net/%%24root", identity)));
} }
@Test @Test

View File

@ -37,13 +37,13 @@ public class AzureBlobTestInitializer extends TransientBlobStoreTestInitializer
@Override @Override
protected BlobStoreContext createLiveContext(Module configurationModule, String url, String app, protected BlobStoreContext createLiveContext(Module configurationModule, String url, String app,
String account, String key) throws IOException { String identity, String key) throws IOException {
Properties properties = new Properties(); Properties properties = new Properties();
// properties.setProperty(PROPERTY_MAX_CONNECTIONS_PER_CONTEXT, Integer.toString(0)); // properties.setProperty(PROPERTY_MAX_CONNECTIONS_PER_CONTEXT, Integer.toString(0));
// properties.setProperty(PROPERTY_MAX_CONNECTIONS_PER_HOST, Integer.toString(0)); // properties.setProperty(PROPERTY_MAX_CONNECTIONS_PER_HOST, Integer.toString(0));
// properties.setProperty(PROPERTY_USER_THREADS, Integer.toString(0)); // properties.setProperty(PROPERTY_USER_THREADS, Integer.toString(0));
// properties.setProperty(PROPERTY_IO_WORKER_THREADS, Integer.toString(20)); // properties.setProperty(PROPERTY_IO_WORKER_THREADS, Integer.toString(20));
return (BlobStoreContext) new BlobStoreContextFactory().createContext("azureblob", account, return (BlobStoreContext) new BlobStoreContextFactory().createContext("azureblob", identity,
key, ImmutableSet.of(configurationModule, new Log4JLoggingModule()), properties); key, ImmutableSet.of(configurationModule, new Log4JLoggingModule()), properties);
} }

View File

@ -50,7 +50,7 @@ import com.google.inject.Module;
*/ */
@Test(groups = "live", sequential = true, testName = "azurequeue.AzureQueueClientLiveTest") @Test(groups = "live", sequential = true, testName = "azurequeue.AzureQueueClientLiveTest")
public class AzureQueueClientLiveTest { public class AzureQueueClientLiveTest {
String account; String identity;
protected AzureQueueClient connection; protected AzureQueueClient connection;
@ -58,10 +58,10 @@ public class AzureQueueClientLiveTest {
@BeforeGroups(groups = { "live" }) @BeforeGroups(groups = { "live" })
public void setupClient() throws IOException { public void setupClient() throws IOException {
account = System.getProperty("jclouds.test.user"); identity = System.getProperty("jclouds.test.identity");
String key = System.getProperty("jclouds.test.key"); String credential = System.getProperty("jclouds.test.credential");
connection = (AzureQueueClient) new RestContextFactory().createContext("azurequeue", account, connection = (AzureQueueClient) new RestContextFactory().createContext("azurequeue", identity,
key, ImmutableSet.<Module> of(new Log4JLoggingModule())).getApi(); credential, ImmutableSet.<Module> of(new Log4JLoggingModule())).getApi();
} }
@Test @Test

View File

@ -58,7 +58,7 @@ public interface BlobStore {
Set<? extends Location> listAssignableLocations(); Set<? extends Location> listAssignableLocations();
/** /**
* Lists all root-level resources available to the account. * Lists all root-level resources available to the identity.
*/ */
PageSet<? extends StorageMetadata> list(); PageSet<? extends StorageMetadata> list();
@ -72,7 +72,7 @@ public interface BlobStore {
* <p/> * <p/>
* *
* A container is a namespace for your objects. Depending on the service, the scope can be * A container is a namespace for your objects. Depending on the service, the scope can be
* global, account, or sub-account scoped. For example, in Amazon S3, containers are called * global, identity, or sub-identity scoped. For example, in Amazon S3, containers are called
* buckets, and they must be uniquely named such that no-one else in the world conflicts. In * buckets, and they must be uniquely named such that no-one else in the world conflicts. In
* other blobstores, the naming convention of the container is less strict. All blobstores allow * other blobstores, the naming convention of the container is less strict. All blobstores allow
* you to list your containers and also the contents within them. These contents can either be * you to list your containers and also the contents within them. These contents can either be

View File

@ -27,7 +27,7 @@ import com.google.inject.ImplementedBy;
/** /**
* Represents a cloud that has key-value storage functionality. This object is scoped to a service * Represents a cloud that has key-value storage functionality. This object is scoped to a service
* and an account. * and an identity.
* *
* @author Adrian Cole * @author Adrian Cole
* *

View File

@ -28,12 +28,12 @@ public enum ContainerVisibilities {
/** /**
* Container namespace is shared by the general public and therefore has highest likelihood of * Container namespace is shared by the general public and therefore has highest likelihood of
* collision. Containers created in public namespace are not deletable by other accounts. * collision. Containers created in public namespace are not deletable by other identitys.
*/ */
PUBLIC, PUBLIC,
/** /**
* Container namespace is shared within an account and therefore all containers are deletable by * Container namespace is shared within an identity and therefore all containers are deletable by
* the account. * the identity.
*/ */
ACCOUNT ACCOUNT
} }

View File

@ -38,22 +38,22 @@ import com.google.common.base.Splitter;
public class BlobStoreContextFactoryTest { public class BlobStoreContextFactoryTest {
public void test() throws IOException { public void test() throws IOException {
URI blobStore = URI.create("service://account:key@container/path"); URI blobStore = URI.create("service://identity:key@container/path");
assertEquals(blobStore.getScheme(), "service"); assertEquals(blobStore.getScheme(), "service");
Iterator<String> accountKey = Splitter.on(":").split( Iterator<String> identityKey = Splitter.on(":").split(
checkNotNull(blobStore.getUserInfo(), "userInfo")).iterator(); checkNotNull(blobStore.getUserInfo(), "userInfo")).iterator();
assertEquals(accountKey.next(), "account"); assertEquals(identityKey.next(), "identity");
assertEquals(accountKey.next(), "key"); assertEquals(identityKey.next(), "key");
assertEquals(blobStore.getHost(), "container"); assertEquals(blobStore.getHost(), "container");
assertEquals(blobStore.getPath(), "/path"); assertEquals(blobStore.getPath(), "/path");
} }
public void testNoPassword() throws IOException { public void testNoPassword() throws IOException {
URI blobStore = URI.create("service://account@container/path"); URI blobStore = URI.create("service://identity@container/path");
assertEquals(blobStore.getScheme(), "service"); assertEquals(blobStore.getScheme(), "service");
Iterator<String> accountKey = Splitter.on(":").split( Iterator<String> identityKey = Splitter.on(":").split(
checkNotNull(blobStore.getUserInfo(), "userInfo")).iterator(); checkNotNull(blobStore.getUserInfo(), "userInfo")).iterator();
assertEquals(accountKey.next(), "account"); assertEquals(identityKey.next(), "identity");
assertEquals(blobStore.getHost(), "container"); assertEquals(blobStore.getHost(), "container");
assertEquals(blobStore.getPath(), "/path"); assertEquals(blobStore.getPath(), "/path");
} }

View File

@ -34,7 +34,7 @@ public class TransientBlobStoreTestInitializer extends BaseTestInitializer {
@Override @Override
protected BlobStoreContext createLiveContext(Module configurationModule, String url, String app, protected BlobStoreContext createLiveContext(Module configurationModule, String url, String app,
String account, String key) throws IOException { String identity, String key) throws IOException {
return createStubContext(); return createStubContext();
} }

View File

@ -31,18 +31,18 @@ public abstract class BaseTestInitializer {
throws Exception { throws Exception {
String endpoint = System.getProperty("jclouds.test.endpoint"); String endpoint = System.getProperty("jclouds.test.endpoint");
String app = System.getProperty("jclouds.test.app"); String app = System.getProperty("jclouds.test.app");
String account = System.getProperty("jclouds.test.user"); String identity = System.getProperty("jclouds.test.identity");
String key = System.getProperty("jclouds.test.key"); String credential = System.getProperty("jclouds.test.credential");
if (endpoint != null) if (endpoint != null)
testContext.setAttribute("jclouds.test.endpoint", endpoint); testContext.setAttribute("jclouds.test.endpoint", endpoint);
if (app != null) if (app != null)
testContext.setAttribute("jclouds.test.app", app); testContext.setAttribute("jclouds.test.app", app);
if (account != null) if (identity != null)
testContext.setAttribute("jclouds.test.user", account); testContext.setAttribute("jclouds.test.identity", identity);
if (key != null) if (credential != null)
testContext.setAttribute("jclouds.test.key", key); testContext.setAttribute("jclouds.test.credential", credential);
if (account != null) { if (identity != null) {
return createLiveContext(configurationModule, endpoint, app, account, key); return createLiveContext(configurationModule, endpoint, app, identity, credential);
} else { } else {
return createStubContext(); return createStubContext();
} }
@ -51,5 +51,5 @@ public abstract class BaseTestInitializer {
protected abstract BlobStoreContext createStubContext() throws IOException; protected abstract BlobStoreContext createStubContext() throws IOException;
protected abstract BlobStoreContext createLiveContext(Module configurationModule, String url, protected abstract BlobStoreContext createLiveContext(Module configurationModule, String url,
String app, String account, String key) throws IOException; String app, String identity, String key) throws IOException;
} }

View File

@ -60,8 +60,8 @@
</repositories> </repositories>
<properties> <properties>
<jclouds.test.user>apiKey</jclouds.test.user> <jclouds.test.identity>apiKey</jclouds.test.identity>
<jclouds.test.key>authToken</jclouds.test.key> <jclouds.test.credential>authToken</jclouds.test.credential>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@ -46,11 +46,11 @@ public class BoxDotNetClientLiveTest {
@BeforeGroups(groups = { "live" }) @BeforeGroups(groups = { "live" })
public void setupClient() { public void setupClient() {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
context = createContext(contextSpec("boxdotnet", "https://www.box.net/api/1.0/rest", "1.0", context = createContext(contextSpec("boxdotnet", "https://www.box.net/api/1.0/rest", "1.0",
user, password, BoxDotNetClient.class, BoxDotNetAsyncClient.class)); identity, credential, BoxDotNetClient.class, BoxDotNetAsyncClient.class));
connection = context.getApi(); connection = context.getApi();
} }

View File

@ -63,8 +63,8 @@
<jclouds.chef.identity>chef-validator</jclouds.chef.identity> <jclouds.chef.identity>chef-validator</jclouds.chef.identity>
<jclouds.chef.rsa-key>/etc/chef/validation.pem</jclouds.chef.rsa-key> <jclouds.chef.rsa-key>/etc/chef/validation.pem</jclouds.chef.rsa-key>
<jclouds.chef.endpoint>http://localhost:4000</jclouds.chef.endpoint> <jclouds.chef.endpoint>http://localhost:4000</jclouds.chef.endpoint>
<jclouds.test.user>${jclouds.chef.identity}</jclouds.test.user> <jclouds.test.identity>${jclouds.chef.identity}</jclouds.test.identity>
<jclouds.test.key>${jclouds.chef.rsa-key}</jclouds.test.key> <jclouds.test.credential>${jclouds.chef.rsa-key}</jclouds.test.credential>
<jclouds.test.endpoint>${jclouds.chef.endpoint}</jclouds.test.endpoint> <jclouds.test.endpoint>${jclouds.chef.endpoint}</jclouds.test.endpoint>
</properties> </properties>

View File

@ -78,8 +78,8 @@ public class ChefClientLiveTest {
String validatorKey = System.getProperty("jclouds.test.validator.key"); String validatorKey = System.getProperty("jclouds.test.validator.key");
if (validatorKey == null || validatorKey.equals("")) if (validatorKey == null || validatorKey.equals(""))
validatorKey = System.getProperty("user.home") + "/.chef/validation.pem"; validatorKey = System.getProperty("user.home") + "/.chef/validation.pem";
user = checkNotNull(System.getProperty("jclouds.test.user")); user = checkNotNull(System.getProperty("jclouds.test.identity"));
String keyfile = System.getProperty("jclouds.test.key"); String keyfile = System.getProperty("jclouds.test.credential");
if (keyfile == null || keyfile.equals("")) if (keyfile == null || keyfile.equals(""))
keyfile = System.getProperty("user.home") + "/.chef/" + user + ".pem"; keyfile = System.getProperty("user.home") + "/.chef/" + user + ".pem";
validatorConnection = createConnection(validator, Files.toString(new File(validatorKey), validatorConnection = createConnection(validator, Files.toString(new File(validatorKey),

View File

@ -50,7 +50,7 @@ public class AuthorizeRSAPublicKey implements SshCallable<ExecResponse> {
public ExecResponse call() throws Exception { public ExecResponse call() throws Exception {
ssh.exec("mkdir .ssh"); ssh.exec("mkdir .ssh");
ssh.put(".ssh/id_rsa.pub", new ByteArrayInputStream(publicKey.getBytes())); ssh.put(".ssh/id_rsa.pub", new ByteArrayInputStream(publicKey.getBytes()));
logger.debug(">> authorizing rsa public key for %s@%s", node.getCredentials().account, logger.debug(">> authorizing rsa public key for %s@%s", node.getCredentials().identity,
Iterables.get(node.getPublicAddresses(), 0)); Iterables.get(node.getPublicAddresses(), 0));
ExecResponse returnVal = ssh.exec("cat .ssh/id_rsa.pub >> .ssh/authorized_keys"); ExecResponse returnVal = ssh.exec("cat .ssh/id_rsa.pub >> .ssh/authorized_keys");
returnVal = ssh.exec("chmod 600 .ssh/authorized_keys"); returnVal = ssh.exec("chmod 600 .ssh/authorized_keys");

View File

@ -50,7 +50,7 @@ public class InstallRSAPrivateKey implements SshCallable<ExecResponse> {
public ExecResponse call() throws Exception { public ExecResponse call() throws Exception {
ssh.exec("mkdir .ssh"); ssh.exec("mkdir .ssh");
ssh.put(".ssh/id_rsa", new ByteArrayInputStream(privateKey.getBytes())); ssh.put(".ssh/id_rsa", new ByteArrayInputStream(privateKey.getBytes()));
logger.debug(">> installing rsa key for %s@%s", node.getCredentials().account, Iterables.get( logger.debug(">> installing rsa key for %s@%s", node.getCredentials().identity, Iterables.get(
node.getPublicAddresses(), 0)); node.getPublicAddresses(), 0));
return ssh.exec("chmod 600 .ssh/id_rsa"); return ssh.exec("chmod 600 .ssh/id_rsa");
} }

View File

@ -83,10 +83,10 @@ public class RunScriptOnNode implements SshCallable<ExecResponse> {
runScriptNotRunning.apply(new CommandUsingClient("./" + scriptName + " status", ssh)); runScriptNotRunning.apply(new CommandUsingClient("./" + scriptName + " status", ssh));
logger.debug("<< complete(%d)", returnVal.getExitCode()); logger.debug("<< complete(%d)", returnVal.getExitCode());
if (logger.isDebugEnabled() || returnVal.getExitCode() != 0) { if (logger.isDebugEnabled() || returnVal.getExitCode() != 0) {
logger.debug("<< stdout from %s as %s@%s\n%s", scriptName, node.getCredentials().account, logger.debug("<< stdout from %s as %s@%s\n%s", scriptName, node.getCredentials().identity,
Iterables.get(node.getPublicAddresses(), 0), ssh Iterables.get(node.getPublicAddresses(), 0), ssh
.exec("./" + scriptName + " tail").getOutput()); .exec("./" + scriptName + " tail").getOutput());
logger.debug("<< stderr from %s as %s@%s\n%s", scriptName, node.getCredentials().account, logger.debug("<< stderr from %s as %s@%s\n%s", scriptName, node.getCredentials().identity,
Iterables.get(node.getPublicAddresses(), 0), ssh.exec( Iterables.get(node.getPublicAddresses(), 0), ssh.exec(
"./" + scriptName + " tailerr").getOutput()); "./" + scriptName + " tailerr").getOutput());
} }
@ -100,24 +100,24 @@ public class RunScriptOnNode implements SshCallable<ExecResponse> {
} }
private ExecResponse runScriptAsRoot() { private ExecResponse runScriptAsRoot() {
if (node.getCredentials().account.equals("root")) { if (node.getCredentials().identity.equals("root")) {
logger.debug(">> running %s as %s@%s", scriptName, node.getCredentials().account, logger.debug(">> running %s as %s@%s", scriptName, node.getCredentials().identity,
Iterables.get(node.getPublicAddresses(), 0)); Iterables.get(node.getPublicAddresses(), 0));
return ssh.exec("./" + scriptName + " start"); return ssh.exec("./" + scriptName + " start");
} else if (ComputeServiceUtils.isKeyAuth(node)) { } else if (ComputeServiceUtils.isKeyAuth(node)) {
logger.debug(">> running sudo %s as %s@%s", scriptName, node.getCredentials().account, logger.debug(">> running sudo %s as %s@%s", scriptName, node.getCredentials().identity,
Iterables.get(node.getPublicAddresses(), 0)); Iterables.get(node.getPublicAddresses(), 0));
return ssh.exec("sudo ./" + scriptName + " start"); return ssh.exec("sudo ./" + scriptName + " start");
} else { } else {
logger.debug(">> running sudo -S %s as %s@%s", scriptName, node.getCredentials().account, logger.debug(">> running sudo -S %s as %s@%s", scriptName, node.getCredentials().identity,
Iterables.get(node.getPublicAddresses(), 0)); Iterables.get(node.getPublicAddresses(), 0));
return ssh.exec(String.format("echo '%s'|sudo -S ./%s", node.getCredentials().key, return ssh.exec(String.format("echo '%s'|sudo -S ./%s", node.getCredentials().credential,
scriptName + " start")); scriptName + " start"));
} }
} }
private ExecResponse runScriptAsDefaultUser() { private ExecResponse runScriptAsDefaultUser() {
logger.debug(">> running script %s as %s@%s", scriptName, node.getCredentials().account, logger.debug(">> running script %s as %s@%s", scriptName, node.getCredentials().identity,
Iterables.get(node.getPublicAddresses(), 0)); Iterables.get(node.getPublicAddresses(), 0));
return ssh.exec(String.format("./%s", scriptName + " start")); return ssh.exec(String.format("./%s", scriptName + " start"));
} }

View File

@ -412,10 +412,10 @@ public class BaseComputeService implements ComputeService {
// don't override // don't override
checkNotNull(node.getCredentials(), checkNotNull(node.getCredentials(),
"If the default credentials need to be used, they can't be null"); "If the default credentials need to be used, they can't be null");
checkNotNull(node.getCredentials().account, checkNotNull(node.getCredentials().identity,
"Account name for ssh authentication must be " "Account name for ssh authentication must be "
+ "specified. Try passing RunScriptOptions with new credentials"); + "specified. Try passing RunScriptOptions with new credentials");
checkNotNull(node.getCredentials().key, checkNotNull(node.getCredentials().credential,
"Key or password for ssh authentication must be " "Key or password for ssh authentication must be "
+ "specified. Try passing RunScriptOptions with new credentials"); + "specified. Try passing RunScriptOptions with new credentials");
} }

View File

@ -80,8 +80,8 @@ public class RunScriptOptions {
public RunScriptOptions withOverridingCredentials(Credentials overridingCredentials) { public RunScriptOptions withOverridingCredentials(Credentials overridingCredentials) {
checkNotNull(overridingCredentials, "overridingCredentials"); checkNotNull(overridingCredentials, "overridingCredentials");
checkNotNull(overridingCredentials.account, "overridingCredentials.account"); checkNotNull(overridingCredentials.identity, "overridingCredentials.identity");
checkNotNull(overridingCredentials.key, "overridingCredentials.key"); checkNotNull(overridingCredentials.credential, "overridingCredentials.key");
this.overridingCredentials = overridingCredentials; this.overridingCredentials = overridingCredentials;
return this; return this;
} }

View File

@ -38,7 +38,7 @@ public interface PopulateDefaultLoginCredentialsForImageStrategy {
* responsibility of an implementation to apply * responsibility of an implementation to apply
* the cloud-specific logic. * the cloud-specific logic.
* @return credentials object. Note: the key * @return credentials object. Note: the key
* may not be set, but the account must be set * may not be set, but the identity must be set
*/ */
Credentials execute(Object resourceToAuthenticate); Credentials execute(Object resourceToAuthenticate);

View File

@ -144,8 +144,8 @@ public class ComputeServiceUtils {
} }
public static boolean isKeyAuth(NodeMetadata createdNode) { public static boolean isKeyAuth(NodeMetadata createdNode) {
return createdNode.getCredentials().key != null return createdNode.getCredentials().credential != null
&& createdNode.getCredentials().key.startsWith("-----BEGIN RSA PRIVATE KEY-----"); && createdNode.getCredentials().credential.startsWith("-----BEGIN RSA PRIVATE KEY-----");
} }
/** /**

View File

@ -201,7 +201,7 @@ public class ComputeUtils {
Iterable<? extends SshCallable<?>> parallel, @Nullable SshCallable<?> last) { Iterable<? extends SshCallable<?>> parallel, @Nullable SshCallable<?> last) {
checkState(this.sshFactory != null, "runScript requested, but no SshModule configured"); checkState(this.sshFactory != null, "runScript requested, but no SshModule configured");
checkNodeHasPublicIps(node); checkNodeHasPublicIps(node);
checkNotNull(node.getCredentials().key, "credentials.key for node " + node.getId()); checkNotNull(node.getCredentials().credential, "credentials.key for node " + node.getId());
SshClient ssh = createSshClientOncePortIsListeningOnNode(node); SshClient ssh = createSshClientOncePortIsListeningOnNode(node);
try { try {
ssh.connect(); ssh.connect();
@ -232,9 +232,9 @@ public class ComputeUtils {
public SshClient createSshClientOncePortIsListeningOnNode(NodeMetadata node) { public SshClient createSshClientOncePortIsListeningOnNode(NodeMetadata node) {
IPSocket socket = new IPSocket(Iterables.get(node.getPublicAddresses(), 0), 22); IPSocket socket = new IPSocket(Iterables.get(node.getPublicAddresses(), 0), 22);
socketTester.apply(socket); socketTester.apply(socket);
SshClient ssh = isKeyAuth(node) ? sshFactory.create(socket, node.getCredentials().account, SshClient ssh = isKeyAuth(node) ? sshFactory.create(socket, node.getCredentials().identity,
node.getCredentials().key.getBytes()) : sshFactory.create(socket, node node.getCredentials().credential.getBytes()) : sshFactory.create(socket, node
.getCredentials().account, node.getCredentials().key); .getCredentials().identity, node.getCredentials().credential);
return ssh; return ssh;
} }

View File

@ -93,8 +93,8 @@ public abstract class BaseComputeServiceLiveTest {
protected SortedSet<NodeMetadata> nodes; protected SortedSet<NodeMetadata> nodes;
protected ComputeServiceContext context; protected ComputeServiceContext context;
protected ComputeService client; protected ComputeService client;
protected String user; protected String identity;
protected String password; protected String credential;
protected Template template; protected Template template;
protected Map<String, String> keyPair; protected Map<String, String> keyPair;
@ -133,10 +133,10 @@ public abstract class BaseComputeServiceLiveTest {
} }
protected void setupCredentials() { protected void setupCredentials() {
user = checkNotNull(System.getProperty("jclouds.test.user"), identity = checkNotNull(System.getProperty("jclouds.test.identity"),
"jclouds.test.user"); "jclouds.test.identity");
password = checkNotNull(System.getProperty("jclouds.test.key"), credential = checkNotNull(System.getProperty("jclouds.test.credential"),
"jclouds.test.key"); "jclouds.test.credential");
} }
protected Injector createSshClientInjector() { protected Injector createSshClientInjector() {
@ -147,7 +147,7 @@ public abstract class BaseComputeServiceLiveTest {
if (context != null) if (context != null)
context.close(); context.close();
context = new ComputeServiceContextFactory() context = new ComputeServiceContextFactory()
.createContext(service, user, password, ImmutableSet.of( .createContext(service, identity, credential, ImmutableSet.of(
new Log4JLoggingModule(), getSshModule())); new Log4JLoggingModule(), getSshModule()));
client = context.getComputeService(); client = context.getComputeService();
} }
@ -198,13 +198,13 @@ public abstract class BaseComputeServiceLiveTest {
Set<? extends NodeMetadata> nodes = client.runNodesWithTag(tag, 1, Set<? extends NodeMetadata> nodes = client.runNodesWithTag(tag, 1,
options); options);
Credentials good = nodes.iterator().next().getCredentials(); Credentials good = nodes.iterator().next().getCredentials();
assert good.account != null; assert good.identity != null;
assert good.key != null; assert good.credential != null;
Image image = Iterables.get(nodes, 0).getImage(); Image image = Iterables.get(nodes, 0).getImage();
try { try {
Map<? extends NodeMetadata, ExecResponse> responses = runScriptWithCreds( Map<? extends NodeMetadata, ExecResponse> responses = runScriptWithCreds(
tag, image.getOsFamily(), new Credentials(good.account, tag, image.getOsFamily(), new Credentials(good.identity,
"romeo")); "romeo"));
assert false : "shouldn't pass with a bad password\n" + responses; assert false : "shouldn't pass with a bad password\n" + responses;
} catch (RunScriptOnNodesException e) { } catch (RunScriptOnNodesException e) {
@ -297,7 +297,7 @@ public abstract class BaseComputeServiceLiveTest {
} catch (SshException e) { } catch (SshException e) {
if (Throwables.getRootCause(e).getMessage().contains("Auth fail")) { if (Throwables.getRootCause(e).getMessage().contains("Auth fail")) {
// System.err.printf("bad credentials: %s:%s for %s%n", // System.err.printf("bad credentials: %s:%s for %s%n",
// creds.account, creds.key, client // creds.identity, creds.key, client
// .listNodesDetailsMatching(tag)); // .listNodesDetailsMatching(tag));
} }
throw e; throw e;
@ -314,9 +314,9 @@ public abstract class BaseComputeServiceLiveTest {
assert node.getPublicAddresses().size() >= 1 assert node.getPublicAddresses().size() >= 1
|| node.getPrivateAddresses().size() >= 1 : "no ips in" + node; || node.getPrivateAddresses().size() >= 1 : "no ips in" + node;
assertNotNull(node.getCredentials()); assertNotNull(node.getCredentials());
if (node.getCredentials().account != null) { if (node.getCredentials().identity != null) {
assertNotNull(node.getCredentials().account); assertNotNull(node.getCredentials().identity);
assertNotNull(node.getCredentials().key); assertNotNull(node.getCredentials().credential);
sshPing(node); sshPing(node);
} }
} }
@ -536,7 +536,7 @@ public abstract class BaseComputeServiceLiveTest {
socketTester.apply(socket); // TODO add transitionTo option that accepts socketTester.apply(socket); // TODO add transitionTo option that accepts
// a socket conection // a socket conection
// state. // state.
SshClient ssh = sshFactory.create(socket, node.getCredentials().account, SshClient ssh = sshFactory.create(socket, node.getCredentials().identity,
keyPair.get("private").getBytes()); keyPair.get("private").getBytes());
try { try {
ssh.connect(); ssh.connect();

View File

@ -69,8 +69,8 @@ public abstract class BaseLoadBalancerServiceLiveTest {
protected ComputeServiceContext context; protected ComputeServiceContext context;
protected ComputeService client; protected ComputeService client;
protected LoadBalancerService lbClient; protected LoadBalancerService lbClient;
protected String user; protected String identity;
protected String password; protected String credential;
protected Template template; protected Template template;
protected Map<String, String> keyPair; protected Map<String, String> keyPair;
protected Set<String> loadbalancers; protected Set<String> loadbalancers;
@ -80,8 +80,8 @@ public abstract class BaseLoadBalancerServiceLiveTest {
IOException, RunNodesException { IOException, RunNodesException {
if (tag == null) if (tag == null)
tag = checkNotNull(service, "service") + "lb"; tag = checkNotNull(service, "service") + "lb";
user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
initializeContextAndClient(); initializeContextAndClient();
@ -99,7 +99,7 @@ public abstract class BaseLoadBalancerServiceLiveTest {
private void initializeContextAndClient() throws IOException { private void initializeContextAndClient() throws IOException {
if (context != null) if (context != null)
context.close(); context.close();
context = new ComputeServiceContextFactory().createContext(service, user, password, context = new ComputeServiceContextFactory().createContext(service, identity, credential,
ImmutableSet.of(new Log4JLoggingModule(), getSshModule())); ImmutableSet.of(new Log4JLoggingModule(), getSshModule()));
client = context.getComputeService(); client = context.getComputeService();
lbClient = context.getLoadBalancerService(); lbClient = context.getLoadBalancerService();

View File

@ -255,8 +255,8 @@ public class StubComputeServiceIntegrationTest extends
@Override @Override
protected void setupCredentials() { protected void setupCredentials() {
user = "stub"; identity = "stub";
password = "stub"; credential = "stub";
} }
protected void assertNodeZero(Set<? extends NodeMetadata> metadataSet) { protected void assertNodeZero(Set<? extends NodeMetadata> metadataSet) {
@ -279,7 +279,7 @@ public class StubComputeServiceIntegrationTest extends
public void testAssignability() throws Exception { public void testAssignability() throws Exception {
@SuppressWarnings("unused") @SuppressWarnings("unused")
RestContext<ConcurrentMap<Integer, StubNodeMetadata>, ConcurrentMap<Integer, StubNodeMetadata>> stubContext = new ComputeServiceContextFactory() RestContext<ConcurrentMap<Integer, StubNodeMetadata>, ConcurrentMap<Integer, StubNodeMetadata>> stubContext = new ComputeServiceContextFactory()
.createContext(service, user, password) .createContext(service, identity, credential)
.getProviderSpecificContext(); .getProviderSpecificContext();
} }

View File

@ -33,35 +33,35 @@ import com.google.common.collect.Lists;
*/ */
public class Credentials { public class Credentials {
public final String account; public final String identity;
public final String key; public final String credential;
public Credentials(String account, String key) { public Credentials(String identity, String credential) {
this.account = account; this.identity = identity;
this.key = key; this.credential = credential;
} }
public static Credentials parse(URI uri) { public static Credentials parse(URI uri) {
checkNotNull(uri, "uri"); checkNotNull(uri, "uri");
List<String> userInfo = Lists.newArrayList(Splitter.on(':').split( List<String> userInfo = Lists.newArrayList(Splitter.on(':').split(
checkNotNull(uri.getUserInfo(), "no userInfo in " + uri))); checkNotNull(uri.getUserInfo(), "no userInfo in " + uri)));
String account = checkNotNull(userInfo.get(0), "no username in " + uri.getUserInfo()); String identity = checkNotNull(userInfo.get(0), "no username in " + uri.getUserInfo());
if (HttpUtils.isUrlEncoded(account)) { if (HttpUtils.isUrlEncoded(identity)) {
account = HttpUtils.urlDecode(account); identity = HttpUtils.urlDecode(identity);
} }
String key = userInfo.size() > 1 ? userInfo.get(1) : null; String credential = userInfo.size() > 1 ? userInfo.get(1) : null;
if (key != null && HttpUtils.isUrlEncoded(key)) { if (credential != null && HttpUtils.isUrlEncoded(credential)) {
key = HttpUtils.urlDecode(key); credential = HttpUtils.urlDecode(credential);
} }
return new Credentials(account, key); return new Credentials(identity, credential);
} }
@Override @Override
public int hashCode() { public int hashCode() {
final int prime = 31; final int prime = 31;
int result = 1; int result = 1;
result = prime * result + ((account == null) ? 0 : account.hashCode()); result = prime * result + ((identity == null) ? 0 : identity.hashCode());
result = prime * result + ((key == null) ? 0 : key.hashCode()); result = prime * result + ((credential == null) ? 0 : credential.hashCode());
return result; return result;
} }
@ -74,15 +74,15 @@ public class Credentials {
if (getClass() != obj.getClass()) if (getClass() != obj.getClass())
return false; return false;
Credentials other = (Credentials) obj; Credentials other = (Credentials) obj;
if (account == null) { if (identity == null) {
if (other.account != null) if (other.identity != null)
return false; return false;
} else if (!account.equals(other.account)) } else if (!identity.equals(other.identity))
return false; return false;
if (key == null) { if (credential == null) {
if (other.key != null) if (other.credential != null)
return false; return false;
} else if (!key.equals(other.key)) } else if (!credential.equals(other.credential))
return false; return false;
return true; return true;

View File

@ -281,9 +281,9 @@ public class HttpUtils {
if (matcher.find()) { if (matcher.find()) {
String scheme = matcher.group(1); String scheme = matcher.group(1);
String rest = matcher.group(4); String rest = matcher.group(4);
String account = matcher.group(2); String identity = matcher.group(2);
String key = matcher.group(3); String key = matcher.group(3);
return URI.create(String.format("%s://%s:%s@%s", scheme, urlEncode(account), return URI.create(String.format("%s://%s:%s@%s", scheme, urlEncode(identity),
urlEncode(key), rest)); urlEncode(key), rest));
} else { } else {
throw new IllegalArgumentException("bad syntax"); throw new IllegalArgumentException("bad syntax");

View File

@ -29,7 +29,7 @@ import java.lang.annotation.Target;
import javax.inject.Qualifier; import javax.inject.Qualifier;
/** /**
* Designates that this Resource qualifies an object to an account on a provider. * Designates that this Resource qualifies an object to an identity on a provider.
* *
* @author Adrian Cole * @author Adrian Cole
*/ */

View File

@ -32,51 +32,51 @@ public class CredentialsTest {
public void testAzure() { public void testAzure() {
Credentials creds = Credentials.parse(URI Credentials creds = Credentials.parse(URI
.create("compute://account:Base64==@azureblob/container-hyphen/prefix")); .create("compute://identity:Base64==@azureblob/container-hyphen/prefix"));
assertEquals(creds.account, "account"); assertEquals(creds.identity, "identity");
assertEquals(creds.key, "Base64=="); assertEquals(creds.credential, "Base64==");
} }
public void testAtmos() { public void testAtmos() {
Credentials creds = Credentials.parse(URI Credentials creds = Credentials.parse(URI
.create("compute://domain%2Fuser:Base64%3D%3D@azureblob/container-hyphen/prefix")); .create("compute://domain%2Fuser:Base64%3D%3D@azureblob/container-hyphen/prefix"));
assertEquals(creds.account, "domain/user"); assertEquals(creds.identity, "domain/user");
assertEquals(creds.key, "Base64=="); assertEquals(creds.credential, "Base64==");
} }
public void testHosting() { public void testHosting() {
Credentials creds = Credentials.parse(URI Credentials creds = Credentials.parse(URI
.create("compute://user%40domain:pa%24sword@hostingdotcom")); .create("compute://user%40domain:pa%24sword@hostingdotcom"));
assertEquals(creds.account, "user@domain"); assertEquals(creds.identity, "user@domain");
assertEquals(creds.key, "pa$sword"); assertEquals(creds.credential, "pa$sword");
} }
public void testTerremark() { public void testTerremark() {
Credentials creds = Credentials.parse(URI Credentials creds = Credentials.parse(URI
.create("compute://user%40domain:password@terremark")); .create("compute://user%40domain:password@terremark"));
assertEquals(creds.account, "user@domain"); assertEquals(creds.identity, "user@domain");
assertEquals(creds.key, "password"); assertEquals(creds.credential, "password");
} }
public void testTerremark2() { public void testTerremark2() {
Credentials creds = Credentials.parse(URI Credentials creds = Credentials.parse(URI
.create("compute://user%40domain:passw%40rd@terremark")); .create("compute://user%40domain:passw%40rd@terremark"));
assertEquals(creds.account, "user@domain"); assertEquals(creds.identity, "user@domain");
assertEquals(creds.key, "passw@rd"); assertEquals(creds.credential, "passw@rd");
} }
public void testTerremark3() { public void testTerremark3() {
Credentials creds = Credentials.parse(URI Credentials creds = Credentials.parse(URI
.create("compute://user%40domain:AbC%21%40943%21@terremark")); .create("compute://user%40domain:AbC%21%40943%21@terremark"));
assertEquals(creds.account, "user@domain"); assertEquals(creds.identity, "user@domain");
assertEquals(creds.key, "AbC!@943!"); assertEquals(creds.credential, "AbC!@943!");
} }
public void testCloudFiles() { public void testCloudFiles() {
Credentials creds = Credentials.parse(URI Credentials creds = Credentials.parse(URI
.create("compute://account:h3c@cloudfiles/container-hyphen/prefix")); .create("compute://identity:h3c@cloudfiles/container-hyphen/prefix"));
assertEquals(creds.account, "account"); assertEquals(creds.identity, "identity");
assertEquals(creds.key, "h3c"); assertEquals(creds.credential, "h3c");
} }
@ -84,16 +84,16 @@ public class CredentialsTest {
Credentials creds = Credentials Credentials creds = Credentials
.parse(URI.create("compute://0AB:aA%2B%2F0@s3/buck-et/prefix")); .parse(URI.create("compute://0AB:aA%2B%2F0@s3/buck-et/prefix"));
assertEquals(creds.account, "0AB"); assertEquals(creds.identity, "0AB");
assertEquals(creds.key, "aA+/0"); assertEquals(creds.credential, "aA+/0");
} }
public void testS3Space() { public void testS3Space() {
Credentials creds = Credentials.parse(URI Credentials creds = Credentials.parse(URI
.create("compute://0AB:aA%2B%2F0@s3/buck-et/pre%20fix")); .create("compute://0AB:aA%2B%2F0@s3/buck-et/pre%20fix"));
assertEquals(creds.account, "0AB"); assertEquals(creds.identity, "0AB");
assertEquals(creds.key, "aA+/0"); assertEquals(creds.credential, "aA+/0");
} }
} }

View File

@ -945,10 +945,10 @@ public class RestAnnotationProcessorTest {
} }
@SkipEncoding('/') @SkipEncoding('/')
@Path("/v1/{account}") @Path("/v1/{identity}")
public interface TestConstantPathParam { public interface TestConstantPathParam {
@Named("testaccount") @Named("testidentity")
@PathParam("account") @PathParam("identity")
void setUsername(); void setUsername();
@GET @GET

View File

@ -60,9 +60,9 @@ public class HttpUtilsTest extends PerformanceTest {
public void testAzure() { public void testAzure() {
URI creds = HttpUtils URI creds = HttpUtils
.createUri("compute://account:Base64==@azureblob/container-hyphen/prefix"); .createUri("compute://identity:Base64==@azureblob/container-hyphen/prefix");
assertEquals(creds, URI assertEquals(creds, URI
.create("compute://account:Base64==@azureblob/container-hyphen/prefix")); .create("compute://identity:Base64==@azureblob/container-hyphen/prefix"));
} }
public void testHosting() { public void testHosting() {
@ -90,8 +90,8 @@ public class HttpUtilsTest extends PerformanceTest {
} }
public void testCloudFiles() { public void testCloudFiles() {
URI creds = HttpUtils.createUri("compute://account:h3c@cloudfiles/container-hyphen/prefix"); URI creds = HttpUtils.createUri("compute://identity:h3c@cloudfiles/container-hyphen/prefix");
assertEquals(creds, URI.create("compute://account:h3c@cloudfiles/container-hyphen/prefix")); assertEquals(creds, URI.create("compute://identity:h3c@cloudfiles/container-hyphen/prefix"));
} }
public void testS3() { public void testS3() {

View File

@ -42,8 +42,8 @@
<url>http://jclouds.googlecode.com/svn/trunk/gogrid</url> <url>http://jclouds.googlecode.com/svn/trunk/gogrid</url>
</scm> </scm>
<properties> <properties>
<jclouds.test.user>${jclouds.gogrid.apikey}</jclouds.test.user> <jclouds.test.identity>${jclouds.gogrid.apikey}</jclouds.test.identity>
<jclouds.test.key>${jclouds.gogrid.secret}</jclouds.test.key> <jclouds.test.credential>${jclouds.gogrid.secret}</jclouds.test.credential>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@ -84,7 +84,7 @@ public class GoGridAddNodeWithTagStrategy implements AddNodeWithTagStrategy {
IpType.PUBLIC)); IpType.PUBLIC));
if (availableIps.size() == 0) if (availableIps.size() == 0)
throw new RuntimeException( throw new RuntimeException(
"No public IPs available on this account."); "No public IPs available on this identity.");
int ipIndex = new SecureRandom().nextInt(availableIps.size()); int ipIndex = new SecureRandom().nextInt(availableIps.size());
Ip availableIp = Iterables.get(availableIps, ipIndex); Ip availableIp = Iterables.get(availableIps, ipIndex);
try { try {

View File

@ -59,6 +59,6 @@ public class GoGridComputeServiceLiveTest extends BaseComputeServiceLiveTest {
public void testAssignability() throws Exception { public void testAssignability() throws Exception {
@SuppressWarnings("unused") @SuppressWarnings("unused")
RestContext<GoGridClient, GoGridAsyncClient> goGridContext = new ComputeServiceContextFactory() RestContext<GoGridClient, GoGridAsyncClient> goGridContext = new ComputeServiceContextFactory()
.createContext(service, user, password).getProviderSpecificContext(); .createContext(service, identity, credential).getProviderSpecificContext();
} }
} }

View File

@ -94,10 +94,10 @@ public class GoGridLiveTest {
@BeforeGroups(groups = { "live" }) @BeforeGroups(groups = { "live" })
public void setupClient() { public void setupClient() {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
context = new RestContextFactory().createContext("gogrid", user, password, ImmutableSet context = new RestContextFactory().createContext("gogrid", identity, credential, ImmutableSet
.<Module> of(new Log4JLoggingModule())); .<Module> of(new Log4JLoggingModule()));
client = context.getApi(); client = context.getApi();
@ -360,7 +360,7 @@ public class GoGridLiveTest {
socketOpen.apply(socket); socketOpen.apply(socket);
SshClient sshClient = new JschSshClient(new BackoffLimitedRetryHandler(), socket, 60000, SshClient sshClient = new JschSshClient(new BackoffLimitedRetryHandler(), socket, 60000,
instanceCredentials.account, instanceCredentials.key, null); instanceCredentials.identity, instanceCredentials.credential, null);
sshClient.connect(); sshClient.connect();
String output = sshClient.exec("df").getOutput(); String output = sshClient.exec("df").getOutput();
assertTrue(output.contains("Filesystem"), assertTrue(output.contains("Filesystem"),

View File

@ -58,8 +58,8 @@
</repositories> </repositories>
<properties> <properties>
<jclouds.test.user>${providerUser}</jclouds.test.user> <jclouds.test.identity>${providerUser}</jclouds.test.identity>
<jclouds.test.key>${providerPassword}</jclouds.test.key> <jclouds.test.credential>${providerPassword}</jclouds.test.credential>
<jclouds.test.endpoint>https://www-180.ibm.com/cloud/enterprise/beta/api/rest/20090403</jclouds.test.endpoint> <jclouds.test.endpoint>https://www-180.ibm.com/cloud/enterprise/beta/api/rest/20090403</jclouds.test.endpoint>
</properties> </properties>
<dependencies> <dependencies>

View File

@ -82,6 +82,6 @@ public class InstanceToNodeMetadata implements Function<Instance, NodeMetadata>
return new NodeMetadataImpl(from.getId() + "", from.getName(), from.getId() + "", locations return new NodeMetadataImpl(from.getId() + "", from.getName(), from.getId() + "", locations
.get(image.getLocation()), null, ImmutableMap.<String, String> of(), tag, image, .get(image.getLocation()), null, ImmutableMap.<String, String> of(), tag, image,
state, ipSet, ImmutableList.<String> of(), ImmutableMap.<String, String> of(), state, ipSet, ImmutableList.<String> of(), ImmutableMap.<String, String> of(),
new Credentials(image.getDefaultCredentials().account, key)); new Credentials(image.getDefaultCredentials().identity, key));
} }
} }

View File

@ -83,7 +83,7 @@ public class IBMDeveloperCloudClientLiveTest {
private ImmutableMap<String, String> keyPair; private ImmutableMap<String, String> keyPair;
private Key key; private Key key;
private Volume volume; private Volume volume;
private String user; private String identity;
private Instance instance2; private Instance instance2;
private Instance instance; private Instance instance;
private RestContext<IBMDeveloperCloudClient, IBMDeveloperCloudAsyncClient> context; private RestContext<IBMDeveloperCloudClient, IBMDeveloperCloudAsyncClient> context;
@ -94,13 +94,13 @@ public class IBMDeveloperCloudClientLiveTest {
public void setupClient() { public void setupClient() {
String endpoint = System.getProperty("jclouds.test.endpoint"); String endpoint = System.getProperty("jclouds.test.endpoint");
user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
Properties props = new Properties(); Properties props = new Properties();
if (endpoint != null) if (endpoint != null)
props.setProperty("ibmdev.endpoint", endpoint); props.setProperty("ibmdev.endpoint", endpoint);
context = new RestContextFactory().createContext("ibmdev", user, password, ImmutableSet context = new RestContextFactory().createContext("ibmdev", identity, credential, ImmutableSet
.<Module> of(new Log4JLoggingModule()), props); .<Module> of(new Log4JLoggingModule()), props);
connection = context.getApi(); connection = context.getApi();
@ -376,7 +376,7 @@ public class IBMDeveloperCloudClientLiveTest {
assertEquals(instance.getKeyName(), key.getName()); assertEquals(instance.getKeyName(), key.getName());
assertNotNull(instance.getLaunchTime()); assertNotNull(instance.getLaunchTime());
assertNotNull(instance.getExpirationTime()); assertNotNull(instance.getExpirationTime());
assertEquals(instance.getOwner(), user); assertEquals(instance.getOwner(), identity);
assertEquals(instance.getProductCodes(), ImmutableSet.<String> of()); assertEquals(instance.getProductCodes(), ImmutableSet.<String> of());
assertEquals(instance.getRequestName(), name); assertEquals(instance.getRequestName(), name);
assertNotNull(instance.getRequestId()); assertNotNull(instance.getRequestId());

View File

@ -72,7 +72,7 @@ public class IBMDeveloperCloudComputeServiceLiveTest extends BaseComputeServiceL
public void testAssignability() throws Exception { public void testAssignability() throws Exception {
@SuppressWarnings("unused") @SuppressWarnings("unused")
RestContext<IBMDeveloperCloudClient, IBMDeveloperCloudAsyncClient> tmContext = new ComputeServiceContextFactory() RestContext<IBMDeveloperCloudClient, IBMDeveloperCloudAsyncClient> tmContext = new ComputeServiceContextFactory()
.createContext(service, user, password).getProviderSpecificContext(); .createContext(service, identity, credential).getProviderSpecificContext();
} }
} }

View File

@ -65,7 +65,7 @@ public class PCSClientLiveTest {
private PCSClient connection; private PCSClient connection;
private String user; private String identity;
Provider<UriBuilder> uriBuilderProvider = new Provider<UriBuilder>() { Provider<UriBuilder> uriBuilderProvider = new Provider<UriBuilder>() {
@Override @Override
@ -79,14 +79,14 @@ public class PCSClientLiveTest {
@BeforeGroups(groups = { "live" }) @BeforeGroups(groups = { "live" })
public void setupClient() throws InterruptedException, ExecutionException, TimeoutException { public void setupClient() throws InterruptedException, ExecutionException, TimeoutException {
user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
String endpoint = checkNotNull(System.getProperty("jclouds.test.endpoint"), String endpoint = checkNotNull(System.getProperty("jclouds.test.endpoint"),
"jclouds.test.endpoint"); "jclouds.test.endpoint");
Properties props = new Properties(); Properties props = new Properties();
props.setProperty("pcs.endpoint", endpoint); props.setProperty("pcs.endpoint", endpoint);
context = new RestContextFactory().createContext("pcs", user, password, ImmutableSet context = new RestContextFactory().createContext("pcs", identity, credential, ImmutableSet
.<Module> of(new Log4JLoggingModule()), props); .<Module> of(new Log4JLoggingModule()), props);
connection = context.getApi(); connection = context.getApi();
@ -163,7 +163,7 @@ public class PCSClientLiveTest {
assertNotNull(response.getMetadata()); assertNotNull(response.getMetadata());
assertNotNull(response.getModified()); assertNotNull(response.getModified());
assertEquals(response.getName(), name); assertEquals(response.getName(), name);
assertEquals(response.getOwner(), user); assertEquals(response.getOwner(), identity);
assertEquals(response.getParent(), parent); assertEquals(response.getParent(), parent);
assertNotNull(response.getTags()); assertNotNull(response.getTags());
assertNotNull(response.getType()); assertNotNull(response.getType());

View File

@ -53,10 +53,10 @@ public class SDNAuthRestClientModule extends AbstractModule {
@Provides @Provides
@Singleton @Singleton
@Named(SDNConstants.PROPERTY_SDN_APPKEY) @Named(SDNConstants.PROPERTY_SDN_APPKEY)
public String credentials1(@Named(Constants.PROPERTY_IDENTITY) String account) { public String credentials1(@Named(Constants.PROPERTY_IDENTITY) String identity) {
List<String> parts = Lists.newArrayList(Splitter.on('/').split(account)); List<String> parts = Lists.newArrayList(Splitter.on('/').split(identity));
if (parts.size() != 3) { if (parts.size() != 3) {
throw new IllegalArgumentException("account syntax is appkey/appname/username"); throw new IllegalArgumentException("identity syntax is appkey/appname/username");
} }
return parts.get(0); return parts.get(0);
} }
@ -64,10 +64,10 @@ public class SDNAuthRestClientModule extends AbstractModule {
@Provides @Provides
@Singleton @Singleton
@Named(SDNConstants.PROPERTY_SDN_APPNAME) @Named(SDNConstants.PROPERTY_SDN_APPNAME)
public String credentials2(@Named(Constants.PROPERTY_IDENTITY) String account) { public String credentials2(@Named(Constants.PROPERTY_IDENTITY) String identity) {
List<String> parts = Lists.newArrayList(Splitter.on('/').split(account)); List<String> parts = Lists.newArrayList(Splitter.on('/').split(identity));
if (parts.size() != 3) { if (parts.size() != 3) {
throw new IllegalArgumentException("account syntax is appkey/appname/username"); throw new IllegalArgumentException("identity syntax is appkey/appname/username");
} }
return parts.get(1); return parts.get(1);
} }
@ -75,10 +75,10 @@ public class SDNAuthRestClientModule extends AbstractModule {
@Provides @Provides
@Singleton @Singleton
@Named(SDNConstants.PROPERTY_SDN_USERNAME) @Named(SDNConstants.PROPERTY_SDN_USERNAME)
public String credentials3(@Named(Constants.PROPERTY_IDENTITY) String account) { public String credentials3(@Named(Constants.PROPERTY_IDENTITY) String identity) {
List<String> parts = Lists.newArrayList(Splitter.on('/').split(account)); List<String> parts = Lists.newArrayList(Splitter.on('/').split(identity));
if (parts.size() != 3) { if (parts.size() != 3) {
throw new IllegalArgumentException("account syntax is appkey/appname/username"); throw new IllegalArgumentException("identity syntax is appkey/appname/username");
} }
return parts.get(2); return parts.get(2);
} }

View File

@ -70,8 +70,8 @@ public class SDNAuthenticationLiveTest {
void setupFactory() { void setupFactory() {
String endpoint = "http://services.nirvanix.com"; String endpoint = "http://services.nirvanix.com";
identity = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
credential = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
ContextSpec<SDNAuthClient, SDNAuthAsyncClient> contextSpec = contextSpec("test", endpoint, ContextSpec<SDNAuthClient, SDNAuthAsyncClient> contextSpec = contextSpec("test", endpoint,
"1", identity, credential, SDNAuthClient.class, SDNAuthAsyncClient.class); "1", identity, credential, SDNAuthClient.class, SDNAuthAsyncClient.class);

View File

@ -59,10 +59,10 @@ public class SDNClientLiveTest {
@BeforeGroups(groups = { "live" }) @BeforeGroups(groups = { "live" })
public void setupClient() { public void setupClient() {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
this.context = new RestContextFactory().createContext("sdn", user, password, ImmutableSet this.context = new RestContextFactory().createContext("sdn", identity, credential, ImmutableSet
.<Module> of(new Log4JLoggingModule())); .<Module> of(new Log4JLoggingModule()));
this.connection = context.getApi(); this.connection = context.getApi();
} }

View File

@ -62,8 +62,8 @@
<properties> <properties>
<jclouds.opscodeplatform.org>MYORG</jclouds.opscodeplatform.org> <jclouds.opscodeplatform.org>MYORG</jclouds.opscodeplatform.org>
<jclouds.opscodeplatform.rsa-key>/etc/chef/validation.pem</jclouds.opscodeplatform.rsa-key> <jclouds.opscodeplatform.rsa-key>/etc/chef/validation.pem</jclouds.opscodeplatform.rsa-key>
<jclouds.test.user>${jclouds.opscodeplatform.org}</jclouds.test.user> <jclouds.test.identity>${jclouds.opscodeplatform.org}</jclouds.test.identity>
<jclouds.test.key>${jclouds.opscodeplatform.rsa-key}</jclouds.test.key> <jclouds.test.credential>${jclouds.opscodeplatform.rsa-key}</jclouds.test.credential>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@ -63,8 +63,8 @@ public class OpscodePlatformClientLiveTest {
@BeforeClass(groups = { "live" }) @BeforeClass(groups = { "live" })
public void setupClient() throws IOException { public void setupClient() throws IOException {
orgname = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); orgname = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String keyfile = System.getProperty("jclouds.test.key"); String keyfile = System.getProperty("jclouds.test.credential");
if (keyfile == null || keyfile.equals("")) if (keyfile == null || keyfile.equals(""))
keyfile = "/etc/chef/validation.pem"; keyfile = "/etc/chef/validation.pem";
validatorConnection = createConnection(orgname + "-validator", Files.toString(new File( validatorConnection = createConnection(orgname + "-validator", Files.toString(new File(

View File

@ -31,8 +31,8 @@
<artifactId>jclouds-rackspace</artifactId> <artifactId>jclouds-rackspace</artifactId>
<name>jclouds rackspace components</name> <name>jclouds rackspace components</name>
<properties> <properties>
<jclouds.test.user>${jclouds.rackspace.user}</jclouds.test.user> <jclouds.test.identity>${jclouds.rackspace.user}</jclouds.test.identity>
<jclouds.test.key>${jclouds.rackspace.key}</jclouds.test.key> <jclouds.test.credential>${jclouds.rackspace.key}</jclouds.test.credential>
<jclouds.test.initializer>org.jclouds.rackspace.cloudfiles.blobstore.integration.CloudFilesTestInitializer</jclouds.test.initializer> <jclouds.test.initializer>org.jclouds.rackspace.cloudfiles.blobstore.integration.CloudFilesTestInitializer</jclouds.test.initializer>
</properties> </properties>
<dependencies> <dependencies>

View File

@ -55,10 +55,10 @@ public interface CloudFilesClient {
CFObject newCFObject(); CFObject newCFObject();
/** /**
* HEAD operations against an account are performed to retrieve the number of Containers and the * HEAD operations against an identity are performed to retrieve the number of Containers and the
* total bytes stored in Cloud Files for the account. * total bytes stored in Cloud Files for the identity.
* <p/> * <p/>
* Determine the number of Containers within the account and the total bytes stored. Since the * Determine the number of Containers within the identity and the total bytes stored. Since the
* storage system is designed to store large amounts of data, care should be taken when * storage system is designed to store large amounts of data, care should be taken when
* representing the total bytes response as an integer; when possible, convert it to a 64-bit * representing the total bytes response as an integer; when possible, convert it to a 64-bit
* unsigned integer if your platform supports that primitive flavor. * unsigned integer if your platform supports that primitive flavor.
@ -66,7 +66,7 @@ public interface CloudFilesClient {
AccountMetadata getAccountStatistics(); AccountMetadata getAccountStatistics();
/** /**
* GET operations against the X-Storage-Url for an account are performed to retrieve a list of * GET operations against the X-Storage-Url for an identity are performed to retrieve a list of
* existing storage * existing storage
* <p/> * <p/>
* Containers ordered by name. The following list describes the optional query parameters that * Containers ordered by name. The following list describes the optional query parameters that

View File

@ -36,7 +36,7 @@ public class ListCdnContainerOptions extends BaseHttpRequestOptions {
} }
/** /**
* Indicates where to begin listing the account's containers. The list will only include * Indicates where to begin listing the identity's containers. The list will only include
* containers whose names occur lexicographically after the marker. This is convenient for * containers whose names occur lexicographically after the marker. This is convenient for
* pagination: To get the next page of results use the last container name of the current * pagination: To get the next page of results use the last container name of the current
* page as the marker. * page as the marker.

View File

@ -58,7 +58,7 @@ public interface CloudServersClient {
* *
* List all servers (IDs and names only) * List all servers (IDs and names only)
* *
* This operation provides a list of servers associated with your account. Servers that have been * This operation provides a list of servers associated with your identity. Servers that have been
* deleted are not included in this list. * deleted are not included in this list.
* <p/> * <p/>
* in order to retrieve all details, pass the option {@link ListOptions#withDetails() * in order to retrieve all details, pass the option {@link ListOptions#withDetails()

View File

@ -127,8 +127,8 @@ public class CloudServersComputeServiceContextModule extends AbstractModule {
@Provides @Provides
@Named("NAMING_CONVENTION") @Named("NAMING_CONVENTION")
@Singleton @Singleton
String provideNamingConvention(@Named(Constants.PROPERTY_IDENTITY) String account) { String provideNamingConvention(@Named(Constants.PROPERTY_IDENTITY) String identity) {
return account + "-%s-%s"; return identity + "-%s-%s";
} }
@Singleton @Singleton

View File

@ -32,7 +32,7 @@ import javax.ws.rs.HttpMethod;
* Rate limits are applied in order relative to the verb, going from least to most specific. For * Rate limits are applied in order relative to the verb, going from least to most specific. For
* example, although the threshold for POST to /servers is 25 per day, one cannot POST to /servers * example, although the threshold for POST to /servers is 25 per day, one cannot POST to /servers
* more than 10 times within a single minute because the rate limits for any POST is 10/min. In the * more than 10 times within a single minute because the rate limits for any POST is 10/min. In the
* event you exceed the thresholds established for your account, a 413 Rate Control HTTP response * event you exceed the thresholds established for your identity, a 413 Rate Control HTTP response
* will be returned with a Reply-After header to notify the client when theyagain. * will be returned with a Reply-After header to notify the client when theyagain.
* *
* @author Adrian Cole * @author Adrian Cole

View File

@ -77,8 +77,8 @@ public class RackspaceAuthenticationLiveTest {
@BeforeClass @BeforeClass
void setupFactory() { void setupFactory() {
identity = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
credential = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
ContextSpec<RackspaceAuthClient, RackspaceAuthAsyncClient> contextSpec = contextSpec("test", ContextSpec<RackspaceAuthClient, RackspaceAuthAsyncClient> contextSpec = contextSpec("test",
"https://api.mosso.com", "1", null, null, RackspaceAuthClient.class, "https://api.mosso.com", "1", null, null, RackspaceAuthClient.class,

View File

@ -37,8 +37,8 @@ public class CloudFilesTestInitializer extends TransientBlobStoreTestInitializer
@Override @Override
protected BlobStoreContext createLiveContext(Module configurationModule, String url, String app, protected BlobStoreContext createLiveContext(Module configurationModule, String url, String app,
String account, String key) throws IOException { String identity, String key) throws IOException {
return (BlobStoreContext) new BlobStoreContextFactory().createContext("cloudfiles", account, return (BlobStoreContext) new BlobStoreContextFactory().createContext("cloudfiles", identity,
key, ImmutableSet.of(configurationModule, new Log4JLoggingModule()), key, ImmutableSet.of(configurationModule, new Log4JLoggingModule()),
new Properties()); new Properties());
} }

View File

@ -83,11 +83,11 @@ public class CloudServersClientLiveTest {
@BeforeGroups(groups = { "live" }) @BeforeGroups(groups = { "live" })
public void setupClient() { public void setupClient() {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user"); String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key"); String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
Injector injector = new RestContextFactory().createContextBuilder("cloudservers", user, Injector injector = new RestContextFactory().createContextBuilder("cloudservers", identity,
password, credential,
ImmutableSet.<Module> of(new Log4JLoggingModule(), new JschSshClientModule()), ImmutableSet.<Module> of(new Log4JLoggingModule(), new JschSshClientModule()),
new Properties()).buildInjector(); new Properties()).buildInjector();

View File

@ -69,7 +69,7 @@ public class CloudServersComputeServiceLiveTest extends BaseComputeServiceLiveTe
public void testAssignability() throws Exception { public void testAssignability() throws Exception {
@SuppressWarnings("unused") @SuppressWarnings("unused")
RestContext<CloudServersClient, CloudServersAsyncClient> tmContext = new ComputeServiceContextFactory() RestContext<CloudServersClient, CloudServersAsyncClient> tmContext = new ComputeServiceContextFactory()
.createContext(service, user, password).getProviderSpecificContext(); .createContext(service, identity, credential).getProviderSpecificContext();
} }
@Override @Override

View File

@ -39,8 +39,8 @@
<url>http://jclouds.googlecode.com/svn/trunk/rimuhosting</url> <url>http://jclouds.googlecode.com/svn/trunk/rimuhosting</url>
</scm> </scm>
<properties> <properties>
<jclouds.test.user>${jclouds.rimuhosting.apikey}</jclouds.test.user> <jclouds.test.identity>${jclouds.rimuhosting.apikey}</jclouds.test.identity>
<jclouds.test.key>${jclouds.rimuhosting.apikey}</jclouds.test.key> <jclouds.test.credential>${jclouds.rimuhosting.apikey}</jclouds.test.credential>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@ -45,7 +45,7 @@ public interface RimuHostingClient {
SortedSet<Image> getImageList(); SortedSet<Image> getImageList();
/** /**
* Returns a list of servers that belong to this account. * Returns a list of servers that belong to this identity.
* *
* @return An empty set if there are no servers. * @return An empty set if there are no servers.
* @see Server * @see Server

Some files were not shown because too many files have changed in this diff Show More