mirror of https://github.com/apache/jclouds.git
Removed trystack-nova provider.
Conflicts: providers/trystack-nova/pom.xml
This commit is contained in:
parent
0097a22c4f
commit
0f1a455bc9
|
@ -180,11 +180,6 @@
|
|||
<artifactId>hpcloud-compute</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.provider</groupId>
|
||||
<artifactId>trystack-nova</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jclouds.provider</groupId>
|
||||
<artifactId>rackspace-cloudservers-us</artifactId>
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
},
|
||||
"serviceCatalog": [{
|
||||
"endpoints": [{
|
||||
"adminURL": "https://nova-api.trystack.org:9774/v1.1/3456",
|
||||
"adminURL": "https://nova-api.openstack.org:9774/v1.1/3456",
|
||||
"region": "RegionOne",
|
||||
"internalURL": "https://nova-api.trystack.org:9774/v1.1/3456",
|
||||
"publicURL": "https://nova-api.trystack.org:9774/v1.1/3456"
|
||||
"internalURL": "https://nova-api.openstack.org:9774/v1.1/3456",
|
||||
"publicURL": "https://nova-api.openstack.org:9774/v1.1/3456"
|
||||
}],
|
||||
"type": "compute",
|
||||
"name": "nova"
|
||||
|
@ -28,7 +28,7 @@
|
|||
"name": "glance"
|
||||
}, {
|
||||
"endpoints": [{
|
||||
"adminURL": "https://nova-api.trystack.org:5443/v2.0",
|
||||
"adminURL": "https://nova-api.openstack.org:5443/v2.0",
|
||||
"region": "RegionOne",
|
||||
"internalURL": "https://keystone.thefreecloud.org:5000/v2.0",
|
||||
"publicURL": "https://keystone.thefreecloud.org:5000/v2.0"
|
|
@ -86,7 +86,6 @@ public class CreateSecurityGroupIfNeeded implements Function<ZoneSecurityGroupNa
|
|||
|
||||
private void authorizeGroupToItselfAndAllIPsToTCPPort(SecurityGroupApi securityGroupApi,
|
||||
SecurityGroup securityGroup, int port) {
|
||||
// NOTE that permission to itself isn't supported on trystack!
|
||||
logger.debug(">> authorizing securityGroup(%s) permission to 0.0.0.0/0 on port %d", securityGroup, port);
|
||||
securityGroupApi.createRuleAllowingCidrBlock(securityGroup.getId(), Ingress.builder().ipProtocol(
|
||||
IpProtocol.TCP).fromPort(port).toPort(port).build(), "0.0.0.0/0");
|
||||
|
|
|
@ -58,7 +58,7 @@ public class NovaComputeServiceExpectTest extends BaseNovaComputeServiceExpectTe
|
|||
protected Properties setupProperties() {
|
||||
Properties overrides = super.setupProperties();
|
||||
// only specify limited zones so that we don't have to configure requests for multiple zones.
|
||||
// since we are doing tests with keystone responses from hpcloud and also trystack, we have
|
||||
// since we are doing tests with keystone responses from hpcloud and also openstack, we have
|
||||
// to whitelist one zone from each
|
||||
overrides.setProperty("jclouds.zones", "az-1.region-a.geo-1,RegionOne");
|
||||
return overrides;
|
||||
|
@ -85,7 +85,7 @@ public class NovaComputeServiceExpectTest extends BaseNovaComputeServiceExpectTe
|
|||
assertEquals(apiWhenServersExist.listNodes().iterator().next().getName(), "sample-server");
|
||||
}
|
||||
|
||||
Map<HttpRequest, HttpResponse> defaultTemplateTryStack = ImmutableMap
|
||||
Map<HttpRequest, HttpResponse> defaultTemplateOpenStack = ImmutableMap
|
||||
.<HttpRequest, HttpResponse> builder()
|
||||
.put(keystoneAuthWithUsernameAndPasswordAndTenantName,
|
||||
HttpResponse
|
||||
|
@ -93,31 +93,31 @@ public class NovaComputeServiceExpectTest extends BaseNovaComputeServiceExpectTe
|
|||
.statusCode(200)
|
||||
.message("HTTP/1.1 200")
|
||||
.payload(
|
||||
payloadFromResourceWithContentType("/keystoneAuthResponse_trystack.json", "application/json"))
|
||||
payloadFromResourceWithContentType("/keystoneAuthResponse_openstack.json", "application/json"))
|
||||
.build())
|
||||
.put(extensionsOfNovaRequest.toBuilder()
|
||||
.endpoint("https://nova-api.trystack.org:9774/v1.1/3456/extensions").build(),
|
||||
HttpResponse.builder().statusCode(200).payload(payloadFromResource("/extension_list_trystack.json"))
|
||||
.endpoint("https://nova-api.openstack.org:9774/v1.1/3456/extensions").build(),
|
||||
HttpResponse.builder().statusCode(200).payload(payloadFromResource("/extension_list_openstack.json"))
|
||||
.build())
|
||||
.put(listDetail.toBuilder()
|
||||
.endpoint("https://nova-api.trystack.org:9774/v1.1/3456/images/detail").build(),
|
||||
HttpResponse.builder().statusCode(200).payload(payloadFromResource("/image_list_detail_trystack.json"))
|
||||
.endpoint("https://nova-api.openstack.org:9774/v1.1/3456/images/detail").build(),
|
||||
HttpResponse.builder().statusCode(200).payload(payloadFromResource("/image_list_detail_openstack.json"))
|
||||
.build())
|
||||
.put(listServers.toBuilder()
|
||||
.endpoint("https://nova-api.trystack.org:9774/v1.1/3456/servers/detail").build(),
|
||||
.endpoint("https://nova-api.openstack.org:9774/v1.1/3456/servers/detail").build(),
|
||||
listServersResponse)
|
||||
.put(listFlavorsDetail.toBuilder()
|
||||
.endpoint("https://nova-api.trystack.org:9774/v1.1/3456/flavors/detail").build(),
|
||||
HttpResponse.builder().statusCode(200).payload(payloadFromResource("/flavor_list_detail_trystack.json"))
|
||||
.endpoint("https://nova-api.openstack.org:9774/v1.1/3456/flavors/detail").build(),
|
||||
HttpResponse.builder().statusCode(200).payload(payloadFromResource("/flavor_list_detail_openstack.json"))
|
||||
.build()).build();
|
||||
|
||||
public void testDefaultTemplateTryStack() throws Exception {
|
||||
public void testDefaultTemplateOpenStack() throws Exception {
|
||||
|
||||
ComputeService apiForTryStack = requestsSendResponses(defaultTemplateTryStack);
|
||||
ComputeService apiForOpenStack = requestsSendResponses(defaultTemplateOpenStack);
|
||||
|
||||
Template defaultTemplate = apiForTryStack.templateBuilder().imageId("RegionOne/15").build();
|
||||
Template defaultTemplate = apiForOpenStack.templateBuilder().imageId("RegionOne/15").build();
|
||||
checkTemplate(defaultTemplate);
|
||||
checkTemplate(apiForTryStack.templateBuilder().fromTemplate(defaultTemplate).build());
|
||||
checkTemplate(apiForOpenStack.templateBuilder().fromTemplate(defaultTemplate).build());
|
||||
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,7 @@ public class NovaComputeServiceExpectTest extends BaseNovaComputeServiceExpectTe
|
|||
HttpRequest list = HttpRequest
|
||||
.builder()
|
||||
.method("GET")
|
||||
.endpoint("https://nova-api.trystack.org:9774/v1.1/3456/os-security-groups")
|
||||
.endpoint("https://nova-api.openstack.org:9774/v1.1/3456/os-security-groups")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("X-Auth-Token", authToken).build();
|
||||
|
||||
|
@ -158,7 +158,7 @@ public class NovaComputeServiceExpectTest extends BaseNovaComputeServiceExpectTe
|
|||
HttpRequest createWithPrefixOnGroup = HttpRequest
|
||||
.builder()
|
||||
.method("POST")
|
||||
.endpoint("https://nova-api.trystack.org:9774/v1.1/3456/os-security-groups")
|
||||
.endpoint("https://nova-api.openstack.org:9774/v1.1/3456/os-security-groups")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("X-Auth-Token", authToken)
|
||||
.payload(
|
||||
|
@ -172,7 +172,7 @@ public class NovaComputeServiceExpectTest extends BaseNovaComputeServiceExpectTe
|
|||
HttpRequest createRuleForDefaultPort22 = HttpRequest
|
||||
.builder()
|
||||
.method("POST")
|
||||
.endpoint("https://nova-api.trystack.org:9774/v1.1/3456/os-security-group-rules")
|
||||
.endpoint("https://nova-api.openstack.org:9774/v1.1/3456/os-security-group-rules")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("X-Auth-Token", authToken)
|
||||
.payload(
|
||||
|
@ -186,7 +186,7 @@ public class NovaComputeServiceExpectTest extends BaseNovaComputeServiceExpectTe
|
|||
HttpRequest getSecurityGroup = HttpRequest
|
||||
.builder()
|
||||
.method("GET")
|
||||
.endpoint("https://nova-api.trystack.org:9774/v1.1/3456/os-security-groups/160")
|
||||
.endpoint("https://nova-api.openstack.org:9774/v1.1/3456/os-security-groups/160")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("X-Auth-Token", authToken).build();
|
||||
|
||||
|
@ -196,7 +196,7 @@ public class NovaComputeServiceExpectTest extends BaseNovaComputeServiceExpectTe
|
|||
HttpRequest create = HttpRequest
|
||||
.builder()
|
||||
.method("POST")
|
||||
.endpoint("https://nova-api.trystack.org:9774/v1.1/3456/os-keypairs")
|
||||
.endpoint("https://nova-api.openstack.org:9774/v1.1/3456/os-keypairs")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("X-Auth-Token", authToken)
|
||||
.payload(
|
||||
|
@ -210,7 +210,7 @@ public class NovaComputeServiceExpectTest extends BaseNovaComputeServiceExpectTe
|
|||
HttpRequest serverDetail = HttpRequest
|
||||
.builder()
|
||||
.method("GET")
|
||||
.endpoint("https://nova-api.trystack.org:9774/v1.1/3456/servers/71752")
|
||||
.endpoint("https://nova-api.openstack.org:9774/v1.1/3456/servers/71752")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("X-Auth-Token", authToken).build();
|
||||
|
||||
|
@ -220,7 +220,7 @@ public class NovaComputeServiceExpectTest extends BaseNovaComputeServiceExpectTe
|
|||
@Test
|
||||
public void testCreateNodeWithGeneratedKeyPair() throws Exception {
|
||||
Builder<HttpRequest, HttpResponse> requestResponseMap = ImmutableMap.<HttpRequest, HttpResponse> builder()
|
||||
.putAll(defaultTemplateTryStack);
|
||||
.putAll(defaultTemplateOpenStack);
|
||||
requestResponseMap.put(list, notFound);
|
||||
|
||||
requestResponseMap.put(createWithPrefixOnGroup, securityGroupCreated);
|
||||
|
@ -236,7 +236,7 @@ public class NovaComputeServiceExpectTest extends BaseNovaComputeServiceExpectTe
|
|||
HttpRequest createServerWithGeneratedKeyPair = HttpRequest
|
||||
.builder()
|
||||
.method("POST")
|
||||
.endpoint("https://nova-api.trystack.org:9774/v1.1/3456/servers")
|
||||
.endpoint("https://nova-api.openstack.org:9774/v1.1/3456/servers")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("X-Auth-Token", authToken)
|
||||
.payload(
|
||||
|
@ -276,7 +276,7 @@ public class NovaComputeServiceExpectTest extends BaseNovaComputeServiceExpectTe
|
|||
@Test
|
||||
public void testCreateNodeWhileUserSpecifiesKeyPair() throws Exception {
|
||||
Builder<HttpRequest, HttpResponse> requestResponseMap = ImmutableMap.<HttpRequest, HttpResponse> builder()
|
||||
.putAll(defaultTemplateTryStack);
|
||||
.putAll(defaultTemplateOpenStack);
|
||||
requestResponseMap.put(list, notFound);
|
||||
|
||||
requestResponseMap.put(createWithPrefixOnGroup, securityGroupCreated);
|
||||
|
@ -290,7 +290,7 @@ public class NovaComputeServiceExpectTest extends BaseNovaComputeServiceExpectTe
|
|||
HttpRequest createServerWithSuppliedKeyPair = HttpRequest
|
||||
.builder()
|
||||
.method("POST")
|
||||
.endpoint("https://nova-api.trystack.org:9774/v1.1/3456/servers")
|
||||
.endpoint("https://nova-api.openstack.org:9774/v1.1/3456/servers")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("X-Auth-Token", authToken)
|
||||
.payload(
|
||||
|
@ -332,7 +332,7 @@ public class NovaComputeServiceExpectTest extends BaseNovaComputeServiceExpectTe
|
|||
@Test
|
||||
public void testCreateNodeWhileUserSpecifiesKeyPairAndUserSpecifiedGroups() throws Exception {
|
||||
Builder<HttpRequest, HttpResponse> requestResponseMap = ImmutableMap.<HttpRequest, HttpResponse> builder()
|
||||
.putAll(defaultTemplateTryStack);
|
||||
.putAll(defaultTemplateOpenStack);
|
||||
requestResponseMap.put(list, notFound);
|
||||
|
||||
requestResponseMap.put(serverDetail, serverDetailResponse);
|
||||
|
@ -340,7 +340,7 @@ public class NovaComputeServiceExpectTest extends BaseNovaComputeServiceExpectTe
|
|||
HttpRequest createServerWithSuppliedKeyPairAndGroup = HttpRequest
|
||||
.builder()
|
||||
.method("POST")
|
||||
.endpoint("https://nova-api.trystack.org:9774/v1.1/3456/servers")
|
||||
.endpoint("https://nova-api.openstack.org:9774/v1.1/3456/servers")
|
||||
.addHeader("Accept", "application/json")
|
||||
.addHeader("X-Auth-Token", authToken)
|
||||
.payload(
|
||||
|
|
|
@ -48,7 +48,7 @@ public class ParseServerWithInternetAddressesTest extends BaseItemParserTest<Ser
|
|||
|
||||
@Override
|
||||
public String resource() {
|
||||
return "/server_details_trystack.json";
|
||||
return "/server_details_openstack.json";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -73,7 +73,7 @@ public class ParseServerWithInternetAddressesTest extends BaseItemParserTest<Ser
|
|||
.links(
|
||||
Link.create(
|
||||
Relation.BOOKMARK,
|
||||
URI.create("https://nova-api.trystack.org:9774/37/images/14")))
|
||||
URI.create("https://nova-api.openstack.org:9774/37/images/14")))
|
||||
.build())
|
||||
.flavor(
|
||||
Resource
|
||||
|
@ -82,15 +82,15 @@ public class ParseServerWithInternetAddressesTest extends BaseItemParserTest<Ser
|
|||
.links(
|
||||
Link.create(
|
||||
Relation.BOOKMARK,
|
||||
URI.create("https://nova-api.trystack.org:9774/37/flavors/1")))
|
||||
URI.create("https://nova-api.openstack.org:9774/37/flavors/1")))
|
||||
.build())
|
||||
.links(
|
||||
Link.create(
|
||||
Relation.SELF,
|
||||
URI.create("https://nova-api.trystack.org:9774/v1.1/37/servers/1459")),
|
||||
URI.create("https://nova-api.openstack.org:9774/v1.1/37/servers/1459")),
|
||||
Link.create(
|
||||
Relation.BOOKMARK,
|
||||
URI.create("https://nova-api.trystack.org:9774/37/servers/1459")))
|
||||
URI.create("https://nova-api.openstack.org:9774/37/servers/1459")))
|
||||
.addresses(ImmutableMultimap.of("internet", Address.createV4("8.21.28.47"))).build();
|
||||
}
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
"rxtx_quota": 0,
|
||||
"name": "m1.medium",
|
||||
"links": [{
|
||||
"href": "https://nova-api.trystack.org:9774/v1.1/37/flavors/3",
|
||||
"href": "https://nova-api.openstack.org:9774/v1.1/37/flavors/3",
|
||||
"rel": "self"
|
||||
}, {
|
||||
"href": "https://nova-api.trystack.org:9774/37/flavors/3",
|
||||
"href": "https://nova-api.openstack.org:9774/37/flavors/3",
|
||||
"rel": "bookmark"
|
||||
}],
|
||||
"ram": 4096,
|
||||
|
@ -19,10 +19,10 @@
|
|||
"rxtx_quota": 0,
|
||||
"name": "m1.large",
|
||||
"links": [{
|
||||
"href": "https://nova-api.trystack.org:9774/v1.1/37/flavors/4",
|
||||
"href": "https://nova-api.openstack.org:9774/v1.1/37/flavors/4",
|
||||
"rel": "self"
|
||||
}, {
|
||||
"href": "https://nova-api.trystack.org:9774/37/flavors/4",
|
||||
"href": "https://nova-api.openstack.org:9774/37/flavors/4",
|
||||
"rel": "bookmark"
|
||||
}],
|
||||
"ram": 8192,
|
||||
|
@ -35,10 +35,10 @@
|
|||
"rxtx_quota": 0,
|
||||
"name": "m1.tiny",
|
||||
"links": [{
|
||||
"href": "https://nova-api.trystack.org:9774/v1.1/37/flavors/1",
|
||||
"href": "https://nova-api.openstack.org:9774/v1.1/37/flavors/1",
|
||||
"rel": "self"
|
||||
}, {
|
||||
"href": "https://nova-api.trystack.org:9774/37/flavors/1",
|
||||
"href": "https://nova-api.openstack.org:9774/37/flavors/1",
|
||||
"rel": "bookmark"
|
||||
}],
|
||||
"ram": 512,
|
||||
|
@ -51,10 +51,10 @@
|
|||
"rxtx_quota": 0,
|
||||
"name": "m1.xlarge",
|
||||
"links": [{
|
||||
"href": "https://nova-api.trystack.org:9774/v1.1/37/flavors/5",
|
||||
"href": "https://nova-api.openstack.org:9774/v1.1/37/flavors/5",
|
||||
"rel": "self"
|
||||
}, {
|
||||
"href": "https://nova-api.trystack.org:9774/37/flavors/5",
|
||||
"href": "https://nova-api.openstack.org:9774/37/flavors/5",
|
||||
"rel": "bookmark"
|
||||
}],
|
||||
"ram": 16384,
|
||||
|
@ -67,10 +67,10 @@
|
|||
"rxtx_quota": 0,
|
||||
"name": "m1.small",
|
||||
"links": [{
|
||||
"href": "https://nova-api.trystack.org:9774/v1.1/37/flavors/2",
|
||||
"href": "https://nova-api.openstack.org:9774/v1.1/37/flavors/2",
|
||||
"rel": "self"
|
||||
}, {
|
||||
"href": "https://nova-api.trystack.org:9774/37/flavors/2",
|
||||
"href": "https://nova-api.openstack.org:9774/37/flavors/2",
|
||||
"rel": "bookmark"
|
||||
}],
|
||||
"ram": 2048,
|
|
@ -4,10 +4,10 @@
|
|||
"updated": "2012-02-02T19:11:00Z",
|
||||
"name": "oneiric-server-cloudimg-amd64",
|
||||
"links": [{
|
||||
"href": "https://nova-api.trystack.org:9774/v1.1/37/images/15",
|
||||
"href": "https://nova-api.openstack.org:9774/v1.1/37/images/15",
|
||||
"rel": "self"
|
||||
}, {
|
||||
"href": "https://nova-api.trystack.org:9774/37/images/15",
|
||||
"href": "https://nova-api.openstack.org:9774/37/images/15",
|
||||
"rel": "bookmark"
|
||||
}],
|
||||
"created": "2012-02-02T19:10:52Z",
|
||||
|
@ -24,10 +24,10 @@
|
|||
"updated": "2012-02-02T19:10:51Z",
|
||||
"name": "oneiric-server-cloudimg-amd64-kernel",
|
||||
"links": [{
|
||||
"href": "https://nova-api.trystack.org:9774/v1.1/37/images/14",
|
||||
"href": "https://nova-api.openstack.org:9774/v1.1/37/images/14",
|
||||
"rel": "self"
|
||||
}, {
|
||||
"href": "https://nova-api.trystack.org:9774/37/images/14",
|
||||
"href": "https://nova-api.openstack.org:9774/37/images/14",
|
||||
"rel": "bookmark"
|
||||
}],
|
||||
"created": "2012-02-02T19:10:50Z",
|
||||
|
@ -43,10 +43,10 @@
|
|||
"updated": "2012-02-02T19:10:41Z",
|
||||
"name": "natty-server-cloudimg-amd64",
|
||||
"links": [{
|
||||
"href": "https://nova-api.trystack.org:9774/v1.1/37/images/13",
|
||||
"href": "https://nova-api.openstack.org:9774/v1.1/37/images/13",
|
||||
"rel": "self"
|
||||
}, {
|
||||
"href": "https://nova-api.trystack.org:9774/37/images/13",
|
||||
"href": "https://nova-api.openstack.org:9774/37/images/13",
|
||||
"rel": "bookmark"
|
||||
}],
|
||||
"created": "2012-02-02T19:10:33Z",
|
||||
|
@ -63,10 +63,10 @@
|
|||
"updated": "2012-02-02T19:10:33Z",
|
||||
"name": "natty-server-cloudimg-amd64-kernel",
|
||||
"links": [{
|
||||
"href": "https://nova-api.trystack.org:9774/v1.1/37/images/12",
|
||||
"href": "https://nova-api.openstack.org:9774/v1.1/37/images/12",
|
||||
"rel": "self"
|
||||
}, {
|
||||
"href": "https://nova-api.trystack.org:9774/37/images/12",
|
||||
"href": "https://nova-api.openstack.org:9774/37/images/12",
|
||||
"rel": "bookmark"
|
||||
}],
|
||||
"created": "2012-02-02T19:10:32Z",
|
||||
|
@ -82,10 +82,10 @@
|
|||
"updated": "2012-02-02T19:10:41Z",
|
||||
"name": "natty-server-cloudimg-amd64",
|
||||
"links": [{
|
||||
"href": "https://nova-api.trystack.org:9774/v1.1/37/images/11",
|
||||
"href": "https://nova-api.openstack.org:9774/v1.1/37/images/11",
|
||||
"rel": "self"
|
||||
}, {
|
||||
"href": "https://nova-api.trystack.org:9774/37/images/11",
|
||||
"href": "https://nova-api.openstack.org:9774/37/images/11",
|
||||
"rel": "bookmark"
|
||||
}],
|
||||
"created": "2012-02-02T19:10:33Z",
|
||||
|
@ -102,10 +102,10 @@
|
|||
"updated": "2012-02-02T19:10:41Z",
|
||||
"name": "natty-server-cloudimg-amd64",
|
||||
"links": [{
|
||||
"href": "https://nova-api.trystack.org:9774/v1.1/37/images/10",
|
||||
"href": "https://nova-api.openstack.org:9774/v1.1/37/images/10",
|
||||
"rel": "self"
|
||||
}, {
|
||||
"href": "https://nova-api.trystack.org:9774/37/images/10",
|
||||
"href": "https://nova-api.openstack.org:9774/37/images/10",
|
||||
"rel": "bookmark"
|
||||
}],
|
||||
"created": "2012-02-02T19:10:33Z",
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
"updated": "2012-02-02T19:11:00Z",
|
||||
"name": "oneiric-server-cloudimg-amd64",
|
||||
"links": [{
|
||||
"href": "https://nova-api.trystack.org:9774/v1.1/37/images/15",
|
||||
"href": "https://nova-api.openstack.org:9774/v1.1/37/images/15",
|
||||
"rel": "self"
|
||||
}, {
|
||||
"href": "https://nova-api.trystack.org:9774/37/images/15",
|
||||
"href": "https://nova-api.openstack.org:9774/37/images/15",
|
||||
"rel": "bookmark"
|
||||
}],
|
||||
"created": "2012-02-02T19:10:52Z",
|
||||
|
@ -24,10 +24,10 @@
|
|||
"updated": "2012-02-02T19:10:51Z",
|
||||
"name": "oneiric-server-cloudimg-amd64-kernel",
|
||||
"links": [{
|
||||
"href": "https://nova-api.trystack.org:9774/v1.1/37/images/14",
|
||||
"href": "https://nova-api.openstack.org:9774/v1.1/37/images/14",
|
||||
"rel": "self"
|
||||
}, {
|
||||
"href": "https://nova-api.trystack.org:9774/37/images/14",
|
||||
"href": "https://nova-api.openstack.org:9774/37/images/14",
|
||||
"rel": "bookmark"
|
||||
}],
|
||||
"created": "2012-02-02T19:10:50Z",
|
||||
|
@ -43,10 +43,10 @@
|
|||
"updated": "2012-02-02T19:10:41Z",
|
||||
"name": "natty-server-cloudimg-amd64",
|
||||
"links": [{
|
||||
"href": "https://nova-api.trystack.org:9774/v1.1/37/images/13",
|
||||
"href": "https://nova-api.openstack.org:9774/v1.1/37/images/13",
|
||||
"rel": "self"
|
||||
}, {
|
||||
"href": "https://nova-api.trystack.org:9774/37/images/13",
|
||||
"href": "https://nova-api.openstack.org:9774/37/images/13",
|
||||
"rel": "bookmark"
|
||||
}],
|
||||
"created": "2012-02-02T19:10:33Z",
|
||||
|
@ -63,10 +63,10 @@
|
|||
"updated": "2012-02-02T19:10:33Z",
|
||||
"name": "natty-server-cloudimg-amd64-kernel",
|
||||
"links": [{
|
||||
"href": "https://nova-api.trystack.org:9774/v1.1/37/images/12",
|
||||
"href": "https://nova-api.openstack.org:9774/v1.1/37/images/12",
|
||||
"rel": "self"
|
||||
}, {
|
||||
"href": "https://nova-api.trystack.org:9774/37/images/12",
|
||||
"href": "https://nova-api.openstack.org:9774/37/images/12",
|
||||
"rel": "bookmark"
|
||||
}],
|
||||
"created": "2012-02-02T19:10:32Z",
|
|
@ -6,10 +6,10 @@
|
|||
"user_id": "508151008",
|
||||
"name": "mygroup-72c",
|
||||
"links": [{
|
||||
"href": "https://nova-api.trystack.org:9774/v1.1/37/servers/1459",
|
||||
"href": "https://nova-api.openstack.org:9774/v1.1/37/servers/1459",
|
||||
"rel": "self"
|
||||
}, {
|
||||
"href": "https://nova-api.trystack.org:9774/37/servers/1459",
|
||||
"href": "https://nova-api.openstack.org:9774/37/servers/1459",
|
||||
"rel": "bookmark"
|
||||
}],
|
||||
"addresses": {
|
||||
|
@ -22,7 +22,7 @@
|
|||
"image": {
|
||||
"id": "14",
|
||||
"links": [{
|
||||
"href": "https://nova-api.trystack.org:9774/37/images/14",
|
||||
"href": "https://nova-api.openstack.org:9774/37/images/14",
|
||||
"rel": "bookmark"
|
||||
}]
|
||||
},
|
||||
|
@ -35,7 +35,7 @@
|
|||
"flavor": {
|
||||
"id": "1",
|
||||
"links": [{
|
||||
"href": "https://nova-api.trystack.org:9774/37/flavors/1",
|
||||
"href": "https://nova-api.openstack.org:9774/37/flavors/1",
|
||||
"rel": "bookmark"
|
||||
}]
|
||||
},
|
|
@ -44,7 +44,7 @@ public class BaseSwiftKeystoneExpectTest<T> extends BaseRestClientExpectTest<T>
|
|||
@Override
|
||||
protected Properties setupProperties() {
|
||||
Properties overrides = super.setupProperties();
|
||||
// hpcloud or trystack
|
||||
// hpcloud or openstack
|
||||
overrides.setProperty("jclouds.regions", "region-a.geo-1,RegionOne");
|
||||
return overrides;
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ public interface ProviderMetadata {
|
|||
|
||||
/**
|
||||
*
|
||||
* @return the provider's unique identifier (ex. aws-ec2, trystack-nova)
|
||||
* @return the provider's unique identifier (ex. aws-ec2, rackspace-cloudservers-us)
|
||||
*/
|
||||
public String getId();
|
||||
|
||||
|
|
|
@ -61,7 +61,6 @@
|
|||
<module>ninefold-compute</module>
|
||||
<module>hpcloud-compute</module>
|
||||
<module>hpcloud-objectstorage</module>
|
||||
<module>trystack-nova</module>
|
||||
<module>cloudservers-us</module>
|
||||
<module>cloudservers-uk</module>
|
||||
<module>cloudfiles-us</module>
|
||||
|
|
|
@ -1,105 +0,0 @@
|
|||
/**
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. jclouds licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jclouds.trystack.nova;
|
||||
|
||||
import static org.jclouds.Constants.PROPERTY_TRUST_ALL_CERTS;
|
||||
import static org.jclouds.openstack.nova.v2_0.config.NovaProperties.AUTO_GENERATE_KEYPAIRS;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule;
|
||||
import org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule.ZoneModule;
|
||||
import org.jclouds.openstack.keystone.v2_0.config.MappedAuthenticationApiModule;
|
||||
import org.jclouds.openstack.nova.v2_0.NovaApiMetadata;
|
||||
import org.jclouds.openstack.nova.v2_0.config.NovaParserModule;
|
||||
import org.jclouds.openstack.nova.v2_0.config.NovaRestClientModule;
|
||||
import org.jclouds.providers.ProviderMetadata;
|
||||
import org.jclouds.providers.internal.BaseProviderMetadata;
|
||||
import org.jclouds.trystack.nova.config.TryStackNovaServiceContextModule;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.inject.Module;
|
||||
|
||||
/**
|
||||
* Implementation of {@link org.jclouds.types.ProviderMetadata} for TryStack Nova
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
public class TryStackNovaProviderMetadata extends BaseProviderMetadata {
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder toBuilder() {
|
||||
return builder().fromProviderMetadata(this);
|
||||
}
|
||||
|
||||
public TryStackNovaProviderMetadata() {
|
||||
super(builder());
|
||||
}
|
||||
|
||||
public TryStackNovaProviderMetadata(Builder builder) {
|
||||
super(builder);
|
||||
}
|
||||
|
||||
public static Properties defaultProperties() {
|
||||
Properties properties = new Properties();
|
||||
properties.setProperty(PROPERTY_TRUST_ALL_CERTS, "true");
|
||||
properties.setProperty(AUTO_GENERATE_KEYPAIRS, "true");
|
||||
return properties;
|
||||
}
|
||||
|
||||
public static class Builder extends BaseProviderMetadata.Builder {
|
||||
|
||||
protected Builder(){
|
||||
id("trystack-nova")
|
||||
.name("TryStack.org (Nova)")
|
||||
.apiMetadata(
|
||||
new NovaApiMetadata().toBuilder()
|
||||
.defaultModules(ImmutableSet.<Class<? extends Module>>builder()
|
||||
.add(MappedAuthenticationApiModule.class)
|
||||
.add(KeystoneAuthenticationModule.class)
|
||||
.add(ZoneModule.class)
|
||||
.add(NovaParserModule.class)
|
||||
.add(NovaRestClientModule.class)
|
||||
.add(TryStackNovaServiceContextModule.class).build())
|
||||
.build())
|
||||
.homepage(URI.create("https://trystack.org"))
|
||||
.console(URI.create("https://trystack.org/dash"))
|
||||
.iso3166Codes("US-CA")
|
||||
.endpoint("https://nova-api.trystack.org:5443/v2.0/")
|
||||
.defaultProperties(TryStackNovaProviderMetadata.defaultProperties());
|
||||
}
|
||||
|
||||
@Override
|
||||
public TryStackNovaProviderMetadata build() {
|
||||
return new TryStackNovaProviderMetadata(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder fromProviderMetadata(
|
||||
ProviderMetadata in) {
|
||||
super.fromProviderMetadata(in);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
package org.jclouds.trystack.nova;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.jclouds.location.Zone;
|
||||
import org.jclouds.openstack.nova.v2_0.NovaApi;
|
||||
import org.jclouds.openstack.nova.v2_0.compute.NovaComputeServiceAdapter;
|
||||
import org.jclouds.openstack.nova.v2_0.compute.functions.RemoveFloatingIpFromNodeAndDeallocate;
|
||||
import org.jclouds.openstack.nova.v2_0.domain.KeyPair;
|
||||
import org.jclouds.openstack.nova.v2_0.domain.zonescoped.ImageInZone;
|
||||
import org.jclouds.openstack.nova.v2_0.domain.zonescoped.ZoneAndName;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Supplier;
|
||||
import com.google.common.cache.LoadingCache;
|
||||
import com.google.common.collect.Iterables;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
public class TryStackNovaServiceAdapter extends NovaComputeServiceAdapter {
|
||||
|
||||
@Inject
|
||||
public TryStackNovaServiceAdapter(NovaApi novaApi, @Zone Supplier<Set<String>> zoneIds,
|
||||
RemoveFloatingIpFromNodeAndDeallocate removeFloatingIpFromNodeAndDeallocate, LoadingCache<ZoneAndName, KeyPair> keyPairCache) {
|
||||
super(novaApi, zoneIds, removeFloatingIpFromNodeAndDeallocate, keyPairCache);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<ImageInZone> listImages() {
|
||||
return Iterables.filter(super.listImages(), new Predicate<ImageInZone>() {
|
||||
|
||||
@Override
|
||||
public boolean apply(ImageInZone arg0) {
|
||||
String imageName = arg0.getImage().getName();
|
||||
return imageName.indexOf("kernel") == -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "notKernel";
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
/**
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. jclouds licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jclouds.trystack.nova.config;
|
||||
|
||||
import org.jclouds.openstack.nova.v2_0.compute.NovaComputeServiceAdapter;
|
||||
import org.jclouds.openstack.nova.v2_0.compute.config.NovaComputeServiceContextModule;
|
||||
import org.jclouds.trystack.nova.TryStackNovaServiceAdapter;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
public class TryStackNovaServiceContextModule extends NovaComputeServiceContextModule {
|
||||
|
||||
@Override
|
||||
protected void configure() {
|
||||
super.configure();
|
||||
bind(NovaComputeServiceAdapter.class).to(TryStackNovaServiceAdapter.class);
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
org.jclouds.trystack.nova.TryStackNovaProviderMetadata
|
|
@ -1,64 +0,0 @@
|
|||
/**
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. jclouds licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jclouds.trystack.nova;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
|
||||
import org.jclouds.http.HttpRequest;
|
||||
import org.jclouds.http.HttpResponse;
|
||||
import org.jclouds.openstack.nova.v2_0.NovaApi;
|
||||
import org.jclouds.openstack.nova.v2_0.internal.BaseNovaApiExpectTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
/**
|
||||
* This test ensures that the wiring in {@link TryStackNovaProviderMetadata} is correct.
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", testName = "TryStackNovaProviderMetadataExpectTest")
|
||||
public class TryStackNovaProviderMetadataExpectTest extends BaseNovaApiExpectTest {
|
||||
|
||||
public TryStackNovaProviderMetadataExpectTest() {
|
||||
this.provider = "trystack-nova";
|
||||
this.identity = "demo:demo";
|
||||
this.credential = "password";
|
||||
}
|
||||
|
||||
public void testCanGetConfiguredZones() {
|
||||
|
||||
HttpRequest authenticate = HttpRequest.builder().method("POST")
|
||||
.endpoint("https://nova-api.trystack.org:5443/v2.0/tokens")
|
||||
.addHeader("Accept", "application/json")
|
||||
.payload(payloadFromStringWithContentType(
|
||||
"{\"auth\":{\"passwordCredentials\":{\"username\":\"demo\",\"password\":\"password\"},\"tenantName\":\"demo\"}}"
|
||||
, "application/json")).build();
|
||||
|
||||
|
||||
HttpResponse authenticationResponse = HttpResponse.builder().statusCode(200)
|
||||
.payload(payloadFromResourceWithContentType("/access_trystack.json", "application/json")).build();
|
||||
|
||||
NovaApi whenNovaRegionExists = requestSendsResponse(authenticate, authenticationResponse);
|
||||
|
||||
assertEquals(whenNovaRegionExists.getConfiguredZones(), ImmutableSet.of("RegionOne"));
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
/**
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. jclouds licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not computee this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*
|
||||
* ====================================================================
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not computee this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* ====================================================================
|
||||
*/
|
||||
package org.jclouds.trystack.nova;
|
||||
|
||||
import org.jclouds.openstack.nova.v2_0.NovaApiMetadata;
|
||||
import org.jclouds.providers.internal.BaseProviderMetadataTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "unit", testName = "TryStackNovaProviderTest")
|
||||
public class TryStackNovaProviderTest extends BaseProviderMetadataTest {
|
||||
|
||||
public TryStackNovaProviderTest() {
|
||||
super(new TryStackNovaProviderMetadata(), new NovaApiMetadata());
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. jclouds licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not computee this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jclouds.trystack.nova.compute;
|
||||
|
||||
import org.jclouds.openstack.nova.v2_0.compute.NovaComputeServiceLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "TryStackNovaComputeServiceLiveTest")
|
||||
public class TryStackNovaComputeServiceLiveTest extends NovaComputeServiceLiveTest {
|
||||
|
||||
public TryStackNovaComputeServiceLiveTest() {
|
||||
provider = "trystack-nova";
|
||||
}
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
/**
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. jclouds licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not computee this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jclouds.trystack.nova.compute;
|
||||
|
||||
import static org.jclouds.compute.util.ComputeServiceUtils.getCores;
|
||||
import static org.testng.Assert.assertEquals;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.jclouds.compute.domain.OsFamily;
|
||||
import org.jclouds.compute.domain.OsFamilyVersion64Bit;
|
||||
import org.jclouds.compute.domain.Template;
|
||||
import org.jclouds.compute.internal.BaseTemplateBuilderLiveTest;
|
||||
import org.jclouds.openstack.nova.v2_0.compute.options.NovaTemplateOptions;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "TryStackNovaTemplateBuilderLiveTest")
|
||||
public class TryStackNovaTemplateBuilderLiveTest extends BaseTemplateBuilderLiveTest {
|
||||
|
||||
public TryStackNovaTemplateBuilderLiveTest() {
|
||||
provider = "trystack-nova";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Predicate<OsFamilyVersion64Bit> defineUnsupportedOperatingSystems() {
|
||||
return Predicates.not(new Predicate<OsFamilyVersion64Bit>() {
|
||||
|
||||
@Override
|
||||
public boolean apply(OsFamilyVersion64Bit input) {
|
||||
switch (input.family) {
|
||||
case UBUNTU:
|
||||
return (input.version.equals("") || input.version.matches("^11.*")) && input.is64Bit;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTemplateBuilder() {
|
||||
Template defaultTemplate = this.view.getComputeService().templateBuilder().build();
|
||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true);
|
||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "11.10");
|
||||
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
|
||||
assertEquals(defaultTemplate.getImage().getName(), "oneiric-server-cloudimg-amd64");
|
||||
assertEquals(defaultTemplate.getImage().getDefaultCredentials().getUser(), "ubuntu");
|
||||
assertEquals(defaultTemplate.getLocation().getId(), "RegionOne");
|
||||
assertEquals(defaultTemplate.getOptions().as(NovaTemplateOptions.class).shouldAutoAssignFloatingIp(), false);
|
||||
assertEquals(getCores(defaultTemplate.getHardware()), 1.0d);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Set<String> getIso3166Codes() {
|
||||
return ImmutableSet.<String> of("US-CA");
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. jclouds licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jclouds.trystack.nova.features;
|
||||
|
||||
import org.jclouds.openstack.nova.v2_0.features.FlavorApiLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "TryStackNovaFlavorApiLiveTest")
|
||||
public class TryStackNovaFlavorApiLiveTest extends FlavorApiLiveTest {
|
||||
public TryStackNovaFlavorApiLiveTest() {
|
||||
provider = "trystack-nova";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
/**
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. jclouds licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jclouds.trystack.nova.features;
|
||||
|
||||
import org.jclouds.openstack.nova.v2_0.features.ImageApiLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Michael Arnold
|
||||
*/
|
||||
@Test(groups = "live", testName = "TryStackNovaImageApiLiveTest")
|
||||
public class TryStackNovaImageApiLiveTest extends ImageApiLiveTest {
|
||||
public TryStackNovaImageApiLiveTest() {
|
||||
provider = "trystack-nova";
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. jclouds licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jclouds.trystack.nova.features;
|
||||
|
||||
import org.jclouds.openstack.nova.v2_0.extensions.KeyPairApiLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Michael Arnold
|
||||
*/
|
||||
@Test(groups = "live", testName = "TryStackNovaKeyPairApiLiveTest")
|
||||
public class TryStackNovaKeyPairApiLiveTest extends KeyPairApiLiveTest {
|
||||
public TryStackNovaKeyPairApiLiveTest() {
|
||||
provider = "trystack-nova";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
/**
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. jclouds licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jclouds.trystack.nova.features;
|
||||
|
||||
import org.jclouds.openstack.nova.v2_0.extensions.SecurityGroupApiLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Michael Arnold
|
||||
*/
|
||||
@Test(groups = "live", testName = "TryStackNovaSecurityGroupApiLiveTest")
|
||||
public class TryStackNovaSecurityGroupApiLiveTest extends SecurityGroupApiLiveTest {
|
||||
public TryStackNovaSecurityGroupApiLiveTest() {
|
||||
provider = "trystack-nova";
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. jclouds licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jclouds.trystack.nova.features;
|
||||
|
||||
import org.jclouds.openstack.nova.v2_0.features.ServerApiLiveTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "TryStackNovaServerApiLiveTest")
|
||||
public class TryStackNovaServerApiLiveTest extends ServerApiLiveTest {
|
||||
public TryStackNovaServerApiLiveTest() {
|
||||
provider = "trystack-nova";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
{
|
||||
"access": {
|
||||
"token": {
|
||||
"expires": "2012-03-23T21:44:09",
|
||||
"id": "Auth_4f173437e4b013bee56d1007",
|
||||
"tenant": {
|
||||
"id": "3456",
|
||||
"name": "508151008"
|
||||
}
|
||||
},
|
||||
"serviceCatalog": [{
|
||||
"endpoints": [{
|
||||
"adminURL": "https://nova-api.trystack.org:9774/v1.1/3456",
|
||||
"region": "RegionOne",
|
||||
"internalURL": "https://nova-api.trystack.org:9774/v1.1/3456",
|
||||
"publicURL": "https://nova-api.trystack.org:9774/v1.1/3456"
|
||||
}],
|
||||
"type": "compute",
|
||||
"name": "nova"
|
||||
}, {
|
||||
"endpoints": [{
|
||||
"adminURL": "https://GLANCE_API_IS_NOT_DISCLOSED/v1.1/3456",
|
||||
"region": "RegionOne",
|
||||
"internalURL": "https://GLANCE_API_IS_NOT_DISCLOSED/v1.1/3456",
|
||||
"publicURL": "https://GLANCE_API_IS_NOT_DISCLOSED/v1.1/3456"
|
||||
}],
|
||||
"type": "image",
|
||||
"name": "glance"
|
||||
}, {
|
||||
"endpoints": [{
|
||||
"adminURL": "https://nova-api.trystack.org:5443/v2.0",
|
||||
"region": "RegionOne",
|
||||
"internalURL": "https://keystone.thefreecloud.org:5000/v2.0",
|
||||
"publicURL": "https://keystone.thefreecloud.org:5000/v2.0"
|
||||
}],
|
||||
"type": "identity",
|
||||
"name": "keystone"
|
||||
}],
|
||||
"user": {
|
||||
"id": "43",
|
||||
"roles": [{
|
||||
"tenantId": "3456",
|
||||
"id": "2",
|
||||
"name": "Member"
|
||||
}],
|
||||
"name": "508151008"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue