Sync ~xianghui/charm-helpers/format-ipv6, format auth_host for ipv6.
This commit is contained in:
parent
5ece28e50d
commit
e94e6db6a0
@ -250,11 +250,13 @@ class IdentityServiceContext(OSContextGenerator):
|
||||
rdata = relation_get(rid=rid, unit=unit)
|
||||
serv_host = rdata.get('service_host')
|
||||
serv_host = format_ipv6_addr(serv_host) or serv_host
|
||||
auth_host = rdata.get('auth_host')
|
||||
auth_host = format_ipv6_addr(auth_host) or auth_host
|
||||
|
||||
ctxt = {
|
||||
'service_port': rdata.get('service_port'),
|
||||
'service_host': serv_host,
|
||||
'auth_host': rdata.get('auth_host'),
|
||||
'auth_host': auth_host,
|
||||
'auth_port': rdata.get('auth_port'),
|
||||
'admin_tenant_name': rdata.get('service_tenant'),
|
||||
'admin_user': rdata.get('service_username'),
|
||||
|
@ -239,9 +239,6 @@ class IdentityServiceContext(context.IdentityServiceContext):
|
||||
ctxt['keystone_ec2_url'] = ec2_tokens
|
||||
ctxt['region'] = config('region')
|
||||
|
||||
if config('prefer-ipv6') and ctxt['auth_host']:
|
||||
ctxt['auth_host'] = '[%s]' % ctxt['auth_host']
|
||||
|
||||
return ctxt
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user