netbox-agent/netbox_agent
illes a59fb446f3
Fix KeyError: 'pvid' in lldp.py
```
lldp.eth0.vlan.vlan-id=300
lldp.eth0.vlan.pvid=yes
lldp.eth0.vlan=VLAN300
```
```
Version: lldpd 1.0.11
```

```
{'300': {'pvid': True}, 'VLAN300': {}}
Traceback (most recent call last):
  File "/root/.local/bin/netbox_agent", line 8, in <module>
    sys.exit(main())
  File "/root/.local/lib/python3.10/site-packages/netbox_agent/cli.py", line 44, in main
    return run(config)
  File "/root/.local/lib/python3.10/site-packages/netbox_agent/cli.py", line 39, in run
    server.netbox_create_or_update(config)
  File "/root/.local/lib/python3.10/site-packages/netbox_agent/server.py", line 292, in netbox_create_or_update
    self.network.create_or_update_netbox_network_cards()
  File "/root/.local/lib/python3.10/site-packages/netbox_agent/network.py", line 417, in create_or_update_netbox_network_cards
    ret, interface = self.reset_vlan_on_interface(nic, interface)
  File "/root/.local/lib/python3.10/site-packages/netbox_agent/network.py", line 234, in reset_vlan_on_interface
    pvid_vlan = [key for (key, value) in lldp_vlan.items() if value['pvid']]
  File "/root/.local/lib/python3.10/site-packages/netbox_agent/network.py", line 234, in <listcomp>
    pvid_vlan = [key for (key, value) in lldp_vlan.items() if value['pvid']]
KeyError: 'pvid'
```
2022-04-26 12:25:28 +02:00
..
drivers should have used git mv 2019-08-05 12:03:06 +02:00
raid fix: hp raid, prevent us to miss some errors when matching only returncode 1 2022-04-04 14:39:19 +02:00
vendors Added disks extended attributes 2022-03-02 15:53:38 +01:00
__init__.py Project cleanup (#6) 2019-08-04 00:00:22 +02:00
cli.py Various changes 2022-02-22 14:51:58 +01:00
config.py chore: update Help 2022-03-31 21:21:19 +02:00
dmidecode.py Setup tests 2020-02-02 20:24:01 +01:00
ethtool.py fix ethtool class in case ethtool works but returns nothing (#123) 2020-04-19 12:19:28 +02:00
inventory.py Added disks extended attributes 2022-03-02 15:53:38 +01:00
ipmi.py Virtual Machine feature (#122) 2020-04-19 12:28:49 +02:00
lldp.py Fix KeyError: 'pvid' in lldp.py 2022-04-26 12:25:28 +02:00
location.py Add tags,device roles,tenants.. (#110) 2020-07-01 18:54:58 +02:00
logging.py Virtual Machine feature (#122) 2020-04-19 12:28:49 +02:00
lshw.py Unnamed network interfaces. 2022-03-07 17:18:35 +01:00
misc.py chore: cleanup, add device_platform in summary 2022-03-31 20:58:50 +02:00
network.py Fixed virtual network cards creation 2022-03-08 17:27:06 +01:00
power.py Added disks extended attributes 2022-03-02 15:53:38 +01:00
server.py chore: cleanup, add device_platform in summary 2022-03-31 20:58:50 +02:00
virtualmachine.py chore: cleanup virtual_machines get_device_platform 2022-03-31 21:04:32 +02:00