From f5a975fb7a67e866daa92f94ed8c3661100ff018 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 24 Aug 2022 16:11:06 -0400 Subject: [PATCH] Add TimeZone to SMM configuration Change-Id: Ic25675a7f7d0bd45018ad12c83bb95a2ebbcd4f2 --- pyghmi/ipmi/oem/lenovo/nextscale.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyghmi/ipmi/oem/lenovo/nextscale.py b/pyghmi/ipmi/oem/lenovo/nextscale.py index ae8a611d..ea4b621c 100644 --- a/pyghmi/ipmi/oem/lenovo/nextscale.py +++ b/pyghmi/ipmi/oem/lenovo/nextscale.py @@ -403,6 +403,7 @@ class SMMClient(object): 'password_login_failures': 'passwordFailAllowdNum', 'password_min_length': 'passwordMinLength', 'password_lockout_period': 'passwordLockoutTimePeriod', + 'timezone': 'timeZone', } fanmodes = { @@ -422,13 +423,17 @@ class SMMClient(object): ('get=passwordMinLength,passwordForceChange,passwordDurationDays,' 'passwordExpireWarningDays,passwordChangeInterval,' 'passwordReuseCheckNum,passwordFailAllowdNum,' - 'passwordLockoutTimePeriod')) + 'passwordLockoutTimePeriod,timeZone')) rsp = wc.getresponse() rspbody = rsp.read() accountinfo = fromstring(rspbody) for rule in self.rulemap: ruleinfo = accountinfo.find(self.rulemap[rule]) if ruleinfo is not None: + try: + val = int(ruleinfo.text) + except ValueError: + val = ruleinfo.text settings[rule] = {'value': int(ruleinfo.text)} dwc = self.ipmicmd.xraw_command(0x32, 0x94) dwc = bytearray(dwc['data'])