Gets the right chassis serial number
This commit is contained in:
parent
957e5f4fb9
commit
51a857ceb5
1 changed files with 6 additions and 1 deletions
|
@ -258,7 +258,12 @@ class ServerBase():
|
||||||
device_bay = nb.dcim.device_bays.get(
|
device_bay = nb.dcim.device_bays.get(
|
||||||
server.parent_device.device_bay.id
|
server.parent_device.device_bay.id
|
||||||
)
|
)
|
||||||
netbox_chassis_serial = server.parent_device.device_bay.device.serial
|
|
||||||
|
parent_chassis = nb.dcim.devices.get(
|
||||||
|
chassis.id
|
||||||
|
)
|
||||||
|
|
||||||
|
netbox_chassis_serial = parent_chassis.serial
|
||||||
move_device_bay = False
|
move_device_bay = False
|
||||||
|
|
||||||
# check chassis serial with dmidecode
|
# check chassis serial with dmidecode
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue