mirror of
https://opendev.org/x/pyghmi
synced 2026-01-11 18:52:33 +00:00
Set warning according to expiry
Since the expiration warning can block expiration, always set warning when expiration set. Aim for 8% of the interval. Change-Id: Iecffb9c26822a21632b22170607bb2019fb52e29
This commit is contained in:
@@ -861,6 +861,9 @@ class XCCClient(IMMClient):
|
||||
self.ipmicmd.xraw_command(0x3a, 0xf1, data=[2])
|
||||
elif key.lower() in self.rulemap:
|
||||
ruleset[self.rulemap[key.lower()]] = changeset[key]['value']
|
||||
if key.lower() == 'password_expiration':
|
||||
warntime = str(int(int(changeset[key]['value']) * 0.08))
|
||||
rulset['USER_GlobalPassExpWarningPeriod'] = warntime
|
||||
else:
|
||||
raise pygexc.InvalidParameterValue(
|
||||
'{0} not a known setting'.format(key))
|
||||
|
||||
Reference in New Issue
Block a user