From 0bd140036c7011010854ce9cc9f02e16471d6f8c Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 9 Mar 2018 11:23:04 -0500 Subject: [PATCH] Shore up support of numeric_data, mask others The numeric_data type was not handled, handle it. boolean and cmd_data are not currently supported, mask them for now. Change-Id: I11bad320237fbcf7fd630f7b55cb30cff66d2845 --- pyghmi/ipmi/oem/lenovo/config.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pyghmi/ipmi/oem/lenovo/config.py b/pyghmi/ipmi/oem/lenovo/config.py index f42c8dc9..2bd5f24c 100644 --- a/pyghmi/ipmi/oem/lenovo/config.py +++ b/pyghmi/ipmi/oem/lenovo/config.py @@ -284,16 +284,21 @@ class LenovoFirmwareConfig(object): reset = False name = setting.find("mriName").text help = setting.find("desc").text - textdata = setting.find('text_data') - if textdata is not None: - if textdata.get('maxinstance') is not None: + onedata = setting.find('text_data') + if onedata is None: + onedata = setting.find('numeric_data') + if onedata is not None: + if onedata.get('maxinstance') is not None: protect = True # Not yet supported else: - instance = textdata.find('instance') + instance = onedata.find('instance') if instance is None: protect = True # not supported yet else: current = instance.text + if (setting.find('cmd_data') is not None or + setting.find('boolean_data') is not None): + protect = True # Hide currently unsupported settings ldata = setting.find("list_data") extraorder = False currentdict = {}