Update API end point for elastichosts

This commit is contained in:
vijaykiran 2012-07-25 20:44:15 +02:00
parent 899034097e
commit d2d70fd2bf
13 changed files with 36 additions and 36 deletions

View File

@ -48,7 +48,7 @@
</repositories>
<properties>
<test.elasticstack.endpoint>https://api.lon-p.elastichosts.com</test.elasticstack.endpoint>
<test.elasticstack.endpoint>https://api-lon-p.elastichosts.com</test.elasticstack.endpoint>
<test.elasticstack.api-version>1.0</test.elasticstack.api-version>
<test.elasticstack.build-version></test.elasticstack.build-version>
<test.elasticstack.identity>FIXME</test.elasticstack.identity>

View File

@ -83,7 +83,7 @@ public class ElasticStackApiMetadata extends BaseRestApiMetadata {
.credentialName("Secret API key")
.documentation(URI.create("http://www.elasticstack.com/cloud-platform/api"))
.version("1.0")
.defaultEndpoint("https://api.lon-p.elastichosts.com")
.defaultEndpoint("https://api-lon-p.elastichosts.com")
.defaultProperties(ElasticStackApiMetadata.defaultProperties())
.view(TypeToken.of(ComputeServiceContext.class))
.defaultModules(ImmutableSet.<Class<? extends Module>>of(ElasticStackRestClientModule.class, ElasticStackComputeServiceContextModule.class));

View File

@ -66,7 +66,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
Method method = ElasticStackAsyncClient.class.getMethod("listServers");
HttpRequest httpRequest = processor.createRequest(method);
assertRequestLineEquals(httpRequest, "GET https://api.lon-p.elastichosts.com/servers/list HTTP/1.1");
assertRequestLineEquals(httpRequest, "GET https://api-lon-p.elastichosts.com/servers/list HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\n");
assertPayloadEquals(httpRequest, null, null, false);
@ -74,7 +74,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
httpRequest = Iterables.getOnlyElement(httpRequest.getFilters()).filter(httpRequest);
httpRequest = Iterables.getOnlyElement(httpRequest.getFilters()).filter(httpRequest);
assertRequestLineEquals(httpRequest, "GET https://api.lon-p.elastichosts.com/servers/list HTTP/1.1");
assertRequestLineEquals(httpRequest, "GET https://api-lon-p.elastichosts.com/servers/list HTTP/1.1");
// for example, using basic authentication, we should get "only one"
// header
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\nAuthorization: Basic aWRlbnRpdHk6Y3JlZGVudGlhbA==\n");
@ -93,7 +93,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
Method method = ElasticStackAsyncClient.class.getMethod("listServerInfo");
HttpRequest httpRequest = processor.createRequest(method);
assertRequestLineEquals(httpRequest, "GET https://api.lon-p.elastichosts.com/servers/info HTTP/1.1");
assertRequestLineEquals(httpRequest, "GET https://api-lon-p.elastichosts.com/servers/info HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\n");
assertPayloadEquals(httpRequest, null, null, false);
@ -108,7 +108,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
Method method = ElasticStackAsyncClient.class.getMethod("getServerInfo", String.class);
HttpRequest httpRequest = processor.createRequest(method, "uuid");
assertRequestLineEquals(httpRequest, "GET https://api.lon-p.elastichosts.com/servers/uuid/info HTTP/1.1");
assertRequestLineEquals(httpRequest, "GET https://api-lon-p.elastichosts.com/servers/uuid/info HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\n");
assertPayloadEquals(httpRequest, null, null, false);
@ -125,7 +125,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
HttpRequest httpRequest = processor.createRequest(method,
BindServerToPlainTextStringTest.SERVER);
assertRequestLineEquals(httpRequest, "POST https://api.lon-p.elastichosts.com/servers/create HTTP/1.1");
assertRequestLineEquals(httpRequest, "POST https://api-lon-p.elastichosts.com/servers/create HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\n");
assertPayloadEquals(httpRequest, BindServerToPlainTextStringTest.CREATED_SERVER, "text/plain", false);
@ -142,7 +142,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
HttpRequest httpRequest = processor.createRequest(method,
BindServerToPlainTextStringTest.SERVER);
assertRequestLineEquals(httpRequest, "POST https://api.lon-p.elastichosts.com/servers/create/stopped HTTP/1.1");
assertRequestLineEquals(httpRequest, "POST https://api-lon-p.elastichosts.com/servers/create/stopped HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\n");
assertPayloadEquals(httpRequest, BindServerToPlainTextStringTest.CREATED_SERVER, "text/plain", false);
@ -159,7 +159,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
HttpRequest httpRequest = processor.createRequest(method, "100",
BindServerToPlainTextStringTest.SERVER);
assertRequestLineEquals(httpRequest, "POST https://api.lon-p.elastichosts.com/servers/100/set HTTP/1.1");
assertRequestLineEquals(httpRequest, "POST https://api-lon-p.elastichosts.com/servers/100/set HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\n");
assertPayloadEquals(httpRequest, BindServerToPlainTextStringTest.CREATED_SERVER, "text/plain", false);
@ -175,7 +175,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
Method method = ElasticStackAsyncClient.class.getMethod("destroyServer", String.class);
HttpRequest httpRequest = processor.createRequest(method, "uuid");
assertRequestLineEquals(httpRequest, "POST https://api.lon-p.elastichosts.com/servers/uuid/destroy HTTP/1.1");
assertRequestLineEquals(httpRequest, "POST https://api-lon-p.elastichosts.com/servers/uuid/destroy HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\n");
assertPayloadEquals(httpRequest, null, null, false);
@ -191,7 +191,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
Method method = ElasticStackAsyncClient.class.getMethod("startServer", String.class);
HttpRequest httpRequest = processor.createRequest(method, "uuid");
assertRequestLineEquals(httpRequest, "POST https://api.lon-p.elastichosts.com/servers/uuid/start HTTP/1.1");
assertRequestLineEquals(httpRequest, "POST https://api-lon-p.elastichosts.com/servers/uuid/start HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\n");
assertPayloadEquals(httpRequest, null, null, false);
@ -207,7 +207,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
Method method = ElasticStackAsyncClient.class.getMethod("stopServer", String.class);
HttpRequest httpRequest = processor.createRequest(method, "uuid");
assertRequestLineEquals(httpRequest, "POST https://api.lon-p.elastichosts.com/servers/uuid/stop HTTP/1.1");
assertRequestLineEquals(httpRequest, "POST https://api-lon-p.elastichosts.com/servers/uuid/stop HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\n");
assertPayloadEquals(httpRequest, null, null, false);
@ -223,7 +223,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
Method method = ElasticStackAsyncClient.class.getMethod("shutdownServer", String.class);
HttpRequest httpRequest = processor.createRequest(method, "uuid");
assertRequestLineEquals(httpRequest, "POST https://api.lon-p.elastichosts.com/servers/uuid/shutdown HTTP/1.1");
assertRequestLineEquals(httpRequest, "POST https://api-lon-p.elastichosts.com/servers/uuid/shutdown HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\n");
assertPayloadEquals(httpRequest, null, null, false);
@ -239,7 +239,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
Method method = ElasticStackAsyncClient.class.getMethod("resetServer", String.class);
HttpRequest httpRequest = processor.createRequest(method, "uuid");
assertRequestLineEquals(httpRequest, "POST https://api.lon-p.elastichosts.com/servers/uuid/reset HTTP/1.1");
assertRequestLineEquals(httpRequest, "POST https://api-lon-p.elastichosts.com/servers/uuid/reset HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\n");
assertPayloadEquals(httpRequest, null, null, false);
@ -255,7 +255,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
Method method = ElasticStackAsyncClient.class.getMethod("listDrives");
HttpRequest httpRequest = processor.createRequest(method);
assertRequestLineEquals(httpRequest, "GET https://api.lon-p.elastichosts.com/drives/list HTTP/1.1");
assertRequestLineEquals(httpRequest, "GET https://api-lon-p.elastichosts.com/drives/list HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\n");
assertPayloadEquals(httpRequest, null, null, false);
@ -263,7 +263,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
httpRequest = Iterables.getOnlyElement(httpRequest.getFilters()).filter(httpRequest);
httpRequest = Iterables.getOnlyElement(httpRequest.getFilters()).filter(httpRequest);
assertRequestLineEquals(httpRequest, "GET https://api.lon-p.elastichosts.com/drives/list HTTP/1.1");
assertRequestLineEquals(httpRequest, "GET https://api-lon-p.elastichosts.com/drives/list HTTP/1.1");
// for example, using basic authentication, we should get "only one"
// header
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\nAuthorization: Basic aWRlbnRpdHk6Y3JlZGVudGlhbA==\n");
@ -282,7 +282,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
Method method = ElasticStackAsyncClient.class.getMethod("listDriveInfo");
HttpRequest httpRequest = processor.createRequest(method);
assertRequestLineEquals(httpRequest, "GET https://api.lon-p.elastichosts.com/drives/info HTTP/1.1");
assertRequestLineEquals(httpRequest, "GET https://api-lon-p.elastichosts.com/drives/info HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\n");
assertPayloadEquals(httpRequest, null, null, false);
@ -297,7 +297,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
Method method = ElasticStackAsyncClient.class.getMethod("getDriveInfo", String.class);
HttpRequest httpRequest = processor.createRequest(method, "uuid");
assertRequestLineEquals(httpRequest, "GET https://api.lon-p.elastichosts.com/drives/uuid/info HTTP/1.1");
assertRequestLineEquals(httpRequest, "GET https://api-lon-p.elastichosts.com/drives/uuid/info HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\n");
assertPayloadEquals(httpRequest, null, null, false);
@ -314,7 +314,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
HttpRequest httpRequest = processor.createRequest(method,
new CreateDriveRequest.Builder().name("foo").size(10000l).build());
assertRequestLineEquals(httpRequest, "POST https://api.lon-p.elastichosts.com/drives/create HTTP/1.1");
assertRequestLineEquals(httpRequest, "POST https://api-lon-p.elastichosts.com/drives/create HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\n");
assertPayloadEquals(httpRequest, "name foo\nsize 10000", "text/plain", false);
@ -331,7 +331,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
HttpRequest httpRequest = processor.createRequest(method, "100",
new DriveData.Builder().name("foo").size(10000l).tags(ImmutableList.of("production", "candy")).build());
assertRequestLineEquals(httpRequest, "POST https://api.lon-p.elastichosts.com/drives/100/set HTTP/1.1");
assertRequestLineEquals(httpRequest, "POST https://api-lon-p.elastichosts.com/drives/100/set HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\n");
assertPayloadEquals(httpRequest, "name foo\nsize 10000\ntags production candy", "text/plain", false);
@ -347,7 +347,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
Method method = ElasticStackAsyncClient.class.getMethod("destroyDrive", String.class);
HttpRequest httpRequest = processor.createRequest(method, "uuid");
assertRequestLineEquals(httpRequest, "POST https://api.lon-p.elastichosts.com/drives/uuid/destroy HTTP/1.1");
assertRequestLineEquals(httpRequest, "POST https://api-lon-p.elastichosts.com/drives/uuid/destroy HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\n");
assertPayloadEquals(httpRequest, null, null, false);
@ -363,7 +363,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
Method method = ElasticStackAsyncClient.class.getMethod("imageDrive", String.class, String.class);
HttpRequest httpRequest = processor.createRequest(method, "100", "200");
assertRequestLineEquals(httpRequest, "POST https://api.lon-p.elastichosts.com/drives/200/image/100 HTTP/1.1");
assertRequestLineEquals(httpRequest, "POST https://api-lon-p.elastichosts.com/drives/200/image/100 HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\n");
assertPayloadEquals(httpRequest, null, null, false);
@ -381,7 +381,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
HttpRequest httpRequest = processor.createRequest(method, "100", "200",
ImageConversionType.GUNZIP);
assertRequestLineEquals(httpRequest, "POST https://api.lon-p.elastichosts.com/drives/200/image/100/gunzip HTTP/1.1");
assertRequestLineEquals(httpRequest, "POST https://api-lon-p.elastichosts.com/drives/200/image/100/gunzip HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\n");
assertPayloadEquals(httpRequest, null, null, false);
@ -397,7 +397,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
Method method = ElasticStackAsyncClient.class.getMethod("readDrive", String.class, long.class, long.class);
HttpRequest httpRequest = processor.createRequest(method, "100", 1024, 2048);
assertRequestLineEquals(httpRequest, "POST https://api.lon-p.elastichosts.com/drives/100/read/1024/2048 HTTP/1.1");
assertRequestLineEquals(httpRequest, "POST https://api-lon-p.elastichosts.com/drives/100/read/1024/2048 HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/octet-stream\n");
assertPayloadEquals(httpRequest, null, null, false);
@ -413,7 +413,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
HttpRequest httpRequest = processor.createRequest(method, "100",
Payloads.newStringPayload("foo"));
assertRequestLineEquals(httpRequest, "POST https://api.lon-p.elastichosts.com/drives/100/write HTTP/1.1");
assertRequestLineEquals(httpRequest, "POST https://api-lon-p.elastichosts.com/drives/100/write HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\n");
assertPayloadEquals(httpRequest, "foo", MediaType.APPLICATION_OCTET_STREAM, false);
@ -429,7 +429,7 @@ public class ElasticStackAsyncClientTest extends BaseAsyncClientTest<ElasticStac
HttpRequest httpRequest = processor.createRequest(method, "100",
Payloads.newStringPayload("foo"), 2048);
assertRequestLineEquals(httpRequest, "POST https://api.lon-p.elastichosts.com/drives/100/write/2048 HTTP/1.1");
assertRequestLineEquals(httpRequest, "POST https://api-lon-p.elastichosts.com/drives/100/write/2048 HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: text/plain\n");
assertPayloadEquals(httpRequest, "foo", MediaType.APPLICATION_OCTET_STREAM, false);

View File

@ -34,7 +34,7 @@
<packaging>bundle</packaging>
<properties>
<test.elastichosts-lax-p.endpoint>https://api.lax-p.elastichosts.com</test.elastichosts-lax-p.endpoint>
<test.elastichosts-lax-p.endpoint>https://api-lax-p.elastichosts.com</test.elastichosts-lax-p.endpoint>
<test.elastichosts-lax-p.api-version>2.0</test.elastichosts-lax-p.api-version>
<test.elastichosts-lax-p.build-version></test.elastichosts-lax-p.build-version>
<test.elastichosts-lax-p.identity>FIXME_IDENTITY</test.elastichosts-lax-p.identity>

View File

@ -69,7 +69,7 @@ public class ElasticHostsPeer1LosAngelesProviderMetadata extends BaseProviderMet
.homepage(URI.create("https://lax-p.elastichosts.com"))
.console(URI.create("https://lax-p.elastichosts.com/accounts"))
.iso3166Codes("US-CA")
.endpoint("https://api.lax-p.elastichosts.com")
.endpoint("https://api-lax-p.elastichosts.com")
.defaultProperties(ElasticHostsPeer1LosAngelesProviderMetadata.defaultProperties());
}

