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
256 stars 77 forks source link

Update power-port/power-ports check #1

Closed ndom91 closed 3 years ago

ndom91 commented 4 years ago

Split the check for

if "power-ports" in deviceType or "power-port" in deviceType:
createPowerPorts(deviceType["power-ports"], dtSuccess.id, nb)

Into

if "power-ports" in deviceType:
createPowerPorts(deviceType["power-ports"], dtSuccess.id, nb)
if "power-port" in deviceType:
createPowerPorts(deviceType["power-port"], dtSuccess.id, nb)

Because it was causing issues

Otherwise this also worked without issue on v2.8.8!

Thanks for your work, this is the best importer I've found yet! Handles existing manufacturers / device types / ports flawlessly!