Properly fixup protocol propagation

This commit is contained in:
James Page 2014-02-27 14:54:45 +00:00
parent 82340c2f26
commit f5a8dbac5a
2 changed files with 9 additions and 2 deletions

View File

@ -197,6 +197,10 @@ class CloudComputeContext(context.OSContextGenerator):
continue continue
neutron_ctxt = { neutron_ctxt = {
'auth_protocol': relation_get(
'auth_protocol', **rel) or 'http',
'service_protocol': relation_get(
'service_protocol', **rel) or 'http',
'neutron_auth_strategy': 'keystone', 'neutron_auth_strategy': 'keystone',
'keystone_host': relation_get( 'keystone_host': relation_get(
'auth_host', **rel), 'auth_host', **rel),
@ -220,7 +224,7 @@ class CloudComputeContext(context.OSContextGenerator):
neutron_ctxt['neutron_security_groups'] = _neutron_security_groups() neutron_ctxt['neutron_security_groups'] = _neutron_security_groups()
ks_url = '%s://%s:%s/v2.0' % (neutron_ctxt['auth_protocol'] or 'http', ks_url = '%s://%s:%s/v2.0' % (neutron_ctxt['auth_protocol'],
neutron_ctxt['keystone_host'], neutron_ctxt['keystone_host'],
neutron_ctxt['auth_port']) neutron_ctxt['auth_port'])
neutron_ctxt['neutron_admin_auth_url'] = ks_url neutron_ctxt['neutron_admin_auth_url'] = ks_url

View File

@ -22,6 +22,7 @@ QUANTUM_CONTEXT = {
'quantum_auth_strategy': 'keystone', 'quantum_auth_strategy': 'keystone',
'keystone_host': 'keystone_host', 'keystone_host': 'keystone_host',
'auth_port': '5000', 'auth_port': '5000',
'auth_protocol': 'https',
'quantum_url': 'http://quantum_url', 'quantum_url': 'http://quantum_url',
'service_tenant_name': 'admin', 'service_tenant_name': 'admin',
'service_username': 'admin', 'service_username': 'admin',
@ -143,9 +144,11 @@ class NovaComputeContextTests(CharmTestCase):
ex_ctxt = { ex_ctxt = {
'network_manager': 'quantum', 'network_manager': 'quantum',
'network_manager_config': { 'network_manager_config': {
'auth_protocol': 'https',
'service_protocol': 'http',
'auth_port': '5000', 'auth_port': '5000',
'keystone_host': 'keystone_host', 'keystone_host': 'keystone_host',
'quantum_admin_auth_url': 'http://keystone_host:5000/v2.0', 'quantum_admin_auth_url': 'https://keystone_host:5000/v2.0',
'quantum_admin_password': 'openstack', 'quantum_admin_password': 'openstack',
'quantum_admin_tenant_name': 'admin', 'quantum_admin_tenant_name': 'admin',
'quantum_admin_username': 'admin', 'quantum_admin_username': 'admin',