Merge 5346e0fdf9 into ba4cdb217b
This commit is contained in:
commit
2f6f757182
4 changed files with 19 additions and 2 deletions
|
|
@ -38,7 +38,7 @@ class LLDP():
|
|||
vid = value
|
||||
vlans[interface][value] = vlans[interface].get(vid, {})
|
||||
elif path.endswith('vlan'):
|
||||
vid = value.replace('vlan-', '')
|
||||
vid = value.replace('vlan-', '').replace('VLAN', '')
|
||||
vlans[interface][vid] = vlans[interface].get(vid, {})
|
||||
elif 'pvid' in path:
|
||||
vlans[interface][vid]['pvid'] = True
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ class Network(object):
|
|||
interface.untagged_vlan = None
|
||||
# Finally if LLDP reports a vlan-id with the pvid attribute
|
||||
elif lldp_vlan:
|
||||
pvid_vlan = [key for (key, value) in lldp_vlan.items() if value['pvid']]
|
||||
pvid_vlan = [key for (key, value) in lldp_vlan.items() if value.get('pvid')]
|
||||
if len(pvid_vlan) > 0 and (
|
||||
interface.mode is None or
|
||||
interface.mode.value != self.dcim_choices['interface:mode']['Access'] or
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue