Issue 919: ensure filters work on multi-zone openstack-nova

This commit is contained in:
Adrian Cole 2012-05-09 18:22:34 -07:00
parent 9701d80bbb
commit f0a8870b80
27 changed files with 195 additions and 165 deletions

View File

@ -55,7 +55,7 @@ public class PasswordAuthenticationExpectTest extends BaseNovaClientExpectTest {
HttpRequest listServers = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/servers"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();

View File

@ -58,7 +58,7 @@ public class NovaComputeServiceAdapterExpectTest extends BaseNovaComputeServiceC
HttpRequest createServer = HttpRequest
.builder()
.method("POST")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/servers"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build())
@ -72,7 +72,7 @@ public class NovaComputeServiceAdapterExpectTest extends BaseNovaComputeServiceC
HttpRequest serverDetail = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/servers/71752"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/71752"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -111,7 +111,7 @@ public class NovaComputeServiceAdapterExpectTest extends BaseNovaComputeServiceC
HttpRequest createServer = HttpRequest
.builder()
.method("POST")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/servers"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build())
@ -126,7 +126,7 @@ public class NovaComputeServiceAdapterExpectTest extends BaseNovaComputeServiceC
HttpRequest serverDetail = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/servers/71752"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/71752"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();

View File

@ -125,7 +125,7 @@ public class NovaComputeServiceExpectTest extends BaseNovaComputeServiceExpectTe
HttpRequest listServers = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/servers/detail"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/detail"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();

View File

@ -58,7 +58,7 @@ public class AllocateAndAddFloatingIpToNodeExpectTest extends BaseNovaComputeSer
.credentials(LoginCredentials.builder().password("foo").build()).build();
HttpRequest allocateFloatingIP = HttpRequest.builder().method("POST").endpoint(
URI.create("https://compute.north.host/v1.1/3456/os-floating-ips")).headers(
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-floating-ips")).headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json").put("X-Auth-Token",
authToken).build()).payload(payloadFromStringWithContentType("{}", "application/json")).build();
@ -88,7 +88,7 @@ public class AllocateAndAddFloatingIpToNodeExpectTest extends BaseNovaComputeSer
private HttpRequest addFloatingIPForAddress(String address) {
HttpRequest addFloatingIPRequest = HttpRequest.builder().method("POST").endpoint(
URI.create("https://compute.north.host/v1.1/3456/servers/71592/action"))
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/71592/action"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "*/*")
.put("X-Auth-Token", authToken).build()).payload(
@ -107,7 +107,7 @@ public class AllocateAndAddFloatingIpToNodeExpectTest extends BaseNovaComputeSer
"application/json")).build();
HttpRequest listFloatingIPs = HttpRequest.builder().method("GET").endpoint(
URI.create("https://compute.north.host/v1.1/3456/os-floating-ips")).headers(
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-floating-ips")).headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json").put("X-Auth-Token",
authToken).build()).build();

View File

@ -46,7 +46,7 @@ import com.google.common.collect.ImmutableMultimap;
public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
public void testSuspend() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -58,7 +58,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
}
public void testSuspendFailsNotFound() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -71,7 +71,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
@Test(expectedExceptions = AuthorizationException.class)
public void testSuspendFailsNotAuthorized() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -83,7 +83,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
}
public void testResume() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -95,7 +95,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
}
public void testResumeFailsNotFound() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -108,7 +108,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
@Test(expectedExceptions = AuthorizationException.class)
public void testResumeFailsNotAuthorized() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -120,7 +120,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
}
public void testLock() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -132,7 +132,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
}
public void testLockFailsNotFound() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -144,7 +144,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
}
public void testUnlock() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -156,7 +156,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
}
public void testUnlockFailsNotFound() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -168,7 +168,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
}
public void testPause() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -180,7 +180,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
}
public void testPauseFailsNotFound() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -192,7 +192,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
}
public void testUnpause() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -204,7 +204,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
}
public void testUnpauseFailsNotFound() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -216,7 +216,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
}
public void testMigrateServer() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -229,7 +229,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
public void testMigrateServerFailsNotFound() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -241,7 +241,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
}
public void testResetNetworkOfServer() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -253,7 +253,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
}
public void testResetNetworkOfServerFailsNotFound() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -265,7 +265,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
}
public void testInjectNetworkInfoIntoServer() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -277,7 +277,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
}
public void testInjectNetworkInfoIntoServerFailsNotFound() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -289,7 +289,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
}
public void testBackupServer() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -304,7 +304,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
@Test(expectedExceptions = ResourceNotFoundException.class)
public void testBackupServerFailNotFound() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -317,7 +317,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
}
public void testLiveMigrateServer() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -330,7 +330,7 @@ public class AdminActionsClientExpectTest extends BaseNovaClientExpectTest {
}
public void testLiveMigrateServerFailsNotFound() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/action");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/action");
AdminActionsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,

View File

@ -70,7 +70,7 @@ public class FloatingIPAsyncClientExpectTest extends BaseNovaAsyncClientExpectTe
HttpRequest listFloatingIPs = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/os-floating-ips"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-floating-ips"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -91,7 +91,7 @@ public class FloatingIPAsyncClientExpectTest extends BaseNovaAsyncClientExpectTe
HttpRequest listFloatingIPs = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/os-floating-ips"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-floating-ips"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -109,7 +109,7 @@ public class FloatingIPAsyncClientExpectTest extends BaseNovaAsyncClientExpectTe
HttpRequest getFloatingIP = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/os-floating-ips/1"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-floating-ips/1"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -128,7 +128,7 @@ public class FloatingIPAsyncClientExpectTest extends BaseNovaAsyncClientExpectTe
HttpRequest getFloatingIP = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/os-floating-ips/1"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-floating-ips/1"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -145,7 +145,7 @@ public class FloatingIPAsyncClientExpectTest extends BaseNovaAsyncClientExpectTe
HttpRequest allocateFloatingIP = HttpRequest
.builder()
.method("POST")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/os-floating-ips"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-floating-ips"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build())
@ -167,7 +167,7 @@ public class FloatingIPAsyncClientExpectTest extends BaseNovaAsyncClientExpectTe
HttpRequest allocateFloatingIP = HttpRequest
.builder()
.method("POST")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/os-floating-ips"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-floating-ips"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build())

View File

@ -69,7 +69,7 @@ public class FloatingIPClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest listFloatingIPs = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/os-floating-ips"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-floating-ips"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -90,7 +90,7 @@ public class FloatingIPClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest listFloatingIPs = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/os-floating-ips"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-floating-ips"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -107,7 +107,7 @@ public class FloatingIPClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest getFloatingIP = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/os-floating-ips/1"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-floating-ips/1"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -126,7 +126,7 @@ public class FloatingIPClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest getFloatingIP = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/os-floating-ips/1"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-floating-ips/1"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -143,7 +143,7 @@ public class FloatingIPClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest allocateFloatingIP = HttpRequest
.builder()
.method("POST")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/os-floating-ips"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-floating-ips"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build())
@ -165,7 +165,7 @@ public class FloatingIPClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest allocateFloatingIP = HttpRequest
.builder()
.method("POST")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/os-floating-ips"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-floating-ips"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build())

View File

@ -46,7 +46,7 @@ public class HostAdministrationClientExpectTest extends BaseNovaClientExpectTest
public void testList() throws Exception {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-hosts");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-hosts");
HostAdministrationClient client = requestsSendResponses(keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
HttpRequest.builder().method("GET").headers(ImmutableMultimap.of("Accept", MediaType.APPLICATION_JSON, "X-Auth-Token", authToken))
@ -64,7 +64,7 @@ public class HostAdministrationClientExpectTest extends BaseNovaClientExpectTest
}
public void testGet() throws Exception {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-hosts/xyz");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-hosts/xyz");
HostAdministrationClient client = requestsSendResponses(keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
HttpRequest.builder().method("GET").headers(ImmutableMultimap.of("Accept", MediaType.APPLICATION_JSON, "X-Auth-Token", authToken))

View File

@ -46,7 +46,7 @@ public class KeyPairClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest listKeyPairs = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/os-keypairs"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-keypairs"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -67,7 +67,7 @@ public class KeyPairClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest listKeyPairs = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/os-keypairs"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-keypairs"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -85,7 +85,7 @@ public class KeyPairClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest createKeyPair = HttpRequest
.builder()
.method("POST")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/os-keypairs"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-keypairs"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build())
@ -107,7 +107,7 @@ public class KeyPairClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest createKeyPair = HttpRequest
.builder()
.method("POST")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/os-keypairs"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-keypairs"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build())
@ -136,7 +136,7 @@ public class KeyPairClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest deleteKeyPair = HttpRequest
.builder()
.method("DELETE")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/os-keypairs/testkeypair"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-keypairs/testkeypair"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "*/*").put("X-Auth-Token", authToken)
.build()).build();

