From 3c1c6edf391e24e246ca0809ef1e24da0edd52b8 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 22 Jun 2020 14:05:43 -0400 Subject: [PATCH] Support newer storage api Newer XCC firmware changes the storage API, support the newer api. Change-Id: I6740fab59098ae825be5f23c5eb28cbf2e85968f --- pyghmi/ipmi/oem/lenovo/imm.py | 5 ++++- pyghmi/redfish/oem/lenovo/xcc.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index be2bc99f..b97850be 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -1372,7 +1372,10 @@ class XCCClient(IMMClient): def get_storage_configuration(self, logout=True): rsp = self.wc.grab_json_response( - '/api/function/raid_alldevices?params=storage_GetAllDevices') + '/api/function/raid_alldevices?params=storage_GetAllDevices,0') + if not rsp: + rsp = self.wc.grab_json_response( + '/api/function/raid_alldevices?params=storage_GetAllDevices') standalonedisks = [] pools = [] for item in rsp.get('items', []): diff --git a/pyghmi/redfish/oem/lenovo/xcc.py b/pyghmi/redfish/oem/lenovo/xcc.py index cd0c57d9..8b170c3b 100644 --- a/pyghmi/redfish/oem/lenovo/xcc.py +++ b/pyghmi/redfish/oem/lenovo/xcc.py @@ -135,7 +135,10 @@ class OEMHandler(generic.OEMHandler): def get_storage_configuration(self, logout=True): rsp = self.wc.grab_json_response( - '/api/function/raid_alldevices?params=storage_GetAllDevices') + '/api/function/raid_alldevices?params=storage_GetAllDevices,0') + if not rsp: + rsp = self.wc.grab_json_response( + '/api/function/raid_alldevices?params=storage_GetAllDevices') standalonedisks = [] pools = [] for item in rsp.get('items', []):