[hopem, r=thedac] Fixes Bug #1510958: [ipv6] auth creds incorrectly formatted

This commit is contained in:
David Ames 2015-10-28 15:12:15 -07:00
commit ea51ebf757
1 changed files with 8 additions and 1 deletions

View File

@ -21,7 +21,8 @@ from charmhelpers.contrib.hahelpers.cluster import (
determine_apache_port,
)
from charmhelpers.contrib.network.ip import (
get_ipv6_addr
format_ipv6_addr,
get_ipv6_addr,
)
from charmhelpers.contrib.openstack.utils import get_host_ip
@ -171,6 +172,12 @@ class SwiftIdentityContext(OSContextGenerator):
if context_complete(ks_auth):
ctxt.update(ks_auth)
if config('prefer-ipv6'):
for key in ['keystone_host', 'service_host']:
host = ctxt.get(key)
if host:
ctxt[key] = format_ipv6_addr(host)
return ctxt