[openstack-dev] [puppet] Adding "IPv6" bracket handling utilities in openstacklib.

Cody Herriges cody at herriges.org
Thu Jan 7 20:40:24 UTC 2016


Sofer Athlan-Guyot wrote:
> Hi,
> 
> There are a few places where I would like to be able to check for IPv6
> address and add bracket to the parameters.  I think that would be a nice
> addition to the puppet-openstacklib/lib/puppet/parser.
> 
> 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.
> 
> WDYT?
> 

I see this and it looks like that only only reason this is a problem is
because we've broken up all the pieces of data needed to generate a URI
so it becomes inappropriate to decorate the vncproxy_host variable's
value with "[]" because it lacks the port appended to the end.  What are
the ramifications of simply switching to a "$vnc_uri" variable much the
same that has happened with identity_uri and auth_uri, e.g.
https://review.openstack.org/262799. If one has to simply define the
entire URI, they'll be able to properly decorate the IPv6 address.

-- 
Cody

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160107/f9cb1e4d/attachment.pgp>


More information about the OpenStack-dev mailing list