From befb3395b3c9ded3dc92182cbfd7633edea52d7d Mon Sep 17 00:00:00 2001 From: Thomas Davis Date: Mon, 20 Jan 2020 16:38:10 -0800 Subject: [PATCH] tox fixes --- netbox_agent/network.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/netbox_agent/network.py b/netbox_agent/network.py index f305d76..506657d 100644 --- a/netbox_agent/network.py +++ b/netbox_agent/network.py @@ -29,7 +29,6 @@ class Network(): for c in dcim_c[choice]: self.dcim_choices[choice][c['label']] = c['value'] - self.ipam_choices = {} ipam_c = nb.ipam.choices() @@ -38,7 +37,6 @@ class Network(): for c in ipam_c[choice]: self.ipam_choices[choice][c['label']] = c['value'] - def scan(self): for interface in os.listdir('/sys/class/net/'): # ignore if it's not a link (ie: bonding_masters etc) @@ -206,7 +204,7 @@ class Network(): interface.untagged_vlan = None # if it's a vlan interface elif vlan_id and ( - interface.mode is None or + interface.mode is None or interface.mode.value != self.dcim_choices['interface:mode']['Access'] or len(interface.tagged_vlans) != 1 or interface.tagged_vlans[0].vid != vlan_id):