Issue 293: normalized on provider vocab

This commit is contained in:
Adrian Cole 2010-06-28 12:03:35 -07:00
parent caceae90bd
commit 7e28286dd0
19 changed files with 35 additions and 35 deletions

View File

@ -44,7 +44,7 @@ public class ${providerName}ComputeServiceLiveTest extends BaseComputeServiceLiv
@BeforeClass
@Override
public void setServiceDefaults() {
service = "${lcaseProviderName}";
provider = "${lcaseProviderName}";
}
@Test
@ -64,7 +64,7 @@ public class ${providerName}ComputeServiceLiveTest extends BaseComputeServiceLiv
public void testAssignability() throws Exception {
@SuppressWarnings("unused")
RestContext<${providerName}Client, ${providerName}AsyncClient> tmContext = new ComputeServiceContextFactory()
.createContext(service, user, password).getProviderSpecificContext();
.createContext(provider, user, password).getProviderSpecificContext();
}
}

View File

@ -52,7 +52,7 @@ public class EC2ComputeServiceLiveTest extends BaseComputeServiceLiveTest {
@BeforeClass
@Override
public void setServiceDefaults() {
service = "ec2";
provider = "ec2";
}
@Override

View File

@ -53,7 +53,7 @@ public class EC2LoadBalancerServiceLiveTest extends BaseLoadBalancerServiceLiveT
@BeforeClass
@Override
public void setServiceDefaults() {
service = "ec2";
provider = "ec2";
}
@Override

View File

@ -30,7 +30,7 @@ public class EucalyptusComputeServiceLiveTest extends EC2ComputeServiceLiveTest
@BeforeClass
@Override
public void setServiceDefaults() {
service = "eucalyptus";
provider = "eucalyptus";
// security groups must be <30 characters
tag = "euc";
}

View File

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

View File

@ -305,7 +305,7 @@ public class BaseBlobStoreIntegrationTest {
/**
* requestor will create a container using the name returned from this. This method will take
* care not to exceed the maximum containers permitted by a service by deleting an existing
* care not to exceed the maximum containers permitted by a provider by deleting an existing
* container first.
*
* @throws InterruptedException

View File

@ -85,7 +85,7 @@ public abstract class BaseComputeServiceLiveTest {
@BeforeClass
abstract public void setServiceDefaults();
protected String service;
protected String provider;
protected SshClient.Factory sshFactory;
protected String tag;
@ -102,7 +102,7 @@ public abstract class BaseComputeServiceLiveTest {
public void setupClient() throws InterruptedException, ExecutionException,
TimeoutException, IOException {
if (tag == null)
tag = checkNotNull(service, "service");
tag = checkNotNull(provider, "provider");
setupCredentials();
setupKeyPair();
initializeContextAndClient();
@ -147,7 +147,7 @@ public abstract class BaseComputeServiceLiveTest {
if (context != null)
context.close();
context = new ComputeServiceContextFactory()
.createContext(service, identity, credential, ImmutableSet.of(
.createContext(provider, identity, credential, ImmutableSet.of(
new Log4JLoggingModule(), getSshModule()));
client = context.getComputeService();
}
@ -168,7 +168,7 @@ public abstract class BaseComputeServiceLiveTest {
// wait up to 5 seconds for an auth exception
@Test(enabled = true, expectedExceptions = AuthorizationException.class)
public void testCorrectAuthException() throws Exception {
new ComputeServiceContextFactory().createContext(service, "MOMMA", "MIA",
new ComputeServiceContextFactory().createContext(provider, "MOMMA", "MIA",
ImmutableSet.<Module> of(new Log4JLoggingModule())).close();
}

View File

@ -60,7 +60,7 @@ public abstract class BaseLoadBalancerServiceLiveTest {
@BeforeClass
abstract public void setServiceDefaults();
protected String service;
protected String provider;
protected SshClient.Factory sshFactory;
protected String tag;
@ -79,7 +79,7 @@ public abstract class BaseLoadBalancerServiceLiveTest {
public void setupClient() throws InterruptedException, ExecutionException, TimeoutException,
IOException, RunNodesException {
if (tag == null)
tag = checkNotNull(service, "service") + "lb";
tag = checkNotNull(provider, "provider") + "lb";
identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");
@ -99,7 +99,7 @@ public abstract class BaseLoadBalancerServiceLiveTest {
private void initializeContextAndClient() throws IOException {
if (context != null)
context.close();
context = new ComputeServiceContextFactory().createContext(service, identity, credential,
context = new ComputeServiceContextFactory().createContext(provider, identity, credential,
ImmutableSet.of(new Log4JLoggingModule(), getSshModule()));
client = context.getComputeService();
lbClient = context.getLoadBalancerService();

View File

@ -75,7 +75,7 @@ public class StubComputeServiceIntegrationTest extends
@BeforeClass
@Override
public void setServiceDefaults() {
service = "stub";
provider = "stub";
}
@Override
@ -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, identity, credential)
.createContext(provider, identity, credential)
.getProviderSpecificContext();
}

View File

@ -39,7 +39,7 @@ public class GoGridComputeServiceLiveTest extends BaseComputeServiceLiveTest {
@BeforeClass
@Override
public void setServiceDefaults() {
service = "gogrid";
provider = "gogrid";
}
@Test
@ -59,6 +59,6 @@ public class GoGridComputeServiceLiveTest extends BaseComputeServiceLiveTest {
public void testAssignability() throws Exception {
@SuppressWarnings("unused")
RestContext<GoGridClient, GoGridAsyncClient> goGridContext = new ComputeServiceContextFactory()
.createContext(service, identity, credential).getProviderSpecificContext();
.createContext(provider, identity, credential).getProviderSpecificContext();
}
}

View File

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

View File

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

View File

@ -36,7 +36,7 @@ public class RimuHostingComputeServiceLiveTest extends BaseComputeServiceLiveTes
@BeforeClass
@Override
public void setServiceDefaults() {
service = "rimuhosting";
provider = "rimuhosting";
tag = "rimuhosting.jclouds";
}

View File

@ -42,7 +42,7 @@ public class BlueLockVCloudComputeServiceLiveTest extends VCloudComputeServiceLi
@BeforeClass
@Override
public void setServiceDefaults() {
service = "bluelock";
provider = "bluelock";
}
@Test

View File

@ -57,7 +57,7 @@ import com.google.inject.internal.ImmutableMap;
*/
@Test(groups = "live", enabled = true, sequential = true, testName = "vcloud.VCloudClientLiveTest")
public class VCloudComputeClientLiveTest {
protected String service;
protected String provider;
protected VCloudComputeClient computeClient;
protected VCloudClient client;
@ -157,7 +157,7 @@ public class VCloudComputeClientLiveTest {
}));
expectationMap = ImmutableMap.<OsFamily, Expectation> builder().put(OsFamily.CENTOS,
new Expectation(4194304 / 2 * 10, "Red Hat Enterprise Linux 5 (64-bit)")).build();
service = "vcloudtest";
provider = "vcloudtest";
templateId = "3";
}

