From a8a03632a03eecf17df1212f5a0719285a3a68b7 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 27 Aug 2024 10:03:32 -0400 Subject: [PATCH] Wire up redfish for getting extended BMC settings In recent XCC incarnations, this is possible over non-IPMI, so wire it up to be more equivalent. Change-Id: Ie13d6faeee27639df67352568046810e0615fcb6 --- pyghmi/redfish/command.py | 3 +++ pyghmi/redfish/oem/generic.py | 3 +++ pyghmi/redfish/oem/lenovo/xcc.py | 7 +++++++ 3 files changed, 13 insertions(+) diff --git a/pyghmi/redfish/command.py b/pyghmi/redfish/command.py index 76043c00..285e6f5d 100644 --- a/pyghmi/redfish/command.py +++ b/pyghmi/redfish/command.py @@ -789,6 +789,9 @@ class Command(object): def get_health(self, verbose=True): return self.oem.get_health(self, verbose) + def get_extended_bmc_configuration(self, hideadvanced=True): + return self.oem.get_extended_bmc_configuration(self, hideadvanced=hideadvanced) + def get_bmc_configuration(self): """Get miscellaneous BMC configuration diff --git a/pyghmi/redfish/oem/generic.py b/pyghmi/redfish/oem/generic.py index 57648f3e..c2c9add9 100644 --- a/pyghmi/redfish/oem/generic.py +++ b/pyghmi/redfish/oem/generic.py @@ -994,6 +994,9 @@ class OEMHandler(object): raise exc.UnsupportedFunctionality() return licenses + def get_extended_bmc_configuration(self, fishclient, hideadvanced=True): + raise exc.UnsupportedFunctionality() + def _get_licenses(self, fishclient): licenses = self._get_license_collection_url(fishclient) collection = fishclient._do_web_request(licenses) diff --git a/pyghmi/redfish/oem/lenovo/xcc.py b/pyghmi/redfish/oem/lenovo/xcc.py index 6dd7ac37..15a30f0e 100644 --- a/pyghmi/redfish/oem/lenovo/xcc.py +++ b/pyghmi/redfish/oem/lenovo/xcc.py @@ -149,6 +149,13 @@ class OEMHandler(generic.OEMHandler): self.fwc = None self.fwo = None + def get_extended_bmc_configuration(self, fishclient, hideadvanced=True): + immsettings = self.get_system_configuration(fetchimm=True, hideadvanced=hideadvanced) + for setting in list(immsettings): + if not setting.startswith('IMM.'): + del immsettings[setting] + return immsettings + def get_system_configuration(self, hideadvanced=True, fishclient=None, fetchimm=False): if not self.fwc: