test/keywords/bmc/ipmitool/ipmitool_table_parser.py
croy 82d417b9e6 New StarlingX Automation Framework
Fresh start for the StarlingX automation framework.

Change-Id: Ie265e0791024f45f71faad6315c2b91b022934d1
2024-11-29 16:01:57 -05:00

24 lines
610 B
Python

class IPMIToolTableParser:
"""
Class for IPMITool table parsing
"""
def __init__(self, openstack_output):
self.openstack_output = openstack_output
def get_output_values_list(self):
"""
Getter for output values list
Returns: the output values list
"""
output_values = {}
for line in self.openstack_output:
# Actual output have : separators
if line.__contains__(':'):
values = line.split(':')
output_values[values[0].strip()] = values[1].strip()
return output_values