diff --git a/config.yaml b/config.yaml index dbe20e50..e486ff40 100644 --- a/config.yaml +++ b/config.yaml @@ -207,7 +207,7 @@ options: 192.168.0.0/24) . This network will be used for public endpoints. - endpoint-public-name: + os-public-hostname: type: string default: description: | @@ -215,7 +215,7 @@ options: in the keystone identity provider. . This value will be used for public endpoints. For example, an - endpoint-public-name set to 'cinder.example.com' with ssl enabled will + os-public-hostname set to 'cinder.example.com' with ssl enabled will create two public endpoints for cinder. . https://cinder.example.com:443/v1/$(tenant_id)s and diff --git a/hooks/charmhelpers/contrib/openstack/ip.py b/hooks/charmhelpers/contrib/openstack/ip.py index 45531b57..6e18c98a 100644 --- a/hooks/charmhelpers/contrib/openstack/ip.py +++ b/hooks/charmhelpers/contrib/openstack/ip.py @@ -34,17 +34,17 @@ ADDRESS_MAP = { PUBLIC: { 'config': 'os-public-network', 'fallback': 'public-address', - 'override': 'endpoint-public-name', + 'override': 'os-public-hostname', }, INTERNAL: { 'config': 'os-internal-network', 'fallback': 'private-address', - 'override': 'endpoint-internal-name', + 'override': 'os-internal-hostname', }, ADMIN: { 'config': 'os-admin-network', 'fallback': 'private-address', - 'override': 'endpoint-admin-name', + 'override': 'os-admin-hostname', } } diff --git a/unit_tests/test_cinder_hooks.py b/unit_tests/test_cinder_hooks.py index fb38b936..37f6e9a3 100644 --- a/unit_tests/test_cinder_hooks.py +++ b/unit_tests/test_cinder_hooks.py @@ -473,7 +473,7 @@ class TestJoinedHooks(CharmTestCase): _unit_get.return_value = 'cindernode1' self.config.side_effect = self.test_config.get _config.side_effect = self.test_config.get - self.test_config.set('endpoint-public-name', 'public.example.com') + self.test_config.set('os-public-hostname', 'public.example.com') _is_clustered.return_value = False hooks.hooks.execute(['hooks/identity-service-relation-joined']) expected = { @@ -484,12 +484,14 @@ class TestJoinedHooks(CharmTestCase): 'admin_url': None, 'cinder_service': 'cinder', 'cinder_region': 'RegionOne', - 'cinder_public_url': 'http://public.example.com:8776/v1/$(tenant_id)s', + 'cinder_public_url': + 'http://public.example.com:8776/v1/$(tenant_id)s', 'cinder_admin_url': 'http://cindernode1:8776/v1/$(tenant_id)s', 'cinder_internal_url': 'http://cindernode1:8776/v1/$(tenant_id)s', 'cinderv2_service': 'cinderv2', 'cinderv2_region': 'RegionOne', - 'cinderv2_public_url': 'http://public.example.com:8776/v2/$(tenant_id)s', + 'cinderv2_public_url': + 'http://public.example.com:8776/v2/$(tenant_id)s', 'cinderv2_admin_url': 'http://cindernode1:8776/v2/$(tenant_id)s', 'cinderv2_internal_url': 'http://cindernode1:8776/' 'v2/$(tenant_id)s',