| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
GET_IDRAC_CONTROLLER_URI = "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellControllers" |
| 30 |
NA = "Not Available" |
| 31 |
|
| 32 |
|
| 33 |
class IDRACControllerInfo(object): |
| 34 |
def __init__(self, idrac): |
| 35 |
self.idrac = idrac |
| 36 |
|
| 37 |
def get_controller_data(self, resp): |
| 38 |
output = { |
| 39 |
"Bus": NA, |
| 40 |
"CacheSize": str(resp.get("CacheSizeInMB")) + " MB", |
| 41 |
"CachecadeCapability": str(resp.get("CachecadeCapability", NA)), |
| 42 |
"ControllerFirmwareVersion": str(resp.get("ControllerFirmwareVersion", NA)), |
| 43 |
"DeviceCardDataBusWidth": str(resp.get("DeviceCardDataBusWidth", NA)), |
| 44 |
"DeviceCardManufacturer": NA, |
| 45 |
"DeviceCardSlotLength": str(resp.get("DeviceCardSlotLength", NA)), |
| 46 |
"DeviceCardSlotType": str(resp.get("DeviceCardSlotType", NA)), |
| 47 |
"DeviceDescription": NA, |
| 48 |
"DriverVersion": str(resp.get("DriverVersion", NA)), |
| 49 |
"EncryptionCapability": str(resp.get("EncryptionCapability", NA)), |
| 50 |
"EncryptionMode": str(resp.get("WiredOrder", NA)), |
| 51 |
"FQDD": str(resp.get("Id", NA)), |
| 52 |
"Key": str(resp.get("Id", NA)), |
| 53 |
"MaxAvailablePCILinkSpeed": str(resp.get("MaxAvailablePCILinkSpeed", NA)), |
| 54 |
"MaxPossiblePCILinkSpeed": str(resp.get("MaxPossiblePCILinkSpeed", NA)), |
| 55 |
"PCISlot": str(resp.get("PCISlot", NA)), |
| 56 |
"PCIVendorID": NA, |
| 57 |
"PrimaryStatus": NA, |
| 58 |
"ProductName": NA, |
| 59 |
"RollupStatus": str(resp.get("RollupStatus", NA)), |
| 60 |
"SASAddress": str(resp.get("SASAddress", NA)), |
| 61 |
"SecurityStatus": str(resp.get("SecurityStatus", NA)), |
| 62 |
"SlicedVDCapability": str(resp.get("SlicedVDCapability", NA)), |
| 63 |
"SupportControllerBootMode": str(resp.get("SupportControllerBootMode", NA)), |
| 64 |
"SupportEnhancedAutoForeignImport": str(resp.get("SupportEnhancedAutoForeignImport", NA)), |
| 65 |
"SupportRAID10UnevenSpans": str(resp.get("SupportRAID10UnevenSpans", NA)), |
| 66 |
"T10PICapability": str(resp.get("T10PICapability", NA)) |
| 67 |
} |
| 68 |
return output |
| 69 |
|
| 70 |
def get_controller_system_info(self): |
| 71 |
output = [] |
| 72 |
resp = self.idrac.invoke_request(method='GET', uri=GET_IDRAC_CONTROLLER_URI) |
| 73 |
for each_member in resp.json_data.get("Members", []): |
| 74 |
output.append(self.get_controller_data(each_member)) |
| 75 |
return output |