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 @BeforeClass
@Override @Override
public void setServiceDefaults() { public void setServiceDefaults() {
service = "${lcaseProviderName}"; provider = "${lcaseProviderName}";
} }
@Test @Test
@ -64,7 +64,7 @@ public class ${providerName}ComputeServiceLiveTest extends BaseComputeServiceLiv
public void testAssignability() throws Exception { public void testAssignability() throws Exception {
@SuppressWarnings("unused") @SuppressWarnings("unused")
RestContext<${providerName}Client, ${providerName}AsyncClient> tmContext = new ComputeServiceContextFactory() 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 @BeforeClass
@Override @Override
public void setServiceDefaults() { public void setServiceDefaults() {
service = "ec2"; provider = "ec2";
} }
@Override @Override

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -75,7 +75,7 @@ public class StubComputeServiceIntegrationTest extends
@BeforeClass @BeforeClass
@Override @Override
public void setServiceDefaults() { public void setServiceDefaults() {
service = "stub"; provider = "stub";
} }
@Override @Override
@ -279,7 +279,7 @@ public class StubComputeServiceIntegrationTest extends
public void testAssignability() throws Exception { public void testAssignability() throws Exception {
@SuppressWarnings("unused") @SuppressWarnings("unused")
RestContext<ConcurrentMap<Integer, StubNodeMetadata>, ConcurrentMap<Integer, StubNodeMetadata>> stubContext = new ComputeServiceContextFactory() RestContext<ConcurrentMap<Integer, StubNodeMetadata>, ConcurrentMap<Integer, StubNodeMetadata>> stubContext = new ComputeServiceContextFactory()
.createContext(service, identity, credential) .createContext(provider, identity, credential)
.getProviderSpecificContext(); .getProviderSpecificContext();
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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