Commit 39628d01 by James Cammarata

Minor fix to ipv6 detection for inventory with -i

For link-local addresses, it is sometimes necessary to append the
interface to use for the ipv6 address. This patch extends the ipv6
regex to allow for '%ifnameX' at the end.

See https://bugzilla.redhat.com/show_bug.cgi?id=136852 for more info
parent b655d579
...@@ -74,7 +74,7 @@ class Inventory(object): ...@@ -74,7 +74,7 @@ class Inventory(object):
self.parser = None self.parser = None
all = Group('all') all = Group('all')
self.groups = [ all ] self.groups = [ all ]
ipv6_re = re.compile('\[([a-f:A-F0-9]*)\](?::(\d+))?') ipv6_re = re.compile('\[([a-f:A-F0-9]*[%[0-z]+]?)\](?::(\d+))?')
for x in host_list: for x in host_list:
m = ipv6_re.match(x) m = ipv6_re.match(x)
if m: if m:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment