Gets the right chassis serial number (#104)

This commit is contained in:
ThomasADavis 2020-01-25 03:03:30 -08:00 committed by Solvik
parent 86a8d73873
commit 405cce3995

View file

@ -258,7 +258,12 @@ class ServerBase():
device_bay = nb.dcim.device_bays.get(
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
# check chassis serial with dmidecode