Skip to content
This repository has been archived by the owner on Mar 25, 2018. It is now read-only.

Commit

Permalink
Removed trystack-nova provider.
Browse files Browse the repository at this point in the history
  • Loading branch information
Everett Toews committed Apr 26, 2013
1 parent 6d6be56 commit 2bbd039
Show file tree
Hide file tree
Showing 28 changed files with 71 additions and 857 deletions.
5 changes: 0 additions & 5 deletions allcompute/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ public SecurityGroupInZone apply(ZoneSecurityGroupNameAndPorts zoneSecurityGroup

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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -85,39 +85,39 @@ public void testListLocationsWhenResponseIs2xx() throws Exception {
assertEquals(apiWhenServersExist.listNodes().iterator().next().getName(), "sample-server");
}

Map<HttpRequest, HttpResponse> defaultTemplateTryStack = ImmutableMap
Map<HttpRequest, HttpResponse> defaultTemplateOpenStack = ImmutableMap
.<HttpRequest, HttpResponse> builder()
.put(keystoneAuthWithUsernameAndPasswordAndTenantName,
HttpResponse
.builder()
.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());

}

Expand Down Expand Up @@ -149,7 +149,7 @@ public void testListServersWhenReponseIs404IsEmpty() throws Exception {
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();

Expand All @@ -158,7 +158,7 @@ public void testListServersWhenReponseIs404IsEmpty() throws Exception {
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(
Expand All @@ -172,7 +172,7 @@ public void testListServersWhenReponseIs404IsEmpty() throws Exception {
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(
Expand All @@ -186,7 +186,7 @@ public void testListServersWhenReponseIs404IsEmpty() throws Exception {
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();

Expand All @@ -196,7 +196,7 @@ public void testListServersWhenReponseIs404IsEmpty() throws Exception {
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(
Expand All @@ -210,7 +210,7 @@ public void testListServersWhenReponseIs404IsEmpty() throws Exception {
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();

Expand All @@ -220,7 +220,7 @@ public void testListServersWhenReponseIs404IsEmpty() throws Exception {
@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);
Expand All @@ -236,7 +236,7 @@ public void testCreateNodeWithGeneratedKeyPair() throws Exception {
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(
Expand Down Expand Up @@ -276,7 +276,7 @@ public String get() {
@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);
Expand All @@ -290,7 +290,7 @@ public void testCreateNodeWhileUserSpecifiesKeyPair() throws Exception {
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(
Expand Down Expand Up @@ -332,15 +332,15 @@ public String get() {
@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);

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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -73,7 +73,7 @@ public Server expected() {
.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
Expand All @@ -82,15 +82,15 @@ public Server expected() {
.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();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down
Loading

0 comments on commit 2bbd039

Please sign in to comment.