mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
parent
052f4d2571
commit
f94ef03625
1 changed files with 14 additions and 8 deletions
|
@ -348,7 +348,9 @@ class Interfaces(FactsBase):
|
||||||
return objects
|
return objects
|
||||||
|
|
||||||
def parse_ipv6_interfaces(self, data):
|
def parse_ipv6_interfaces(self, data):
|
||||||
|
try:
|
||||||
data = data['TABLE_intf']
|
data = data['TABLE_intf']
|
||||||
|
if data:
|
||||||
if isinstance(data, dict):
|
if isinstance(data, dict):
|
||||||
data = [data]
|
data = [data]
|
||||||
for item in data:
|
for item in data:
|
||||||
|
@ -356,6 +358,10 @@ class Interfaces(FactsBase):
|
||||||
intf = self.facts['interfaces'][name]
|
intf = self.facts['interfaces'][name]
|
||||||
intf['ipv6'] = self.transform_dict(item, self.INTERFACE_IPV6_MAP)
|
intf['ipv6'] = self.transform_dict(item, self.INTERFACE_IPV6_MAP)
|
||||||
self.facts['all_ipv6_addresses'].append(item['ROW_intf']['addr'])
|
self.facts['all_ipv6_addresses'].append(item['ROW_intf']['addr'])
|
||||||
|
else:
|
||||||
|
return ""
|
||||||
|
except TypeError:
|
||||||
|
return ""
|
||||||
|
|
||||||
|
|
||||||
class Legacy(FactsBase):
|
class Legacy(FactsBase):
|
||||||
|
|
Loading…
Reference in a new issue