From cece5016053c3d869330da231747e390ce3d58dd Mon Sep 17 00:00:00 2001 From: Zhi Yan Liu Date: Tue, 18 Nov 2014 00:27:07 +0800 Subject: [PATCH] Correct name of internal URL in endpoints and template 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 --- etc/identity.templates | 12 ++++++------ etc/identity_v3.templates | 12 ++++++------ jumpgate/identity/drivers/sl/auth_tokens_v3.py | 2 +- jumpgate/identity/drivers/sl/services_v3.py | 2 +- jumpgate/identity/drivers/sl/tokens.py | 4 ++-- tests/jumpgate-tests/identity.templates | 12 ++++++------ tests/jumpgate-tests/identity_v3.templates | 12 ++++++------ 7 files changed, 28 insertions(+), 28 deletions(-) diff --git a/etc/identity.templates b/etc/identity.templates index 9629dce..4d96fd6 100644 --- a/etc/identity.templates +++ b/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 diff --git a/etc/identity_v3.templates b/etc/identity_v3.templates index 1f9eb78..9e34302 100755 --- a/etc/identity_v3.templates +++ b/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 diff --git a/jumpgate/identity/drivers/sl/auth_tokens_v3.py b/jumpgate/identity/drivers/sl/auth_tokens_v3.py index 8773fd4..095b5bc 100755 --- a/jumpgate/identity/drivers/sl/auth_tokens_v3.py +++ b/jumpgate/identity/drivers/sl/auth_tokens_v3.py @@ -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", diff --git a/jumpgate/identity/drivers/sl/services_v3.py b/jumpgate/identity/drivers/sl/services_v3.py index 3d5b22c..3e12f5e 100755 --- a/jumpgate/identity/drivers/sl/services_v3.py +++ b/jumpgate/identity/drivers/sl/services_v3.py @@ -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': [], diff --git a/jumpgate/identity/drivers/sl/tokens.py b/jumpgate/identity/drivers/sl/tokens.py index 852509e..6552cdd 100644 --- a/jumpgate/identity/drivers/sl/tokens.py +++ b/jumpgate/identity/drivers/sl/tokens.py @@ -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': [], @@ -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, diff --git a/tests/jumpgate-tests/identity.templates b/tests/jumpgate-tests/identity.templates index 9dd48eb..5ff3089 100644 --- a/tests/jumpgate-tests/identity.templates +++ b/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 diff --git a/tests/jumpgate-tests/identity_v3.templates b/tests/jumpgate-tests/identity_v3.templates index a2af81a..7201036 100644 --- a/tests/jumpgate-tests/identity_v3.templates +++ b/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