routeros_facts: fix crash when ipv6 is disabled (#39)

* routeros_facts: fix crash when ipv6 is disabled

* chore: rename fixture file
This commit is contained in:
Egor Zaitsev 2020-03-27 10:10:42 +03:00 committed by GitHub
commit 4fba692c1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 0 deletions

View file

@ -289,6 +289,8 @@ class Interfaces(FactsBase):
def populate_ipv6_interfaces(self, data):
for key, value in iteritems(data):
if key is None:
break
if 'ipv6' not in self.facts['interfaces'][key]:
self.facts['interfaces'][key]['ipv6'] = list()
addr, subnet = value['address'].split("/")