2
0
mirror of https://opendev.org/x/pyghmi synced 2025-02-10 07:44:02 +00:00

Add TimeZone to SMM configuration

Change-Id: Ic25675a7f7d0bd45018ad12c83bb95a2ebbcd4f2
This commit is contained in:
Jarrod Johnson 2022-08-24 16:11:06 -04:00
parent d99c07ce81
commit f5a975fb7a

View File

@ -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'])