[gnuoy, r=thedac] Rename catalogue entry published to keystone from quantum to neutron

This commit is contained in:
David Ames 2016-01-15 07:45:18 -08:00
commit 778c6311ea
3 changed files with 38 additions and 23 deletions

View File

@ -357,11 +357,16 @@ def identity_joined(rid=None, relation_trigger=False):
api_port('neutron-server') api_port('neutron-server')
) )
rel_settings = { rel_settings = {
'quantum_service': 'quantum', 'neutron_service': 'neutron',
'quantum_region': config('region'), 'neutron_region': config('region'),
'quantum_public_url': public_url, 'neutron_public_url': public_url,
'quantum_admin_url': admin_url, 'neutron_admin_url': admin_url,
'quantum_internal_url': internal_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: if relation_trigger:
rel_settings['relation_trigger'] = str(uuid.uuid4()) rel_settings['relation_trigger'] = str(uuid.uuid4())
@ -395,7 +400,7 @@ def neutron_api_relation_joined(rid=None):
else: else:
relation_data['neutron-security-groups'] = "no" relation_data['neutron-security-groups'] = "no"
relation_set(relation_id=rid, **relation_data) 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 # relation to register that its here
for r_id in relation_ids('identity-service'): for r_id in relation_ids('identity-service'):
identity_joined(rid=r_id, relation_trigger=True) identity_joined(rid=r_id, relation_trigger=True)

View File

@ -284,11 +284,11 @@ class NeutronAPIBasicDeployment(OpenStackAmuletDeployment):
api_endpoint = 'http://{}:9696'.format(api_ip) api_endpoint = 'http://{}:9696'.format(api_ip)
expected = { expected = {
'private-address': u.valid_ip, 'private-address': u.valid_ip,
'quantum_region': 'RegionOne', 'neutron_region': 'RegionOne',
'quantum_service': 'quantum', 'neutron_service': 'neutron',
'quantum_admin_url': api_endpoint, 'neutron_admin_url': api_endpoint,
'quantum_internal_url': api_endpoint, 'neutron_internal_url': api_endpoint,
'quantum_public_url': api_endpoint, 'neutron_public_url': api_endpoint,
} }
ret = u.validate_relation_data(unit, relation, expected) ret = u.validate_relation_data(unit, relation, expected)
@ -342,7 +342,7 @@ class NeutronAPIBasicDeployment(OpenStackAmuletDeployment):
'service_port': '5000', 'service_port': '5000',
'service_protocol': 'http', 'service_protocol': 'http',
'service_tenant': 'services', 'service_tenant': 'services',
'service_username': 'quantum', 'service_username': 'neutron',
} }
ret = u.validate_relation_data(unit, relation, expected) ret = u.validate_relation_data(unit, relation, expected)
if ret: if ret:
@ -436,7 +436,7 @@ class NeutronAPIBasicDeployment(OpenStackAmuletDeployment):
'keystone_authtoken': { 'keystone_authtoken': {
'signing_dir': '/var/cache/neutron', 'signing_dir': '/var/cache/neutron',
'admin_tenant_name': 'services', 'admin_tenant_name': 'services',
'admin_user': 'quantum', 'admin_user': 'neutron',
'admin_password': rel_napi_ks['service_password'], 'admin_password': rel_napi_ks['service_password'],
}, },
'database': { 'database': {

View File

@ -378,11 +378,16 @@ class NeutronAPIHooksTests(CharmTestCase):
self.test_config.set('region', 'region1') self.test_config.set('region', 'region1')
_neutron_url = 'http://127.0.0.1:9696' _neutron_url = 'http://127.0.0.1:9696'
_endpoints = { _endpoints = {
'quantum_service': 'quantum', 'neutron_service': 'neutron',
'quantum_region': 'region1', 'neutron_region': 'region1',
'quantum_public_url': _neutron_url, 'neutron_public_url': _neutron_url,
'quantum_admin_url': _neutron_url, 'neutron_admin_url': _neutron_url,
'quantum_internal_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._call_hook('identity-service-relation-joined')
self.relation_set.assert_called_with( self.relation_set.assert_called_with(
@ -407,11 +412,16 @@ class NeutronAPIHooksTests(CharmTestCase):
self._call_hook('identity-service-relation-joined') self._call_hook('identity-service-relation-joined')
_neutron_url = 'http://127.0.0.1:9696' _neutron_url = 'http://127.0.0.1:9696'
_endpoints = { _endpoints = {
'quantum_service': 'quantum', 'neutron_service': 'neutron',
'quantum_region': 'region1', 'neutron_region': 'region1',
'quantum_public_url': 'http://neutron-api.example.com:9696', 'neutron_public_url': 'http://neutron-api.example.com:9696',
'quantum_admin_url': _neutron_url, 'neutron_admin_url': _neutron_url,
'quantum_internal_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( self.relation_set.assert_called_with(
relation_id=None, relation_id=None,