View File

@ -28,7 +28,7 @@ public class VCloudComputeServiceLiveTest extends BaseComputeServiceLiveTest {
public void setServiceDefaults() {
System.setProperty("vcloud.endpoint", checkNotNull(System
.getProperty("jclouds.test.endpoint"), "jclouds.test.endpoint"));
service = "vcloud";
provider = "vcloud";
}
@Override
@ -39,7 +39,7 @@ public class VCloudComputeServiceLiveTest extends BaseComputeServiceLiveTest {
public void testAssignability() throws Exception {
@SuppressWarnings("unused")
RestContext<VCloudClient, VCloudAsyncClient> tmContext = new ComputeServiceContextFactory()
.createContext(service, identity, credential)
.createContext(provider, identity, credential)
.getProviderSpecificContext();
}

View File

@ -61,7 +61,7 @@ public class HostingDotComVCloudComputeClientLiveTest extends VCloudComputeClien
}));
expectationMap = ImmutableMap.<OsFamily, Expectation> builder().put(OsFamily.CENTOS,
new Expectation(4194304 / 2 * 10, "Red Hat Enterprise Linux 5 (64-bit)")).build();
service = "vcloudtest";
provider = "vcloudtest";
templateId = "3";
}

View File

@ -38,7 +38,7 @@ public class HostingDotComVCloudComputeServiceLiveTest extends VCloudComputeServ
@BeforeClass
@Override
public void setServiceDefaults() {
service = "hostingdotcom";
provider = "hostingdotcom";
}
@Test

View File

@ -49,7 +49,7 @@ public class TerremarkVCloudComputeServiceLiveTest extends VCloudComputeServiceL
String endpoint = System.getProperty("jclouds.test.endpoint");
if (endpoint != null && !"".equals(endpoint))
System.setProperty("terremark.endpoint", endpoint);
service = "terremark";
provider = "terremark";
tag = "trmk";
}
@ -65,7 +65,7 @@ public class TerremarkVCloudComputeServiceLiveTest extends VCloudComputeServiceL
public void testAssignability() throws Exception {
@SuppressWarnings("unused")
RestContext<TerremarkVCloudClient, TerremarkVCloudAsyncClient> tmContext = new ComputeServiceContextFactory()
.createContext(service, identity, credential).getProviderSpecificContext();
.createContext(provider, identity, credential).getProviderSpecificContext();
}
@Override