mirror of
https://github.com/netbox-community/Device-Type-Library-Import.git
synced 2024-11-22 15:43:28 +01:00
fix: create poweroutlet with unambiguous powerport
This commit is contained in:
parent
c6bc1fbbc8
commit
16b922b383
@ -185,9 +185,12 @@ def createPowerOutlets(poweroutlets, deviceType, nb):
|
||||
poweroutlet["device_type"] = deviceType
|
||||
poSuccess = nb.dcim.power_outlet_templates.create(poweroutlet)
|
||||
print(f'Power Outlet Created: {poSuccess.name} - {poSuccess.type} - {poSuccess.device_type.id} - {poSuccess.id}')
|
||||
counter.update({'updated':1})
|
||||
counter.update({'updated':1})
|
||||
except:
|
||||
print(f'Error assining Power Port to Power Outlet in Outlet: {poweroutlet["name"]}')
|
||||
poweroutlet["device_type"] = deviceType
|
||||
poSuccess = nb.dcim.power_outlet_templates.create(poweroutlet)
|
||||
print(f'Power Outlet Created: {poSuccess.name} - {poSuccess.type} - {poSuccess.device_type.id} - {poSuccess.id}')
|
||||
counter.update({'updated':1})
|
||||
except pynetbox.RequestError as e:
|
||||
print(e.error)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user