From 62c49787be15226d541811538258203aef242f44 Mon Sep 17 00:00:00 2001 From: Justas Balcas Date: Wed, 3 Jan 2024 15:35:34 -0600 Subject: [PATCH] Cisconx9 routing accept only dict (ignore lo routes) --- plugins/modules/cisconx9_facts.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/modules/cisconx9_facts.py b/plugins/modules/cisconx9_facts.py index bab536a..c04066f 100644 --- a/plugins/modules/cisconx9_facts.py +++ b/plugins/modules/cisconx9_facts.py @@ -182,6 +182,8 @@ def populate_ip46(self, respid, resptype): self.facts.setdefault(resptype, []) for intdict in self.responses[respid].get('TABLE_vrf', {}).get('ROW_vrf', []): for routeEntry in intdict.get('TABLE_addrf', {}).get('ROW_addrf').get('TABLE_prefix', {}).get('ROW_prefix', []): + if not isinstance(routeEntry, dict): + continue tmpdict = {'vrf': intdict['vrf-name-out']} if 'ipprefix' in routeEntry: tmpdict['to'] = routeEntry['ipprefix']