Merge pull request #1 from ndom91/master

Update power-port/power-ports check
This commit is contained in:
minitriga 2020-10-09 10:16:01 +01:00 committed by GitHub
commit ee033cc1e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -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:

View File

@ -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