minor fixes
This commit is contained in:
parent
a16d9bf82c
commit
74e5a16c04
1 changed files with 2 additions and 2 deletions
|
@ -191,7 +191,7 @@ class Network():
|
||||||
interface.untagged_vlan = None
|
interface.untagged_vlan = None
|
||||||
# if it's a vlan interface
|
# if it's a vlan interface
|
||||||
elif vlan_id and (
|
elif vlan_id and (
|
||||||
interface.mode.value != 200 or
|
interface.mode is None or interface.mode.value != 200 or
|
||||||
len(interface.tagged_vlans) != 1 or
|
len(interface.tagged_vlans) != 1 or
|
||||||
interface.tagged_vlans[0].vid != vlan_id):
|
interface.tagged_vlans[0].vid != vlan_id):
|
||||||
logging.info('Resetting tagged VLAN(s) on interface {interface}'.format(
|
logging.info('Resetting tagged VLAN(s) on interface {interface}'.format(
|
||||||
|
@ -203,7 +203,7 @@ class Network():
|
||||||
interface.untagged_vlan = None
|
interface.untagged_vlan = None
|
||||||
# if lldp reports a vlan-id
|
# if lldp reports a vlan-id
|
||||||
elif lldp_vlan and (
|
elif lldp_vlan and (
|
||||||
interface.mode.value != 100 or
|
interface.mode is None or interface.mode.value != 100 or
|
||||||
interface.untagged_vlan is None or
|
interface.untagged_vlan is None or
|
||||||
interface.untagged_vlan.vid != lldp_vlan):
|
interface.untagged_vlan.vid != lldp_vlan):
|
||||||
logging.info('Resetting access VLAN on interface {interface}'.format(
|
logging.info('Resetting access VLAN on interface {interface}'.format(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue