mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #25083 from steverweber/fix_ipmi_stat
ipmi: get_sensor_data would always fail
This commit is contained in:
commit
46350796b6
1 changed files with 4 additions and 1 deletions
|
@ -604,10 +604,13 @@ def get_sensor_data(**kwargs):
|
|||
|
||||
salt-call ipmi.get_sensor_data api_host=127.0.0.1 api_user=admin api_pass=pass
|
||||
'''
|
||||
import ast
|
||||
with _IpmiCommand(**kwargs) as s:
|
||||
data = {}
|
||||
for reading in s.get_sensor_data():
|
||||
data[reading['name']] = reading
|
||||
if reading:
|
||||
r = ast.literal_eval(repr(reading))
|
||||
data[r.pop('name')] = r
|
||||
return data
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue