Change blade slot behavior #28

Merged
Solvik merged 2 commits from feature/blade_slot into master 2019-08-08 14:46:38 +02:00
2 changed files with 4 additions and 9 deletions
Showing only changes of commit 9519a43277 - Show all commits

View file

@ -42,10 +42,7 @@ Tested on:
### Blades ### Blades
* PowerEdge M1000e * PowerEdge M1000e (your `DeviceType` should have slots named `Slot 01` and so on)
your DeviceType should have slots named `Slot 01` and so on
* PowerEdge M640 * PowerEdge M640
* PowerEdge M630 * PowerEdge M630
* PowerEdge M620 * PowerEdge M620
@ -59,10 +56,7 @@ your DeviceType should have slots named `Slot 01` and so on
### Blades ### Blades
* HP BladeSystem c7000 Enclosure G2 / G3 * HP BladeSystem c7000 Enclosure G2 / G3 (your `DeviceType` should have slots named `Bay 1` and so on)
your DeviceType should have slots named `Bay 1` and so on
* HP ProLiant BL460c Gen8 * HP ProLiant BL460c Gen8
* HP ProLiant BL460c Gen9 * HP ProLiant BL460c Gen9

View file

@ -192,7 +192,7 @@ class ServerBase():
blade = self._netbox_create_blade(chassis, datacenter) blade = self._netbox_create_blade(chassis, datacenter)
# Set slot for blade # Set slot for blade
self._netbox_set_blade_slot(chassis, server) self._netbox_set_blade_slot(chassis, blade)
else: else:
server = nb.dcim.devices.get(serial=self.get_service_tag()) server = nb.dcim.devices.get(serial=self.get_service_tag())
if not server: if not server:
@ -207,6 +207,7 @@ class ServerBase():
server.parent_device.device_bay.id server.parent_device.device_bay.id
) )
netbox_chassis_serial = server.parent_device.device_bay.device.serial netbox_chassis_serial = server.parent_device.device_bay.device.serial
move_device_bay = False
# check chassis serial with dmidecode # check chassis serial with dmidecode
if netbox_chassis_serial != self.get_chassis_service_tag(): if netbox_chassis_serial != self.get_chassis_service_tag():