Merge pull request #964 from rackspace/keystone-support-for-cinder

Added Cinder service to Keystone test service catalog repsonses.
This commit is contained in:
Adrian Cole 2012-11-06 15:30:05 -08:00
commit 36e7c1664a
5 changed files with 98 additions and 50 deletions

View File

@ -49,4 +49,8 @@ public interface ServiceType {
* Network Service (Quantum) * Network Service (Quantum)
*/ */
public static final String NETWORK = "network"; public static final String NETWORK = "network";
/**
* Block Storage (Cinder)
*/
public static final String BLOCK_STORAGE = "volume";
} }

View File

@ -108,7 +108,14 @@ public class ParseAccessTest extends BaseItemParserTest<Access> {
.internalURL("https://csnode.jclouds.org:9696/v1.0/tenants/3456") .internalURL("https://csnode.jclouds.org:9696/v1.0/tenants/3456")
.adminURL("https://csnode.jclouds.org:9696/v1.0") .adminURL("https://csnode.jclouds.org:9696/v1.0")
.region("region-a.geo-1") .region("region-a.geo-1")
.versionId("1.0").build()).build()).build(); .versionId("1.0").build()).build())
.service(Service.builder().name("cinder").type("volume")
.endpoint(Endpoint.builder()
.id("08330c2dcbfc4c6c8dc7a0949fbf5da7")
.publicURL("http://172.16.0.1:8776/v1/50cdb4c60374463198695d9f798fa34d")
.internalURL("http://10.0.2.15:8776/v1/50cdb4c60374463198695d9f798fa34d")
.adminURL("http://10.0.2.15:8776/v1/50cdb4c60374463198695d9f798fa34d")
.region("RegionOne").build()).build()).build();
} }
} }

View File

