netbox-community / Device-Type-Library-Import

This library is intended to assist with importing device and module types into NetBox from the NetBox Community DeviceType-Library
https://github.com/netbox-community/devicetype-library
MIT License
265 stars 82 forks source link

Incompatible for use with latest netbox-community #153

Open 1823alex opened 6 days ago

1823alex commented 6 days ago

Just wanted to post that the issue mentioned here is also affecting me: https://github.com/netbox-community/Device-Type-Library-Import/issues/144 I tried the pip reinstall someone suggested but I'm using docker and ultimately got a permissions error when running the command in privileged exec mode saying something about owned by wheel or not part of wheel and I got lazy and saw other solutions so I didn't bother figuring out what user docker exec was running as and adding it to wheel to see if the pip reinstall would work after that so I moved onto another solution. So I kept reading and found this issue: https://github.com/netbox-community/Device-Type-Library-Import/issues/142 and was able to get the script to execute with my token and netbox url using the final comment's solution entirely commenting out the version check...

Which is why I am guessing I received some of the following output errors with the APC power bars?

Error '[{"__all__":["Parent power port (Power Port 1) must belong to the same device type"]},{"__all__":["Parent power port (Power Port 1) must belong to the same device type"]},{"__all__":["Parent power port (Power Port 1) must belong to the same device type"]},{"__all__":["Parent power port (Power Port 1) must belong to the same device type"]},{"__all__":["Parent power port (Power Port 1) must belong to the same device type"]},{"__all__":["Parent power port (Power Port 1) must belong to the same device type"]},{"__all__":["Parent power port (Power Port 1) must belong to the same device type"]},{"__all__":["Parent power port (Power Port 1) must belong to the same device type"]},{"__all__":["Parent power port (Power Port 1) must belong to the same device type"]}]' creating Power Outlet
Error '[{"__all__":["Parent power port (Power Port 1) must belong to the same device type"]},{"__all__":["Parent power port (Power Port 1) must belong to the same device type"]},{"__all__":["Parent power port (Power Port 1) must belong to the same device type"]},{"__all__":["Parent power port (Power Port 1) must belong to the same device type"]},{"__all__":["Parent power port (Power Port 1) must belong to the same device type"]},{"__all__":["Parent power port (Power Port 1) must belong to the same device type"]},{"__all__":["Parent power port (Power Port 1) must belong to the same device type"]},{"__all__":["Parent power port (Power Port 1) must belong to the same device type"]}]' creating Power Outlet
Error '[{"__all__":["Parent power port (Source) must belong to the same device type"]},{"__all__":["Parent power port (Source) must belong to the same device type"]},{"__all__":["Parent power port (Source) must belong to the same device type"]},{"__all__":["Parent power port (Source) must belong to the same device type"]}]' creating Power Outlet

I also noticed after this output that checking the APC device types many just have 1 or 2 outlets or they have the network interface and 1 power port assigned and that's it and some models like AP7921B which I own and know has like 8 plugs doesn't have any ports assigned, - no network or power plugs. AP4443 has 1 power port 2 and 1 network port (which might be right, but I know the AP7921 is wrong and that many others are probably messed up due to this).

Can this be fixed with an updated script to reimport over these half imported APC models? It seems the image elevation uploads are going okay as it's returning 200 codes.

jonare77 commented 2 days ago

When using docker just edit the requirements.txt with version 7.3.4 for pynetbox and build a custom image of Device-Type-Library-Import. Everything should be working then, also with latest netbox 4.1.3