Have a function to handle IPv6 address brackets.

Bug #1531960 reported by Sofer Athlan-Guyot
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-openstacklib
Fix Released
Medium
Unassigned

Bug Description

Hi,

when using ipv6, one has often to put brackets around the ip when it puts it in url. It would be very convenient to have a function that does it.

Here the interface I have in mind with the puppet-nova module:

class nova::vncproxy::common (
  $vncproxy_host = undef,
  $vncproxy_protocol = undef,
  $vncproxy_port = undef,
  $vncproxy_path = undef,
) {

  include ::nova::deps

  $vncproxy_host_real = pick(
    ipv6_add_bracket_maybe($vncproxy_host,
                           $::nova::compute::vncproxy_host,
                           $::nova::vncproxy::host,
                           false)

This would returns an array with the host decorated with "[]" if the
value is an IPv6 address. Ideally the function could take only one
value and return it or take an array and return an array for seamless
integration in the code.

Revision history for this message
Cody Herriges (ody-cat) wrote :
Changed in puppet-openstacklib:
importance: Undecided → Medium
status: New → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/puppet-openstacklib 7.1.0

This issue was fixed in the openstack/puppet-openstacklib 7.1.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.