View File

@ -34,7 +34,7 @@
<packaging>bundle</packaging>
<properties>
<test.elastichosts-lon-b.endpoint>https://api.lon-b.elastichosts.com</test.elastichosts-lon-b.endpoint>
<test.elastichosts-lon-b.endpoint>https://api-lon-b.elastichosts.com</test.elastichosts-lon-b.endpoint>
<test.elastichosts-lon-b.api-version>2.0</test.elastichosts-lon-b.api-version>
<test.elastichosts-lon-b.build-version></test.elastichosts-lon-b.build-version>
<test.elastichosts-lon-b.identity>FIXME_IDENTITY</test.elastichosts-lon-b.identity>

View File

@ -68,7 +68,7 @@ public class ElasticHostsBlueSquareLondonProviderMetadata extends BaseProviderMe
.homepage(URI.create("https://lon-b.elastichosts.com"))
.console(URI.create("https://lon-b.elastichosts.com/accounts"))
.iso3166Codes("GB-LND")
.endpoint("https://api.lon-b.elastichosts.com")
.endpoint("https://api-lon-b.elastichosts.com")
.defaultProperties(ElasticHostsBlueSquareLondonProviderMetadata.defaultProperties());
}

View File

@ -34,7 +34,7 @@
<packaging>bundle</packaging>
<properties>
<test.elastichosts-lon-p.endpoint>https://api.lon-p.elastichosts.com</test.elastichosts-lon-p.endpoint>
<test.elastichosts-lon-p.endpoint>https://api-lon-p.elastichosts.com</test.elastichosts-lon-p.endpoint>
<test.elastichosts-lon-p.api-version>2.0</test.elastichosts-lon-p.api-version>
<test.elastichosts-lon-p.build-version></test.elastichosts-lon-p.build-version>
<test.elastichosts-lon-p.identity>FIXME_IDENTITY</test.elastichosts-lon-p.identity>

