| import bmc_ssh_utils as bsu |
| def peltool(option_string, parse_json=True, **bsu_options): |
| Run peltool on the BMC with the caller's option string and return the result. |
| ${pel_results}= Peltool -l |
| [Subsystem]: BMC Firmware |
| [Message]: An application had an internal failure |
| [Commit Time]: 02/25/2020 04:51:31 |
| [Sev]: Unrecoverable Error |
| Description of argument(s): |
| option_string A string of options which are to be processed by the peltool command. |
| parse_json Indicates that the raw JSON data should parsed into a list of |
| bsu_options Options to be passed directly to bmc_execute_command. See its prolog for |
| bsu_options = fa.args_to_objects(bsu_options) |
| out_buf, stderr, rc = bsu.bmc_execute_command('peltool ' + option_string, **bsu_options) |
| return json.loads(out_buf) |
| except json.JSONDecodeError: |