From 146ffe57c2429e9b0673e6820c1dccb267c63f41 Mon Sep 17 00:00:00 2001 From: Bjarke Madsen <bjarke@nordu.net> Date: Wed, 15 Jan 2025 11:12:27 +0100 Subject: [PATCH] ensure vlan_type is always set --- inventory_provider/routes/poller.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inventory_provider/routes/poller.py b/inventory_provider/routes/poller.py index 7c45930..3b9eec5 100644 --- a/inventory_provider/routes/poller.py +++ b/inventory_provider/routes/poller.py @@ -908,8 +908,9 @@ def load_interfaces_to_poll(config, hostname=None, no_lab=False, use_next_redis= ifc_list.sort(key=lambda x: x['name']) base = ifc_list.pop(0) if base['name'] != base_ifc: - continue - base['vlan_type'] = VLAN_TYPES.TRUNK.name + base['vlan_type'] = VLAN_TYPES.VLAN.name + else: + base['vlan_type'] = VLAN_TYPES.TRUNK.name for ifc in ifc_list: ifc['vlan_type'] = VLAN_TYPES.VLAN.name -- GitLab