mirror of
https://opendev.org/x/pyghmi
synced 2025-01-14 19:57:47 +00:00
Get pending settings with current
To be consistent with the ipmi settings, present the pending as the 'value' and 'active' for the current value for pending settings. Change-Id: Ia99374732f05509d2796b5e2166c686716e93c69
This commit is contained in:
parent
1988c09d48
commit
5c2c5d797f
@ -601,10 +601,18 @@ class Command(object):
|
||||
reguri = reg['Uri']
|
||||
extrainfo, valtodisplay, _ = self._get_biosreg(reguri)
|
||||
currsettings = {}
|
||||
pendingsettings = self._do_web_request(self._setbiosurl)
|
||||
pendingsettings = pendingsettings.get('Attributes', {})
|
||||
for setting in biosinfo.get('Attributes', {}):
|
||||
val = biosinfo['Attributes'][setting]
|
||||
currval = val
|
||||
if setting in pendingsettings:
|
||||
val = pendingsettings[setting]
|
||||
val = valtodisplay.get(setting, {}).get(val, val)
|
||||
currval = valtodisplay.get(setting, {}).get(currval, currval)
|
||||
val = {'value': val}
|
||||
if currval != val['value']:
|
||||
val['active'] = currval
|
||||
val.update(**extrainfo.get(setting, {}))
|
||||
currsettings[setting] = val
|
||||
return currsettings
|
||||
|
Loading…
x
Reference in New Issue
Block a user