View File

@ -68,7 +68,7 @@ public class ElasticHostsPeer1LondonProviderMetadata extends BaseProviderMetadat
.homepage(URI.create("https://lon-p.elastichosts.com"))
.console(URI.create("https://lon-p.elastichosts.com/accounts"))
.iso3166Codes("GB-LND")
.endpoint("https://api.lon-p.elastichosts.com")
.endpoint("https://api-lon-p.elastichosts.com")
.defaultProperties(ElasticHostsPeer1LondonProviderMetadata.defaultProperties());
}

View File

@ -34,7 +34,7 @@
<packaging>bundle</packaging>
<properties>
<test.elastichosts-sat-p.endpoint>https://api.sat-p.elastichosts.com</test.elastichosts-sat-p.endpoint>
<test.elastichosts-sat-p.endpoint>https://api-sat-p.elastichosts.com</test.elastichosts-sat-p.endpoint>
<test.elastichosts-sat-p.api-version>2.0</test.elastichosts-sat-p.api-version>
<test.elastichosts-sat-p.build-version></test.elastichosts-sat-p.build-version>
<test.elastichosts-sat-p.identity>FIXME_IDENTITY</test.elastichosts-sat-p.identity>

View File

@ -66,7 +66,7 @@ public class ElasticHostsPeer1SanAntonioProviderMetadata extends BaseProviderMet
.homepage(URI.create("https://sat-p.elastichosts.com"))
.console(URI.create("https://sat-p.elastichosts.com/accounts"))
.iso3166Codes("US-TX")
.endpoint("https://api.sat-p.elastichosts.com")
.endpoint("https://api-sat-p.elastichosts.com")
.defaultProperties(ElasticHostsPeer1SanAntonioProviderMetadata.defaultProperties());
}

View File

@ -34,7 +34,7 @@
<packaging>bundle</packaging>
<properties>
<test.elastichosts-tor-p.endpoint>https://api.tor-p.elastichosts.com</test.elastichosts-tor-p.endpoint>
<test.elastichosts-tor-p.endpoint>https://api-tor-p.elastichosts.com</test.elastichosts-tor-p.endpoint>
<test.elastichosts-tor-p.api-version>2.0</test.elastichosts-tor-p.api-version>
<test.elastichosts-tor-p.build-version></test.elastichosts-tor-p.build-version>
<test.elastichosts-tor-p.identity>FIXME_IDENTITY</test.elastichosts-tor-p.identity>

View File

@ -66,7 +66,7 @@ public class ElasticHostsPeer1TorontoProviderMetadata extends BaseProviderMetada
.homepage(URI.create("https://tor-p.elastichosts.com"))
.console(URI.create("https://tor-p.elastichosts.com/accounts"))
.iso3166Codes("CA-ON")
.endpoint("https://api.tor-p.elastichosts.com")
.endpoint("https://api-tor-p.elastichosts.com")
.defaultProperties(ElasticHostsPeer1TorontoProviderMetadata.defaultProperties());
}