Hello!
Trying this out and getting errors when updating inventory, see below:
DEBUG:urllib3.connectionpool:https://netbox.xxxx:443 "GET /api/dcim/devices/?serial=C07JFKYXXX HTTP/1.1" 200 1085
Traceback (most recent call last):
File "/usr/local/bin/netbox_agent", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/netbox_agent/cli.py", line 44, in main
return run(config)
File "/usr/local/lib/python3.8/dist-packages/netbox_agent/cli.py", line 39, in run
server.netbox_create_or_update(config)
File "/usr/local/lib/python3.8/dist-packages/netbox_agent/server.py", line 295, in netbox_create_or_update
self.inventory = Inventory(server=self)
File "/usr/local/lib/python3.8/dist-packages/netbox_agent/inventory.py", line 56, in init
self.lshw = LSHW()
File "/usr/local/lib/python3.8/dist-packages/netbox_agent/lshw.py", line 25, in init
self.vendor = self.hw_info["vendor"]
TypeError: list indices must be integers or slices, not str
For reference this is a macmini running ubuntu 20.04,
There also seems to be a type error in the exampel yaml, if you run it through a validator you get:
(): could not find expected ':' while scanning a simple key at line 28 column 1 removing line 28 solves the issue.
Hello!
Trying this out and getting errors when updating inventory, see below:
DEBUG:urllib3.connectionpool:https://netbox.xxxx:443 "GET /api/dcim/devices/?serial=C07JFKYXXX HTTP/1.1" 200 1085
Traceback (most recent call last):
File "/usr/local/bin/netbox_agent", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/netbox_agent/cli.py", line 44, in main
return run(config)
File "/usr/local/lib/python3.8/dist-packages/netbox_agent/cli.py", line 39, in run
server.netbox_create_or_update(config)
File "/usr/local/lib/python3.8/dist-packages/netbox_agent/server.py", line 295, in netbox_create_or_update
self.inventory = Inventory(server=self)
File "/usr/local/lib/python3.8/dist-packages/netbox_agent/inventory.py", line 56, in init
self.lshw = LSHW()
File "/usr/local/lib/python3.8/dist-packages/netbox_agent/lshw.py", line 25, in init
self.vendor = self.hw_info["vendor"]
TypeError: list indices must be integers or slices, not str
For reference this is a macmini running ubuntu 20.04,
There also seems to be a type error in the exampel yaml, if you run it through a validator you get:
(): could not find expected ':' while scanning a simple key at line 28 column 1 removing line 28 solves the issue.