Skip to content

Commit ca72bf9

Browse files
committed
mitigates issue qith unsupported Dell Drives #165
1 parent a63c215 commit ca72bf9

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

cr_module/storage.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -651,12 +651,16 @@ def get_drive(drive_link):
651651
if plugin_object.rf.vendor == "HPE" and drive_oem_data.get("DriveStatus") is not None:
652652
status_data = get_status_data(drive_oem_data.get("DriveStatus"))
653653

654-
# Dell
655-
dell_disk_data = grab(drive_oem_data, "DellPhysicalDisk")
656-
if dell_disk_data is not None:
657-
if bay is None:
658-
bay = dell_disk_data.get("Slot")
659-
storage_port = dell_disk_data.get("Connector")
654+
# Dell
655+
dell_disk_data = grab(drive_oem_data, "DellPhysicalDisk")
656+
if dell_disk_data is not None:
657+
if bay is None:
658+
bay = dell_disk_data.get("Slot")
659+
storage_port = dell_disk_data.get("Connector")
660+
# mitigate issue with unsupported Disks for Dell server
661+
# https://github.com/bb-Ricardo/check_redfish/issues/165
662+
if predicted_media_life_left_percent == 0 and dell_disk_data.get("AvailableSparePercent") is None:
663+
predicted_media_life_left_percent = None
660664

661665
physical_location = grab(drive_response, "PhysicalLocation.PartLocation")
662666
if bay is None and physical_location is not None:

0 commit comments

Comments
 (0)