diff --git a/pyghmi/ipmi/command.py b/pyghmi/ipmi/command.py index db0b1c59..248da16b 100644 --- a/pyghmi/ipmi/command.py +++ b/pyghmi/ipmi/command.py @@ -723,9 +723,9 @@ class Command(object): else: raise Exception("Unrecognized data format " + repr(fetchdata)) - def get_system_configuration(self): + def get_system_configuration(self, hideadvanced=True): self.oem_init() - return self._oem.get_system_configuration() + return self._oem.get_system_configuration(hideadvanced) def set_system_configuration(self, changeset): self.oem_init() diff --git a/pyghmi/ipmi/oem/generic.py b/pyghmi/ipmi/oem/generic.py index 618852df..2b2e2cb2 100644 --- a/pyghmi/ipmi/oem/generic.py +++ b/pyghmi/ipmi/oem/generic.py @@ -305,11 +305,14 @@ class OEMHandler(object): """ return False - def get_system_configuration(self): + def get_system_configuration(self, hideadvanced): """Retrieve system configuration This returns a dictionary of settings names to dictionaries including 'current', 'default' and 'possible' values as well as 'help' + + :param hideadvanced: Whether to hide 'advanced' settings that most + users should not need. Defaults to True. """ return {} diff --git a/pyghmi/ipmi/oem/lenovo/handler.py b/pyghmi/ipmi/oem/lenovo/handler.py index f6e26f47..5cafceed 100755 --- a/pyghmi/ipmi/oem/lenovo/handler.py +++ b/pyghmi/ipmi/oem/lenovo/handler.py @@ -914,10 +914,10 @@ class OEMHandler(generic.OEMHandler): progress=progress, bank=bank) - def get_system_configuration(self): + def get_system_configuration(self, hideadvanced): if self.has_imm or self.has_xcc: - return self.immhandler.get_system_configuration() - return super(OEMHandler, self).get_system_configuration() + return self.immhandler.get_system_configuration(hideadvanced) + return super(OEMHandler, self).get_system_configuration(hideadvanced) def set_system_configuration(self, changeset): if self.has_imm or self.has_xcc: diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index 0d6d1ddb..d3a4de22 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -148,14 +148,15 @@ class IMMClient(object): return None return cls._parse_builddate(propstr) - def get_system_configuration(self): + def get_system_configuration(self, hideadvanced=True): if not self.fwc: self.fwc = config.LenovoFirmwareConfig(self.ipmicmd) self.fwo = self.fwc.get_fw_options() self.fwovintage = util._monotonic_time() retcfg = {} for opt in self.fwo: - if self.fwo[opt]['lenovo_protect'] or self.fwo[opt]['hidden']: + if (hideadvanced and self.fwo[opt]['lenovo_protect'] or + self.fwo[opt]['hidden']): # Do not enumerate hidden settings continue retcfg[opt] = {}