@ -99,6 +99,15 @@ public class ParseRackspaceAccessTest extends BaseItemParserTest<Access> {
.tenantId("40806637803162") .tenantId("40806637803162")
.publicURL("https://dfw.loadbalancers.api.rackspacecloud.com/v1.0/40806637803162") .publicURL("https://dfw.loadbalancers.api.rackspacecloud.com/v1.0/40806637803162")
.region("DFW").build()).build()) .region("DFW").build()).build())
.service(Service.builder().name("cloudBlockStorage").type("volume")
.endpoint(Endpoint.builder()
.tenantId("40806637803162")
.publicURL("https://dfw.blockstorage.api.rackspacecloud.com/v1/40806637803162")
.region("DFW").build())
.endpoint(Endpoint.builder()
.tenantId("40806637803162")
.publicURL("https://ord.blockstorage.api.rackspacecloud.com/v1/40806637803162")
.region("ORD").build()).build())
.service(Service.builder().name("cloudMonitoring").type("rax:monitor") .service(Service.builder().name("cloudMonitoring").type("rax:monitor")
.endpoint(Endpoint.builder() .endpoint(Endpoint.builder()
.tenantId("40806637803162") .tenantId("40806637803162")

View File

@ -60,7 +60,7 @@
"publicURL": "https://csnode.jclouds.org/v2.0/", "publicURL": "https://csnode.jclouds.org/v2.0/",
"region": "region-a.geo-1", "region": "region-a.geo-1",
"id": "2.0", "id": "2.0",
"versionId":"2.0", "versionId": "2.0",
"list": "https://csnode.jclouds.org/extension" "list": "https://csnode.jclouds.org/extension"
} }
] ]
@ -77,52 +77,68 @@
} }
] ]
}, },
{ {
"name": "Compute", "name": "Compute",
"type": "compute", "type": "compute",
"endpoints": [ "endpoints": [
{ {
"tenantId": "3456", "tenantId": "3456",
"publicURL": "https:\/\/az-1.region-a.geo-1.compute.hpcloudsvc.com\/v1.1\/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", "publicURL2": "https://az-1.region-a.geo-1.ec2-compute.hpcloudsvc.com/services/Cloud",
"region": "az-1.region-a.geo-1", "region": "az-1.region-a.geo-1",
"versionId": "1.1", "versionId": "1.1",
"versionInfo": "https:\/\/az-1.region-a.geo-1.compute.hpcloudsvc.com\/v1.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" "versionList": "https://az-1.region-a.geo-1.compute.hpcloudsvc.com"
}, },
{ {
"tenantId": "3456", "tenantId": "3456",
"publicURL": "https:\/\/az-2.region-a.geo-1.compute.hpcloudsvc.com\/v1.1\/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", "publicURL2": "https://az-2.region-a.geo-1.ec2-compute.hpcloudsvc.com/services/Cloud",
"region": "az-2.region-a.geo-1", "region": "az-2.region-a.geo-1",
"versionId": "1.1", "versionId": "1.1",
"versionInfo": "https:\/\/az-2.region-a.geo-1.compute.hpcloudsvc.com\/v1.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" "versionList": "https://az-2.region-a.geo-1.compute.hpcloudsvc.com"
}, },
{ {
"tenantId": "3456", "tenantId": "3456",
"publicURL": "https:\/\/az-3.region-a.geo-1.compute.hpcloudsvc.com\/v1.1\/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", "publicURL2": "https://az-3.region-a.geo-1.ec2-compute.hpcloudsvc.com/services/Cloud",
"region": "az-3.region-a.geo-1", "region": "az-3.region-a.geo-1",
"versionId": "1.1", "versionId": "1.1",
"versionInfo": "https:\/\/az-3.region-a.geo-1.compute.hpcloudsvc.com\/v1.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" "versionList": "https://az-3.region-a.geo-1.compute.hpcloudsvc.com"
} }
] ]
}, },
{ {
"type": "network", "type": "network",
"name": "Quantum Service", "name": "Quantum Service",
"endpoints": [{ "endpoints": [
"tenantId": "3456", {
"adminURL": "https://csnode.jclouds.org:9696/v1.0", "tenantId": "3456",
"region": "region-a.geo-1", "adminURL": "https://csnode.jclouds.org:9696/v1.0",
"versionId": "1.0", "region": "region-a.geo-1",
"publicURL": "https://csnode.jclouds.org:9696/v1.0/tenants/3456", "versionId": "1.0",
"internalURL": "https://csnode.jclouds.org:9696/v1.0/tenants/3456" "publicURL": "https://csnode.jclouds.org:9696/v1.0/tenants/3456",
}], "internalURL": "https://csnode.jclouds.org:9696/v1.0/tenants/3456"
"endpoints_links": [] }
} ],
] "endpoints_links": []
} },
{
"type": "volume",
"name": "cinder",
"endpoints": [
{
"adminURL": "http://10.0.2.15:8776/v1/50cdb4c60374463198695d9f798fa34d",
"region": "RegionOne",
"internalURL": "http://10.0.2.15:8776/v1/50cdb4c60374463198695d9f798fa34d",
"id": "08330c2dcbfc4c6c8dc7a0949fbf5da7",
"publicURL": "http://172.16.0.1:8776/v1/50cdb4c60374463198695d9f798fa34d"
}
],
"endpoints_links": []
}
]
}
} }

View File

@ -62,6 +62,18 @@
}], }],
"name": "cloudLoadBalancers", "name": "cloudLoadBalancers",
"type": "rax:load-balancer" "type": "rax:load-balancer"
}, {
"endpoints": [{
"publicURL": "https:\/\/dfw.blockstorage.api.rackspacecloud.com\/v1\/40806637803162",
"tenantId": "40806637803162",
"region": "DFW"
}, {
"publicURL": "https:\/\/ord.blockstorage.api.rackspacecloud.com\/v1\/40806637803162",
"tenantId": "40806637803162",
"region": "ORD"
}],
"type": "volume",
"name": "cloudBlockStorage"
}, { }, {
"endpoints": [{ "endpoints": [{
"tenantId": "40806637803162", "tenantId": "40806637803162",