~tribaal/charms/trusty/nova-compute/enable-api-rate-limiting

« back to all changes in this revision

Viewing changes to hooks/nova_compute_context.py

  • Committer: billy.olsen at canonical
  • Date: 2015-09-28 17:44:32 UTC
  • mfrom: (161.1.2 nova-compute.lp1499656)
  • Revision ID: billy.olsen@canonical.com-20150928174432-xwk78kafbn7pnvfi
[hopem,r=billy-olsen]

With ipv6 addresses host_ip should not be formatted with [].

Closes-Bug: 1499656

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
from charmhelpers.contrib.network.ip import (
27
27
    get_address_in_network,
28
28
    get_ipv6_addr,
29
 
    format_ipv6_addr,
30
29
)
31
30
 
32
31
# This is just a label and it must be consistent across
493
492
            host_ip = get_host_ip(unit_get('private-address'))
494
493
 
495
494
        if host_ip:
496
 
            ctxt['host_ip'] = format_ipv6_addr(host_ip) or host_ip
 
495
            # NOTE: do not format this even for ipv6 (see bug 1499656)
 
496
            ctxt['host_ip'] = host_ip
497
497
 
498
498
        return ctxt