From ee569eef3cdadedbbd4865fe2bda237331906a87 Mon Sep 17 00:00:00 2001 From: Liam Young Date: Tue, 12 Jan 2016 11:16:17 +0000 Subject: [PATCH 1/2] Rename catalogue entry published to keystone from quantum to neutron --- hooks/neutron_api_hooks.py | 17 ++++++++++------ unit_tests/test_neutron_api_hooks.py | 30 ++++++++++++++++++---------- 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/hooks/neutron_api_hooks.py b/hooks/neutron_api_hooks.py index 5d57abff..1fb8ddca 100755 --- a/hooks/neutron_api_hooks.py +++ b/hooks/neutron_api_hooks.py @@ -357,11 +357,16 @@ def identity_joined(rid=None, relation_trigger=False): api_port('neutron-server') ) rel_settings = { - 'quantum_service': 'quantum', - 'quantum_region': config('region'), - 'quantum_public_url': public_url, - 'quantum_admin_url': admin_url, - 'quantum_internal_url': internal_url, + 'neutron_service': 'neutron', + 'neutron_region': config('region'), + 'neutron_public_url': public_url, + 'neutron_admin_url': admin_url, + 'neutron_internal_url': internal_url, + 'quantum_service': None, + 'quantum_region': None, + 'quantum_public_url': None, + 'quantum_admin_url': None, + 'quantum_internal_url': None, } if relation_trigger: rel_settings['relation_trigger'] = str(uuid.uuid4()) @@ -395,7 +400,7 @@ def neutron_api_relation_joined(rid=None): else: relation_data['neutron-security-groups'] = "no" relation_set(relation_id=rid, **relation_data) - # Nova-cc may have grabbed the quantum endpoint so kick identity-service + # Nova-cc may have grabbed the neutron endpoint so kick identity-service # relation to register that its here for r_id in relation_ids('identity-service'): identity_joined(rid=r_id, relation_trigger=True) diff --git a/unit_tests/test_neutron_api_hooks.py b/unit_tests/test_neutron_api_hooks.py index a7f14576..c924bc41 100644 --- a/unit_tests/test_neutron_api_hooks.py +++ b/unit_tests/test_neutron_api_hooks.py @@ -378,11 +378,16 @@ class NeutronAPIHooksTests(CharmTestCase): self.test_config.set('region', 'region1') _neutron_url = 'http://127.0.0.1:9696' _endpoints = { - 'quantum_service': 'quantum', - 'quantum_region': 'region1', - 'quantum_public_url': _neutron_url, - 'quantum_admin_url': _neutron_url, - 'quantum_internal_url': _neutron_url, + 'neutron_service': 'neutron', + 'neutron_region': 'region1', + 'neutron_public_url': _neutron_url, + 'neutron_admin_url': _neutron_url, + 'neutron_internal_url': _neutron_url, + 'quantum_service': None, + 'quantum_region': None, + 'quantum_public_url': None, + 'quantum_admin_url': None, + 'quantum_internal_url': None, } self._call_hook('identity-service-relation-joined') self.relation_set.assert_called_with( @@ -407,11 +412,16 @@ class NeutronAPIHooksTests(CharmTestCase): self._call_hook('identity-service-relation-joined') _neutron_url = 'http://127.0.0.1:9696' _endpoints = { - 'quantum_service': 'quantum', - 'quantum_region': 'region1', - 'quantum_public_url': 'http://neutron-api.example.com:9696', - 'quantum_admin_url': _neutron_url, - 'quantum_internal_url': _neutron_url, + 'neutron_service': 'neutron', + 'neutron_region': 'region1', + 'neutron_public_url': 'http://neutron-api.example.com:9696', + 'neutron_admin_url': _neutron_url, + 'neutron_internal_url': _neutron_url, + 'quantum_service': None, + 'quantum_region': None, + 'quantum_public_url': None, + 'quantum_admin_url': None, + 'quantum_internal_url': None, } self.relation_set.assert_called_with( relation_id=None, From eba66e7debd9eb9d2811710dccbfe81e4ab1d3c4 Mon Sep 17 00:00:00 2001 From: Liam Young Date: Thu, 14 Jan 2016 17:03:13 +0000 Subject: [PATCH 2/2] Fix amulet tests --- tests/basic_deployment.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/basic_deployment.py b/tests/basic_deployment.py index 5efc9810..774b5047 100644 --- a/tests/basic_deployment.py +++ b/tests/basic_deployment.py @@ -284,11 +284,11 @@ class NeutronAPIBasicDeployment(OpenStackAmuletDeployment): api_endpoint = 'http://{}:9696'.format(api_ip) expected = { 'private-address': u.valid_ip, - 'quantum_region': 'RegionOne', - 'quantum_service': 'quantum', - 'quantum_admin_url': api_endpoint, - 'quantum_internal_url': api_endpoint, - 'quantum_public_url': api_endpoint, + 'neutron_region': 'RegionOne', + 'neutron_service': 'neutron', + 'neutron_admin_url': api_endpoint, + 'neutron_internal_url': api_endpoint, + 'neutron_public_url': api_endpoint, } ret = u.validate_relation_data(unit, relation, expected) @@ -342,7 +342,7 @@ class NeutronAPIBasicDeployment(OpenStackAmuletDeployment): 'service_port': '5000', 'service_protocol': 'http', 'service_tenant': 'services', - 'service_username': 'quantum', + 'service_username': 'neutron', } ret = u.validate_relation_data(unit, relation, expected) if ret: @@ -436,7 +436,7 @@ class NeutronAPIBasicDeployment(OpenStackAmuletDeployment): 'keystone_authtoken': { 'signing_dir': '/var/cache/neutron', 'admin_tenant_name': 'services', - 'admin_user': 'quantum', + 'admin_user': 'neutron', 'admin_password': rel_napi_ks['service_password'], }, 'database': {