Gets the right chassis serial number (#104)
This commit is contained in:
parent
86a8d73873
commit
405cce3995
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…
Reference in a new issue