Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
Correct name of internal URL in endpoints and template
Browse files Browse the repository at this point in the history
Base on the identity api speces [0][1], internal URL of a service
should be provided by 'internalURL' key instead of 'privateURL'.

[0] http://developer.openstack.org/api-ref-identity-v2.html
[1] http://developer.openstack.org/api-ref-identity-v3.html

Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
  • Loading branch information
Zhi Yan Liu committed Nov 17, 2014
1 parent 9e959d5 commit cece501
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 28 deletions.
12 changes: 6 additions & 6 deletions etc/identity.templates
@@ -1,30 +1,30 @@

catalog.RegionOne.identity.name = Identity Service
catalog.RegionOne.identity.publicURL = http://localhost:5000/v2.0
catalog.RegionOne.identity.privateURL = http://localhost:5000/v2.0
catalog.RegionOne.identity.internalURL = http://localhost:5000/v2.0
catalog.RegionOne.identity.adminURL = http://localhost:5000/v2.0

catalog.RegionOne.baremetal.name = Bare Metal Service
catalog.RegionOne.baremetal.publicURL = http://localhost:5000/v2/baremetal
catalog.RegionOne.baremetal.privateURL = http://localhost:5000/v2/baremetal
catalog.RegionOne.baremetal.internalURL = http://localhost:5000/v2/baremetal
catalog.RegionOne.baremetal.adminURL = http://localhost:5000/v2/baremetal

catalog.RegionOne.compute.name = Compute Service
catalog.RegionOne.compute.publicURL = http://localhost:5000/compute/v2/$(tenant_id)s
catalog.RegionOne.compute.privateURL = http://localhost:5000/compute/v2/$(tenant_id)s
catalog.RegionOne.compute.internalURL = http://localhost:5000/compute/v2/$(tenant_id)s
catalog.RegionOne.compute.adminURL = http://localhost:5000/compute/v2/$(tenant_id)s

catalog.RegionOne.image.name = Image Service
catalog.RegionOne.image.publicURL = http://localhost:5000/image
catalog.RegionOne.image.privateURL = http://localhost:5000/image
catalog.RegionOne.image.internalURL = http://localhost:5000/image
catalog.RegionOne.image.adminURL = http://localhost:5000/image

catalog.RegionOne.network.name = Network Service
catalog.RegionOne.network.publicURL = http://localhost:5000/network
catalog.RegionOne.network.privateURL = http://localhost:5000/network
catalog.RegionOne.network.internalURL = http://localhost:5000/network
catalog.RegionOne.network.adminURL = http://localhost:5000/network

catalog.RegionOne.volume.name = Block Storage Service
catalog.RegionOne.volume.publicURL = http://localhost:5000/volume/v1/$(tenant_id)s
catalog.RegionOne.volume.privateURL = http://localhost:5000/volume/v1/$(tenant_id)s
catalog.RegionOne.volume.internalURL = http://localhost:5000/volume/v1/$(tenant_id)s
catalog.RegionOne.volume.adminURL = http://localhost:5000/volume/v1/$(tenant_id)s
12 changes: 6 additions & 6 deletions etc/identity_v3.templates
@@ -1,30 +1,30 @@

catalog.RegionOne.identity.name = Identity Service
catalog.RegionOne.identity.publicURL = http://localhost:5000/v3
catalog.RegionOne.identity.privateURL = http://localhost:5000/v3
catalog.RegionOne.identity.internalURL = http://localhost:5000/v3
catalog.RegionOne.identity.adminURL = http://localhost:5000/v3

catalog.RegionOne.baremetal.name = Bare Metal Service
catalog.RegionOne.baremetal.publicURL = http://localhost:5000/v2/baremetal
catalog.RegionOne.baremetal.privateURL = http://localhost:5000/v2/baremetal
catalog.RegionOne.baremetal.internalURL = http://localhost:5000/v2/baremetal
catalog.RegionOne.baremetal.adminURL = http://localhost:5000/v2/baremetal

