Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion nb-dt-import.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,10 @@ def createDeviceTypes(deviceTypes, nb):
print(f'Device Type Created: {dtSuccess.manufacturer.name} - {dtSuccess.model} - {dtSuccess.id}')
if "interfaces" in deviceType:
createInterfaces(deviceType["interfaces"], dtSuccess.id, nb)
if "power-ports" in deviceType or "power-port" in deviceType:
if "power-ports" in deviceType:
createPowerPorts(deviceType["power-ports"], dtSuccess.id, nb)
if "power-port" in deviceType:
createPowerPorts(deviceType["power-port"], dtSuccess.id, nb)
if "console-ports" in deviceType:
createConsolePorts(deviceType["console-ports"], dtSuccess.id, nb)
if "power-outlets" in deviceType:
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This library is intended to be your friend and help you import all the device-types defined within the the [NetBox Device Type Library Repository](https://github.com/netbox-community/devicetype-library).

> This currently only works on NetBox v2.7.8.
> Tested working with 2.7.8 and 2.8.8

## Getting Started

Expand Down