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>
<properties>
<jclouds.test.user>${providerUser}</jclouds.test.user>
<jclouds.test.key>${providerPassword}</jclouds.test.key>
<jclouds.test.identity>${providerUser}</jclouds.test.identity>
<jclouds.test.credential>${providerPassword}</jclouds.test.credential>
<jclouds.test.endpoint>${providerEndpoint}</jclouds.test.endpoint>
</properties>
<dependencies>

View File

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

View File

@ -78,8 +78,8 @@ public class ${providerName}ContextModule extends AbstractModule {
@Provides
@Singleton
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) {
return new RestContextImpl<${providerName}Client, ${providerName}AsyncClient>(closer, asyncApi, syncApi, endPoint, 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, identity);
}
}

View File

@ -46,10 +46,10 @@ public class ${providerName}ClientLiveTest {
@BeforeGroups(groups = { "live" })
public void setupClient() {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key");
String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
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();
}

View File

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

View File

@ -116,10 +116,10 @@ public class AtmosStorageClientLiveTest {
@BeforeGroups(groups = { "live" })
public void setupClient() throws InterruptedException, ExecutionException, TimeoutException,
IOException {
String uid = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user");
String key = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key");
String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
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
.getProviderSpecificContext();
connection = context.getApi();
@ -138,7 +138,7 @@ public class AtmosStorageClientLiveTest {
String privateDirectory;
String publicDirectory;
String account;
String identity;
@Test(timeOut = 5 * 60 * 1000)
public void testCreateDirectory() throws Exception {

View File

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

View File

@ -271,7 +271,7 @@ public class RunningInstanceToNodeMetadata implements Function<RunningInstance,
.describeImagesInRegion(from.getRegion(),
DescribeImagesOptions.Builder.imageIds(from.getImageId())));
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.
*/
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() {
return userId;

View File

@ -79,9 +79,9 @@ public class CreateImageOptions extends BaseEC2RequestOptions {
/**
* @see CreateImageOptions#withDescription(String )
*/
public static CreateImageOptions withDescription(String accountId) {
public static CreateImageOptions withDescription(String identityId) {
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 )
*/
public static CreateSnapshotOptions withDescription(String accountId) {
public static CreateSnapshotOptions withDescription(String identityId) {
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.
*
*/
public DescribeImagesOptions executableBy(String accountId) {
formParameters.put("ExecutableBy", checkNotNull(accountId, "accountId"));
public DescribeImagesOptions executableBy(String identityId) {
formParameters.put("ExecutableBy", checkNotNull(identityId, "identityId"));
return this;
}
@ -87,9 +87,9 @@ public class DescribeImagesOptions extends BaseEC2RequestOptions {
/**
* @see DescribeImagesOptions#executableBy(String )
*/
public static DescribeImagesOptions executableBy(String accountId) {
public static DescribeImagesOptions executableBy(String identityId) {
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.
* @param imageId
* 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.
*
* @see #describeImages

View File

@ -40,7 +40,7 @@ import org.jclouds.concurrent.Timeout;
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 #describeRegions
@ -52,7 +52,7 @@ public interface AvailabilityZoneAndRegionClient {
DescribeAvailabilityZonesOptions... options);
/**
* Describes Regions that are currently available to the account.
* Describes Regions that are currently available to the identity.
*
* @see InstanceClient#runInstances
* @see #describeAvailabilityZones

View File

@ -37,7 +37,7 @@ import org.jclouds.concurrent.Timeout;
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
* 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);
/**
* Releases an elastic IP address associated with your account.
* Releases an elastic IP address associated with your identity.
*
* @param region
* Elastic IP addresses are tied to a Region and cannot be mapped across Regions.
* @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 #describeAddresses
@ -104,7 +104,7 @@ public interface ElasticIPAddressClient {
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.
*
* @param region

View File

@ -38,7 +38,7 @@ import org.jclouds.concurrent.Timeout;
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
* 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.
* Traffic from instances in another Region is seen as WAN bandwidth.
* @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
* group to associate with this group.
*
@ -143,7 +143,7 @@ public interface SecurityGroupClient {
* communicate with instances outside the Region using group-based firewall rules.
* Traffic from instances in another Region is seen as WAN bandwidth.
* @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
* IP protocol.
* @param fromPort
@ -176,7 +176,7 @@ public interface SecurityGroupClient {
* communicate with instances outside the Region using group-based firewall rules.
* Traffic from instances in another Region is seen as WAN bandwidth.
* @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
* group to associate with this group.
*
@ -208,7 +208,7 @@ public interface SecurityGroupClient {
* communicate with instances outside the Region using group-based firewall rules.
* Traffic from instances in another Region is seen as WAN bandwidth.
* @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
* IP protocol.
* @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
* 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
* the Amazon S3 account.
* the Amazon S3 identity.
* <p/>
* 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

View File

@ -95,12 +95,12 @@ public class CloudApplicationArchitecturesEC2ClientLiveTest {
public void setupClient() throws InterruptedException, ExecutionException,
TimeoutException,
IOException {
String user = checkNotNull(System.getProperty("jclouds.test.user"),
"jclouds.test.user");
String password = checkNotNull(System.getProperty("jclouds.test.key"),
"jclouds.test.key");
String identity = checkNotNull(System.getProperty("jclouds.test.identity"),
"jclouds.test.identity");
String credential = checkNotNull(System.getProperty("jclouds.test.credential"),
"jclouds.test.credential");
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);
sshFactory = injector.getInstance(SshClient.Factory.class);
runningTester = new RetryablePredicate<RunningInstance>(
@ -427,7 +427,7 @@ public class CloudApplicationArchitecturesEC2ClientLiveTest {
}
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()
.describeInstancesInRegion(null, instanceId); // last parameter
// (ids) narrows the

View File

@ -120,9 +120,9 @@ public class EBSBootEC2ClientLiveTest {
@BeforeGroups(groups = { "live" })
public void setupClient() throws IOException {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key");
Injector injector = new RestContextFactory().createContextBuilder("ec2", user, password,
String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
Injector injector = new RestContextFactory().createContextBuilder("ec2", identity, credential,
ImmutableSet.<Module> of(new Log4JLoggingModule())).buildInjector();
client = injector.getInstance(EC2Client.class);
sshFactory = injector.getInstance(SshClient.Factory.class);
@ -560,7 +560,7 @@ public class EBSBootEC2ClientLiveTest {
.getId());
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(
instance.getRegion(), instance.getId()); // last
// parameter

View File

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

View File

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

View File

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

View File

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

View File

@ -61,10 +61,10 @@ public class AvailabilityZoneAndRegionClientLiveTest {
@BeforeGroups(groups = { "live" })
public void setupClient() throws IOException {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key");
String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
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()));
client = context.getApi().getAvailabilityZoneAndRegionServices();
}

View File

@ -65,10 +65,10 @@ public class ElasticBlockStoreClientLiveTest {
@BeforeGroups(groups = { "live" })
public void setupClient() throws IOException {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key");
String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
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()));
client = context.getApi().getElasticBlockStoreServices();
}

View File

@ -54,10 +54,10 @@ public class ElasticIPAddressClientLiveTest {
@BeforeGroups(groups = { "live" })
public void setupClient() throws IOException {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key");
String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
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()));
client = context.getApi().getElasticIPAddressServices();
}

View File

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

View File

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

View File

@ -50,10 +50,10 @@ public class MonitoringClientLiveTest {
@BeforeGroups(groups = { "live" })
public void setupClient() throws IOException {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key");
String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
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()));
client = context.getApi().getMonitoringServices();
}

View File

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

View File

@ -53,10 +53,10 @@ public class ELBClientLiveTest {
@BeforeGroups(groups = { "live" })
public void setupClient() throws IOException {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key");
String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
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()));
client = context.getApi();
}

View File

@ -38,9 +38,9 @@ public class S3TestInitializer extends TransientBlobStoreTestInitializer {
@Override
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;
return new BlobStoreContextFactory().createContext("s3", account, key, ImmutableSet.of(
return new BlobStoreContextFactory().createContext("s3", identity, key, ImmutableSet.of(
configurationModule, new Log4JLoggingModule()), new Properties());
}

View File

@ -61,10 +61,10 @@ public class SQSClientLiveTest {
@BeforeGroups(groups = { "live" })
public void setupClient() throws IOException {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key");
String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
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()));
this.client = context.getApi();
}

View File

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

View File

@ -50,12 +50,12 @@ public class GoogleAppEngineLiveTest {
throws Exception {
url = new URL(String.format("http://%s:%s", address, port));
Properties props = new Properties();
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key");
String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
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.writePropertiesAndStartServer(address, port, warfile, props);

View File

@ -87,11 +87,11 @@ public class JCloudsS3ServiceLiveTest extends BaseBlobStoreIntegrationTest {
@BeforeClass(groups = { "live" }, dependsOnMethods = "setUpResourcesOnThisThread")
protected void createLiveS3Context(ITestContext testContext) throws S3ServiceException {
String account = System.getProperty("jclouds.test.user");
String key = System.getProperty("jclouds.test.key");
String identity = System.getProperty("jclouds.test.identity");
String credential = System.getProperty("jclouds.test.credential");
if (account != null) {
credentials = new AWSCredentials(account, key);
if (identity != null) {
credentials = new AWSCredentials(identity, credential);
service = new JCloudsS3Service(credentials);
} else {
assert false : "credentials not present";
@ -200,7 +200,7 @@ public class JCloudsS3ServiceLiveTest extends BaseBlobStoreIntegrationTest {
TimeoutException, S3ServiceException {
String bucketName = getContainerName();
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();
SortedSet<org.jclouds.aws.s3.domain.BucketMetadata> jcBuckets = getApi()

View File

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

View File

@ -50,7 +50,7 @@ public interface AzureBlobClient {
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 />
* 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);
/**
* 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.
* <p/>
* 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
* 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/>
* The container resource includes metadata and properties for that container. It does not
* include a list of the blobs contained by the container.

View File

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

View File

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

View File

@ -38,7 +38,7 @@ import com.google.common.util.concurrent.ListenableFuture;
* Provides access to Azure Queue via their REST API.
* <p/>
* The Queue service stores messages that may be read by any client who has access to the storage
* account.
* identity.
* <p/>
* 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,
@ -59,7 +59,7 @@ import com.google.common.util.concurrent.ListenableFuture;
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 />
* 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);
/**
* 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/>
* You can specify user-defined metadata as name-value pairs on the queue at the time that it is
* created.

View File

@ -33,7 +33,7 @@ import com.google.common.collect.Sets;
/**
* Parses the following XML document:
* <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" />
* @author Adrian Cole

View File

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

View File

@ -37,13 +37,13 @@ public class AzureBlobTestInitializer extends TransientBlobStoreTestInitializer
@Override
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.setProperty(PROPERTY_MAX_CONNECTIONS_PER_CONTEXT, Integer.toString(0));
// properties.setProperty(PROPERTY_MAX_CONNECTIONS_PER_HOST, Integer.toString(0));
// properties.setProperty(PROPERTY_USER_THREADS, Integer.toString(0));
// 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);
}

View File

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

View File

@ -58,7 +58,7 @@ public interface BlobStore {
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();
@ -72,7 +72,7 @@ public interface BlobStore {
* <p/>
*
* 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
* 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

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
* and an account.
* and an identity.
*
* @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
* 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,
/**
* Container namespace is shared within an account and therefore all containers are deletable by
* the account.
* Container namespace is shared within an identity and therefore all containers are deletable by
* the identity.
*/
ACCOUNT
}

View File

@ -38,22 +38,22 @@ import com.google.common.base.Splitter;
public class BlobStoreContextFactoryTest {
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");
Iterator<String> accountKey = Splitter.on(":").split(
Iterator<String> identityKey = Splitter.on(":").split(
checkNotNull(blobStore.getUserInfo(), "userInfo")).iterator();
assertEquals(accountKey.next(), "account");
assertEquals(accountKey.next(), "key");
assertEquals(identityKey.next(), "identity");
assertEquals(identityKey.next(), "key");
assertEquals(blobStore.getHost(), "container");
assertEquals(blobStore.getPath(), "/path");
}
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");
Iterator<String> accountKey = Splitter.on(":").split(
Iterator<String> identityKey = Splitter.on(":").split(
checkNotNull(blobStore.getUserInfo(), "userInfo")).iterator();
assertEquals(accountKey.next(), "account");
assertEquals(identityKey.next(), "identity");
assertEquals(blobStore.getHost(), "container");
assertEquals(blobStore.getPath(), "/path");
}

View File

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

View File

@ -31,18 +31,18 @@ public abstract class BaseTestInitializer {
throws Exception {
String endpoint = System.getProperty("jclouds.test.endpoint");
String app = System.getProperty("jclouds.test.app");
String account = System.getProperty("jclouds.test.user");
String key = System.getProperty("jclouds.test.key");
String identity = System.getProperty("jclouds.test.identity");
String credential = System.getProperty("jclouds.test.credential");
if (endpoint != null)
testContext.setAttribute("jclouds.test.endpoint", endpoint);
if (app != null)
testContext.setAttribute("jclouds.test.app", app);
if (account != null)
testContext.setAttribute("jclouds.test.user", account);
if (key != null)
testContext.setAttribute("jclouds.test.key", key);
if (account != null) {
return createLiveContext(configurationModule, endpoint, app, account, key);
if (identity != null)
testContext.setAttribute("jclouds.test.identity", identity);
if (credential != null)
testContext.setAttribute("jclouds.test.credential", credential);
if (identity != null) {
return createLiveContext(configurationModule, endpoint, app, identity, credential);
} else {
return createStubContext();
}
@ -51,5 +51,5 @@ public abstract class BaseTestInitializer {
protected abstract BlobStoreContext createStubContext() throws IOException;
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>
<properties>
<jclouds.test.user>apiKey</jclouds.test.user>
<jclouds.test.key>authToken</jclouds.test.key>
<jclouds.test.identity>apiKey</jclouds.test.identity>
<jclouds.test.credential>authToken</jclouds.test.credential>
</properties>
<dependencies>
<dependency>

View File

@ -46,11 +46,11 @@ public class BoxDotNetClientLiveTest {
@BeforeGroups(groups = { "live" })
public void setupClient() {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key");
String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
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",
user, password, BoxDotNetClient.class, BoxDotNetAsyncClient.class));
identity, credential, BoxDotNetClient.class, BoxDotNetAsyncClient.class));
connection = context.getApi();
}

View File

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

View File

@ -78,8 +78,8 @@ public class ChefClientLiveTest {
String validatorKey = System.getProperty("jclouds.test.validator.key");
if (validatorKey == null || validatorKey.equals(""))
validatorKey = System.getProperty("user.home") + "/.chef/validation.pem";
user = checkNotNull(System.getProperty("jclouds.test.user"));
String keyfile = System.getProperty("jclouds.test.key");
user = checkNotNull(System.getProperty("jclouds.test.identity"));
String keyfile = System.getProperty("jclouds.test.credential");
if (keyfile == null || keyfile.equals(""))
keyfile = System.getProperty("user.home") + "/.chef/" + user + ".pem";
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 {
ssh.exec("mkdir .ssh");
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));
ExecResponse returnVal = ssh.exec("cat .ssh/id_rsa.pub >> .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 {
ssh.exec("mkdir .ssh");
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));
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));
logger.debug("<< complete(%d)", returnVal.getExitCode());
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
.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(
"./" + scriptName + " tailerr").getOutput());
}
@ -100,24 +100,24 @@ public class RunScriptOnNode implements SshCallable<ExecResponse> {
}
private ExecResponse runScriptAsRoot() {
if (node.getCredentials().account.equals("root")) {
logger.debug(">> running %s as %s@%s", scriptName, node.getCredentials().account,
if (node.getCredentials().identity.equals("root")) {
logger.debug(">> running %s as %s@%s", scriptName, node.getCredentials().identity,
Iterables.get(node.getPublicAddresses(), 0));
return ssh.exec("./" + scriptName + " start");
} 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));
return ssh.exec("sudo ./" + scriptName + " start");
} 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));
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"));
}
}
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));
return ssh.exec(String.format("./%s", scriptName + " start"));
}

View File

@ -412,10 +412,10 @@ public class BaseComputeService implements ComputeService {
// don't override
checkNotNull(node.getCredentials(),
"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 "
+ "specified. Try passing RunScriptOptions with new credentials");
checkNotNull(node.getCredentials().key,
checkNotNull(node.getCredentials().credential,
"Key or password for ssh authentication must be "
+ "specified. Try passing RunScriptOptions with new credentials");
}

View File

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

View File

@ -38,7 +38,7 @@ public interface PopulateDefaultLoginCredentialsForImageStrategy {
* responsibility of an implementation to apply
* the cloud-specific logic.
* @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);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -281,9 +281,9 @@ public class HttpUtils {
if (matcher.find()) {
String scheme = matcher.group(1);
String rest = matcher.group(4);
String account = matcher.group(2);
String identity = matcher.group(2);
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));
} else {
throw new IllegalArgumentException("bad syntax");

View File

@ -29,7 +29,7 @@ import java.lang.annotation.Target;
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
*/

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -59,6 +59,6 @@ public class GoGridComputeServiceLiveTest extends BaseComputeServiceLiveTest {
public void testAssignability() throws Exception {
@SuppressWarnings("unused")
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" })
public void setupClient() {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key");
String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
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()));
client = context.getApi();
@ -360,7 +360,7 @@ public class GoGridLiveTest {
socketOpen.apply(socket);
SshClient sshClient = new JschSshClient(new BackoffLimitedRetryHandler(), socket, 60000,
instanceCredentials.account, instanceCredentials.key, null);
instanceCredentials.identity, instanceCredentials.credential, null);
sshClient.connect();
String output = sshClient.exec("df").getOutput();
assertTrue(output.contains("Filesystem"),

View File

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

View File

@ -82,6 +82,6 @@ public class InstanceToNodeMetadata implements Function<Instance, NodeMetadata>
return new NodeMetadataImpl(from.getId() + "", from.getName(), from.getId() + "", locations
.get(image.getLocation()), null, ImmutableMap.<String, String> of(), tag, image,
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 Key key;
private Volume volume;
private String user;
private String identity;
private Instance instance2;
private Instance instance;
private RestContext<IBMDeveloperCloudClient, IBMDeveloperCloudAsyncClient> context;
@ -94,13 +94,13 @@ public class IBMDeveloperCloudClientLiveTest {
public void setupClient() {
String endpoint = System.getProperty("jclouds.test.endpoint");
user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key");
identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
Properties props = new Properties();
if (endpoint != null)
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);
connection = context.getApi();
@ -376,7 +376,7 @@ public class IBMDeveloperCloudClientLiveTest {
assertEquals(instance.getKeyName(), key.getName());
assertNotNull(instance.getLaunchTime());
assertNotNull(instance.getExpirationTime());
assertEquals(instance.getOwner(), user);
assertEquals(instance.getOwner(), identity);
assertEquals(instance.getProductCodes(), ImmutableSet.<String> of());
assertEquals(instance.getRequestName(), name);
assertNotNull(instance.getRequestId());

View File

@ -72,7 +72,7 @@ public class IBMDeveloperCloudComputeServiceLiveTest extends BaseComputeServiceL
public void testAssignability() throws Exception {
@SuppressWarnings("unused")
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 String user;
private String identity;
Provider<UriBuilder> uriBuilderProvider = new Provider<UriBuilder>() {
@Override
@ -79,14 +79,14 @@ public class PCSClientLiveTest {
@BeforeGroups(groups = { "live" })
public void setupClient() throws InterruptedException, ExecutionException, TimeoutException {
user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key");
identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
String endpoint = checkNotNull(System.getProperty("jclouds.test.endpoint"),
"jclouds.test.endpoint");
Properties props = new Properties();
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);
connection = context.getApi();
@ -163,7 +163,7 @@ public class PCSClientLiveTest {
assertNotNull(response.getMetadata());
assertNotNull(response.getModified());
assertEquals(response.getName(), name);
assertEquals(response.getOwner(), user);
assertEquals(response.getOwner(), identity);
assertEquals(response.getParent(), parent);
assertNotNull(response.getTags());
assertNotNull(response.getType());

View File

@ -53,10 +53,10 @@ public class SDNAuthRestClientModule extends AbstractModule {
@Provides
@Singleton
@Named(SDNConstants.PROPERTY_SDN_APPKEY)
public String credentials1(@Named(Constants.PROPERTY_IDENTITY) String account) {
List<String> parts = Lists.newArrayList(Splitter.on('/').split(account));
public String credentials1(@Named(Constants.PROPERTY_IDENTITY) String identity) {
List<String> parts = Lists.newArrayList(Splitter.on('/').split(identity));
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);
}
@ -64,10 +64,10 @@ public class SDNAuthRestClientModule extends AbstractModule {
@Provides
@Singleton
@Named(SDNConstants.PROPERTY_SDN_APPNAME)
public String credentials2(@Named(Constants.PROPERTY_IDENTITY) String account) {
List<String> parts = Lists.newArrayList(Splitter.on('/').split(account));
public String credentials2(@Named(Constants.PROPERTY_IDENTITY) String identity) {
List<String> parts = Lists.newArrayList(Splitter.on('/').split(identity));
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);
}
@ -75,10 +75,10 @@ public class SDNAuthRestClientModule extends AbstractModule {
@Provides
@Singleton
@Named(SDNConstants.PROPERTY_SDN_USERNAME)
public String credentials3(@Named(Constants.PROPERTY_IDENTITY) String account) {
List<String> parts = Lists.newArrayList(Splitter.on('/').split(account));
public String credentials3(@Named(Constants.PROPERTY_IDENTITY) String identity) {
List<String> parts = Lists.newArrayList(Splitter.on('/').split(identity));
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);
}

View File

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

View File

@ -59,10 +59,10 @@ public class SDNClientLiveTest {
@BeforeGroups(groups = { "live" })
public void setupClient() {
String user = checkNotNull(System.getProperty("jclouds.test.user"), "jclouds.test.user");
String password = checkNotNull(System.getProperty("jclouds.test.key"), "jclouds.test.key");
String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
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()));
this.connection = context.getApi();
}

View File

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

View File

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

View File

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

View File

@ -55,10 +55,10 @@ public interface CloudFilesClient {
CFObject newCFObject();
/**
* HEAD operations against an account are performed to retrieve the number of Containers and the
* total bytes stored in Cloud Files for the account.
* HEAD operations against an identity are performed to retrieve the number of Containers and the
* total bytes stored in Cloud Files for the identity.
* <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
* 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.
@ -66,7 +66,7 @@ public interface CloudFilesClient {
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
* <p/>
* 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
* pagination: To get the next page of results use the last container name of the current
* page as the marker.

View File

@ -58,7 +58,7 @@ public interface CloudServersClient {
*
* 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.
* <p/>
* in order to retrieve all details, pass the option {@link ListOptions#withDetails()

View File

@ -127,8 +127,8 @@ public class CloudServersComputeServiceContextModule extends AbstractModule {
@Provides
@Named("NAMING_CONVENTION")
@Singleton
String provideNamingConvention(@Named(Constants.PROPERTY_IDENTITY) String account) {
return account + "-%s-%s";
String provideNamingConvention(@Named(Constants.PROPERTY_IDENTITY) String identity) {
return identity + "-%s-%s";
}
@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
* 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
* 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.
*
* @author Adrian Cole

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -45,7 +45,7 @@ public interface RimuHostingClient {
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.
* @see Server

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