View File

@ -48,7 +48,7 @@ import com.google.common.collect.ImmutableSet;
public class SecurityGroupClientExpectTest extends BaseNovaClientExpectTest {
public void testListSecurityGroupsWhenResponseIs2xx() throws Exception {
HttpRequest listSecurityGroups = HttpRequest.builder().method("GET").endpoint(
URI.create("https://compute.north.host/v1.1/3456/os-security-groups")).headers(
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-security-groups")).headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json").put("X-Auth-Token",
authToken).build()).build();
@ -67,7 +67,7 @@ public class SecurityGroupClientExpectTest extends BaseNovaClientExpectTest {
public void testListSecurityGroupsWhenReponseIs404IsEmpty() throws Exception {
HttpRequest listListSecurityGroups = HttpRequest.builder().method("GET").endpoint(
URI.create("https://compute.north.host/v1.1/3456/os-security-groups")).headers(
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-security-groups")).headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json").put("X-Auth-Token",
authToken).build()).build();
@ -84,7 +84,7 @@ public class SecurityGroupClientExpectTest extends BaseNovaClientExpectTest {
public void testGetSecurityGroupWhenResponseIs2xx() throws Exception {
HttpRequest getSecurityGroup = HttpRequest.builder().method("GET").endpoint(
URI.create("https://compute.north.host/v1.1/3456/os-security-groups/0")).headers(
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-security-groups/0")).headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json").put("X-Auth-Token",
authToken).build()).build();
@ -101,7 +101,7 @@ public class SecurityGroupClientExpectTest extends BaseNovaClientExpectTest {
public void testGetSecurityGroupWhenResponseIs404() throws Exception {
HttpRequest getSecurityGroup = HttpRequest.builder().method("GET").endpoint(
URI.create("https://compute.north.host/v1.1/3456/os-security-groups/0")).headers(
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-security-groups/0")).headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json").put("X-Auth-Token",
authToken).build()).build();
@ -118,7 +118,7 @@ public class SecurityGroupClientExpectTest extends BaseNovaClientExpectTest {
public void testCreateSecurityGroupWhenResponseIs2xx() throws Exception {
HttpRequest createSecurityGroup = HttpRequest.builder().method("POST").endpoint(
URI.create("https://compute.north.host/v1.1/3456/os-security-groups")).headers(
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-security-groups")).headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json").put("X-Auth-Token",
authToken).build())
.payload(
@ -140,7 +140,7 @@ public class SecurityGroupClientExpectTest extends BaseNovaClientExpectTest {
public void testDeleteSecurityGroupWhenResponseIs2xx() throws Exception {
HttpRequest deleteSecurityGroup = HttpRequest.builder().method("DELETE").endpoint(
URI.create("https://compute.north.host/v1.1/3456/os-security-groups/160"))
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-security-groups/160"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -160,7 +160,7 @@ public class SecurityGroupClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest createSecurityGroupRule = HttpRequest
.builder()
.method("POST")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/os-security-group-rules"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-security-group-rules"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json").put(
"X-Auth-Token", authToken).build())
@ -186,7 +186,7 @@ public class SecurityGroupClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest createSecurityGroupRule = HttpRequest
.builder()
.method("POST")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/os-security-group-rules"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-security-group-rules"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json").put(
"X-Auth-Token", authToken).build())
@ -210,7 +210,7 @@ public class SecurityGroupClientExpectTest extends BaseNovaClientExpectTest {
public void testDeleteSecurityGroupRuleWhenResponseIs2xx() throws Exception {
HttpRequest deleteSecurityGroupRule = HttpRequest.builder().method("DELETE").endpoint(
URI.create("https://compute.north.host/v1.1/3456/os-security-group-rules/161"))
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-security-group-rules/161"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "*/*")
.put("X-Auth-Token", authToken).build()).build();

View File

@ -38,7 +38,7 @@ import com.google.common.collect.ImmutableSet;
public class ServerWithSecurityGroupsClientExpectTest extends BaseNovaClientExpectTest {
public void testGetServerWithSecurityGroups() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-create-server-ext/8d0a6ca5-8849-4b3d-b86e-f24c92490ebb");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-create-server-ext/8d0a6ca5-8849-4b3d-b86e-f24c92490ebb");
ServerWithSecurityGroupsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -52,7 +52,7 @@ public class ServerWithSecurityGroupsClientExpectTest extends BaseNovaClientExpe
}
public void testGetServerWithSecurityGroupsFailNotFound() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-create-server-ext/8d0a6ca5-8849-4b3d-b86e-f24c92490ebb");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-create-server-ext/8d0a6ca5-8849-4b3d-b86e-f24c92490ebb");
ServerWithSecurityGroupsClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,

View File

@ -50,7 +50,7 @@ public class SimpleTenantUsageClientExpectTest extends BaseNovaClientExpectTest
private DateService dateService = new SimpleDateFormatDateService();
public void testList() throws Exception {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-simple-tenant-usage");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-simple-tenant-usage");
SimpleTenantUsageClient client = requestsSendResponses(keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
HttpRequest.builder().method("GET").headers(ImmutableMultimap.of("Accept", MediaType.APPLICATION_JSON, "X-Auth-Token", authToken))
@ -74,7 +74,7 @@ public class SimpleTenantUsageClientExpectTest extends BaseNovaClientExpectTest
}
public void testGet() throws Exception {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-simple-tenant-usage/test-1234");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-simple-tenant-usage/test-1234");
SimpleTenantUsageClient client = requestsSendResponses(keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
HttpRequest.builder().method("GET").headers(ImmutableMultimap.of("Accept", MediaType.APPLICATION_JSON, "X-Auth-Token", authToken))

View File

@ -38,7 +38,7 @@ import com.google.common.collect.Iterables;
public class VirtualInterfaceClientExpectTest extends BaseNovaClientExpectTest {
public void testListVirtualInterfaces() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/os-virtual-interfaces");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/os-virtual-interfaces");
VirtualInterfaceClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -52,7 +52,7 @@ public class VirtualInterfaceClientExpectTest extends BaseNovaClientExpectTest {
}
public void testListVirtualInterfacesFailNotFound() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/1/os-virtual-interfaces");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/1/os-virtual-interfaces");
VirtualInterfaceClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,

View File

@ -53,7 +53,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
private DateService dateService = new SimpleDateFormatDateService();
public void testListVolumes() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-volumes");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-volumes");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -66,7 +66,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testListVolumesFail() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-volumes");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-volumes");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -79,7 +79,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testListVolumesInDetail() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-volumes/detail");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-volumes/detail");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -92,7 +92,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testListVolumesInDetailFail() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-volumes/detail");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-volumes/detail");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -105,7 +105,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testCreateVolume() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-volumes");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-volumes");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -122,7 +122,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
@Test(expectedExceptions = ResourceNotFoundException.class)
public void testCreateVolumeFail() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-volumes");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-volumes");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -138,7 +138,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testGetVolume() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-volumes/1");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-volumes/1");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -158,7 +158,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testGetVolumeFail() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-volumes/1");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-volumes/1");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -170,7 +170,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testDeleteVolume() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-volumes/1");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-volumes/1");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -182,7 +182,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testDeleteVolumeFail() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-volumes/1");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-volumes/1");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -194,7 +194,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testListAttachments() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/instance-1/os-volume_attachments");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/instance-1/os-volume_attachments");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -214,7 +214,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
@Test(expectedExceptions = AuthorizationException.class)
public void testListAttachmentsFail() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/instance-2/os-volume_attachments");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/instance-2/os-volume_attachments");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -226,7 +226,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testGetAttachment() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/instance-1/os-volume_attachments/1");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/instance-1/os-volume_attachments/1");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -239,7 +239,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testGetAttachmentFail() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/instance-1/os-volume_attachments/1");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/instance-1/os-volume_attachments/1");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -251,7 +251,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testAttachVolume() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/instance-1/os-volume_attachments");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/instance-1/os-volume_attachments");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -266,7 +266,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
@Test(expectedExceptions = ResourceNotFoundException.class)
public void testAttachVolumeFail() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/instance-1/os-volume_attachments");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/instance-1/os-volume_attachments");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -279,7 +279,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testDetachVolume() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/instance-1/os-volume_attachments/1");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/instance-1/os-volume_attachments/1");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -291,7 +291,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testDetachVolumeFail() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/servers/instance-1/os-volume_attachments/1");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/instance-1/os-volume_attachments/1");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -303,7 +303,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testListSnapshots() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-snapshots");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-snapshots");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -316,7 +316,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testListSnapshotsFail() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-snapshots");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-snapshots");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -329,7 +329,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testGetSnapshot() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-snapshots/1");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-snapshots/1");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -342,7 +342,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testGetSnapshotFail() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-snapshots/1");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-snapshots/1");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -354,7 +354,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testListSnapshotsInDetail() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-snapshots/detail");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-snapshots/detail");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -376,7 +376,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testListSnapshotsInDetailFail() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-snapshots/detail");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-snapshots/detail");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -389,7 +389,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testCreateSnapshot() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-snapshots");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-snapshots");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -406,7 +406,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
@Test(expectedExceptions = AuthorizationException.class)
public void testCreateSnapshotFail() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-snapshots");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-snapshots");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -421,7 +421,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
}
public void testDeleteSnapshot() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-snapshots/1");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-snapshots/1");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,
@ -434,7 +434,7 @@ public class VolumeClientExpectTest extends BaseNovaClientExpectTest {
@Test(expectedExceptions = AuthorizationException.class)
public void testDeleteSnapshotFail() {
URI endpoint = URI.create("https://compute.north.host/v1.1/3456/os-snapshots/1");
URI endpoint = URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-snapshots/1");
VolumeClient client = requestsSendResponses(
keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, extensionsOfNovaRequest, extensionsOfNovaResponse,

View File

@ -47,7 +47,7 @@ public class ExtensionClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest listExtensions = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/extensions"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/extensions"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -68,7 +68,7 @@ public class ExtensionClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest listExtensions = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/extensions"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/extensions"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -87,7 +87,7 @@ public class ExtensionClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest getExtension = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/extensions/RS-PIE"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/extensions/RS-PIE"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -106,7 +106,7 @@ public class ExtensionClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest getExtension = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/extensions/RS-PIE"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/extensions/RS-PIE"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();

View File

@ -47,7 +47,7 @@ public class FlavorClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest listFlavors = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/flavors"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/flavors"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -68,7 +68,7 @@ public class FlavorClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest listFlavors = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/flavors"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/flavors"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -87,7 +87,7 @@ public class FlavorClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest getFlavor = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/flavors/52415800-8b69-11e0-9b19-734f1195ff37"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/flavors/52415800-8b69-11e0-9b19-734f1195ff37"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -107,7 +107,7 @@ public class FlavorClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest getFlavor = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/flavors/123"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/flavors/123"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();

View File

@ -46,7 +46,7 @@ public class ImageClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest listImages = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/images"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/images"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -67,7 +67,7 @@ public class ImageClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest listImages = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/images"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/images"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -85,7 +85,7 @@ public class ImageClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest getImage = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/images/52415800-8b69-11e0-9b19-734f5736d2a2"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/images/52415800-8b69-11e0-9b19-734f5736d2a2"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -105,7 +105,7 @@ public class ImageClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest getImage = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/images/52415800-8b69-11e0-9b19-734f5736d2a2"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/images/52415800-8b69-11e0-9b19-734f5736d2a2"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();

View File

@ -48,7 +48,7 @@ public class ServerClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest listServers = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/servers"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -69,7 +69,7 @@ public class ServerClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest listServers = HttpRequest
.builder()
.method("GET")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/servers"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -86,7 +86,7 @@ public class ServerClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest createServer = HttpRequest
.builder()
.method("POST")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/servers"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build())
@ -110,7 +110,7 @@ public class ServerClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest createServer = HttpRequest
.builder()
.method("POST")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/servers"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build())
@ -139,7 +139,7 @@ public class ServerClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest createImage = HttpRequest
.builder()
.method("POST")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/servers/" + serverId + "/action"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/" + serverId + "/action"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build())
@ -151,7 +151,7 @@ public class ServerClientExpectTest extends BaseNovaClientExpectTest {
.statusCode(200)
.headers(
ImmutableMultimap.<String, String> builder()
.put("Location", "https://compute.north.host/v1.1/3456/images/" + imageId).build()).build();
.put("Location", "https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/images/" + imageId).build()).build();
NovaClient clientWhenServerExists = requestsSendResponses(keystoneAuthWithUsernameAndPassword,
responseWithKeystoneAccess, createImage, createImageResponse);
@ -167,7 +167,7 @@ public class ServerClientExpectTest extends BaseNovaClientExpectTest {
HttpRequest createImage = HttpRequest
.builder()
.method("POST")
.endpoint(URI.create("https://compute.north.host/v1.1/3456/servers/" + serverId + "/action"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/" + serverId + "/action"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken)

View File

@ -45,7 +45,7 @@ import com.google.common.collect.ImmutableMap.Builder;
@Test(groups = "unit", testName = "CreateSecurityGroupIfNeededTest")
public class CreateSecurityGroupIfNeededTest extends BaseNovaClientExpectTest {
HttpRequest createSecurityGroup = HttpRequest.builder().method("POST").endpoint(
URI.create("https://compute.north.host/v1.1/3456/os-security-groups")).headers(
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-security-groups")).headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json").put("X-Auth-Token",
authToken).build())
.payload(
@ -74,7 +74,7 @@ public class CreateSecurityGroupIfNeededTest extends BaseNovaClientExpectTest {
for (int port : ImmutableList.of(22,8080)){
HttpRequest createCidrRule = HttpRequest.builder().method("POST").endpoint(
URI.create("https://compute.north.host/v1.1/3456/os-security-group-rules")).headers(
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-security-group-rules")).headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json").put("X-Auth-Token",
authToken).build())
.payload(
@ -91,7 +91,7 @@ public class CreateSecurityGroupIfNeededTest extends BaseNovaClientExpectTest {
builder.put(createCidrRule, createCidrRuleResponse);
HttpRequest createSelfRule = HttpRequest.builder().method("POST").endpoint(
URI.create("https://compute.north.host/v1.1/3456/os-security-group-rules")).headers(
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-security-group-rules")).headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json").put("X-Auth-Token",
authToken).build())
.payload(
@ -110,7 +110,7 @@ public class CreateSecurityGroupIfNeededTest extends BaseNovaClientExpectTest {
}
HttpRequest getSecurityGroup = HttpRequest.builder().method("GET").endpoint(
URI.create("https://compute.north.host/v1.1/3456/os-security-groups/" + groupId)).headers(
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-security-groups/" + groupId)).headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json").put("X-Auth-Token",
authToken).build()).build();
@ -147,7 +147,7 @@ public class CreateSecurityGroupIfNeededTest extends BaseNovaClientExpectTest {
builder.put(createSecurityGroup, createSecurityGroupResponse);
HttpRequest listSecurityGroups = HttpRequest.builder().method("GET").endpoint(
URI.create("https://compute.north.host/v1.1/3456/os-security-groups")).headers(
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-security-groups")).headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json").put("X-Auth-Token",
authToken).build()).build();

View File

@ -47,7 +47,7 @@ public class FindSecurityGroupWithNameAndReturnTrueExpectTest extends BaseNovaCl
public void testUpdateReferenceWhenSecurityGroupListContainsGroupName() throws Exception {
HttpRequest listSecurityGroups = HttpRequest.builder().method("GET").endpoint(
URI.create("https://compute.north.host/v1.1/3456/os-security-groups")).headers(
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-security-groups")).headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json").put("X-Auth-Token",
authToken).build()).build();
@ -75,7 +75,7 @@ public class FindSecurityGroupWithNameAndReturnTrueExpectTest extends BaseNovaCl
public void testDoesNotUpdateReferenceWhenSecurityGroupListMissingGroupName() throws Exception {
HttpRequest listSecurityGroups = HttpRequest.builder().method("GET").endpoint(
URI.create("https://compute.north.host/v1.1/3456/os-security-groups")).headers(
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-security-groups")).headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json").put("X-Auth-Token",
authToken).build()).build();

View File

@ -40,7 +40,7 @@ public abstract class BaseNovaComputeServiceContextExpectTest<T> extends BaseNov
Function<ComputeServiceContext, T> {
protected final HttpRequest listImagesDetail = HttpRequest.builder().method("GET").endpoint(
URI.create("https://compute.north.host/v1.1/3456/images/detail")).headers(
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/images/detail")).headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json").put("X-Auth-Token",
authToken).build()).build();
@ -48,7 +48,7 @@ public abstract class BaseNovaComputeServiceContextExpectTest<T> extends BaseNov
payloadFromResource("/image_list_detail.json")).build();
protected final HttpRequest listFlavorsDetail = HttpRequest.builder().method("GET").endpoint(
URI.create("https://compute.north.host/v1.1/3456/flavors/detail")).headers(
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/flavors/detail")).headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json").put("X-Auth-Token",
authToken).build()).build();
@ -56,7 +56,7 @@ public abstract class BaseNovaComputeServiceContextExpectTest<T> extends BaseNov
payloadFromResource("/flavor_list_detail.json")).build();
protected final HttpRequest listServers = HttpRequest.builder().method("GET").endpoint(
URI.create("https://compute.north.host/v1.1/3456/servers/detail")).headers(
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/servers/detail")).headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json").put("X-Auth-Token",
authToken).build()).build();
@ -64,7 +64,7 @@ public abstract class BaseNovaComputeServiceContextExpectTest<T> extends BaseNov
payloadFromResource("/server_list_details.json")).build();
protected final HttpRequest listFloatingIps = HttpRequest.builder().method("GET").endpoint(
URI.create("https://compute.north.host/v1.1/3456/os-floating-ips")).headers(
URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-floating-ips")).headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json").put("X-Auth-Token",
authToken).build()).build();

View File

@ -19,6 +19,7 @@
package org.jclouds.openstack.nova.v1_1.internal;
import java.net.URI;
import java.util.Properties;
import javax.ws.rs.core.MediaType;
@ -59,7 +60,7 @@ public class BaseNovaExpectTest<T> extends BaseRestClientExpectTest<T> {
.builder()
.method("GET")
// NOTE THIS IS NOVA, NOT KEYSTONE
.endpoint(URI.create("https://compute.north.host/v1.1/3456/extensions"))
.endpoint(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/extensions"))
.headers(
ImmutableMultimap.<String, String> builder().put("Accept", "application/json")
.put("X-Auth-Token", authToken).build()).build();
@ -71,6 +72,14 @@ public class BaseNovaExpectTest<T> extends BaseRestClientExpectTest<T> {
.payload(payloadFromResource("/extension_list.json")).build();
}
@Override
protected Properties setupProperties() {
Properties overrides = super.setupProperties();
// hpcloud or trystack
overrides.setProperty("jclouds.zones", "az-1.region-a.geo-1,RegionOne");
return overrides;
}
protected HttpRequest.Builder standardRequestBuilder(URI endpoint) {
return HttpRequest.builder().method("GET")
.headers(ImmutableMultimap.of("Accept", MediaType.APPLICATION_JSON, "X-Auth-Token", authToken))

View File

@ -80,14 +80,23 @@ public class ParseAccessTest extends BaseItemParserTest<Access> {
URI.create("https://glance.jclouds.org:9292/v1.0")).region("az-1.region-a.geo-1")
.versionId("1.0").build()).build(),
Service.builder().name("Cloud Servers").type("compute").endpoints(
Endpoint.builder().tenantId("1").publicURL(URI.create("https://compute.north.host/v1/1234"))
.internalURL(URI.create("https://compute.north.host/v1/1234")).region("az-1.region-a.geo-1")
.versionId("1.0").build(),
Endpoint.builder().tenantId("2").publicURL(URI.create("https://compute.north.host/v1.1/3456"))
.internalURL(URI.create("https://compute.north.host/v1.1/3456")).region("az-1.region-a.geo-1")
.versionId("1.1").build()).build()).build();
Service.builder().name("Compute").type("compute").endpoints(
Endpoint.builder()
.tenantId("3456")
.publicURL(URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456"))
.region("az-1.region-a.geo-1")
.versionId("1.1").build(),
Endpoint.builder()
.tenantId("3456")
.publicURL(URI.create("https://az-2.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456"))
.region("az-2.region-a.geo-1")
.versionId("1.1").build(),
Endpoint.builder()
.tenantId("3456")
.publicURL(URI.create("https://az-3.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456"))
.region("az-3.region-a.geo-1")
.versionId("1.1").build()).build()
).build();
}
}

View File

@ -64,6 +64,8 @@ public class RegionIdToAdminURIFromAccessForTypeAndVersionSupplierTest {
.<URI> supplierFunction()), ImmutableMap.of("region-a.geo-1", URI.create("https://csnode.jclouds.org:35357/v2.0/")));
Map<String, URI> map = Maps.newLinkedHashMap();
map.put("region-a.geo-1", null);
map.put("region-b.geo-1", null);
map.put("region-c.geo-1", null);
assertEquals(Maps.transformValues(factory.createForApiTypeAndVersion("compute", "1.1").get(), Suppliers
.<URI> supplierFunction()), map);
}

View File

@ -61,9 +61,11 @@ public class RegionIdToURIFromAccessForTypeAndVersionSupplierTest {
public void testRegionMatches() {
assertEquals(Maps.transformValues(factory.createForApiTypeAndVersion("compute", "1.0").get(), Suppliers
.<URI> supplierFunction()), ImmutableMap.of("az-1.region-a.geo-1", URI.create("https://compute.north.host/v1/1234")));
.<URI> supplierFunction()), ImmutableMap.of());
assertEquals(Maps.transformValues(factory.createForApiTypeAndVersion("compute", "1.1").get(), Suppliers
.<URI> supplierFunction()), ImmutableMap.of("az-1.region-a.geo-1", URI.create("https://compute.north.host/v1.1/3456")));
.<URI> supplierFunction()), ImmutableMap.of("az-1.region-a.geo-1", URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456"),
"az-2.region-a.geo-1", URI.create("https://az-2.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456"),
"az-3.region-a.geo-1", URI.create("https://az-3.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456")));
}
}

View File

@ -61,11 +61,11 @@ public class ZoneIdToURIFromAccessForTypeAndVersionSupplierTest {
public void testZoneMatches() {
assertEquals(Maps.transformValues(factory.createForApiTypeAndVersion("compute", "1.0").get(), Suppliers
.<URI> supplierFunction()), ImmutableMap.of("az-1.region-a.geo-1", URI
.create("https://compute.north.host/v1/1234")));
.<URI> supplierFunction()), ImmutableMap.of());
assertEquals(Maps.transformValues(factory.createForApiTypeAndVersion("compute", "1.1").get(), Suppliers
.<URI> supplierFunction()), ImmutableMap.of("az-1.region-a.geo-1", URI
.create("https://compute.north.host/v1.1/3456")));
.<URI> supplierFunction()), ImmutableMap.of("az-1.region-a.geo-1", URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456"),
"az-2.region-a.geo-1", URI.create("https://az-2.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456"),
"az-3.region-a.geo-1", URI.create("https://az-3.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456")));
}
}

View File

@ -77,30 +77,38 @@
}
]
},
{
"name":"Cloud Servers",
"type":"compute",
"endpoints":[{
"tenantId":"1",
"publicURL":"https://compute.north.host/v1/1234",
"internalURL":"https://compute.north.host/v1/1234",
"region":"az-1.region-a.geo-1",
"versionId":"1.0",
"versionInfo":"https://compute.north.host/v1.0/",
"versionList":"https://compute.north.host/"
},
{
"tenantId":"2",
"publicURL":"https://compute.north.host/v1.1/3456",
"internalURL":"https://compute.north.host/v1.1/3456",
"region":"az-1.region-a.geo-1",
"versionId":"1.1",
"versionInfo":"https://compute.north.host/v1.1/",
"versionList":"https://compute.north.host/"
}
],
"endpoints_links":[]
}
]
{
"name": "Compute",
"type": "compute",
"endpoints": [
{
"tenantId": "3456",
"publicURL": "https:\/\/az-1.region-a.geo-1.compute.hpcloudsvc.com\/v1.1\/3456",
"publicURL2": "https:\/\/az-1.region-a.geo-1.ec2-compute.hpcloudsvc.com\/services\/Cloud",
"region": "az-1.region-a.geo-1",
"versionId": "1.1",
"versionInfo": "https:\/\/az-1.region-a.geo-1.compute.hpcloudsvc.com\/v1.1\/",
"versionList": "https:\/\/az-1.region-a.geo-1.compute.hpcloudsvc.com"
},
{
"tenantId": "3456",
"publicURL": "https:\/\/az-2.region-a.geo-1.compute.hpcloudsvc.com\/v1.1\/3456",
"publicURL2": "https:\/\/az-2.region-a.geo-1.ec2-compute.hpcloudsvc.com\/services\/Cloud",
"region": "az-2.region-a.geo-1",
"versionId": "1.1",
"versionInfo": "https:\/\/az-2.region-a.geo-1.compute.hpcloudsvc.com\/v1.1\/",
"versionList": "https:\/\/az-2.region-a.geo-1.compute.hpcloudsvc.com"
},
{
"tenantId": "3456",
"publicURL": "https:\/\/az-3.region-a.geo-1.compute.hpcloudsvc.com\/v1.1\/3456",
"publicURL2": "https:\/\/az-3.region-a.geo-1.ec2-compute.hpcloudsvc.com\/services\/Cloud",
"region": "az-3.region-a.geo-1",
"versionId": "1.1",
"versionInfo": "https:\/\/az-3.region-a.geo-1.compute.hpcloudsvc.com\/v1.1\/",
"versionList": "https:\/\/az-3.region-a.geo-1.compute.hpcloudsvc.com"
}
]
}
]
}