From de5b4cef77ff0d34617daaf85b12dc05ef2b5e59 Mon Sep 17 00:00:00 2001 From: Nico Domino Date: Tue, 28 Jul 2020 15:21:58 +0200 Subject: [PATCH 1/2] Update power-port/power-ports check --- nb-dt-import.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nb-dt-import.py b/nb-dt-import.py index a03b313..f1d287b 100644 --- a/nb-dt-import.py +++ b/nb-dt-import.py @@ -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: From da3362dc7aeb276228cb000c32e33a910ae720b6 Mon Sep 17 00:00:00 2001 From: Nico Domino Date: Tue, 28 Jul 2020 15:24:42 +0200 Subject: [PATCH 2/2] Update readme.md --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index e192400..51219aa 100644 --- a/readme.md +++ b/readme.md @@ -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