catalog.RegionOne.compute.name = Compute Service
catalog.RegionOne.compute.publicURL = http://localhost:5000/compute/v2/$(tenant_id)s
catalog.RegionOne.compute.privateURL = http://localhost:5000/compute/v2/$(tenant_id)s
catalog.RegionOne.compute.internalURL = http://localhost:5000/compute/v2/$(tenant_id)s
catalog.RegionOne.compute.adminURL = http://localhost:5000/compute/v2/$(tenant_id)s

catalog.RegionOne.image.name = Image Service
catalog.RegionOne.image.publicURL = http://localhost:5000/image/v2
catalog.RegionOne.image.privateURL = http://localhost:5000/image/v2
catalog.RegionOne.image.internalURL = http://localhost:5000/image/v2
catalog.RegionOne.image.adminURL = http://localhost:5000/image/v2

catalog.RegionOne.network.name = Image Service
catalog.RegionOne.network.publicURL = http://localhost:5000/network/
catalog.RegionOne.network.privateURL = http://localhost:5000/network/
catalog.RegionOne.network.internalURL = http://localhost:5000/network/
catalog.RegionOne.network.adminURL = http://localhost:5000/network/

catalog.RegionOne.volume.name = Block Storage Service
catalog.RegionOne.volume.publicURL = http://localhost:5000/volume/v1/$(tenant_id)s
catalog.RegionOne.volume.privateURL = http://localhost:5000/volume/v1/$(tenant_id)s
catalog.RegionOne.volume.internalURL = http://localhost:5000/volume/v1/$(tenant_id)s
catalog.RegionOne.volume.adminURL = http://localhost:5000/volume/v1/$(tenant_id)s
2 changes: 1 addition & 1 deletion jumpgate/identity/drivers/sl/auth_tokens_v3.py
Expand Up @@ -128,7 +128,7 @@ def _build_catalog(self, token_details, user_id):
# 'id': "????"
'interface': "internal",
'region': service.get('region', 'RegionOne'),
'url': service.get('privateURL')
'url': service.get('internalURL')
}, {
# 'id': "????"
'interface': "public",
Expand Down
2 changes: 1 addition & 1 deletion jumpgate/identity/drivers/sl/services_v3.py
Expand Up @@ -72,7 +72,7 @@ def on_get(self, req, resp):
'endpoints': [{
'region': service.get('region', 'RegionOne'),
'publicURL': service.get('publicURL'),
'privateURL': service.get('privateURL'),
'internalURL': service.get('internalURL'),
'adminURL': service.get('adminURL'),
}],
'endpoint_links': [],
Expand Down
4 changes: 2 additions & 2 deletions jumpgate/identity/drivers/sl/tokens.py
Expand Up @@ -210,7 +210,7 @@ def _add_catalog_to_access(self, access, token):
'endpoints': [{
'region': service.get('region', 'RegionOne'),
'publicURL': service.get('publicURL'),
'privateURL': service.get('privateURL'),
'internalURL': service.get('internalURL'),
'adminURL': service.get('adminURL'),
}],
'endpoint_links': [],
Expand Down Expand Up @@ -249,7 +249,7 @@ def on_get(self, req, resp, token_id):
'adminURL': service.get('adminURL'),
'name': service.get('name', 'Unknown'),
'publicURL': service.get('publicURL'),
'privateURL': service.get('privateURL'),
'internalURL': service.get('internalURL'),
'region': service.get('region', 'RegionOne'),
'tenantId': tokens.tenant_id(token),
'type': service_type,
Expand Down
12 changes: 6 additions & 6 deletions tests/jumpgate-tests/identity.templates
@@ -1,24 +1,24 @@

catalog.RegionOne.identity.name = Identity Service
catalog.RegionOne.identity.publicURL = http://localhost:5000/v2.0
catalog.RegionOne.identity.privateURL = http://localhost:5000/v2.0
catalog.RegionOne.identity.internalURL = http://localhost:5000/v2.0

catalog.RegionOne.baremetal.name = Bare Metal Service
catalog.RegionOne.baremetal.publicURL = http://localhost:5000/v2/baremetal
catalog.RegionOne.baremetal.privateURL = http://localhost:5000/v2/baremetal
catalog.RegionOne.baremetal.internalURL = http://localhost:5000/v2/baremetal

catalog.RegionOne.compute.name = Compute Service
catalog.RegionOne.compute.publicURL = http://localhost:5000/compute/v2/$(tenant_id)s
catalog.RegionOne.compute.privateURL = http://localhost:5000/compute/v2/$(tenant_id)s
catalog.RegionOne.compute.internalURL = http://localhost:5000/compute/v2/$(tenant_id)s

catalog.RegionOne.image.name = Image Service
catalog.RegionOne.image.publicURL = http://localhost:5000/image/v2
catalog.RegionOne.image.privateURL = http://localhost:5000/image/v2
catalog.RegionOne.image.internalURL = http://localhost:5000/image/v2

catalog.RegionOne.network.name = Image Service
catalog.RegionOne.network.publicURL = http://localhost:5000/network/v2
catalog.RegionOne.network.privateURL = http://localhost:5000/network/v2
catalog.RegionOne.network.internalURL = http://localhost:5000/network/v2

#catalog.RegionOne.volume.name = Block Storage Service
#catalog.RegionOne.volume.publicURL = http://localhost:5000/volume/v1/$(tenant_id)s
#catalog.RegionOne.volume.privateURL = http://localhost:5000/volume/v1/$(tenant_id)s
#catalog.RegionOne.volume.internalURL = http://localhost:5000/volume/v1/$(tenant_id)s
12 changes: 6 additions & 6 deletions tests/jumpgate-tests/identity_v3.templates
@@ -1,30 +1,30 @@

catalog.RegionOne.identity.name = Identity Service
catalog.RegionOne.identity.publicURL = http://localhost:5000/v3
catalog.RegionOne.identity.privateURL = http://localhost:5000/v3
catalog.RegionOne.identity.internalURL = http://localhost:5000/v3
catalog.RegionOne.identity.adminURL = http://localhost:5000/v3

catalog.RegionOne.baremetal.name = Bare Metal Service
catalog.RegionOne.baremetal.publicURL = http://localhost:5000/v2/baremetal
catalog.RegionOne.baremetal.privateURL = http://localhost:5000/v2/baremetal
catalog.RegionOne.baremetal.internalURL = http://localhost:5000/v2/baremetal
catalog.RegionOne.baremetal.adminURL = http://localhost:5000/v2/baremetal

catalog.RegionOne.compute.name = Compute Service
catalog.RegionOne.compute.publicURL = http://localhost:5000/compute/v2/$(tenant_id)s
catalog.RegionOne.compute.privateURL = http://localhost:5000/compute/v2/$(tenant_id)s
catalog.RegionOne.compute.internalURL = http://localhost:5000/compute/v2/$(tenant_id)s
catalog.RegionOne.compute.adminURL = http://localhost:5000/compute/v2/$(tenant_id)s

catalog.RegionOne.image.name = Image Service
catalog.RegionOne.image.publicURL = http://localhost:5000/image/v2
catalog.RegionOne.image.privateURL = http://localhost:5000/image/v2
catalog.RegionOne.image.internalURL = http://localhost:5000/image/v2
catalog.RegionOne.image.adminURL = http://localhost:5000/image/v2

catalog.RegionOne.network.name = Image Service
catalog.RegionOne.network.publicURL = http://localhost:5000/network/
catalog.RegionOne.network.privateURL = http://localhost:5000/network/
catalog.RegionOne.network.internalURL = http://localhost:5000/network/
catalog.RegionOne.network.adminURL = http://localhost:5000/network/

#catalog.RegionOne.volume.name = Block Storage Service
#catalog.RegionOne.volume.publicURL = http://localhost:5000/volume/v1/$(tenant_id)s
#catalog.RegionOne.volume.privateURL = http://localhost:5000/volume/v1/$(tenant_id)s
#catalog.RegionOne.volume.internalURL = http://localhost:5000/volume/v1/$(tenant_id)s
#catalog.RegionOne.volume.adminURL = http://localhost:5000/volume/v1/$(tenant_id)s

0 comments on commit cece501

Please sign in to comment.