diff --git a/pyghmi/ipmi/oem/lenovo/config.py b/pyghmi/ipmi/oem/lenovo/config.py index b9ceca7a..871cc0fc 100644 --- a/pyghmi/ipmi/oem/lenovo/config.py +++ b/pyghmi/ipmi/oem/lenovo/config.py @@ -260,6 +260,7 @@ class LenovoFirmwareConfig(object): self.connection.ipmi_session.pause(2) xml = etree.fromstring(data) + sortid = 0 for config in xml.iter("config"): lenovo_id = config.get("ID") for group in config.iter("group"): @@ -320,7 +321,9 @@ class LenovoFirmwareConfig(object): lenovo_protect=protect, readonly_expression=readonly, hide_expression=hide, + sortid=sortid, lenovo_instance="") + sortid = sortid + 1 for opt in options: opt = options[opt] opt['hidden'], opt['hidden_why'] = _eval_conditional( diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index e8b8dc1f..6f4b767a 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -143,6 +143,7 @@ class IMMClient(object): retcfg[opt]['default'] = self.fwo[opt]['default'] retcfg[opt]['help'] = self.fwo[opt]['help'] retcfg[opt]['possible'] = self.fwo[opt]['possible'] + retcfg[opt]['sortid'] = self.fwo[opt]['sortid'] return retcfg def set_system_configuration(self, changeset):