Formatted python files to follow PEP 8 python code standards.
- Changed the python files in the openbmc-test-automation
directory to conform to python code style standards with
the exception of E402 and E501.
- Resolves openbmc/openbmc-test-automation#1308
Change-Id: I109995c2d248f5a6bb2c0e3c76a6144c8f3aac2e
Signed-off-by: Joy Onyerikwu <onyekachukwu.joy.onyerikwu@ibm.com>
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/bin/plug_ins/Stop/cp_stop_check b/bin/plug_ins/Stop/cp_stop_check
index 471be4e..3199ec0 100755
--- a/bin/plug_ins/Stop/cp_stop_check
+++ b/bin/plug_ins/Stop/cp_stop_check
@@ -56,7 +56,6 @@
def exit_function(signal_number=0,
frame=None):
-
r"""
Execute whenever the program ends normally or with the signals that we
catch (i.e. TERM, INT).
@@ -70,7 +69,6 @@
def signal_handler(signal_number,
frame):
-
r"""
Handle signals. Without a function to catch a SIGTERM or SIGINT, our
program would terminate immediately with return code 143 and without
@@ -88,7 +86,6 @@
def validate_parms():
-
r"""
Validate program parameters, etc. Return True or False (i.e. pass/fail)
accordingly.
@@ -105,7 +102,6 @@
def rest_fail():
-
r"""
If STOP_REST_FAIL, then this function will determine whether REST commands
to the target are working. If not, this function will stop the program by
@@ -139,7 +135,6 @@
def esel_stop_check():
-
r"""
Run the esel_stop_check program to determine whether any eSEL entries
found warrent stopping the test run. See esel_stop_check help text for
@@ -195,5 +190,6 @@
# Main
+
if not main():
exit(1)
diff --git a/bin/process_plug_in_packages.py b/bin/process_plug_in_packages.py
index 49fc21c..797c3c8 100755
--- a/bin/process_plug_in_packages.py
+++ b/bin/process_plug_in_packages.py
@@ -32,28 +32,28 @@
# Create parser object.
parser = argparse.ArgumentParser(
usage='%(prog)s [OPTIONS]',
- description="%(prog)s will process the plug-in packages passed to it." +
- " A plug-in package is essentially a directory containing" +
- " one or more call point programs. Each of these call point" +
- " programs must have a prefix of \"cp_\". When calling" +
- " %(prog)s, a user must provide a call_point parameter" +
- " (described below). For each plug-in package passed," +
- " %(prog)s will check for the presence of the specified call" +
- " point program in the plug-in directory. If it is found," +
- " %(prog)s will run it. It is the responsibility of the" +
- " caller to set any environment variables needed by the call" +
- " point programs.\n\nAfter each call point program" +
- " has been run, %(prog)s will print the following values in" +
- " the following formats for use by the calling program:\n" +
- " failed_plug_in_name: <failed plug-in value," +
- " if any>\n shell_rc: " +
- "<shell return code value of last call point program - this" +
- " will be printed in hexadecimal format. Also, be aware" +
- " that if a call point program returns a value it will be" +
- " shifted left 2 bytes (e.g. rc of 2 will be printed as" +
- " 0x00000200). That is because the rightmost byte is" +
- " reserved for errors in calling the call point program" +
- " rather than errors generated by the call point program.>",
+ description="%(prog)s will process the plug-in packages passed to it."
+ + " A plug-in package is essentially a directory containing"
+ + " one or more call point programs. Each of these call point"
+ + " programs must have a prefix of \"cp_\". When calling"
+ + " %(prog)s, a user must provide a call_point parameter"
+ + " (described below). For each plug-in package passed,"
+ + " %(prog)s will check for the presence of the specified call"
+ + " point program in the plug-in directory. If it is found,"
+ + " %(prog)s will run it. It is the responsibility of the"
+ + " caller to set any environment variables needed by the call"
+ + " point programs.\n\nAfter each call point program"
+ + " has been run, %(prog)s will print the following values in"
+ + " the following formats for use by the calling program:\n"
+ + " failed_plug_in_name: <failed plug-in value,"
+ + " if any>\n shell_rc: "
+ + "<shell return code value of last call point program - this"
+ + " will be printed in hexadecimal format. Also, be aware"
+ + " that if a call point program returns a value it will be"
+ + " shifted left 2 bytes (e.g. rc of 2 will be printed as"
+ + " 0x00000200). That is because the rightmost byte is"
+ + " reserved for errors in calling the call point program"
+ + " rather than errors generated by the call point program.>",
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
prefix_chars='-+')
@@ -68,51 +68,51 @@
'--call_point',
default="setup",
required=True,
- help='The call point program name. This value must not include the' +
- ' "cp_" prefix. For each plug-in package passed to this program,' +
- ' the specified call_point program will be called if it exists in' +
- ' the plug-in directory.' + default_string)
+ help='The call point program name. This value must not include the'
+ + ' "cp_" prefix. For each plug-in package passed to this program,'
+ + ' the specified call_point program will be called if it exists in'
+ + ' the plug-in directory.' + default_string)
parser.add_argument(
'--allow_shell_rc',
default="0x00000000",
- help='The user may supply a value other than zero to indicate an' +
- ' acceptable non-zero return code. For example, if this value' +
- ' equals 0x00000200, it means that for each plug-in call point that' +
- ' runs, a 0x00000200 will not be counted as a failure. See note' +
- ' above regarding left-shifting of return codes.' + default_string)
+ help='The user may supply a value other than zero to indicate an'
+ + ' acceptable non-zero return code. For example, if this value'
+ + ' equals 0x00000200, it means that for each plug-in call point that'
+ + ' runs, a 0x00000200 will not be counted as a failure. See note'
+ + ' above regarding left-shifting of return codes.' + default_string)
parser.add_argument(
'--stop_on_plug_in_failure',
default=1,
type=int,
choices=[1, 0],
- help='If this parameter is set to 1, this program will stop and return ' +
- 'non-zero if the call point program from any plug-in directory ' +
- 'fails. Conversely, if it is set to false, this program will run ' +
- 'the call point program from each and every plug-in directory ' +
- 'regardless of their return values. Typical example cases where ' +
- 'you\'d want to run all plug-in call points regardless of success ' +
- 'or failure would be "cleanup" or "ffdc" call points.')
+ help='If this parameter is set to 1, this program will stop and return '
+ + 'non-zero if the call point program from any plug-in directory '
+ + 'fails. Conversely, if it is set to false, this program will run '
+ + 'the call point program from each and every plug-in directory '
+ + 'regardless of their return values. Typical example cases where '
+ + 'you\'d want to run all plug-in call points regardless of success '
+ + 'or failure would be "cleanup" or "ffdc" call points.')
parser.add_argument(
'--stop_on_non_zero_rc',
default=0,
type=int,
choices=[1, 0],
- help='If this parm is set to 1 and a plug-in call point program returns ' +
- 'a valid non-zero return code (see "allow_shell_rc" parm above),' +
- ' this program will stop processing and return 0 (success). Since' +
- ' this constitutes a successful exit, this would normally be used' +
- ' where the caller wishes to stop processing if one of the plug-in' +
- ' directory call point programs returns a special value indicating' +
- ' that some special case has been found. An example might be in' +
- ' calling some kind of "check_errl" call point program. Such a' +
- ' call point program might return a 2 (i.e. 0x00000200) to indicate' +
- ' that a given error log entry was found in an "ignore" list and is' +
- ' therefore to be ignored. That being the case, no other' +
- ' "check_errl" call point program would need to be called.' +
- default_string)
+ help='If this parm is set to 1 and a plug-in call point program returns '
+ + 'a valid non-zero return code (see "allow_shell_rc" parm above),'
+ + ' this program will stop processing and return 0 (success). Since'
+ + ' this constitutes a successful exit, this would normally be used'
+ + ' where the caller wishes to stop processing if one of the plug-in'
+ + ' directory call point programs returns a special value indicating'
+ + ' that some special case has been found. An example might be in'
+ + ' calling some kind of "check_errl" call point program. Such a'
+ + ' call point program might return a 2 (i.e. 0x00000200) to indicate'
+ + ' that a given error log entry was found in an "ignore" list and is'
+ + ' therefore to be ignored. That being the case, no other'
+ + ' "check_errl" call point program would need to be called.'
+ + default_string)
parser.add_argument(
'--mch_class',
@@ -236,8 +236,8 @@
print_var(shell_rc, hex)
return rc, shell_rc, failed_plug_in_name
- print("------------------------------------------------- Starting plug-" +
- "in -----------------------------------------------")
+ print("------------------------------------------------- Starting plug-"
+ + "in -----------------------------------------------")
print(out_buf)
if autoscript:
stdout = 1 - quiet
@@ -266,8 +266,8 @@
if shell_rc != 0:
failed_plug_in_name = plug_in_name
- print("------------------------------------------------- Ending plug-in" +
- " -------------------------------------------------")
+ print("------------------------------------------------- Ending plug-in"
+ + " -------------------------------------------------")
if failed_plug_in_name != "":
print_var(failed_plug_in_name)
print_var(shell_rc, hex)
@@ -334,8 +334,8 @@
if stop_on_plug_in_failure:
break
if shell_rc != 0 and stop_on_non_zero_rc:
- qprint_time("Stopping on non-zero shell return code as requested" +
- " by caller.\n")
+ qprint_time("Stopping on non-zero shell return code as requested"
+ + " by caller.\n")
break
if ret_code == 0:
diff --git a/bin/prop_call.py b/bin/prop_call.py
index b616feb..30845ff 100755
--- a/bin/prop_call.py
+++ b/bin/prop_call.py
@@ -34,26 +34,26 @@
parser = argparse.ArgumentParser(
usage='%(prog)s [OPTIONS]',
- description="%(prog)s will call a program using parameters retrieved" +
- " from the given properties file.",
+ description="%(prog)s will call a program using parameters retrieved"
+ + " from the given properties file.",
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
prefix_chars='-+')
parser.add_argument(
'--prop_dir_path',
default=os.environ.get("PROP_DIR_PATH", os.getcwd()),
- help='The path to the directory that contains the properties file.' +
- ' The default value is environment variable "PROP_DIR_PATH", if' +
- ' set. Otherwise, it is the current working directory.')
+ help='The path to the directory that contains the properties file.'
+ + ' The default value is environment variable "PROP_DIR_PATH", if'
+ + ' set. Otherwise, it is the current working directory.')
parser.add_argument(
'--prop_file_name',
- help='The path to a properties file that contains the parameters to' +
- ' pass to the program. If the properties file has a ".properties"' +
- ' extension, the caller need not specify the extension. The format' +
- ' of each line in the properties file should be as follows:' +
- ' <parm_name=parm_value>. Do not quote the parm value. To specify' +
- ' positional parms, use a parm name of "pos". For example: pos=this'
+ help='The path to a properties file that contains the parameters to'
+ + ' pass to the program. If the properties file has a ".properties"'
+ + ' extension, the caller need not specify the extension. The format'
+ + ' of each line in the properties file should be as follows:'
+ + ' <parm_name=parm_value>. Do not quote the parm value. To specify'
+ + ' positional parms, use a parm name of "pos". For example: pos=this'
' value')
parser.add_argument(
@@ -66,7 +66,6 @@
def exit_function(signal_number=0,
frame=None):
-
r"""
Execute whenever the program ends normally or with the signals that we
catch (i.e. TERM, INT).
@@ -80,7 +79,6 @@
def signal_handler(signal_number,
frame):
-
r"""
Handle signals. Without a function to catch a SIGTERM or SIGINT, our
program would terminate immediately with return code 143 and without
@@ -98,7 +96,6 @@
def validate_parms():
-
r"""
Validate program parameters, etc. Return True or False (i.e. pass/fail)
accordingly.
diff --git a/bin/validate_plug_ins.py b/bin/validate_plug_ins.py
index 36b1db9..9c0a1fd 100755
--- a/bin/validate_plug_ins.py
+++ b/bin/validate_plug_ins.py
@@ -27,9 +27,9 @@
# Create parser object.
parser = argparse.ArgumentParser(
usage='%(prog)s [OPTIONS] [PLUG_IN_DIR_PATHS]',
- description="%(prog)s will validate the plug-in packages passed to it." +
- " It will also print a list of the absolute plug-in" +
- " directory paths for use by the calling program.",
+ description="%(prog)s will validate the plug-in packages passed to it."
+ + " It will also print a list of the absolute plug-in"
+ + " directory paths for use by the calling program.",
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
prefix_chars='-+')
diff --git a/data/Barreleye.py b/data/Barreleye.py
index 1c9c1be..537477e 100755
--- a/data/Barreleye.py
+++ b/data/Barreleye.py
@@ -234,13 +234,18 @@
'<inventory_root>/system/chassis/motherboard': {'fru_type': 'MAIN_PLANAR', 'is_fru': True, },
'<inventory_root>/system/chassis/io_board': {'fru_type': 'DAUGHTER_CARD', 'is_fru': True, },
'<inventory_root>/system/chassis/sas_expander': {'fru_type': 'DAUGHTER_CARD', 'is_fru': True, },
- '<inventory_root>/system/chassis/hdd_backplane': {'fru_type': 'DAUGHTER_CARD', 'is_fru': True, },
+ '<inventory_root>/system/chassis/hdd_backplane': {'fru_type': 'DAUGHTER_CARD',
+ 'is_fru': True, },
'<inventory_root>/system/systemevent': {'fru_type': 'SYSTEM_EVENT', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/refclock': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/pcieclock': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/todclock': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/apss': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/refclock': {'fru_type': 'MAIN_PLANAR',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/pcieclock': {'fru_type': 'MAIN_PLANAR',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/todclock': {'fru_type': 'MAIN_PLANAR',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/apss': {'fru_type': 'MAIN_PLANAR',
+ 'is_fru': False, },
'<inventory_root>/system/chassis/fan0': {'fru_type': 'FAN', 'is_fru': True, },
'<inventory_root>/system/chassis/fan1': {'fru_type': 'FAN', 'is_fru': True, },
@@ -249,45 +254,78 @@
'<inventory_root>/system/chassis/fan4': {'fru_type': 'FAN', 'is_fru': True, },
'<inventory_root>/system/chassis/fan5': {'fru_type': 'FAN', 'is_fru': True, },
- '<inventory_root>/system/chassis/motherboard/bmc': {'fru_type': 'BMC', 'is_fru': False, 'manufacturer': 'ASPEED'},
+ '<inventory_root>/system/chassis/motherboard/bmc': {'fru_type': 'BMC', 'is_fru': False,
+ 'manufacturer': 'ASPEED'},
'<inventory_root>/system/chassis/motherboard/cpu0': {'fru_type': 'CPU', 'is_fru': True, },
'<inventory_root>/system/chassis/motherboard/cpu1': {'fru_type': 'CPU', 'is_fru': True, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core0': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core1': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core2': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core3': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core4': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core5': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core6': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core7': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core8': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core9': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core10': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core11': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core0': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core1': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core2': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core3': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core4': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core5': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core6': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core7': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core8': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core9': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core10': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core11': {'fru_type': 'CORE',
+ 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core0': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core1': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core2': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core3': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core4': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core5': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core6': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core7': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core8': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core9': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core10': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core11': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core0': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core1': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core2': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core3': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core4': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core5': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core6': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core7': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core8': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core9': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core10': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core11': {'fru_type': 'CORE',
+ 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/membuf0': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/membuf1': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/membuf2': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/membuf3': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/membuf4': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/membuf5': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/membuf6': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/membuf7': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/membuf0': {'fru_type': 'MEMORY_BUFFER',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/membuf1': {'fru_type': 'MEMORY_BUFFER',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/membuf2': {'fru_type': 'MEMORY_BUFFER',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/membuf3': {'fru_type': 'MEMORY_BUFFER',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/membuf4': {'fru_type': 'MEMORY_BUFFER',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/membuf5': {'fru_type': 'MEMORY_BUFFER',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/membuf6': {'fru_type': 'MEMORY_BUFFER',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/membuf7': {'fru_type': 'MEMORY_BUFFER',
+ 'is_fru': False, },
'<inventory_root>/system/chassis/motherboard/dimm0': {'fru_type': 'DIMM', 'is_fru': True, },
'<inventory_root>/system/chassis/motherboard/dimm1': {'fru_type': 'DIMM', 'is_fru': True, },
@@ -322,14 +360,22 @@
'<inventory_root>/system/chassis/motherboard/dimm30': {'fru_type': 'DIMM', 'is_fru': True, },
'<inventory_root>/system/chassis/motherboard/dimm31': {'fru_type': 'DIMM', 'is_fru': True, },
- '<inventory_root>/system/chassis/io_board/pcie_slot0_riser': {'fru_type': 'PCIE_RISER', 'is_fru': True, },
- '<inventory_root>/system/chassis/io_board/pcie_slot1_riser': {'fru_type': 'PCIE_RISER', 'is_fru': True, },
- '<inventory_root>/system/chassis/io_board/pcie_slot2_riser': {'fru_type': 'PCIE_RISER', 'is_fru': True, },
- '<inventory_root>/system/chassis/io_board/pcie_slot0': {'fru_type': 'PCIE_CARD', 'is_fru': True, },
- '<inventory_root>/system/chassis/io_board/pcie_slot1': {'fru_type': 'PCIE_CARD', 'is_fru': True, },
- '<inventory_root>/system/chassis/io_board/pcie_slot2': {'fru_type': 'PCIE_CARD', 'is_fru': True, },
- '<inventory_root>/system/chassis/io_board/pcie_mezz0': {'fru_type': 'PCIE_CARD', 'is_fru': True, },
- '<inventory_root>/system/chassis/io_board/pcie_mezz1': {'fru_type': 'PCIE_CARD', 'is_fru': True, },
+ '<inventory_root>/system/chassis/io_board/pcie_slot0_riser': {'fru_type': 'PCIE_RISER',
+ 'is_fru': True, },
+ '<inventory_root>/system/chassis/io_board/pcie_slot1_riser': {'fru_type': 'PCIE_RISER',
+ 'is_fru': True, },
+ '<inventory_root>/system/chassis/io_board/pcie_slot2_riser': {'fru_type': 'PCIE_RISER',
+ 'is_fru': True, },
+ '<inventory_root>/system/chassis/io_board/pcie_slot0': {'fru_type': 'PCIE_CARD',
+ 'is_fru': True, },
+ '<inventory_root>/system/chassis/io_board/pcie_slot1': {'fru_type': 'PCIE_CARD',
+ 'is_fru': True, },
+ '<inventory_root>/system/chassis/io_board/pcie_slot2': {'fru_type': 'PCIE_CARD',
+ 'is_fru': True, },
+ '<inventory_root>/system/chassis/io_board/pcie_mezz0': {'fru_type': 'PCIE_CARD',
+ 'is_fru': True, },
+ '<inventory_root>/system/chassis/io_board/pcie_mezz1': {'fru_type': 'PCIE_CARD',
+ 'is_fru': True, },
}
ID_LOOKUP = {
@@ -561,15 +607,16 @@
name = name.upper()
c = name[0:1]
offset = int(name[1:])
- a = ord(c)-65
- base = a*8+GPIO_BASE
- return base+offset
+ a = ord(c) - 65
+ base = a * 8 + GPIO_BASE
+ return base + offset
HWMON_CONFIG = {
- '0-004a': {
+ '0-004a': {
'names': {
- 'temp1_input': {'object_path': 'temperature/ambient', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
+ 'temp1_input': {'object_path': 'temperature/ambient', 'poll_interval': 5000,
+ 'scale': 1000, 'units': 'C'},
}
},
'6-002d': {
@@ -577,20 +624,34 @@
'pwm1': {'object_path': 'speed/fan0', 'poll_interval': 10000, 'scale': 1, 'units': ''},
'pwm2': {'object_path': 'speed/fan1', 'poll_interval': 10000, 'scale': 1, 'units': ''},
'pwm3': {'object_path': 'speed/fan2', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in1_input': {'object_path': 'voltage/P1V35_CPU0_BUF4', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in2_input': {'object_path': 'voltage/P0V9_CPU0_BUF1', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in3_input': {'object_path': 'voltage/P0V9_CPU0_BUF2', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in4_input': {'object_path': 'voltage/P0V9_CPU0_BUF3', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in5_input': {'object_path': 'voltage/P0V9_CPU0_BUF4', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in6_input': {'object_path': 'voltage/P1V09_CPU0_BUF1', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in7_input': {'object_path': 'voltage/P1V09_CPU0_BUF2', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in8_input': {'object_path': 'voltage/P1V09_CPU0_BUF3', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in9_input': {'object_path': 'voltage/P1V09_CPU0_BUF4', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in10_input': {'object_path': 'voltage/P0V97_CPU0', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in11_input': {'object_path': 'voltage/P1V1_MEM0', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in12_input': {'object_path': 'voltage/P1V35_CPU0_BUF1', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in13_input': {'object_path': 'voltage/P1V35_CPU0_BUF2', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in14_input': {'object_path': 'voltage/P1V35_CPU0_BUF3', 'poll_interval': 10000, 'scale': 1, 'units': ''},
+ 'in1_input': {'object_path': 'voltage/P1V35_CPU0_BUF4', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in2_input': {'object_path': 'voltage/P0V9_CPU0_BUF1', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in3_input': {'object_path': 'voltage/P0V9_CPU0_BUF2', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in4_input': {'object_path': 'voltage/P0V9_CPU0_BUF3', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in5_input': {'object_path': 'voltage/P0V9_CPU0_BUF4', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in6_input': {'object_path': 'voltage/P1V09_CPU0_BUF1', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in7_input': {'object_path': 'voltage/P1V09_CPU0_BUF2', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in8_input': {'object_path': 'voltage/P1V09_CPU0_BUF3', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in9_input': {'object_path': 'voltage/P1V09_CPU0_BUF4', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in10_input': {'object_path': 'voltage/P0V97_CPU0', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in11_input': {'object_path': 'voltage/P1V1_MEM0', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in12_input': {'object_path': 'voltage/P1V35_CPU0_BUF1', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in13_input': {'object_path': 'voltage/P1V35_CPU0_BUF2', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in14_input': {'object_path': 'voltage/P1V35_CPU0_BUF3', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
}
},
'6-002e': {
@@ -598,146 +659,263 @@
'pwm1': {'object_path': 'speed/fan3', 'poll_interval': 10000, 'scale': 1, 'units': ''},
'pwm2': {'object_path': 'speed/fan4', 'poll_interval': 10000, 'scale': 1, 'units': ''},
'pwm3': {'object_path': 'speed/fan5', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in1_input': {'object_path': 'voltage/P1V35_CPU1_BUF4', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in2_input': {'object_path': 'voltage/P0V9_CPU1_BUF1', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in3_input': {'object_path': 'voltage/P0V9_CPU1_BUF2', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in4_input': {'object_path': 'voltage/P0V9_CPU1_BUF3', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in5_input': {'object_path': 'voltage/P0V9_CPU1_BUF4', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in6_input': {'object_path': 'voltage/P1V09_CPU1_BUF1', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in7_input': {'object_path': 'voltage/P1V09_CPU1_BUF2', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in8_input': {'object_path': 'voltage/P1V09_CPU1_BUF3', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in9_input': {'object_path': 'voltage/P1V09_CPU1_BUF4', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in10_input': {'object_path': 'voltage/P0V97_CPU1', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in11_input': {'object_path': 'voltage/P1V1_MEM1', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in12_input': {'object_path': 'voltage/P1V35_CPU1_BUF1', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in13_input': {'object_path': 'voltage/P1V35_CPU1_BUF2', 'poll_interval': 10000, 'scale': 1, 'units': ''},
- 'in14_input': {'object_path': 'voltage/P1V35_CPU1_BUF3', 'poll_interval': 10000, 'scale': 1, 'units': ''},
+ 'in1_input': {'object_path': 'voltage/P1V35_CPU1_BUF4', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in2_input': {'object_path': 'voltage/P0V9_CPU1_BUF1', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in3_input': {'object_path': 'voltage/P0V9_CPU1_BUF2', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in4_input': {'object_path': 'voltage/P0V9_CPU1_BUF3', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in5_input': {'object_path': 'voltage/P0V9_CPU1_BUF4', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in6_input': {'object_path': 'voltage/P1V09_CPU1_BUF1', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in7_input': {'object_path': 'voltage/P1V09_CPU1_BUF2', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in8_input': {'object_path': 'voltage/P1V09_CPU1_BUF3', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in9_input': {'object_path': 'voltage/P1V09_CPU1_BUF4', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in10_input': {'object_path': 'voltage/P0V97_CPU1', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in11_input': {'object_path': 'voltage/P1V1_MEM1', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in12_input': {'object_path': 'voltage/P1V35_CPU1_BUF1', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in13_input': {'object_path': 'voltage/P1V35_CPU1_BUF2', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
+ 'in14_input': {'object_path': 'voltage/P1V35_CPU1_BUF3', 'poll_interval': 10000,
+ 'scale': 1, 'units': ''},
}
},
'3-0050': {
'names': {
- 'caps_curr_powercap': {'object_path': 'powercap/curr_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
- 'caps_curr_powerreading': {'object_path': 'powercap/system_power', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
- 'caps_max_powercap': {'object_path': 'powercap/max_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
- 'caps_min_powercap': {'object_path': 'powercap/min_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
- 'caps_norm_powercap': {'object_path': 'powercap/n_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
- 'caps_user_powerlimit': {'object_path': 'powercap/user_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
+ 'caps_curr_powercap': {'object_path': 'powercap/curr_cap', 'poll_interval': 10000,
+ 'scale': 1, 'units': 'W'},
+ 'caps_curr_powerreading': {'object_path': 'powercap/system_power',
+ 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
+ 'caps_max_powercap': {'object_path': 'powercap/max_cap', 'poll_interval': 10000,
+ 'scale': 1, 'units': 'W'},
+ 'caps_min_powercap': {'object_path': 'powercap/min_cap', 'poll_interval': 10000,
+ 'scale': 1, 'units': 'W'},
+ 'caps_norm_powercap': {'object_path': 'powercap/n_cap', 'poll_interval': 10000,
+ 'scale': 1, 'units': 'W'},
+ 'caps_user_powerlimit': {'object_path': 'powercap/user_cap', 'poll_interval': 10000,
+ 'scale': 1, 'units': 'W'},
},
'labels': {
- '176': {'object_path': 'temperature/cpu0/core0', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '177': {'object_path': 'temperature/cpu0/core1', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '178': {'object_path': 'temperature/cpu0/core2', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '179': {'object_path': 'temperature/cpu0/core3', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '180': {'object_path': 'temperature/cpu0/core4', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '181': {'object_path': 'temperature/cpu0/core5', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '182': {'object_path': 'temperature/cpu0/core6', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '183': {'object_path': 'temperature/cpu0/core7', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '184': {'object_path': 'temperature/cpu0/core8', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '185': {'object_path': 'temperature/cpu0/core9', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '186': {'object_path': 'temperature/cpu0/core10', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '187': {'object_path': 'temperature/cpu0/core11', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '102': {'object_path': 'temperature/dimm0', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '103': {'object_path': 'temperature/dimm1', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '104': {'object_path': 'temperature/dimm2', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '105': {'object_path': 'temperature/dimm3', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '106': {'object_path': 'temperature/dimm4', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '107': {'object_path': 'temperature/dimm5', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '108': {'object_path': 'temperature/dimm6', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '109': {'object_path': 'temperature/dimm7', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '110': {'object_path': 'temperature/dimm8', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '111': {'object_path': 'temperature/dimm9', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '112': {'object_path': 'temperature/dimm10', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '113': {'object_path': 'temperature/dimm11', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '114': {'object_path': 'temperature/dimm12', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '115': {'object_path': 'temperature/dimm13', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '116': {'object_path': 'temperature/dimm14', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '117': {'object_path': 'temperature/dimm15', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '94': {'object_path': 'temperature/membuf0', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '95': {'object_path': 'temperature/membuf1', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '96': {'object_path': 'temperature/membuf2', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '97': {'object_path': 'temperature/membuf3', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
+ '176': {'object_path': 'temperature/cpu0/core0', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '177': {'object_path': 'temperature/cpu0/core1', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '178': {'object_path': 'temperature/cpu0/core2', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '179': {'object_path': 'temperature/cpu0/core3', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '180': {'object_path': 'temperature/cpu0/core4', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '181': {'object_path': 'temperature/cpu0/core5', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '182': {'object_path': 'temperature/cpu0/core6', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '183': {'object_path': 'temperature/cpu0/core7', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '184': {'object_path': 'temperature/cpu0/core8', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '185': {'object_path': 'temperature/cpu0/core9', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '186': {'object_path': 'temperature/cpu0/core10', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '187': {'object_path': 'temperature/cpu0/core11', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '102': {'object_path': 'temperature/dimm0', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '103': {'object_path': 'temperature/dimm1', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '104': {'object_path': 'temperature/dimm2', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '105': {'object_path': 'temperature/dimm3', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '106': {'object_path': 'temperature/dimm4', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '107': {'object_path': 'temperature/dimm5', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '108': {'object_path': 'temperature/dimm6', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '109': {'object_path': 'temperature/dimm7', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '110': {'object_path': 'temperature/dimm8', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '111': {'object_path': 'temperature/dimm9', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '112': {'object_path': 'temperature/dimm10', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '113': {'object_path': 'temperature/dimm11', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '114': {'object_path': 'temperature/dimm12', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '115': {'object_path': 'temperature/dimm13', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '116': {'object_path': 'temperature/dimm14', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '117': {'object_path': 'temperature/dimm15', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '94': {'object_path': 'temperature/membuf0', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '95': {'object_path': 'temperature/membuf1', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '96': {'object_path': 'temperature/membuf2', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '97': {'object_path': 'temperature/membuf3', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
}
},
'3-0051': {
- 'labels': {
- '188': {'object_path': 'temperature/cpu1/core0', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '189': {'object_path': 'temperature/cpu1/core1', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '190': {'object_path': 'temperature/cpu1/core2', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '191': {'object_path': 'temperature/cpu1/core3', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '192': {'object_path': 'temperature/cpu1/core4', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '193': {'object_path': 'temperature/cpu1/core5', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '194': {'object_path': 'temperature/cpu1/core6', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '195': {'object_path': 'temperature/cpu1/core7', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '196': {'object_path': 'temperature/cpu1/core8', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '197': {'object_path': 'temperature/cpu1/core9', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '198': {'object_path': 'temperature/cpu1/core10', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '199': {'object_path': 'temperature/cpu1/core11', 'poll_interval': 5000, 'scale': 1000, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '118': {'object_path': 'temperature/dimm16', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '119': {'object_path': 'temperature/dimm17', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '120': {'object_path': 'temperature/dimm18', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '121': {'object_path': 'temperature/dimm19', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '122': {'object_path': 'temperature/dimm20', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '123': {'object_path': 'temperature/dimm21', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '124': {'object_path': 'temperature/dimm22', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '125': {'object_path': 'temperature/dimm23', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '126': {'object_path': 'temperature/dimm24', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '127': {'object_path': 'temperature/dimm25', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '128': {'object_path': 'temperature/dimm26', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '129': {'object_path': 'temperature/dimm27', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '130': {'object_path': 'temperature/dimm28', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '131': {'object_path': 'temperature/dimm29', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '132': {'object_path': 'temperature/dimm30', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '133': {'object_path': 'temperature/dimm31', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '98': {'object_path': 'temperature/membuf4', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '99': {'object_path': 'temperature/membuf5', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '100': {'object_path': 'temperature/membuf6', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
- '101': {'object_path': 'temperature/membuf7', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
+ 'labels': {
+ '188': {'object_path': 'temperature/cpu1/core0', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '189': {'object_path': 'temperature/cpu1/core1', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '190': {'object_path': 'temperature/cpu1/core2', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '191': {'object_path': 'temperature/cpu1/core3', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '192': {'object_path': 'temperature/cpu1/core4', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '193': {'object_path': 'temperature/cpu1/core5', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '194': {'object_path': 'temperature/cpu1/core6', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '195': {'object_path': 'temperature/cpu1/core7', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '196': {'object_path': 'temperature/cpu1/core8', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '197': {'object_path': 'temperature/cpu1/core9', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '198': {'object_path': 'temperature/cpu1/core10', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '199': {'object_path': 'temperature/cpu1/core11', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '118': {'object_path': 'temperature/dimm16', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '119': {'object_path': 'temperature/dimm17', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '120': {'object_path': 'temperature/dimm18', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '121': {'object_path': 'temperature/dimm19', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '122': {'object_path': 'temperature/dimm20', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '123': {'object_path': 'temperature/dimm21', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '124': {'object_path': 'temperature/dimm22', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '125': {'object_path': 'temperature/dimm23', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '126': {'object_path': 'temperature/dimm24', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '127': {'object_path': 'temperature/dimm25', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '128': {'object_path': 'temperature/dimm26', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '129': {'object_path': 'temperature/dimm27', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '130': {'object_path': 'temperature/dimm28', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '131': {'object_path': 'temperature/dimm29', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '132': {'object_path': 'temperature/dimm30', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '133': {'object_path': 'temperature/dimm31', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '98': {'object_path': 'temperature/membuf4', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '99': {'object_path': 'temperature/membuf5', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '100': {'object_path': 'temperature/membuf6', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
+ '101': {'object_path': 'temperature/membuf7', 'poll_interval': 5000, 'scale': 1000,
+ 'units': 'C'},
}
},
- '4-0010': {
+ '4-0010': {
'names': {
# Barreleye uses 0.25 millioohms sense resistor for adm1278
- # To convert Iout register value Y to real-world value X, use an equation:
- # X= 1/m * (Y * 10^-R - b), here m = 800 * R_sense, and R_sense is expressed in milliohms.
- # The adm1278 driver did the conversion, but the R_sense is set here as a scale factor.
- 'curr1_input': {'object_path': 'HSCA/Iout', 'poll_interval': 5000, 'scale': 0.25, 'units': 'mA'},
- 'in2_input': {'object_path': 'HSCA/Vout', 'poll_interval': 5000, 'scale': 1, 'units': 'mV'},
+ # To convert Iout register value Y to real-world value X, use an
+ # equation:
+ # X= 1/m * (Y * 10^-R - b), here m = 800 * R_sense, and R_sense
+ # is expressed in milliohms.
+ # The adm1278 driver did the conversion, but the R_sense is set
+ # here as a scale factor.
+ 'curr1_input': {'object_path': 'HSCA/Iout', 'poll_interval': 5000, 'scale': 0.25,
+ 'units': 'mA'},
+ 'in2_input': {'object_path': 'HSCA/Vout', 'poll_interval': 5000, 'scale': 1,
+ 'units': 'mV'},
}
},
- '5-0010': {
+ '5-0010': {
'names': {
- 'curr1_input': {'object_path': 'HSCB/Iout', 'poll_interval': 5000, 'scale': 0.25, 'units': 'mA'},
- 'in2_input': {'object_path': 'HSCB/Vout', 'poll_interval': 5000, 'scale': 1, 'units': 'mV'},
+ 'curr1_input': {'object_path': 'HSCB/Iout', 'poll_interval': 5000, 'scale': 0.25,
+ 'units': 'mA'},
+ 'in2_input': {'object_path': 'HSCB/Vout', 'poll_interval': 5000, 'scale': 1,
+ 'units': 'mV'},
}
},
- '6-0010': {
+ '6-0010': {
'names': {
- 'curr1_input': {'object_path': 'HSCC/Iout', 'poll_interval': 5000, 'scale': 0.25, 'units': 'mA'},
- 'in2_input': {'object_path': 'HSCC/Vout', 'poll_interval': 5000, 'scale': 1, 'units': 'mV'},
+ 'curr1_input': {'object_path': 'HSCC/Iout', 'poll_interval': 5000, 'scale': 0.25,
+ 'units': 'mA'},
+ 'in2_input': {'object_path': 'HSCC/Vout', 'poll_interval': 5000, 'scale': 1,
+ 'units': 'mV'},
}
},
}
diff --git a/data/Palmetto.py b/data/Palmetto.py
index fa39929..05a14a1 100755
--- a/data/Palmetto.py
+++ b/data/Palmetto.py
@@ -176,34 +176,53 @@
'<inventory_root>/system/chassis/motherboard/bmc': {'fru_type': 'BMC', 'is_fru': False,
'manufacturer': 'ASPEED'},
'<inventory_root>/system/chassis/motherboard/cpu': {'fru_type': 'CPU', 'is_fru': True, },
- '<inventory_root>/system/chassis/motherboard/cpu/core0': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu/core1': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu/core2': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu/core3': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu/core4': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu/core5': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu/core6': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu/core7': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu/core8': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu/core9': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu/core10': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu/core11': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu/core0': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu/core1': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu/core2': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu/core3': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu/core4': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu/core5': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu/core6': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu/core7': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu/core8': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu/core9': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu/core10': {'fru_type': 'CORE',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu/core11': {'fru_type': 'CORE',
+ 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/membuf': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/membuf': {'fru_type': 'MEMORY_BUFFER',
+ 'is_fru': False, },
'<inventory_root>/system/chassis/motherboard/dimm0': {'fru_type': 'DIMM', 'is_fru': True, },
'<inventory_root>/system/chassis/motherboard/dimm1': {'fru_type': 'DIMM', 'is_fru': True, },
'<inventory_root>/system/chassis/motherboard/dimm2': {'fru_type': 'DIMM', 'is_fru': True, },
'<inventory_root>/system/chassis/motherboard/dimm3': {'fru_type': 'DIMM', 'is_fru': True, },
- '<inventory_root>/system/chassis/io_board/pcie_slot0': {'fru_type': 'PCIE_CARD', 'is_fru': True, },
- '<inventory_root>/system/chassis/io_board/pcie_slot1': {'fru_type': 'PCIE_CARD', 'is_fru': True, },
+ '<inventory_root>/system/chassis/io_board/pcie_slot0': {'fru_type': 'PCIE_CARD',
+ 'is_fru': True, },
+ '<inventory_root>/system/chassis/io_board/pcie_slot1': {'fru_type': 'PCIE_CARD',
+ 'is_fru': True, },
'<inventory_root>/system/systemevent': {'fru_type': 'SYSTEM_EVENT', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/refclock': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/pcieclock': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/todclock': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/apss': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/refclock': {'fru_type': 'MAIN_PLANAR',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/pcieclock': {'fru_type': 'MAIN_PLANAR',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/todclock': {'fru_type': 'MAIN_PLANAR',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/apss': {'fru_type': 'MAIN_PLANAR',
+ 'is_fru': False, },
}
ID_LOOKUP = {
@@ -291,25 +310,32 @@
name = name.upper()
c = name[0:1]
offset = int(name[1:])
- a = ord(c)-65
- base = a*8+GPIO_BASE
- return base+offset
+ a = ord(c) - 65
+ base = a * 8 + GPIO_BASE
+ return base + offset
HWMON_CONFIG = {
- '2-004c': {
+ '2-004c': {
'names': {
- 'temp1_input': {'object_path': 'temperature/ambient', 'poll_interval': 5000, 'scale': 1000, 'units': 'C'},
+ 'temp1_input': {'object_path': 'temperature/ambient', 'poll_interval': 5000,
+ 'scale': 1000, 'units': 'C'},
}
},
'3-0050': {
'names': {
- 'caps_curr_powercap': {'object_path': 'powercap/curr_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
- 'caps_curr_powerreading': {'object_path': 'powercap/system_power', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
- 'caps_max_powercap': {'object_path': 'powercap/max_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
- 'caps_min_powercap': {'object_path': 'powercap/min_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
- 'caps_norm_powercap': {'object_path': 'powercap/n_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
- 'caps_user_powerlimit': {'object_path': 'powercap/user_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
+ 'caps_curr_powercap': {'object_path': 'powercap/curr_cap', 'poll_interval': 10000,
+ 'scale': 1, 'units': 'W'},
+ 'caps_curr_powerreading': {'object_path': 'powercap/system_power',
+ 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
+ 'caps_max_powercap': {'object_path': 'powercap/max_cap', 'poll_interval': 10000,
+ 'scale': 1, 'units': 'W'},
+ 'caps_min_powercap': {'object_path': 'powercap/min_cap', 'poll_interval': 10000,
+ 'scale': 1, 'units': 'W'},
+ 'caps_norm_powercap': {'object_path': 'powercap/n_cap', 'poll_interval': 10000,
+ 'scale': 1, 'units': 'W'},
+ 'caps_user_powerlimit': {'object_path': 'powercap/user_cap', 'poll_interval': 10000,
+ 'scale': 1, 'units': 'W'},
}
}
}
diff --git a/data/Romulus.py b/data/Romulus.py
index dcb8b92..13c405c 100644
--- a/data/Romulus.py
+++ b/data/Romulus.py
@@ -35,17 +35,22 @@
'<inventory_root>/system/chassis/motherboard': {'fru_type': 'MAIN_PLANAR', 'is_fru': True, },
'<inventory_root>/system/systemevent': {'fru_type': 'SYSTEM_EVENT', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/refclock': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/pcieclock': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/todclock': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/apss': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/refclock': {'fru_type': 'MAIN_PLANAR',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/pcieclock': {'fru_type': 'MAIN_PLANAR',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/todclock': {'fru_type': 'MAIN_PLANAR',
+ 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/apss': {'fru_type': 'MAIN_PLANAR',
+ 'is_fru': False, },
'<inventory_root>/system/chassis/fan0': {'fru_type': 'FAN', 'is_fru': True, },
'<inventory_root>/system/chassis/fan1': {'fru_type': 'FAN', 'is_fru': True, },
'<inventory_root>/system/chassis/fan2': {'fru_type': 'FAN', 'is_fru': True, },
'<inventory_root>/system/chassis/fan3': {'fru_type': 'FAN', 'is_fru': True, },
- '<inventory_root>/system/chassis/motherboard/bmc': {'fru_type': 'BMC', 'is_fru': False, 'manufacturer': 'ASPEED'},
+ '<inventory_root>/system/chassis/motherboard/bmc': {'fru_type': 'BMC', 'is_fru': False,
+ 'manufacturer': 'ASPEED'},
'<inventory_root>/system/chassis/motherboard/cpu0': {'fru_type': 'CPU', 'is_fru': True, },
'<inventory_root>/system/chassis/motherboard/cpu1': {'fru_type': 'CPU', 'is_fru': True, },
@@ -291,82 +296,152 @@
HWMON_CONFIG = {
'4-0050': {
'names': {
- 'caps_curr_powercap': {'object_path': 'powercap/curr_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
- 'caps_curr_powerreading': {'object_path': 'powercap/system_power', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
- 'caps_max_powercap': {'object_path': 'powercap/max_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
- 'caps_min_powercap': {'object_path': 'powercap/min_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
- 'caps_norm_powercap': {'object_path': 'powercap/n_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
- 'caps_user_powerlimit': {'object_path': 'powercap/user_cap', 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
+ 'caps_curr_powercap': {'object_path': 'powercap/curr_cap', 'poll_interval': 10000,
+ 'scale': 1, 'units': 'W'},
+ 'caps_curr_powerreading': {'object_path': 'powercap/system_power',
+ 'poll_interval': 10000, 'scale': 1, 'units': 'W'},
+ 'caps_max_powercap': {'object_path': 'powercap/max_cap', 'poll_interval': 10000,
+ 'scale': 1, 'units': 'W'},
+ 'caps_min_powercap': {'object_path': 'powercap/min_cap', 'poll_interval': 10000,
+ 'scale': 1, 'units': 'W'},
+ 'caps_norm_powercap': {'object_path': 'powercap/n_cap', 'poll_interval': 10000,
+ 'scale': 1, 'units': 'W'},
+ 'caps_user_powerlimit': {'object_path': 'powercap/user_cap', 'poll_interval': 10000,
+ 'scale': 1, 'units': 'W'},
},
'labels': {
- '176': {'object_path': 'temperature/cpu0/core0', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '177': {'object_path': 'temperature/cpu0/core1', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '178': {'object_path': 'temperature/cpu0/core2', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '179': {'object_path': 'temperature/cpu0/core3', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '180': {'object_path': 'temperature/cpu0/core4', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '181': {'object_path': 'temperature/cpu0/core5', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '182': {'object_path': 'temperature/cpu0/core6', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '183': {'object_path': 'temperature/cpu0/core7', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '184': {'object_path': 'temperature/cpu0/core8', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '185': {'object_path': 'temperature/cpu0/core9', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '186': {'object_path': 'temperature/cpu0/core10', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '187': {'object_path': 'temperature/cpu0/core11', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '102': {'object_path': 'temperature/dimm0', 'poll_interval': 5000, 'scale': -3, 'units': 'C'},
- '103': {'object_path': 'temperature/dimm1', 'poll_interval': 5000, 'scale': -3, 'units': 'C'},
- '104': {'object_path': 'temperature/dimm2', 'poll_interval': 5000, 'scale': -3, 'units': 'C'},
- '105': {'object_path': 'temperature/dimm3', 'poll_interval': 5000, 'scale': -3, 'units': 'C'},
- '106': {'object_path': 'temperature/dimm4', 'poll_interval': 5000, 'scale': -3, 'units': 'C'},
- '107': {'object_path': 'temperature/dimm5', 'poll_interval': 5000, 'scale': -3, 'units': 'C'},
- '108': {'object_path': 'temperature/dimm6', 'poll_interval': 5000, 'scale': -3, 'units': 'C'},
- '109': {'object_path': 'temperature/dimm7', 'poll_interval': 5000, 'scale': -3, 'units': 'C'},
+ '176': {'object_path': 'temperature/cpu0/core0', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '177': {'object_path': 'temperature/cpu0/core1', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '178': {'object_path': 'temperature/cpu0/core2', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '179': {'object_path': 'temperature/cpu0/core3', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '180': {'object_path': 'temperature/cpu0/core4', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '181': {'object_path': 'temperature/cpu0/core5', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '182': {'object_path': 'temperature/cpu0/core6', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '183': {'object_path': 'temperature/cpu0/core7', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '184': {'object_path': 'temperature/cpu0/core8', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '185': {'object_path': 'temperature/cpu0/core9', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '186': {'object_path': 'temperature/cpu0/core10', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '187': {'object_path': 'temperature/cpu0/core11', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '102': {'object_path': 'temperature/dimm0', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C'},
+ '103': {'object_path': 'temperature/dimm1', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C'},
+ '104': {'object_path': 'temperature/dimm2', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C'},
+ '105': {'object_path': 'temperature/dimm3', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C'},
+ '106': {'object_path': 'temperature/dimm4', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C'},
+ '107': {'object_path': 'temperature/dimm5', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C'},
+ '108': {'object_path': 'temperature/dimm6', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C'},
+ '109': {'object_path': 'temperature/dimm7', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C'},
}
},
'5-0050': {
- 'labels': {
- '188': {'object_path': 'temperature/cpu1/core0', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '189': {'object_path': 'temperature/cpu1/core1', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '190': {'object_path': 'temperature/cpu1/core2', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '191': {'object_path': 'temperature/cpu1/core3', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '192': {'object_path': 'temperature/cpu1/core4', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '193': {'object_path': 'temperature/cpu1/core5', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '194': {'object_path': 'temperature/cpu1/core6', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '195': {'object_path': 'temperature/cpu1/core7', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '196': {'object_path': 'temperature/cpu1/core8', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '197': {'object_path': 'temperature/cpu1/core9', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '198': {'object_path': 'temperature/cpu1/core10', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '199': {'object_path': 'temperature/cpu1/core11', 'poll_interval': 5000, 'scale': -3, 'units': 'C',
- 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90, 'warning_lower': -99, 'emergency_enabled': True},
- '110': {'object_path': 'temperature/dimm8', 'poll_interval': 5000, 'scale': -3, 'units': 'C'},
- '111': {'object_path': 'temperature/dimm9', 'poll_interval': 5000, 'scale': -3, 'units': 'C'},
- '112': {'object_path': 'temperature/dimm10', 'poll_interval': 5000, 'scale': -3, 'units': 'C'},
- '113': {'object_path': 'temperature/dimm11', 'poll_interval': 5000, 'scale': -3, 'units': 'C'},
- '114': {'object_path': 'temperature/dimm12', 'poll_interval': 5000, 'scale': -3, 'units': 'C'},
- '115': {'object_path': 'temperature/dimm13', 'poll_interval': 5000, 'scale': -3, 'units': 'C'},
- '116': {'object_path': 'temperature/dimm14', 'poll_interval': 5000, 'scale': -3, 'units': 'C'},
- '117': {'object_path': 'temperature/dimm15', 'poll_interval': 5000, 'scale': -3, 'units': 'C'},
+ 'labels': {
+ '188': {'object_path': 'temperature/cpu1/core0', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '189': {'object_path': 'temperature/cpu1/core1', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '190': {'object_path': 'temperature/cpu1/core2', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '191': {'object_path': 'temperature/cpu1/core3', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '192': {'object_path': 'temperature/cpu1/core4', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '193': {'object_path': 'temperature/cpu1/core5', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '194': {'object_path': 'temperature/cpu1/core6', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '195': {'object_path': 'temperature/cpu1/core7', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '196': {'object_path': 'temperature/cpu1/core8', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '197': {'object_path': 'temperature/cpu1/core9', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '198': {'object_path': 'temperature/cpu1/core10', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '199': {'object_path': 'temperature/cpu1/core11', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C',
+ 'critical_upper': 100, 'critical_lower': -100, 'warning_upper': 90,
+ 'warning_lower': -99, 'emergency_enabled': True},
+ '110': {'object_path': 'temperature/dimm8', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C'},
+ '111': {'object_path': 'temperature/dimm9', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C'},
+ '112': {'object_path': 'temperature/dimm10', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C'},
+ '113': {'object_path': 'temperature/dimm11', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C'},
+ '114': {'object_path': 'temperature/dimm12', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C'},
+ '115': {'object_path': 'temperature/dimm13', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C'},
+ '116': {'object_path': 'temperature/dimm14', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C'},
+ '117': {'object_path': 'temperature/dimm15', 'poll_interval': 5000, 'scale': -3,
+ 'units': 'C'},
}
},
}
diff --git a/data/Witherspoon.py b/data/Witherspoon.py
index 6c72415..6ae00fc 100755
--- a/data/Witherspoon.py
+++ b/data/Witherspoon.py
@@ -1,9 +1,9 @@
#! /usr/bin/python
-## System states
-## state can change to next state in 2 ways:
-## - a process emits a GotoSystemState signal with state name to goto
-## - objects specified in EXIT_STATE_DEPEND have started
+# System states
+# state can change to next state in 2 ways:
+# - a process emits a GotoSystemState signal with state name to goto
+# - objects specified in EXIT_STATE_DEPEND have started
SYSTEM_STATES = [
'BASE_APPS',
'BMC_STARTING',
@@ -16,328 +16,329 @@
]
EXIT_STATE_DEPEND = {
- 'BASE_APPS' : {
+ 'BASE_APPS': {
'/org/openbmc/sensors': 0,
},
- 'BMC_STARTING' : {
+ 'BMC_STARTING': {
'/org/openbmc/control/chassis0': 0,
- '/org/openbmc/control/power0' : 0,
- '/org/openbmc/control/flash/bios' : 0,
+ '/org/openbmc/control/power0': 0,
+ '/org/openbmc/control/flash/bios': 0,
},
}
FRU_INSTANCES = {
- '<inventory_root>/system' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" },
- '<inventory_root>/system/bios' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" },
- '<inventory_root>/system/misc' : { 'fru_type' : 'SYSTEM','is_fru' : False, },
+ '<inventory_root>/system': {'fru_type': 'SYSTEM', 'is_fru': True, 'present': "True"},
+ '<inventory_root>/system/bios': {'fru_type': 'SYSTEM', 'is_fru': True, 'present': "True"},
+ '<inventory_root>/system/misc': {'fru_type': 'SYSTEM', 'is_fru': False, },
- '<inventory_root>/system/chassis' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" },
+ '<inventory_root>/system/chassis': {'fru_type': 'SYSTEM', 'is_fru': True, 'present': "True"},
- '<inventory_root>/system/chassis/motherboard' : { 'fru_type' : 'MAIN_PLANAR','is_fru' : True, },
+ '<inventory_root>/system/chassis/motherboard': {'fru_type': 'MAIN_PLANAR', 'is_fru': True, },
- '<inventory_root>/system/systemevent' : { 'fru_type' : 'SYSTEM_EVENT', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/refclock' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/pcieclock': { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/todclock' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/apss' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, },
+ '<inventory_root>/system/systemevent': {'fru_type': 'SYSTEM_EVENT', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/refclock': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/pcieclock': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/todclock': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/apss': {'fru_type': 'MAIN_PLANAR', 'is_fru': False, },
- '<inventory_root>/system/chassis/fan0' : { 'fru_type' : 'FAN','is_fru' : True, },
- '<inventory_root>/system/chassis/fan1' : { 'fru_type' : 'FAN','is_fru' : True, },
- '<inventory_root>/system/chassis/fan2' : { 'fru_type' : 'FAN','is_fru' : True, },
- '<inventory_root>/system/chassis/fan3' : { 'fru_type' : 'FAN','is_fru' : True, },
+ '<inventory_root>/system/chassis/fan0': {'fru_type': 'FAN', 'is_fru': True, },
+ '<inventory_root>/system/chassis/fan1': {'fru_type': 'FAN', 'is_fru': True, },
+ '<inventory_root>/system/chassis/fan2': {'fru_type': 'FAN', 'is_fru': True, },
+ '<inventory_root>/system/chassis/fan3': {'fru_type': 'FAN', 'is_fru': True, },
- '<inventory_root>/system/chassis/motherboard/bmc' : { 'fru_type' : 'BMC','is_fru' : False, 'manufacturer' : 'ASPEED' },
+ '<inventory_root>/system/chassis/motherboard/bmc': {'fru_type': 'BMC', 'is_fru': False,
+ 'manufacturer': 'ASPEED'},
- '<inventory_root>/system/chassis/motherboard/cpu0' : { 'fru_type' : 'CPU', 'is_fru' : True, },
- '<inventory_root>/system/chassis/motherboard/cpu1' : { 'fru_type' : 'CPU', 'is_fru' : True, },
+ '<inventory_root>/system/chassis/motherboard/cpu0': {'fru_type': 'CPU', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/cpu1': {'fru_type': 'CPU', 'is_fru': True, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core0' : { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core1' : { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core2' : { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core3' : { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core4' : { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core5' : { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core6' : { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core7' : { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core8' : { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core9' : { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core10': { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu0/core11': { 'fru_type' : 'CORE', 'is_fru' : False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core0': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core1': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core2': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core3': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core4': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core5': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core6': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core7': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core8': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core9': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core10': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu0/core11': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core0' : { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core1' : { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core2' : { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core3' : { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core4' : { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core5' : { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core6' : { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core7' : { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core8' : { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core9' : { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core10' : { 'fru_type' : 'CORE', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/cpu1/core11' : { 'fru_type' : 'CORE', 'is_fru' : False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core0': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core1': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core2': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core3': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core4': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core5': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core6': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core7': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core8': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core9': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core10': {'fru_type': 'CORE', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/cpu1/core11': {'fru_type': 'CORE', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/membuf0' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/membuf1' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/membuf2' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/membuf3' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/membuf4' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/membuf5' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/membuf6' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
- '<inventory_root>/system/chassis/motherboard/membuf7' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, },
+ '<inventory_root>/system/chassis/motherboard/membuf0': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/membuf1': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/membuf2': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/membuf3': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/membuf4': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/membuf5': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/membuf6': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
+ '<inventory_root>/system/chassis/motherboard/membuf7': {'fru_type': 'MEMORY_BUFFER', 'is_fru': False, },
- '<inventory_root>/system/chassis/motherboard/dimm0' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm1' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm2' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm3' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm4' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm5' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm6' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm7' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm8' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm9' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm10' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm11' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm12' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm13' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm14' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm15' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm16' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm17' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm18' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm19' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm20' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm21' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm22' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm23' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm24' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm25' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm26' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm27' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm28' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm29' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm30' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
- '<inventory_root>/system/chassis/motherboard/dimm31' : { 'fru_type' : 'DIMM', 'is_fru' : True,},
+ '<inventory_root>/system/chassis/motherboard/dimm0': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm1': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm2': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm3': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm4': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm5': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm6': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm7': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm8': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm9': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm10': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm11': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm12': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm13': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm14': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm15': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm16': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm17': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm18': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm19': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm20': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm21': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm22': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm23': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm24': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm25': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm26': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm27': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm28': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm29': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm30': {'fru_type': 'DIMM', 'is_fru': True, },
+ '<inventory_root>/system/chassis/motherboard/dimm31': {'fru_type': 'DIMM', 'is_fru': True, },
}
ID_LOOKUP = {
- 'FRU' : {
- 0x01 : '<inventory_root>/system/chassis/motherboard/cpu0',
- 0x02 : '<inventory_root>/system/chassis/motherboard/cpu1',
- 0x03 : '<inventory_root>/system/chassis/motherboard',
- 0x04 : '<inventory_root>/system/chassis/motherboard/membuf0',
- 0x05 : '<inventory_root>/system/chassis/motherboard/membuf1',
- 0x06 : '<inventory_root>/system/chassis/motherboard/membuf2',
- 0x07 : '<inventory_root>/system/chassis/motherboard/membuf3',
- 0x08 : '<inventory_root>/system/chassis/motherboard/membuf4',
- 0x09 : '<inventory_root>/system/chassis/motherboard/membuf5',
- 0x0c : '<inventory_root>/system/chassis/motherboard/dimm0',
- 0x0d : '<inventory_root>/system/chassis/motherboard/dimm1',
- 0x0e : '<inventory_root>/system/chassis/motherboard/dimm2',
- 0x0f : '<inventory_root>/system/chassis/motherboard/dimm3',
- 0x10 : '<inventory_root>/system/chassis/motherboard/dimm4',
- 0x11 : '<inventory_root>/system/chassis/motherboard/dimm5',
- 0x12 : '<inventory_root>/system/chassis/motherboard/dimm6',
- 0x13 : '<inventory_root>/system/chassis/motherboard/dimm7',
- 0x14 : '<inventory_root>/system/chassis/motherboard/dimm8',
- 0x15 : '<inventory_root>/system/chassis/motherboard/dimm9',
- 0x16 : '<inventory_root>/system/chassis/motherboard/dimm10',
- 0x17 : '<inventory_root>/system/chassis/motherboard/dimm11',
- 0x18 : '<inventory_root>/system/chassis/motherboard/dimm12',
- 0x19 : '<inventory_root>/system/chassis/motherboard/dimm13',
- 0x1a : '<inventory_root>/system/chassis/motherboard/dimm14',
- 0x1b : '<inventory_root>/system/chassis/motherboard/dimm15',
- 0x1c : '<inventory_root>/system/chassis/motherboard/dimm16',
- 0x1d : '<inventory_root>/system/chassis/motherboard/dimm17',
- 0x1e : '<inventory_root>/system/chassis/motherboard/dimm18',
- 0x1f : '<inventory_root>/system/chassis/motherboard/dimm19',
- 0x20 : '<inventory_root>/system/chassis/motherboard/dimm20',
- 0x21 : '<inventory_root>/system/chassis/motherboard/dimm21',
- 0x22 : '<inventory_root>/system/chassis/motherboard/dimm22',
- 0x23 : '<inventory_root>/system/chassis/motherboard/dimm23',
- 0x24 : '<inventory_root>/system/chassis/motherboard/dimm24',
- 0x25 : '<inventory_root>/system/chassis/motherboard/dimm25',
- 0x26 : '<inventory_root>/system/chassis/motherboard/dimm26',
- 0x27 : '<inventory_root>/system/chassis/motherboard/dimm27',
- 0x28 : '<inventory_root>/system/chassis/motherboard/dimm28',
- 0x29 : '<inventory_root>/system/chassis/motherboard/dimm29',
- 0x2a : '<inventory_root>/system/chassis/motherboard/dimm30',
- 0x2b : '<inventory_root>/system/chassis/motherboard/dimm31',
+ 'FRU': {
+ 0x01: '<inventory_root>/system/chassis/motherboard/cpu0',
+ 0x02: '<inventory_root>/system/chassis/motherboard/cpu1',
+ 0x03: '<inventory_root>/system/chassis/motherboard',
+ 0x04: '<inventory_root>/system/chassis/motherboard/membuf0',
+ 0x05: '<inventory_root>/system/chassis/motherboard/membuf1',
+ 0x06: '<inventory_root>/system/chassis/motherboard/membuf2',
+ 0x07: '<inventory_root>/system/chassis/motherboard/membuf3',
+ 0x08: '<inventory_root>/system/chassis/motherboard/membuf4',
+ 0x09: '<inventory_root>/system/chassis/motherboard/membuf5',
+ 0x0c: '<inventory_root>/system/chassis/motherboard/dimm0',
+ 0x0d: '<inventory_root>/system/chassis/motherboard/dimm1',
+ 0x0e: '<inventory_root>/system/chassis/motherboard/dimm2',
+ 0x0f: '<inventory_root>/system/chassis/motherboard/dimm3',
+ 0x10: '<inventory_root>/system/chassis/motherboard/dimm4',
+ 0x11: '<inventory_root>/system/chassis/motherboard/dimm5',
+ 0x12: '<inventory_root>/system/chassis/motherboard/dimm6',
+ 0x13: '<inventory_root>/system/chassis/motherboard/dimm7',
+ 0x14: '<inventory_root>/system/chassis/motherboard/dimm8',
+ 0x15: '<inventory_root>/system/chassis/motherboard/dimm9',
+ 0x16: '<inventory_root>/system/chassis/motherboard/dimm10',
+ 0x17: '<inventory_root>/system/chassis/motherboard/dimm11',
+ 0x18: '<inventory_root>/system/chassis/motherboard/dimm12',
+ 0x19: '<inventory_root>/system/chassis/motherboard/dimm13',
+ 0x1a: '<inventory_root>/system/chassis/motherboard/dimm14',
+ 0x1b: '<inventory_root>/system/chassis/motherboard/dimm15',
+ 0x1c: '<inventory_root>/system/chassis/motherboard/dimm16',
+ 0x1d: '<inventory_root>/system/chassis/motherboard/dimm17',
+ 0x1e: '<inventory_root>/system/chassis/motherboard/dimm18',
+ 0x1f: '<inventory_root>/system/chassis/motherboard/dimm19',
+ 0x20: '<inventory_root>/system/chassis/motherboard/dimm20',
+ 0x21: '<inventory_root>/system/chassis/motherboard/dimm21',
+ 0x22: '<inventory_root>/system/chassis/motherboard/dimm22',
+ 0x23: '<inventory_root>/system/chassis/motherboard/dimm23',
+ 0x24: '<inventory_root>/system/chassis/motherboard/dimm24',
+ 0x25: '<inventory_root>/system/chassis/motherboard/dimm25',
+ 0x26: '<inventory_root>/system/chassis/motherboard/dimm26',
+ 0x27: '<inventory_root>/system/chassis/motherboard/dimm27',
+ 0x28: '<inventory_root>/system/chassis/motherboard/dimm28',
+ 0x29: '<inventory_root>/system/chassis/motherboard/dimm29',
+ 0x2a: '<inventory_root>/system/chassis/motherboard/dimm30',
+ 0x2b: '<inventory_root>/system/chassis/motherboard/dimm31',
},
- 'FRU_STR' : {
- 'PRODUCT_0' : '<inventory_root>/system/bios',
- 'BOARD_1' : '<inventory_root>/system/chassis/motherboard/cpu0',
- 'BOARD_2' : '<inventory_root>/system/chassis/motherboard/cpu1',
- 'CHASSIS_3' : '<inventory_root>/system/chassis/motherboard',
- 'BOARD_3' : '<inventory_root>/system/misc',
- 'BOARD_4' : '<inventory_root>/system/chassis/motherboard/membuf0',
- 'BOARD_5' : '<inventory_root>/system/chassis/motherboard/membuf1',
- 'BOARD_6' : '<inventory_root>/system/chassis/motherboard/membuf2',
- 'BOARD_7' : '<inventory_root>/system/chassis/motherboard/membuf3',
- 'BOARD_8' : '<inventory_root>/system/chassis/motherboard/membuf4',
- 'BOARD_9' : '<inventory_root>/system/chassis/motherboard/membuf5',
- 'BOARD_10' : '<inventory_root>/system/chassis/motherboard/membuf6',
- 'BOARD_11' : '<inventory_root>/system/chassis/motherboard/membuf7',
- 'PRODUCT_12' : '<inventory_root>/system/chassis/motherboard/dimm0',
- 'PRODUCT_13' : '<inventory_root>/system/chassis/motherboard/dimm1',
- 'PRODUCT_14' : '<inventory_root>/system/chassis/motherboard/dimm2',
- 'PRODUCT_15' : '<inventory_root>/system/chassis/motherboard/dimm3',
- 'PRODUCT_16' : '<inventory_root>/system/chassis/motherboard/dimm4',
- 'PRODUCT_17' : '<inventory_root>/system/chassis/motherboard/dimm5',
- 'PRODUCT_18' : '<inventory_root>/system/chassis/motherboard/dimm6',
- 'PRODUCT_19' : '<inventory_root>/system/chassis/motherboard/dimm7',
- 'PRODUCT_20' : '<inventory_root>/system/chassis/motherboard/dimm8',
- 'PRODUCT_21' : '<inventory_root>/system/chassis/motherboard/dimm9',
- 'PRODUCT_22' : '<inventory_root>/system/chassis/motherboard/dimm10',
- 'PRODUCT_23' : '<inventory_root>/system/chassis/motherboard/dimm11',
- 'PRODUCT_24' : '<inventory_root>/system/chassis/motherboard/dimm12',
- 'PRODUCT_25' : '<inventory_root>/system/chassis/motherboard/dimm13',
- 'PRODUCT_26' : '<inventory_root>/system/chassis/motherboard/dimm14',
- 'PRODUCT_27' : '<inventory_root>/system/chassis/motherboard/dimm15',
- 'PRODUCT_28' : '<inventory_root>/system/chassis/motherboard/dimm16',
- 'PRODUCT_29' : '<inventory_root>/system/chassis/motherboard/dimm17',
- 'PRODUCT_30' : '<inventory_root>/system/chassis/motherboard/dimm18',
- 'PRODUCT_31' : '<inventory_root>/system/chassis/motherboard/dimm19',
- 'PRODUCT_32' : '<inventory_root>/system/chassis/motherboard/dimm20',
- 'PRODUCT_33' : '<inventory_root>/system/chassis/motherboard/dimm21',
- 'PRODUCT_34' : '<inventory_root>/system/chassis/motherboard/dimm22',
- 'PRODUCT_35' : '<inventory_root>/system/chassis/motherboard/dimm23',
- 'PRODUCT_36' : '<inventory_root>/system/chassis/motherboard/dimm24',
- 'PRODUCT_37' : '<inventory_root>/system/chassis/motherboard/dimm25',
- 'PRODUCT_38' : '<inventory_root>/system/chassis/motherboard/dimm26',
- 'PRODUCT_39' : '<inventory_root>/system/chassis/motherboard/dimm27',
- 'PRODUCT_40' : '<inventory_root>/system/chassis/motherboard/dimm28',
- 'PRODUCT_41' : '<inventory_root>/system/chassis/motherboard/dimm29',
- 'PRODUCT_42' : '<inventory_root>/system/chassis/motherboard/dimm30',
- 'PRODUCT_43' : '<inventory_root>/system/chassis/motherboard/dimm31',
- 'PRODUCT_47' : '<inventory_root>/system/misc',
+ 'FRU_STR': {
+ 'PRODUCT_0': '<inventory_root>/system/bios',
+ 'BOARD_1': '<inventory_root>/system/chassis/motherboard/cpu0',
+ 'BOARD_2': '<inventory_root>/system/chassis/motherboard/cpu1',
+ 'CHASSIS_3': '<inventory_root>/system/chassis/motherboard',
+ 'BOARD_3': '<inventory_root>/system/misc',
+ 'BOARD_4': '<inventory_root>/system/chassis/motherboard/membuf0',
+ 'BOARD_5': '<inventory_root>/system/chassis/motherboard/membuf1',
+ 'BOARD_6': '<inventory_root>/system/chassis/motherboard/membuf2',
+ 'BOARD_7': '<inventory_root>/system/chassis/motherboard/membuf3',
+ 'BOARD_8': '<inventory_root>/system/chassis/motherboard/membuf4',
+ 'BOARD_9': '<inventory_root>/system/chassis/motherboard/membuf5',
+ 'BOARD_10': '<inventory_root>/system/chassis/motherboard/membuf6',
+ 'BOARD_11': '<inventory_root>/system/chassis/motherboard/membuf7',
+ 'PRODUCT_12': '<inventory_root>/system/chassis/motherboard/dimm0',
+ 'PRODUCT_13': '<inventory_root>/system/chassis/motherboard/dimm1',
+ 'PRODUCT_14': '<inventory_root>/system/chassis/motherboard/dimm2',
+ 'PRODUCT_15': '<inventory_root>/system/chassis/motherboard/dimm3',
+ 'PRODUCT_16': '<inventory_root>/system/chassis/motherboard/dimm4',
+ 'PRODUCT_17': '<inventory_root>/system/chassis/motherboard/dimm5',
+ 'PRODUCT_18': '<inventory_root>/system/chassis/motherboard/dimm6',
+ 'PRODUCT_19': '<inventory_root>/system/chassis/motherboard/dimm7',
+ 'PRODUCT_20': '<inventory_root>/system/chassis/motherboard/dimm8',
+ 'PRODUCT_21': '<inventory_root>/system/chassis/motherboard/dimm9',
+ 'PRODUCT_22': '<inventory_root>/system/chassis/motherboard/dimm10',
+ 'PRODUCT_23': '<inventory_root>/system/chassis/motherboard/dimm11',
+ 'PRODUCT_24': '<inventory_root>/system/chassis/motherboard/dimm12',
+ 'PRODUCT_25': '<inventory_root>/system/chassis/motherboard/dimm13',
+ 'PRODUCT_26': '<inventory_root>/system/chassis/motherboard/dimm14',
+ 'PRODUCT_27': '<inventory_root>/system/chassis/motherboard/dimm15',
+ 'PRODUCT_28': '<inventory_root>/system/chassis/motherboard/dimm16',
+ 'PRODUCT_29': '<inventory_root>/system/chassis/motherboard/dimm17',
+ 'PRODUCT_30': '<inventory_root>/system/chassis/motherboard/dimm18',
+ 'PRODUCT_31': '<inventory_root>/system/chassis/motherboard/dimm19',
+ 'PRODUCT_32': '<inventory_root>/system/chassis/motherboard/dimm20',
+ 'PRODUCT_33': '<inventory_root>/system/chassis/motherboard/dimm21',
+ 'PRODUCT_34': '<inventory_root>/system/chassis/motherboard/dimm22',
+ 'PRODUCT_35': '<inventory_root>/system/chassis/motherboard/dimm23',
+ 'PRODUCT_36': '<inventory_root>/system/chassis/motherboard/dimm24',
+ 'PRODUCT_37': '<inventory_root>/system/chassis/motherboard/dimm25',
+ 'PRODUCT_38': '<inventory_root>/system/chassis/motherboard/dimm26',
+ 'PRODUCT_39': '<inventory_root>/system/chassis/motherboard/dimm27',
+ 'PRODUCT_40': '<inventory_root>/system/chassis/motherboard/dimm28',
+ 'PRODUCT_41': '<inventory_root>/system/chassis/motherboard/dimm29',
+ 'PRODUCT_42': '<inventory_root>/system/chassis/motherboard/dimm30',
+ 'PRODUCT_43': '<inventory_root>/system/chassis/motherboard/dimm31',
+ 'PRODUCT_47': '<inventory_root>/system/misc',
},
- 'SENSOR' : {
- 0x02 : '/org/openbmc/sensors/host/HostStatus',
- 0x03 : '/org/openbmc/sensors/host/BootProgress',
- 0x5a : '<inventory_root>/system/chassis/motherboard/cpu0',
- 0xa4 : '<inventory_root>/system/chassis/motherboard/cpu1',
- 0x1e : '<inventory_root>/system/chassis/motherboard/dimm3',
- 0x1f : '<inventory_root>/system/chassis/motherboard/dimm2',
- 0x20 : '<inventory_root>/system/chassis/motherboard/dimm1',
- 0x21 : '<inventory_root>/system/chassis/motherboard/dimm0',
- 0x22 : '<inventory_root>/system/chassis/motherboard/dimm7',
- 0x23 : '<inventory_root>/system/chassis/motherboard/dimm6',
- 0x24 : '<inventory_root>/system/chassis/motherboard/dimm5',
- 0x25 : '<inventory_root>/system/chassis/motherboard/dimm4',
- 0x26 : '<inventory_root>/system/chassis/motherboard/dimm11',
- 0x27 : '<inventory_root>/system/chassis/motherboard/dimm10',
- 0x28 : '<inventory_root>/system/chassis/motherboard/dimm9',
- 0x29 : '<inventory_root>/system/chassis/motherboard/dimm8',
- 0x2a : '<inventory_root>/system/chassis/motherboard/dimm15',
- 0x2b : '<inventory_root>/system/chassis/motherboard/dimm14',
- 0x2c : '<inventory_root>/system/chassis/motherboard/dimm13',
- 0x2d : '<inventory_root>/system/chassis/motherboard/dimm12',
- 0x2e : '<inventory_root>/system/chassis/motherboard/dimm19',
- 0x2f : '<inventory_root>/system/chassis/motherboard/dimm18',
- 0x30 : '<inventory_root>/system/chassis/motherboard/dimm17',
- 0x31 : '<inventory_root>/system/chassis/motherboard/dimm16',
- 0x32 : '<inventory_root>/system/chassis/motherboard/dimm23',
- 0x33 : '<inventory_root>/system/chassis/motherboard/dimm22',
- 0x34 : '<inventory_root>/system/chassis/motherboard/dimm21',
- 0x35 : '<inventory_root>/system/chassis/motherboard/dimm20',
- 0x36 : '<inventory_root>/system/chassis/motherboard/dimm27',
- 0x37 : '<inventory_root>/system/chassis/motherboard/dimm26',
- 0x38 : '<inventory_root>/system/chassis/motherboard/dimm25',
- 0x39 : '<inventory_root>/system/chassis/motherboard/dimm24',
- 0x3a : '<inventory_root>/system/chassis/motherboard/dimm31',
- 0x3b : '<inventory_root>/system/chassis/motherboard/dimm30',
- 0x3c : '<inventory_root>/system/chassis/motherboard/dimm29',
- 0x3d : '<inventory_root>/system/chassis/motherboard/dimm28',
- 0x3e : '<inventory_root>/system/chassis/motherboard/cpu0/core0',
- 0x3f : '<inventory_root>/system/chassis/motherboard/cpu0/core1',
- 0x40 : '<inventory_root>/system/chassis/motherboard/cpu0/core2',
- 0x41 : '<inventory_root>/system/chassis/motherboard/cpu0/core3',
- 0x42 : '<inventory_root>/system/chassis/motherboard/cpu0/core4',
- 0x43 : '<inventory_root>/system/chassis/motherboard/cpu0/core5',
- 0x44 : '<inventory_root>/system/chassis/motherboard/cpu0/core6',
- 0x45 : '<inventory_root>/system/chassis/motherboard/cpu0/core7',
- 0x46 : '<inventory_root>/system/chassis/motherboard/cpu0/core8',
- 0x47 : '<inventory_root>/system/chassis/motherboard/cpu0/core9',
- 0x48 : '<inventory_root>/system/chassis/motherboard/cpu0/core10',
- 0x49 : '<inventory_root>/system/chassis/motherboard/cpu0/core11',
- 0x4a : '<inventory_root>/system/chassis/motherboard/cpu1/core0',
- 0x4b : '<inventory_root>/system/chassis/motherboard/cpu1/core1',
- 0x4c : '<inventory_root>/system/chassis/motherboard/cpu1/core2',
- 0x4d : '<inventory_root>/system/chassis/motherboard/cpu1/core3',
- 0x4e : '<inventory_root>/system/chassis/motherboard/cpu1/core4',
- 0x4f : '<inventory_root>/system/chassis/motherboard/cpu1/core5',
- 0x50 : '<inventory_root>/system/chassis/motherboard/cpu1/core6',
- 0x51 : '<inventory_root>/system/chassis/motherboard/cpu1/core7',
- 0x52 : '<inventory_root>/system/chassis/motherboard/cpu1/core8',
- 0x53 : '<inventory_root>/system/chassis/motherboard/cpu1/core9',
- 0x54 : '<inventory_root>/system/chassis/motherboard/cpu1/core10',
- 0x55 : '<inventory_root>/system/chassis/motherboard/cpu1/core11',
- 0x56 : '<inventory_root>/system/chassis/motherboard/membuf0',
- 0x57 : '<inventory_root>/system/chassis/motherboard/membuf1',
- 0x58 : '<inventory_root>/system/chassis/motherboard/membuf2',
- 0x59 : '<inventory_root>/system/chassis/motherboard/membuf3',
- 0x5a : '<inventory_root>/system/chassis/motherboard/membuf4',
- 0x5b : '<inventory_root>/system/chassis/motherboard/membuf5',
- 0x5c : '<inventory_root>/system/chassis/motherboard/membuf6',
- 0x5d : '<inventory_root>/system/chassis/motherboard/membuf7',
- 0x07 : '/org/openbmc/sensors/host/BootCount',
- 0x0c : '<inventory_root>/system/chassis/motherboard',
- 0x01 : '<inventory_root>/system/systemevent',
- 0x08 : '<inventory_root>/system/powerlimit',
- 0x0d : '<inventory_root>/system/chassis/motherboard/refclock',
- 0x0e : '<inventory_root>/system/chassis/motherboard/pcieclock',
- 0x0f : '<inventory_root>/system/chassis/motherboard/todclock',
- 0x10 : '<inventory_root>/system/chassis/motherboard/apss',
- 0x02 : '/org/openbmc/sensors/host/OperatingSystemStatus',
- 0x04 : '<inventory_root>/system/chassis/motherboard/pcielink',
- 0x0b : '/xyz/openbmc_project/sensors/chassis/PowerSupplyRedundancy',
- 0xda : '/org/openbmc/sensors/host/TurboAllowed',
- 0xD8 : '/org/openbmc/sensors/host/PowerSupplyDerating',
+ 'SENSOR': {
+ 0x02: '/org/openbmc/sensors/host/HostStatus',
+ 0x03: '/org/openbmc/sensors/host/BootProgress',
+ 0x5a: '<inventory_root>/system/chassis/motherboard/cpu0',
+ 0xa4: '<inventory_root>/system/chassis/motherboard/cpu1',
+ 0x1e: '<inventory_root>/system/chassis/motherboard/dimm3',
+ 0x1f: '<inventory_root>/system/chassis/motherboard/dimm2',
+ 0x20: '<inventory_root>/system/chassis/motherboard/dimm1',
+ 0x21: '<inventory_root>/system/chassis/motherboard/dimm0',
+ 0x22: '<inventory_root>/system/chassis/motherboard/dimm7',
+ 0x23: '<inventory_root>/system/chassis/motherboard/dimm6',
+ 0x24: '<inventory_root>/system/chassis/motherboard/dimm5',
+ 0x25: '<inventory_root>/system/chassis/motherboard/dimm4',
+ 0x26: '<inventory_root>/system/chassis/motherboard/dimm11',
+ 0x27: '<inventory_root>/system/chassis/motherboard/dimm10',
+ 0x28: '<inventory_root>/system/chassis/motherboard/dimm9',
+ 0x29: '<inventory_root>/system/chassis/motherboard/dimm8',
+ 0x2a: '<inventory_root>/system/chassis/motherboard/dimm15',
+ 0x2b: '<inventory_root>/system/chassis/motherboard/dimm14',
+ 0x2c: '<inventory_root>/system/chassis/motherboard/dimm13',
+ 0x2d: '<inventory_root>/system/chassis/motherboard/dimm12',
+ 0x2e: '<inventory_root>/system/chassis/motherboard/dimm19',
+ 0x2f: '<inventory_root>/system/chassis/motherboard/dimm18',
+ 0x30: '<inventory_root>/system/chassis/motherboard/dimm17',
+ 0x31: '<inventory_root>/system/chassis/motherboard/dimm16',
+ 0x32: '<inventory_root>/system/chassis/motherboard/dimm23',
+ 0x33: '<inventory_root>/system/chassis/motherboard/dimm22',
+ 0x34: '<inventory_root>/system/chassis/motherboard/dimm21',
+ 0x35: '<inventory_root>/system/chassis/motherboard/dimm20',
+ 0x36: '<inventory_root>/system/chassis/motherboard/dimm27',
+ 0x37: '<inventory_root>/system/chassis/motherboard/dimm26',
+ 0x38: '<inventory_root>/system/chassis/motherboard/dimm25',
+ 0x39: '<inventory_root>/system/chassis/motherboard/dimm24',
+ 0x3a: '<inventory_root>/system/chassis/motherboard/dimm31',
+ 0x3b: '<inventory_root>/system/chassis/motherboard/dimm30',
+ 0x3c: '<inventory_root>/system/chassis/motherboard/dimm29',
+ 0x3d: '<inventory_root>/system/chassis/motherboard/dimm28',
+ 0x3e: '<inventory_root>/system/chassis/motherboard/cpu0/core0',
+ 0x3f: '<inventory_root>/system/chassis/motherboard/cpu0/core1',
+ 0x40: '<inventory_root>/system/chassis/motherboard/cpu0/core2',
+ 0x41: '<inventory_root>/system/chassis/motherboard/cpu0/core3',
+ 0x42: '<inventory_root>/system/chassis/motherboard/cpu0/core4',
+ 0x43: '<inventory_root>/system/chassis/motherboard/cpu0/core5',
+ 0x44: '<inventory_root>/system/chassis/motherboard/cpu0/core6',
+ 0x45: '<inventory_root>/system/chassis/motherboard/cpu0/core7',
+ 0x46: '<inventory_root>/system/chassis/motherboard/cpu0/core8',
+ 0x47: '<inventory_root>/system/chassis/motherboard/cpu0/core9',
+ 0x48: '<inventory_root>/system/chassis/motherboard/cpu0/core10',
+ 0x49: '<inventory_root>/system/chassis/motherboard/cpu0/core11',
+ 0x4a: '<inventory_root>/system/chassis/motherboard/cpu1/core0',
+ 0x4b: '<inventory_root>/system/chassis/motherboard/cpu1/core1',
+ 0x4c: '<inventory_root>/system/chassis/motherboard/cpu1/core2',
+ 0x4d: '<inventory_root>/system/chassis/motherboard/cpu1/core3',
+ 0x4e: '<inventory_root>/system/chassis/motherboard/cpu1/core4',
+ 0x4f: '<inventory_root>/system/chassis/motherboard/cpu1/core5',
+ 0x50: '<inventory_root>/system/chassis/motherboard/cpu1/core6',
+ 0x51: '<inventory_root>/system/chassis/motherboard/cpu1/core7',
+ 0x52: '<inventory_root>/system/chassis/motherboard/cpu1/core8',
+ 0x53: '<inventory_root>/system/chassis/motherboard/cpu1/core9',
+ 0x54: '<inventory_root>/system/chassis/motherboard/cpu1/core10',
+ 0x55: '<inventory_root>/system/chassis/motherboard/cpu1/core11',
+ 0x56: '<inventory_root>/system/chassis/motherboard/membuf0',
+ 0x57: '<inventory_root>/system/chassis/motherboard/membuf1',
+ 0x58: '<inventory_root>/system/chassis/motherboard/membuf2',
+ 0x59: '<inventory_root>/system/chassis/motherboard/membuf3',
+ 0x5a: '<inventory_root>/system/chassis/motherboard/membuf4',
+ 0x5b: '<inventory_root>/system/chassis/motherboard/membuf5',
+ 0x5c: '<inventory_root>/system/chassis/motherboard/membuf6',
+ 0x5d: '<inventory_root>/system/chassis/motherboard/membuf7',
+ 0x07: '/org/openbmc/sensors/host/BootCount',
+ 0x0c: '<inventory_root>/system/chassis/motherboard',
+ 0x01: '<inventory_root>/system/systemevent',
+ 0x08: '<inventory_root>/system/powerlimit',
+ 0x0d: '<inventory_root>/system/chassis/motherboard/refclock',
+ 0x0e: '<inventory_root>/system/chassis/motherboard/pcieclock',
+ 0x0f: '<inventory_root>/system/chassis/motherboard/todclock',
+ 0x10: '<inventory_root>/system/chassis/motherboard/apss',
+ 0x02: '/org/openbmc/sensors/host/OperatingSystemStatus',
+ 0x04: '<inventory_root>/system/chassis/motherboard/pcielink',
+ 0x0b: '/xyz/openbmc_project/sensors/chassis/PowerSupplyRedundancy',
+ 0xda: '/org/openbmc/sensors/host/TurboAllowed',
+ 0xD8: '/org/openbmc/sensors/host/PowerSupplyDerating',
},
- 'GPIO_PRESENT' : {}
+ 'GPIO_PRESENT': {}
}
GPIO_CONFIG = {}
GPIO_CONFIG['BMC_POWER_UP'] = \
- {'gpio_pin': 'D1', 'direction': 'out'}
+ {'gpio_pin': 'D1', 'direction': 'out'}
GPIO_CONFIG['SOFTWARE_PGOOD'] = \
- {'gpio_pin': 'R1', 'direction': 'out'}
+ {'gpio_pin': 'R1', 'direction': 'out'}
GPIO_CONFIG['SYS_PWROK_BUFF'] = \
- {'gpio_pin': 'D2', 'direction': 'in'}
+ {'gpio_pin': 'D2', 'direction': 'in'}
# PV_CP_MD_JTAG_ATTENTION_N
GPIO_CONFIG['CHECKSTOP'] = \
- {'gpio_pin': 'J2', 'direction': 'falling'}
+ {'gpio_pin': 'J2', 'direction': 'falling'}
GPIO_CONFIG['BMC_CP0_RESET_N'] = \
- {'gpio_pin': 'A1', 'direction': 'out'}
+ {'gpio_pin': 'A1', 'direction': 'out'}
# pcie switch reset
GPIO_CONFIG['BMC_VS1_PERST_N'] = \
- {'gpio_pin': 'B7', 'direction': 'out'}
+ {'gpio_pin': 'B7', 'direction': 'out'}
# pcie slots reset - not connected?
GPIO_CONFIG['BMC_CP0_PERST_ENABLE_R'] = \
- {'gpio_pin': 'A3', 'direction': 'out'}
+ {'gpio_pin': 'A3', 'direction': 'out'}
# SOFT_FSI_DAT
GPIO_CONFIG['FSI_DATA'] = \
- {'gpio_pin': 'E0', 'direction': 'out'}
+ {'gpio_pin': 'E0', 'direction': 'out'}
# SOFT_FSI_CLK
GPIO_CONFIG['FSI_CLK'] = \
- {'gpio_pin': 'AA0', 'direction': 'out'}
+ {'gpio_pin': 'AA0', 'direction': 'out'}
# BMC_FSI_IN_ENA
GPIO_CONFIG['FSI_ENABLE'] = \
- {'gpio_pin': 'D0', 'direction': 'out'}
+ {'gpio_pin': 'D0', 'direction': 'out'}
# FSI_JMFG0_PRSNT_N
GPIO_CONFIG['CRONUS_SEL'] = \
- {'gpio_pin': 'A6', 'direction': 'out'}
+ {'gpio_pin': 'A6', 'direction': 'out'}
# FP_PWR_BTN_N
GPIO_CONFIG['POWER_BUTTON'] = \
- {'gpio_pin': 'I3', 'direction': 'both'}
+ {'gpio_pin': 'I3', 'direction': 'both'}
# BMC_NMIBTN_IN_N
GPIO_CONFIG['RESET_BUTTON'] = \
- {'gpio_pin': 'J1', 'direction': 'both'}
+ {'gpio_pin': 'J1', 'direction': 'both'}
# FIXME: needed for Witherspoon?
# Tracked by openbmc/openbmc#814
@@ -347,22 +348,22 @@
# TODO openbmc/openbmc#2288 - Determine if any pci resets needed
GPIO_CONFIGS = {
- 'power_config' : {
- 'power_good_in' : 'SYS_PWROK_BUFF',
- 'power_up_outs' : [
+ 'power_config': {
+ 'power_good_in': 'SYS_PWROK_BUFF',
+ 'power_up_outs': [
('SOFTWARE_PGOOD', True),
('BMC_POWER_UP', True),
],
- 'reset_outs' : [
+ 'reset_outs': [
('BMC_CP0_RESET_N', False),
],
},
- 'hostctl_config' : {
- 'fsi_data' : 'FSI_DATA',
- 'fsi_clk' : 'FSI_CLK',
- 'fsi_enable' : 'FSI_ENABLE',
- 'cronus_sel' : 'CRONUS_SEL',
- 'optionals' : [
+ 'hostctl_config': {
+ 'fsi_data': 'FSI_DATA',
+ 'fsi_clk': 'FSI_CLK',
+ 'fsi_enable': 'FSI_ENABLE',
+ 'cronus_sel': 'CRONUS_SEL',
+ 'optionals': [
],
},
}
@@ -371,13 +372,13 @@
# Miscellaneous non-poll sensor with system specific properties.
# The sensor id is the same as those defined in ID_LOOKUP['SENSOR'].
MISC_SENSORS = {
- 0x07 : { 'class' : 'BootCountSensor' },
- 0x03 : { 'class' : 'BootProgressSensor' },
- 0x02 : { 'class' : 'OperatingSystemStatusSensor' },
+ 0x07: {'class': 'BootCountSensor'},
+ 0x03: {'class': 'BootProgressSensor'},
+ 0x02: {'class': 'OperatingSystemStatusSensor'},
# Garrison value is used, Not in P9 XML yet.
- 0x0b : { 'class' : 'PowerSupplyRedundancySensor'},
- 0xda : { 'class' : 'TurboAllowedSensor' },
- 0xD8 : { 'class' : 'PowerSupplyDeratingSensor' },
+ 0x0b: {'class': 'PowerSupplyRedundancySensor'},
+ 0xda: {'class': 'TurboAllowedSensor'},
+ 0xD8: {'class': 'PowerSupplyDeratingSensor'},
}
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
diff --git a/data/ipmi_raw_cmd_table.py b/data/ipmi_raw_cmd_table.py
index 589b97b..b4766dc 100644
--- a/data/ipmi_raw_cmd_table.py
+++ b/data/ipmi_raw_cmd_table.py
@@ -8,7 +8,9 @@
"""
# The currently supported cipher level list.
-# Refer: openbmc/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/ipmi/phosphor-ipmi-host/cipher_list.json
+# Refer:
+# openbmc/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipe
+# s-phosphor/ipmi/phosphor-ipmi-host/cipher_list.json
valid_cipher_list = [1, 2, 3, 15, 16, 17]
IPMI_RAW_CMD = {
diff --git a/data/ipmi_rest_fru_field_map.py b/data/ipmi_rest_fru_field_map.py
index 4e278cb..80f8479 100644
--- a/data/ipmi_rest_fru_field_map.py
+++ b/data/ipmi_rest_fru_field_map.py
@@ -52,4 +52,3 @@
# "board_mfg_date": "BuildDate",
}
}
-
diff --git a/data/model.py b/data/model.py
index e8b232c..926371b 100755
--- a/data/model.py
+++ b/data/model.py
@@ -31,20 +31,20 @@
def get_inventory_list(module_name):
- l = []
+ inventory_list = []
m = imp.load_source('module.name', module_name)
for i in m.ID_LOOKUP['FRU']:
s = m.ID_LOOKUP['FRU'][i]
s = s.replace('<inventory_root>', m.INVENTORY_ROOT)
- l.append(s)
+ inventory_list.append(s)
- return l
+ return inventory_list
def get_inventory_fru_type_list(module_name, fru_type):
- l = []
+ inventory_list = []
m = imp.load_source('module.name', module_name)
for i in m.FRU_INSTANCES.keys():
@@ -52,9 +52,9 @@
print 'found one'
s = i.replace('<inventory_root>', m.INVENTORY_ROOT)
- l.append(s)
+ inventory_list.append(s)
- return l
+ return inventory_list
def call_keyword(keyword):
diff --git a/data/variables.py b/data/variables.py
index 8e840f6..3abaa8b 100644
--- a/data/variables.py
+++ b/data/variables.py
@@ -152,7 +152,7 @@
l_https_port = os.getenv('HTTPS_PORT')
if l_https_port:
l_suffix = ':' + l_https_port
- except:
+ except BaseException:
print "Environment variable HTTPS_PORT not set,\
using default HTTPS port"
return l_suffix
diff --git a/extended/run_keyword.py b/extended/run_keyword.py
index c215250..d7a6b0d 100644
--- a/extended/run_keyword.py
+++ b/extended/run_keyword.py
@@ -95,8 +95,8 @@
grp.rdprint_issuing("import_library(\"" + lib_file_path + "\")")
BuiltIn().import_library(lib_file_path)
else:
- grp.rdprint_issuing("my_import_resource(\"" + lib_file_path +
- "\")")
+ grp.rdprint_issuing("my_import_resource(\"" + lib_file_path
+ + "\")")
gru.my_import_resource(lib_file_path)
# The user can pass multiple keyword strings by separating them with " ; ".
diff --git a/lib/code_update_utils.py b/lib/code_update_utils.py
index e041c05..0fa0114 100644
--- a/lib/code_update_utils.py
+++ b/lib/code_update_utils.py
@@ -26,8 +26,8 @@
Check that there are no active images with the same purpose and priority.
Description of argument(s):
- image_purpose The purpose that images must have to be checked for
- priority duplicates.
+ image_purpose The purpose that images must have to be
+ checked for priority duplicates.
"""
taken_priorities = {}
@@ -41,7 +41,8 @@
image_priority = image["Priority"]
if image_priority in taken_priorities:
BuiltIn().fail("Found active images with the same priority.\n"
- + gp.sprint_vars(image, taken_priorities[image_priority]))
+ + gp.sprint_vars(image,
+ taken_priorities[image_priority]))
taken_priorities[image_priority] = image
@@ -90,8 +91,9 @@
change from the state provided by the calling function.
Description of argument(s):
- version_id The version ID whose state change we are waiting for.
- initial_state The activation state we want to wait for.
+ version_id The version ID whose state change we are
+ waiting for.
+ initial_state The activation state we want to wait for.
"""
keyword.run_key_u("Open Connection And Log In")
@@ -100,9 +102,9 @@
read_fail_threshold = 1
while (retry < 30):
# TODO: Use retry option in run_key when available.
- status, software_state = keyword.run_key("Read Properties " +
- var.SOFTWARE_VERSION_URI +
- str(version_id),
+ status, software_state = keyword.run_key("Read Properties "
+ + var.SOFTWARE_VERSION_URI
+ + str(version_id),
ignore=1)
if status == 'FAIL':
num_read_errors += 1
@@ -128,15 +130,15 @@
Get the path to the latest uploaded file.
Description of argument(s):
- dir_path Path to the dir from which the name of the last
- updated file or folder will be returned to the
- calling function.
+ dir_path Path to the dir from which the name of the
+ last updated file or folder will be
+ returned to the calling function.
"""
stdout, stderr, rc = \
- bsu.bmc_execute_command("cd " + dir_path +
- "; stat -c '%Y %n' * |" +
- " sort -k1,1nr | head -n 1")
+ bsu.bmc_execute_command("cd " + dir_path
+ + "; stat -c '%Y %n' * |"
+ + " sort -k1,1nr | head -n 1")
return stdout.split(" ")[-1]
@@ -145,8 +147,8 @@
Read the image version from the MANIFEST inside the tarball.
Description of argument(s):
- tar_file_path The path to a tar file that holds the image
- version inside the MANIFEST.
+ tar_file_path The path to a tar file that holds the image
+ version inside the MANIFEST.
"""
tar = tarfile.open(tar_file_path)
@@ -167,12 +169,13 @@
Read the file for a version object.
Description of argument(s):
- file_path The path to a file that holds the image version.
+ file_path The path to a file that holds the image
+ version.
"""
stdout, stderr, rc = \
- bsu.bmc_execute_command("cat " + file_path +
- " | grep \"version=\"", ignore_err=1)
+ bsu.bmc_execute_command("cat " + file_path
+ + " | grep \"version=\"", ignore_err=1)
return (stdout.split("\n")[0]).split("=")[-1]
@@ -181,12 +184,13 @@
Read the file for a purpose object.
Description of argument(s):
- file_path The path to a file that holds the image purpose.
+ file_path The path to a file that holds the image
+ purpose.
"""
stdout, stderr, rc = \
- bsu.bmc_execute_command("cat " + file_path +
- " | grep \"purpose=\"", ignore_err=1)
+ bsu.bmc_execute_command("cat " + file_path
+ + " | grep \"purpose=\"", ignore_err=1)
return stdout.split("=")[-1]
@@ -198,13 +202,12 @@
exists and is either READY or INVALID.
Description of argument(s):
- image_version The version of the image that should match one
- of the images in the upload dir.
+ image_version The version of the image that should match
+ one of the images in the upload dir.
"""
stdout, stderr, rc = \
- bsu.bmc_execute_command("ls -d " + var.IMAGE_UPLOAD_DIR_PATH +
- "*/")
+ bsu.bmc_execute_command("ls -d " + var.IMAGE_UPLOAD_DIR_PATH + "*/")
image_list = stdout.split("\n")
retry = 0
@@ -225,10 +228,10 @@
fails, try again until we reach the timeout.
Description of argument(s):
- image_version The version from the image's manifest file
- (e.g. "v2.2-253-g00050f1").
- timeout How long, in minutes, to keep trying to find the
- image on the BMC. Default is 3 minutes.
+ image_version The version from the image's manifest file
+ (e.g. "v2.2-253-g00050f1").
+ timeout How long, in minutes, to keep trying to
+ find the image on the BMC. Default is 3 minutes.
"""
image_path = get_image_path(image_version)
@@ -236,8 +239,8 @@
keyword.run_key_u("Open Connection And Log In")
image_purpose = get_image_purpose(image_path + "MANIFEST")
- if (image_purpose == var.VERSION_PURPOSE_BMC or
- image_purpose == var.VERSION_PURPOSE_HOST):
+ if (image_purpose == var.VERSION_PURPOSE_BMC
+ or image_purpose == var.VERSION_PURPOSE_HOST):
uri = var.SOFTWARE_VERSION_URI + image_version_id
ret_values = ""
for itr in range(timeout * 2):
@@ -266,17 +269,18 @@
unpacking the image.
Description of argument(s):
- image_version The version of the image to look for on the BMC.
- timeout How long, in minutes, to try to find an image on the BMC.
- Default is 3 minutes.
+ image_version The version of the image to look for on
+ the BMC.
+ timeout How long, in minutes, to try to find an
+ image on the BMC. Default is 3 minutes.
"""
for i in range(timeout * 2):
stdout, stderr, rc = \
- bsu.bmc_execute_command('ls ' + var.IMAGE_UPLOAD_DIR_PATH +
- '*/MANIFEST 2>/dev/null ' +
- '| xargs grep -rl "version=' +
- image_version + '"')
+ bsu.bmc_execute_command('ls ' + var.IMAGE_UPLOAD_DIR_PATH
+ + '*/MANIFEST 2>/dev/null '
+ + '| xargs grep -rl "version='
+ + image_version + '"')
image_dir = os.path.dirname(stdout.split('\n')[0])
if '' != image_dir:
bsu.bmc_execute_command('rm -rf ' + image_dir)
diff --git a/lib/dump_utils.py b/lib/dump_utils.py
index dd15162..94b6b36 100755
--- a/lib/dump_utils.py
+++ b/lib/dump_utils.py
@@ -33,10 +33,14 @@
Example output:
dump_dict:
- [1]: /var/lib/phosphor-debug-collector/dumps/1/obmcdump_1_1508255216.tar.xz
- [2]: /var/lib/phosphor-debug-collector/dumps/2/obmcdump_2_1508255245.tar.xz
- [3]: /var/lib/phosphor-debug-collector/dumps/3/obmcdump_3_1508255267.tar.xz
- [4]: /var/lib/phosphor-debug-collector/dumps/4/obmcdump_4_1508255283.tar.xz
+ [1]:
+ /var/lib/phosphor-debug-collector/dumps/1/obmcdump_1_1508255216.tar.xz
+ [2]:
+ /var/lib/phosphor-debug-collector/dumps/2/obmcdump_2_1508255245.tar.xz
+ [3]:
+ /var/lib/phosphor-debug-collector/dumps/3/obmcdump_3_1508255267.tar.xz
+ [4]:
+ /var/lib/phosphor-debug-collector/dumps/4/obmcdump_4_1508255283.tar.xz
Description of argument(s):
quiet If quiet is set to 1, this function will
@@ -123,8 +127,8 @@
for dump_id, source_file_path in dump_dict.iteritems():
targ_file_path = targ_dir_path + targ_file_prefix \
+ os.path.basename(source_file_path)
- status, ret_values = grk.run_key("scp.Get File " + source_file_path +
- " " + targ_file_path, quiet=quiet)
+ status, ret_values = grk.run_key("scp.Get File " + source_file_path
+ + " " + targ_file_path, quiet=quiet)
dump_file_list.append(targ_file_path)
return dump_file_list
diff --git a/lib/firmware_utils.py b/lib/firmware_utils.py
index 9885790..4e0dbb5 100755
--- a/lib/firmware_utils.py
+++ b/lib/firmware_utils.py
@@ -14,8 +14,8 @@
dictionary.
Description of argument(s):
- device The device to be passed to the hdparm and lsblk commands (e.g.
- "/dev/sdb").
+ device The device to be passed to the hdparm and
+ lsblk commands (e.g. "/dev/sdb").
Example result:
@@ -23,7 +23,8 @@
[model_number]: MTFDDAK1T9TCB 00LY461 00LY570IBM
[serial_number]: 179C413F
[firmware_revision]: MJ06
- [transport]: Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
+ [transport]: Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5,
+ SATA Rev 2.6, SATA Rev 3.0
[used]: unknown (minor revision code 0x006d)
[supported]: enhanced erase
[likely_used]: 10
diff --git a/lib/gen_arg.py b/lib/gen_arg.py
index badc099..313a486 100755
--- a/lib/gen_arg.py
+++ b/lib/gen_arg.py
@@ -57,7 +57,7 @@
" the desired stock parameter:\n" +\
gp.sprint_var(stock_list)
return gv.process_error_message(error_message)
- if type(stock_list[ix]) is tuple:
+ if isinstance(stock_list[ix], tuple):
arg_name = stock_list[ix][0]
default = stock_list[ix][1]
else:
@@ -78,10 +78,10 @@
default=default,
type=int,
choices=[1, 0],
- help='If this parameter is set to "1", %(prog)s' +
- ' will print only essential information, i.e. it will' +
- ' not echo parameters, echo commands, print the total' +
- ' run time, etc.' + default_string)
+ help='If this parameter is set to "1", %(prog)s'
+ + ' will print only essential information, i.e. it will'
+ + ' not echo parameters, echo commands, print the total'
+ + ' run time, etc.' + default_string)
elif arg_name == "test_mode":
if default is None:
default = 0
@@ -90,10 +90,10 @@
default=default,
type=int,
choices=[1, 0],
- help='This means that %(prog)s should go through all the' +
- ' motions but not actually do anything substantial.' +
- ' This is mainly to be used by the developer of' +
- ' %(prog)s.' + default_string)
+ help='This means that %(prog)s should go through all the'
+ + ' motions but not actually do anything substantial.'
+ + ' This is mainly to be used by the developer of'
+ + ' %(prog)s.' + default_string)
elif arg_name == "debug":
if default is None:
default = 0
@@ -102,9 +102,9 @@
default=default,
type=int,
choices=[1, 0],
- help='If this parameter is set to "1", %(prog)s will print' +
- ' additional debug information. This is mainly to be' +
- ' used by the developer of %(prog)s.' + default_string)
+ help='If this parameter is set to "1", %(prog)s will print'
+ + ' additional debug information. This is mainly to be'
+ + ' used by the developer of %(prog)s.' + default_string)
elif arg_name == "loglevel":
if default is None:
default = "info"
@@ -114,9 +114,9 @@
type=str,
choices=['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL',
'debug', 'info', 'warning', 'error', 'critical'],
- help='If this parameter is set to "1", %(prog)s will print' +
- ' additional debug information. This is mainly to be' +
- ' used by the developer of %(prog)s.' + default_string)
+ help='If this parameter is set to "1", %(prog)s will print'
+ + ' additional debug information. This is mainly to be'
+ + ' used by the developer of %(prog)s.' + default_string)
arg_obj = parser.parse_args()
@@ -125,7 +125,7 @@
__builtin__.debug = 0
__builtin__.loglevel = 'WARNING'
for ix in range(0, len(stock_list)):
- if type(stock_list[ix]) is tuple:
+ if isinstance(stock_list[ix], tuple):
arg_name = stock_list[ix][0]
default = stock_list[ix][1]
else:
diff --git a/lib/gen_call_robot.py b/lib/gen_call_robot.py
index 56fc19a..41ad582 100755
--- a/lib/gen_call_robot.py
+++ b/lib/gen_call_robot.py
@@ -23,7 +23,6 @@
def init_robot_out_parms(extra_prefix=""):
-
r"""
Initialize robot output parms such as outputdir, output, etc.
@@ -64,7 +63,6 @@
def init_robot_test_base_dir_path():
-
r"""
Initialize and validate the environment variable, ROBOT_TEST_BASE_DIR_PATH
and set corresponding global variable ROBOT_TEST_RUNNING_FROM_SB.
@@ -116,9 +114,9 @@
gp.dprint_vars(ROBOT_TEST_RUNNING_FROM_SB)
ROBOT_TEST_BASE_DIR_PATH = developer_home_dir_path + suffix
if not os.path.isdir(ROBOT_TEST_BASE_DIR_PATH):
- gp.dprint_timen("NOTE: Sandbox directory" +
- " ${ROBOT_TEST_BASE_DIR_PATH} does not" +
- " exist.")
+ gp.dprint_timen("NOTE: Sandbox directory"
+ + " ${ROBOT_TEST_BASE_DIR_PATH} does not"
+ + " exist.")
# Fall back to the apollo dir path.
ROBOT_TEST_BASE_DIR_PATH = apollo_dir_path + suffix
else:
@@ -145,7 +143,6 @@
def init_robot_file_path(robot_file_path):
-
r"""
Determine full path name for the file path passed in robot_file_path and
return it.
@@ -206,7 +203,6 @@
def get_robot_parm_names():
-
r"""
Return a list containing all of the long parm names (e.g. --outputdir)
supported by the robot program. Double dashes are not included in the
@@ -214,15 +210,14 @@
"""
cmd_buf = "robot -h | egrep " +\
- "'^([ ]\-[a-zA-Z0-9])?[ ]+--[a-zA-Z0-9]+[ ]+' | sed -re" +\
- " s'/.*\-\-//g' -e s'/ .*//g' | sort -u"
+ "'^([ ]\\-[a-zA-Z0-9])?[ ]+--[a-zA-Z0-9]+[ ]+' | sed -re" +\
+ " s'/.*\\-\\-//g' -e s'/ .*//g' | sort -u"
shell_rc, out_buf = gc.shell_cmd(cmd_buf, quiet=1, print_output=0)
return out_buf.split("\n")
def create_robot_cmd_string(robot_file_path, *parms):
-
r"""
Create a robot command string and return it. On failure, return an empty
string.
@@ -281,7 +276,6 @@
def robot_cmd_fnc(robot_cmd_buf,
robot_jail=os.environ.get('ROBOT_JAIL', ''),
gzip=1):
-
r"""
Run the robot command string.
@@ -384,12 +378,12 @@
# Retrieve the parms from the robot command buffer.
robot_cmd_buf_dict = gc.parse_command_string(robot_cmd_buf)
# Get prefix from the log parm.
- prefix = re.sub('log\.html$', '', robot_cmd_buf_dict['log'])
+ prefix = re.sub('log\\.html$', '', robot_cmd_buf_dict['log'])
gp.qprintn()
- rc, outbuf = gc.cmd_fnc("cd " + robot_cmd_buf_dict['outputdir'] +
- " ; gzip " + robot_cmd_buf_dict['output'] +
- " " + robot_cmd_buf_dict['log'] +
- " " + robot_cmd_buf_dict['report'])
+ rc, outbuf = gc.cmd_fnc("cd " + robot_cmd_buf_dict['outputdir']
+ + " ; gzip " + robot_cmd_buf_dict['output']
+ + " " + robot_cmd_buf_dict['log']
+ + " " + robot_cmd_buf_dict['report'])
outputdir = gm.add_trailing_slash(robot_cmd_buf_dict['outputdir'])
Output = outputdir + robot_cmd_buf_dict['output'] + ".gz"
diff --git a/lib/gen_cmd.py b/lib/gen_cmd.py
index 0919fe1..bdd8258 100644
--- a/lib/gen_cmd.py
+++ b/lib/gen_cmd.py
@@ -246,7 +246,7 @@
key = 'positional'
value = command_string_list[ix]
if key in command_string_dict:
- if type(command_string_dict[key]) is str:
+ if isinstance(command_string_dict[key], str):
command_string_dict[key] = [command_string_dict[key]]
command_string_dict[key].append(value)
else:
@@ -443,9 +443,9 @@
func_stdout += gp.sprint_error_report(err_msg)
func_history_stdout += func_stdout
if attempt_num < max_attempts:
- func_history_stdout += gp.sprint_issuing("time.sleep(" +
- str(retry_sleep_time) +
- ")")
+ func_history_stdout += gp.sprint_issuing("time.sleep("
+ + str(retry_sleep_time)
+ + ")")
time.sleep(retry_sleep_time)
if shell_rc not in allowed_shell_rcs:
diff --git a/lib/gen_misc.py b/lib/gen_misc.py
index 281c406..75487c1 100755
--- a/lib/gen_misc.py
+++ b/lib/gen_misc.py
@@ -107,9 +107,9 @@
try:
module = sys.modules[mod_name]
except KeyError:
- gp.print_error_report("Programmer error - The mod_name passed to" +
- " this function is invalid:\n" +
- gp.sprint_var(mod_name))
+ gp.print_error_report("Programmer error - The mod_name passed to"
+ + " this function is invalid:\n"
+ + gp.sprint_var(mod_name))
raise ValueError('Programmer error.')
if default is None:
@@ -161,9 +161,9 @@
try:
module = sys.modules[mod_name]
except KeyError:
- gp.print_error_report("Programmer error - The mod_name passed to" +
- " this function is invalid:\n" +
- gp.sprint_var(mod_name))
+ gp.print_error_report("Programmer error - The mod_name passed to"
+ + " this function is invalid:\n"
+ + gp.sprint_var(mod_name))
raise ValueError('Programmer error.')
if var_name is None:
@@ -360,7 +360,6 @@
def to_signed(number,
bit_width=gp.bit_length(long(sys.maxsize)) + 1):
-
r"""
Convert number to a signed number and return the result.
diff --git a/lib/gen_plug_in.py b/lib/gen_plug_in.py
index 461ae57..1bd70a1 100755
--- a/lib/gen_plug_in.py
+++ b/lib/gen_plug_in.py
@@ -68,8 +68,8 @@
global plug_in_base_path_list
for plug_in_base_dir_path in plug_in_base_path_list:
- candidate_plug_in_dir_path = os.path.normpath(plug_in_base_dir_path +
- plug_in_name) + \
+ candidate_plug_in_dir_path = os.path.normpath(plug_in_base_dir_path
+ + plug_in_name) + \
os.sep
if os.path.isdir(candidate_plug_in_dir_path):
return candidate_plug_in_dir_path
@@ -98,8 +98,8 @@
candidate_plug_in_dir_path = os.path.normpath(plug_in_dir_path) +\
os.sep
if not os.path.isdir(candidate_plug_in_dir_path):
- gp.print_error_report("Plug-in directory path \"" +
- plug_in_dir_path + "\" does not exist.\n")
+ gp.print_error_report("Plug-in directory path \""
+ + plug_in_dir_path + "\" does not exist.\n")
exit(1)
else:
# The plug_in_dir_path is actually a simple name (e.g.
@@ -107,22 +107,22 @@
candidate_plug_in_dir_path = find_plug_in_package(plug_in_dir_path)
if candidate_plug_in_dir_path == "":
global PATH_LIST
- gp.print_error_report("Plug-in directory path \"" +
- plug_in_dir_path + "\" could not be found" +
- " in any of the following directories:\n" +
- gp.sprint_var(PATH_LIST))
+ gp.print_error_report("Plug-in directory path \""
+ + plug_in_dir_path + "\" could not be found"
+ + " in any of the following directories:\n"
+ + gp.sprint_var(PATH_LIST))
exit(1)
# Make sure that this plug-in supports us...
supports_file_path = candidate_plug_in_dir_path + "supports_" + mch_class
if not os.path.exists(supports_file_path):
- gp.print_error_report("The following file path could not be" +
- " found:\n" +
- gp.sprint_varx("supports_file_path",
- supports_file_path) +
- "\nThis file is necessary to indicate that" +
- " the given plug-in supports the class of" +
- " machine we are testing, namely \"" +
- mch_class + "\".\n")
+ gp.print_error_report("The following file path could not be"
+ + " found:\n"
+ + gp.sprint_varx("supports_file_path",
+ supports_file_path)
+ + "\nThis file is necessary to indicate that"
+ + " the given plug-in supports the class of"
+ + " machine we are testing, namely \""
+ + mch_class + "\".\n")
exit(1)
return candidate_plug_in_dir_path
@@ -153,8 +153,8 @@
for plug_in_base_path in plug_in_base_path_list:
# Get a list of all plug-in paths that support our mch_class.
- mch_class_candidate_list = glob.glob(plug_in_base_path +
- "*/supports_" + mch_class)
+ mch_class_candidate_list = glob.glob(plug_in_base_path
+ + "*/supports_" + mch_class)
for candidate_path in mch_class_candidate_list:
integrated_plug_in_dir_path = os.path.dirname(candidate_path) +\
os.sep
diff --git a/lib/gen_plug_in_utils.py b/lib/gen_plug_in_utils.py
index 39a8a97..34b227f 100755
--- a/lib/gen_plug_in_utils.py
+++ b/lib/gen_plug_in_utils.py
@@ -283,8 +283,8 @@
# Calculate default value for plug_in_dir_paths.
if plug_in_dir_paths is None:
- plug_in_dir_paths = os.environ.get(PLUG_VAR_PREFIX +
- "_PLUG_IN_DIR_PATHS", "")
+ plug_in_dir_paths = os.environ.get(PLUG_VAR_PREFIX
+ + "_PLUG_IN_DIR_PATHS", "")
error_message = ""
@@ -336,8 +336,8 @@
"""
BASE_TOOL_DIR_PATH = \
- gm.add_trailing_slash(os.environ.get(PLUG_VAR_PREFIX +
- "BASE_TOOL_DIR_PATH",
+ gm.add_trailing_slash(os.environ.get(PLUG_VAR_PREFIX
+ + "BASE_TOOL_DIR_PATH",
"/fspmount/"))
NICKNAME = os.environ.get("AUTOBOOT_OPENBMC_NICKNAME", "")
if NICKNAME == "":
@@ -421,13 +421,13 @@
plug_in_save_dir_path = create_plug_in_save_dir()
save_file_path = plug_in_save_dir_path + lvalue
if os.path.isfile(save_file_path):
- gp.qprint_timen("Restoring " + lvalue + " value from " +
- save_file_path + ".")
+ gp.qprint_timen("Restoring " + lvalue + " value from "
+ + save_file_path + ".")
return gm.file_to_list(save_file_path, newlines=0, comments=0,
trim=1)[0]
else:
- gp.qprint_timen("Save file " + save_file_path +
- " does not exist so returning default value.")
+ gp.qprint_timen("Save file " + save_file_path
+ + " does not exist so returning default value.")
return default
diff --git a/lib/gen_print.py b/lib/gen_print.py
index 0de4489..ed254fc 100755
--- a/lib/gen_print.py
+++ b/lib/gen_print.py
@@ -27,7 +27,7 @@
# are in a robot environment. The following try block should confirm that.
try:
var_value = BuiltIn().get_variable_value("${SUITE_NAME}", "")
- except:
+ except BaseException:
robot_env = 0
except ImportError:
robot_env = 0
@@ -203,10 +203,10 @@
os.environ.get('GET_ARG_NAME_SHOW_SOURCE', 0))
if stack_frame_ix < 1:
- print_error("Programmer error - Variable \"stack_frame_ix\" has an" +
- " invalid value of \"" + str(stack_frame_ix) + "\". The" +
- " value must be an integer that is greater than or equal" +
- " to 1.\n")
+ print_error("Programmer error - Variable \"stack_frame_ix\" has an"
+ + " invalid value of \"" + str(stack_frame_ix) + "\". The"
+ + " value must be an integer that is greater than or equal"
+ + " to 1.\n")
return
if local_debug:
@@ -225,12 +225,12 @@
frame, filename, cur_line_no, function_name, lines, index = \
inspect.stack()[stack_frame_ix]
except IndexError:
- print_error("Programmer error - The caller has asked for" +
- " information about the stack frame at index \"" +
- str(stack_frame_ix) + "\". However, the stack" +
- " only contains " + str(len(inspect.stack())) +
- " entries. Therefore the stack frame index is out" +
- " of range.\n")
+ print_error("Programmer error - The caller has asked for"
+ + " information about the stack frame at index \""
+ + str(stack_frame_ix) + "\". However, the stack"
+ + " only contains " + str(len(inspect.stack()))
+ + " entries. Therefore the stack frame index is out"
+ + " of range.\n")
return
if filename != "<string>":
break
@@ -308,11 +308,11 @@
# The call to the function could be encased in a recast (e.g.
# int(func_name())).
- recast_regex = "([^ ]+\([ ]*)?"
- import_name_regex = "([a-zA-Z0-9_]+\.)?"
+ recast_regex = "([^ ]+\\([ ]*)?"
+ import_name_regex = "([a-zA-Z0-9_]+\\.)?"
func_name_regex = recast_regex + import_name_regex + "(" +\
'|'.join(aliases) + ")"
- pre_args_regex = ".*" + func_name_regex + "[ ]*\("
+ pre_args_regex = ".*" + func_name_regex + "[ ]*\\("
# Search backward through source lines looking for the calling function
# name.
@@ -325,9 +325,9 @@
found = True
break
if not found:
- print_error("Programmer error - Could not find the source line with" +
- " a reference to function \"" + real_called_func_name +
- "\".\n")
+ print_error("Programmer error - Could not find the source line with"
+ + " a reference to function \"" + real_called_func_name
+ + "\".\n")
return
# Search forward through the source lines looking for a line whose
@@ -375,7 +375,8 @@
lvalues[ix] = lvalue
ix += 1
lvalue_prefix_regex = "(.*=[ ]+)?"
- called_func_name_regex = lvalue_prefix_regex + func_name_regex + "[ ]*\(.*"
+ called_func_name_regex = lvalue_prefix_regex + func_name_regex +\
+ "[ ]*\\(.*"
called_func_name = re.sub(called_func_name_regex, "\\4", composite_line)
arg_list_etc = "(" + re.sub(pre_args_regex, "", composite_line)
if local_debug:
@@ -805,7 +806,7 @@
var_value & 0xffffffff)
else:
return format_string % ("", str(var_name) + ":", var_value)
- elif type(var_value) is type:
+ elif isinstance(var_value, type):
return sprint_varx(var_name, str(var_value).split("'")[1], hex,
loc_col1_indent, loc_col1_width, trailing_char,
key_list)
@@ -821,20 +822,20 @@
ix = 0
loc_trailing_char = "\n"
type_is_dict = 0
- if type(var_value) is dict:
+ if isinstance(var_value, dict):
type_is_dict = 1
try:
- if type(var_value) is collections.OrderedDict:
+ if isinstance(var_value, collections.OrderedDict):
type_is_dict = 1
except AttributeError:
pass
try:
- if type(var_value) is DotDict:
+ if isinstance(var_value, DotDict):
type_is_dict = 1
except NameError:
pass
try:
- if type(var_value) is NormalizedDict:
+ if isinstance(var_value, NormalizedDict):
type_is_dict = 1
except NameError:
pass
@@ -851,7 +852,7 @@
# Since hex is being used as a format type, we want it
# turned off when processing integer dictionary values so
# it is not interpreted as a hex indicator.
- loc_hex = not (type(value) is int)
+ loc_hex = not (isinstance(value, int))
buffer += sprint_varx("[" + key + "]", value,
loc_hex, loc_col1_indent,
loc_col1_width,
@@ -870,7 +871,7 @@
buffer += sprint_varx(var_name + "[" + str(key) + "]", value,
hex, loc_col1_indent, loc_col1_width,
loc_trailing_char, key_list)
- elif type(var_value) is argparse.Namespace:
+ elif isinstance(var_value, argparse.Namespace):
for key in var_value.__dict__:
ix += 1
if ix == length:
@@ -956,7 +957,7 @@
var_name = get_arg_name(None, parm_num, stack_frame)
# See if parm 1 is to be interpreted as "indent".
try:
- if type(int(var_name)) is int:
+ if isinstance(int(var_name), int):
indent = int(var_name)
args_list.pop(0)
parm_num += 1
@@ -966,7 +967,7 @@
var_name = get_arg_name(None, parm_num, stack_frame)
# See if parm 1 is to be interpreted as "col1_width".
try:
- if type(int(var_name)) is int:
+ if isinstance(int(var_name), int):
loc_col1_width = int(var_name)
args_list.pop(0)
parm_num += 1
@@ -976,7 +977,7 @@
var_name = get_arg_name(None, parm_num, stack_frame)
# See if parm 1 is to be interpreted as "hex".
try:
- if type(int(var_name)) is int:
+ if isinstance(int(var_name), int):
hex = int(var_name)
args_list.pop(0)
parm_num += 1
@@ -1197,8 +1198,8 @@
if robot_env:
suite_name = BuiltIn().get_variable_value("${suite_name}")
- buffer += sindent(sprint_time("Running test suite \"" + suite_name +
- "\".\n"), indent)
+ buffer += sindent(sprint_time("Running test suite \"" + suite_name
+ + "\".\n"), indent)
buffer += sindent(sprint_time() + "Running " + pgm_name + ".\n", indent)
buffer += sindent(sprint_time() + "Program parameter values, etc.:\n\n",
@@ -1220,10 +1221,10 @@
username = "root"
else:
username = "?"
- buffer += sprint_varx("uid", userid_num + " (" + username +
- ")", 0, indent, loc_col1_width)
- buffer += sprint_varx("gid", str(os.getgid()) + " (" +
- str(grp.getgrgid(os.getgid()).gr_name) + ")", 0,
+ buffer += sprint_varx("uid", userid_num + " (" + username
+ + ")", 0, indent, loc_col1_width)
+ buffer += sprint_varx("gid", str(os.getgid()) + " ("
+ + str(grp.getgrgid(os.getgid()).gr_name) + ")", 0,
indent, loc_col1_width)
buffer += sprint_varx("host_name", socket.gethostname(), 0, indent,
loc_col1_width)
@@ -1516,7 +1517,6 @@
def get_stack_var(var_name,
default="",
init_stack_ix=2):
-
r"""
Starting with the caller's stack level, search upward in the call stack,
for a variable named var_name and return its value. If the variable
@@ -1548,8 +1548,8 @@
"""
return next((frame[0].f_locals[var_name]
- for frame in inspect.stack()[init_stack_ix:]
- if var_name in frame[0].f_locals), default)
+ for frame in inspect.stack()[init_stack_ix:]
+ if var_name in frame[0].f_locals), default)
# hidden_text is a list of passwords which are to be replaced with asterisks
@@ -1707,8 +1707,8 @@
# Templates for the various print wrapper functions.
print_func_template = \
[
- " <mod_qualifier>gp_print(<mod_qualifier>replace_passwords(" +
- "<call_line>), stream='<output_stream>')"
+ " <mod_qualifier>gp_print(<mod_qualifier>replace_passwords("
+ + "<call_line>), stream='<output_stream>')"
]
qprint_func_template = \
@@ -1718,8 +1718,8 @@
dprint_func_template = \
[
- " if not int(<mod_qualifier>get_var_value(None, 0, \"debug\")):" +
- " return"
+ " if not int(<mod_qualifier>get_var_value(None, 0, \"debug\")):"
+ + " return"
] + print_func_template
lprint_func_template = \
diff --git a/lib/gen_robot_plug_in.py b/lib/gen_robot_plug_in.py
index 1dc8983..d18c499 100755
--- a/lib/gen_robot_plug_in.py
+++ b/lib/gen_robot_plug_in.py
@@ -39,8 +39,8 @@
if rc != 0:
message = gp.sprint_varx("rc", rc, 1) + out_buf
grp.rprintn(out_buf, 'STDERR')
- BuiltIn().fail(gp.sprint_error("Validate plug ins call failed. See" +
- " stderr text for details.\n"))
+ BuiltIn().fail(gp.sprint_error("Validate plug ins call failed. See"
+ + " stderr text for details.\n"))
plug_in_packages_list = out_buf.split("\n")
if len(plug_in_packages_list) == 1 and plug_in_packages_list[0] == "":
@@ -174,8 +174,8 @@
if int(debug) == 1:
grp.rpissuing(cmd_buf)
else:
- grp.rprint_timen("Processing " + call_point +
- " call point programs.")
+ grp.rprint_timen("Processing " + call_point
+ + " call point programs.")
proc_plug_pkg_rc = subprocess.call(cmd_buf, shell=True,
executable='/bin/bash')
@@ -219,8 +219,8 @@
grp.rprint_varx("grep_rc", grep_rc, hex)
grp.rprint_varx("proc_plug_pkg_rc", proc_plug_pkg_rc, hex)
# Show all of the failed plug in names and shell_rcs.
- gc.cmd_fnc_u("egrep -A 1 '^failed_plug_in_name:[ ]+' " +
- temp_properties_file_path, quiet=1, show_err=0)
+ gc.cmd_fnc_u("egrep -A 1 '^failed_plug_in_name:[ ]+' "
+ + temp_properties_file_path, quiet=1, show_err=0)
rc = 1
return rc, shell_rc, failed_plug_in_name
diff --git a/lib/gen_robot_print.py b/lib/gen_robot_print.py
index ca344b2..4430865 100755
--- a/lib/gen_robot_print.py
+++ b/lib/gen_robot_print.py
@@ -84,7 +84,7 @@
# See if parm 1 is to be interpreted as "hex".
try:
- if type(int(args_list[0])) is int:
+ if isinstance(int(args_list[0]), int):
hex = int(args_list[0])
args_list.pop(0)
except ValueError:
@@ -92,7 +92,7 @@
# See if parm 2 is to be interpreted as "indent".
try:
- if type(int(args_list[0])) is int:
+ if isinstance(int(args_list[0]), int):
indent = int(args_list[0])
args_list.pop(0)
except ValueError:
@@ -100,7 +100,7 @@
# See if parm 3 is to be interpreted as "col1_width".
try:
- if type(int(args_list[0])) is int:
+ if isinstance(int(args_list[0]), int):
loc_col1_width = int(args_list[0])
args_list.pop(0)
except ValueError:
@@ -259,10 +259,10 @@
func_def = \
[
"def " + robot_prefix + func_name + "(*args):",
- " s_func = getattr(" + object_name + ", \"s" + func_name +
- "\")",
- " BuiltIn().log_to_console" +
- "(gp.replace_passwords(s_func(*args)),"
+ " s_func = getattr(" + object_name + ", \"s" + func_name
+ + "\")",
+ " BuiltIn().log_to_console"
+ + "(gp.replace_passwords(s_func(*args)),"
" stream='" + output_stream + "',"
" no_newline=True)"
]
diff --git a/lib/gen_robot_ssh.py b/lib/gen_robot_ssh.py
index 5a4dbe1..5af114c 100755
--- a/lib/gen_robot_ssh.py
+++ b/lib/gen_robot_ssh.py
@@ -234,8 +234,8 @@
index_or_alias = connection.index
else:
index_or_alias = connection.alias
- gp.lprint_timen("Switching to existing connection: \"" +
- str(index_or_alias) + "\".")
+ gp.lprint_timen("Switching to existing connection: \""
+ + str(index_or_alias) + "\".")
sshlib.switch_connection(index_or_alias)
else:
gp.lprint_timen("Connecting to " + open_connection_args['host'] + ".")
@@ -270,11 +270,11 @@
# Now we must continue to next loop iteration to retry the
# execute_command.
continue
- if (except_type is paramiko.ssh_exception.SSHException and
- re.match(r"SSH session not active", str(except_value))) or\
- (except_type is socket.error and
- re.match(r"\[Errno 104\] Connection reset by peer",
- str(except_value))):
+ if (except_type is paramiko.ssh_exception.SSHException
+ and re.match(r"SSH session not active", str(except_value))) or\
+ (except_type is socket.error
+ and re.match(r"\[Errno 104\] Connection reset by peer",
+ str(except_value))):
# Close and re-open a connection.
# Note: close_connection() doesn't appear to get rid of the
# connection. It merely closes it. Since there is a concern
@@ -283,8 +283,8 @@
# connections.
gp.lprint_timen("Closing all connections.")
sshlib.close_all_connections()
- gp.lprint_timen("Connecting to " +
- open_connection_args['host'] + ".")
+ gp.lprint_timen("Connecting to "
+ + open_connection_args['host'] + ".")
cix = sshlib.open_connection(**open_connection_args)
login_ssh(login_args)
continue
@@ -310,10 +310,10 @@
gp.printn(stderr + stdout)
if not ignore_err:
- message = gp.sprint_error("The prior SSH" +
- " command returned a non-zero return" +
- " code:\n" + gp.sprint_var(rc, 1) + stderr +
- "\n")
+ message = gp.sprint_error("The prior SSH"
+ + " command returned a non-zero return"
+ + " code:\n" + gp.sprint_var(rc, 1) + stderr
+ + "\n")
BuiltIn().should_be_equal(rc, 0, message)
if open_connection_args['alias'] == "device_connection":
diff --git a/lib/gen_robot_valid.py b/lib/gen_robot_valid.py
index 3af8750..8f761f9 100755
--- a/lib/gen_robot_valid.py
+++ b/lib/gen_robot_valid.py
@@ -173,7 +173,7 @@
error_message = "Variable \"" + var_name +\
"\" not found (i.e. it's undefined).\n"
else:
- if type(range) is unicode:
+ if isinstance(range, unicode):
range = range.split("..")
if range[0] == "":
range[0] = None
diff --git a/lib/gen_valid.py b/lib/gen_valid.py
index e18e847..f41c9cd 100755
--- a/lib/gen_valid.py
+++ b/lib/gen_valid.py
@@ -222,7 +222,7 @@
success_message = ""
error_message = ""
try:
- if type(int(str(var_value), 0)) is int:
+ if isinstance(int(str(var_value), 0), int):
return success_message
except ValueError:
pass
@@ -467,8 +467,8 @@
" range:\n" +\
gp.sprint_varx(get_var_name(var_name), var_value) +\
gp.sprint_varx("valid_range",
- str(valid_range[0]) + ".." +
- str(valid_range[1]))
+ str(valid_range[0]) + ".."
+ + str(valid_range[1]))
return error_message
return error_message
diff --git a/lib/ipmi_utils.py b/lib/ipmi_utils.py
index 085ca2a..9f30e29 100644
--- a/lib/ipmi_utils.py
+++ b/lib/ipmi_utils.py
@@ -28,7 +28,8 @@
Output:
sol_info:
- sol_info[Info]: SOL parameter 'Payload Channel (7)' not supported - defaulting to 0x0e
+ sol_info[Info]: SOL parameter 'Payload Channel (7)'
+ not supported - defaulting to 0x0e
sol_info[Character Send Threshold]: 1
sol_info[Force Authentication]: true
sol_info[Privilege Level]: USER
@@ -66,12 +67,13 @@
Set SOL setting with given value.
# Description of argument(s):
- # setting_name SOL setting which needs to be set (e.g. "retry-count").
- # setting_value Value which needs to be set (e.g. "7").
+ # setting_name SOL setting which needs to be set (e.g.
+ # "retry-count").
+ # setting_value Value which needs to be set (e.g. "7").
"""
- status, ret_values = grk.run_key_u("Run IPMI Standard Command sol set " +
- setting_name + " " + setting_value)
+ status, ret_values = grk.run_key_u("Run IPMI Standard Command sol set "
+ + setting_name + " " + setting_value)
return status
@@ -175,8 +177,8 @@
[power_reading_state_is]: deactivated
Description of argument(s):
- strip_watts Strip all dictionary values of the trailing " Watts"
- substring.
+ strip_watts Strip all dictionary values of the
+ trailing " Watts" substring.
"""
status, ret_values = \
@@ -295,8 +297,9 @@
Get IPMI Aux version info data and return it.
Description of argument(s):
- version_id The data is obtained by from BMC /etc/os-release
- (e.g. "xxx-v2.1-438-g0030304-r3-gfea8585").
+ version_id The data is obtained by from BMC
+ /etc/os-release
+ (e.g. "xxx-v2.1-438-g0030304-r3-gfea8585").
In the prior example, the 3rd field is "438" is the commit version and
the 5th field is "r3" and value "3" is the release version.
@@ -305,10 +308,10 @@
"""
# Commit version.
- count = re.findall("-(\d{1,4})-", version_id)
+ count = re.findall("-(\\d{1,4})-", version_id)
# Release version.
- release = re.findall("-r(\d{1,4})", version_id)
+ release = re.findall("-r(\\d{1,4})", version_id)
if release:
aux_version = count[0] + "{0:0>4}".format(release[0])
else:
@@ -372,7 +375,7 @@
ret_values)
return [vf.key_value_outbuf_to_dict(x) for x in re.split("\n\n",
- ret_values)]
+ ret_values)]
def get_component_fru_info(component='cpu',
@@ -385,11 +388,14 @@
entries. See get_fru_info's prolog for a layout of the data.
Description of argument(s):
- component The component (e.g. "cpu", "dimm", etc.).
- fru_objs A fru_objs list such as the one returned by get_fru_info. If
- this is None, then this function will call get_fru_info to
- obtain such a list. Supplying this argument may improve
- performance if this function is to be called multiple times.
+ component The component (e.g. "cpu", "dimm", etc.).
+ fru_objs A fru_objs list such as the one returned
+ by get_fru_info. If this is None, then
+ this function will call get_fru_info to
+ obtain such a list.
+ Supplying this argument may improve
+ performance if this function is to be
+ called multiple times.
"""
if fru_objs is None:
diff --git a/lib/logging_utils.py b/lib/logging_utils.py
index 7fc9fd7..b39aa3f 100644
--- a/lib/logging_utils.py
+++ b/lib/logging_utils.py
@@ -24,12 +24,14 @@
directly from a robot script.
Description of argument(s):
- error_logs An error log dictionary such as the one returned by the
- 'Get Error Logs' keyword.
- key_list The list of keys to be printed. This may be specified as
- either a python list or a space-delimited string. In the
- latter case, this function will convert it to a python list.
- See the sprint_varx function prolog for additionatl details.
+ error_logs An error log dictionary such as the one
+ returned by the 'Get Error Logs' keyword.
+ key_list The list of keys to be printed. This may
+ be specified as either a python list
+ or a space-delimited string. In the
+ latter case, this function will convert
+ it to a python list. See the sprint_varx
+ function prolog for additionatl details.
Example use from a python script:
@@ -41,16 +43,20 @@
error_logs:
[/xyz/openbmc_project/logging/entry/3]:
[Timestamp]: 1521738335735
- [Message]: xyz.openbmc_project.Inventory.Error.Nonfunctional
+ [Message]:
+ xyz.openbmc_project.Inventory.Error.Nonfunctional
[/xyz/openbmc_project/logging/entry/2]:
[Timestamp]: 1521738334637
- [Message]: xyz.openbmc_project.Inventory.Error.Nonfunctional
+ [Message]:
+ xyz.openbmc_project.Inventory.Error.Nonfunctional
[/xyz/openbmc_project/logging/entry/1]:
[Timestamp]: 1521738300696
- [Message]: xyz.openbmc_project.Inventory.Error.Nonfunctional
+ [Message]:
+ xyz.openbmc_project.Inventory.Error.Nonfunctional
[/xyz/openbmc_project/logging/entry/4]:
[Timestamp]: 1521738337915
- [Message]: xyz.openbmc_project.Inventory.Error.Nonfunctional
+ [Message]:
+ xyz.openbmc_project.Inventory.Error.Nonfunctional
Another example call using a robot list:
${error_logs}= Get Error Logs
diff --git a/lib/obmc_boot_test.py b/lib/obmc_boot_test.py
index 8b6040a..97461c1 100755
--- a/lib/obmc_boot_test.py
+++ b/lib/obmc_boot_test.py
@@ -37,7 +37,7 @@
# DB_Logging
program_pid = os.getpid()
master_pid = os.environ.get('AUTOBOOT_MASTER_PID', program_pid)
-pgm_name = re.sub('\.py$', '', os.path.basename(__file__))
+pgm_name = re.sub('\\.py$', '', os.path.basename(__file__))
# Set up boot data structures.
boot_table = create_boot_table()
@@ -327,8 +327,8 @@
repo_bin_path = robot_pgm_dir_path.replace("/lib/", "/bin/")
# If we can't find process_plug_in_packages.py, ssh_pw or
# validate_plug_ins.py, then we don't have our repo bin in PATH.
- shell_rc, out_buf = gc.cmd_fnc_u("which process_plug_in_packages.py" +
- " ssh_pw validate_plug_ins.py", quiet=1,
+ shell_rc, out_buf = gc.cmd_fnc_u("which process_plug_in_packages.py"
+ + " ssh_pw validate_plug_ins.py", quiet=1,
print_output=0, show_err=0)
if shell_rc != 0:
os.environ['PATH'] = repo_bin_path + ":" + os.environ.get('PATH', "")
@@ -421,8 +421,8 @@
valid_boot_list(boot_list, valid_boot_types)
valid_boot_list(boot_stack, valid_boot_types)
- selected_PDU_boots = list(set(boot_list + boot_stack) &
- set(boot_lists['PDU_reboot']))
+ selected_PDU_boots = list(set(boot_list + boot_stack)
+ & set(boot_lists['PDU_reboot']))
if len(selected_PDU_boots) > 0 and pdu_host == "":
error_message = "You have selected the following boots which" +\
@@ -480,12 +480,12 @@
if transitional_boot_selected and not boot_success:
prior_boot = next_boot
boot_candidate = boot_stack.pop()
- gp.qprint_timen("The prior '" + next_boot + "' was chosen to" +
- " transition to a valid state for '" + boot_candidate +
- "' which was at the top of the boot_stack. Since" +
- " the '" + next_boot + "' failed, the '" +
- boot_candidate + "' has been removed from the stack" +
- " to avoid and endless failure loop.")
+ gp.qprint_timen("The prior '" + next_boot + "' was chosen to"
+ + " transition to a valid state for '" + boot_candidate
+ + "' which was at the top of the boot_stack. Since"
+ + " the '" + next_boot + "' failed, the '"
+ + boot_candidate + "' has been removed from the stack"
+ + " to avoid and endless failure loop.")
if len(boot_stack) == 0:
return ""
@@ -509,10 +509,10 @@
if not skip_boot_printed:
gp.qprint_var(stack_mode)
gp.qprintn()
- gp.qprint_timen("Skipping the following boot tests" +
- " which are unnecessary since their" +
- " required end states match the" +
- " current machine state:")
+ gp.qprint_timen("Skipping the following boot tests"
+ + " which are unnecessary since their"
+ + " required end states match the"
+ + " current machine state:")
skip_boot_printed = 1
gp.qprint_var(boot_candidate)
boot_candidate = ""
@@ -522,16 +522,16 @@
gp.qprint_dashes()
return boot_candidate
if st.compare_states(state, boot_table[boot_candidate]['start']):
- gp.qprint_timen("The machine state is valid for a '" +
- boot_candidate + "' boot test.")
+ gp.qprint_timen("The machine state is valid for a '"
+ + boot_candidate + "' boot test.")
gp.qprint_dashes()
gp.qprint_var(boot_stack)
gp.qprint_dashes()
return boot_candidate
else:
- gp.qprint_timen("The machine state does not match the required" +
- " starting state for a '" + boot_candidate +
- "' boot test:")
+ gp.qprint_timen("The machine state does not match the required"
+ + " starting state for a '" + boot_candidate
+ + "' boot test:")
gp.qprint_varx("boot_table[" + boot_candidate + "][start]",
boot_table[boot_candidate]['start'], 1)
boot_stack.append(boot_candidate)
@@ -550,14 +550,14 @@
boot_candidates.append(boot_candidate)
if len(boot_candidates) == 0:
- gp.qprint_timen("The user's boot list contained no boot tests" +
- " which are valid for the current machine state.")
+ gp.qprint_timen("The user's boot list contained no boot tests"
+ + " which are valid for the current machine state.")
boot_candidate = default_power_on
if not st.compare_states(state, boot_table[default_power_on]['start']):
boot_candidate = default_power_off
boot_candidates.append(boot_candidate)
- gp.qprint_timen("Using default '" + boot_candidate +
- "' boot type to transition to valid state.")
+ gp.qprint_timen("Using default '" + boot_candidate
+ + "' boot type to transition to valid state.")
gp.dprint_var(boot_candidates)
@@ -621,8 +621,7 @@
# Combine the files from plug_in_ffdc_list with the ffdc_file_list passed
# in. Eliminate duplicates and sort the list.
- ffdc_file_list = list(set(ffdc_file_list + plug_in_ffdc_list))
- ffdc_file_list.sort()
+ ffdc_file_list = sorted(set(ffdc_file_list + plug_in_ffdc_list))
if status_file_path != "":
ffdc_file_list.insert(0, status_file_path)
@@ -681,10 +680,10 @@
call_point='ffdc', stop_on_plug_in_failure=0)
AUTOBOOT_FFDC_PREFIX = os.environ['AUTOBOOT_FFDC_PREFIX']
- status, ffdc_file_list = grk.run_key_u("FFDC ffdc_prefix=" +
- AUTOBOOT_FFDC_PREFIX +
- " ffdc_function_list=" +
- ffdc_function_list, ignore=1)
+ status, ffdc_file_list = grk.run_key_u("FFDC ffdc_prefix="
+ + AUTOBOOT_FFDC_PREFIX
+ + " ffdc_function_list="
+ + ffdc_function_list, ignore=1)
if status != 'PASS':
gp.qprint_error("Call to ffdc failed.\n")
@@ -820,12 +819,12 @@
gp.qprintn()
if boot_status == "PASS":
boot_success = 1
- completion_msg = gp.sprint_timen("BOOT_SUCCESS: \"" + next_boot +
- "\" succeeded.")
+ completion_msg = gp.sprint_timen("BOOT_SUCCESS: \"" + next_boot
+ + "\" succeeded.")
else:
boot_success = 0
- completion_msg = gp.sprint_timen("BOOT_FAILED: \"" + next_boot +
- "\" failed.")
+ completion_msg = gp.sprint_timen("BOOT_FAILED: \"" + next_boot
+ + "\" failed.")
# Set boot_end_time for use by plug-ins.
boot_end_time = completion_msg[1:33]
@@ -894,7 +893,7 @@
# Get the parm_value if it was saved on the stack.
try:
parm_value = save_stack.pop(parm_name)
- except:
+ except BaseException:
# If it was not saved, no further action is required.
continue
diff --git a/lib/openbmc_ffdc.py b/lib/openbmc_ffdc.py
index 9370847..eaca19f 100644
--- a/lib/openbmc_ffdc.py
+++ b/lib/openbmc_ffdc.py
@@ -50,8 +50,8 @@
return ffdc_file_list
if state['uptime'] == "":
- gp.print_error("BMC is not communicating. Terminating FFDC" +
- " collection.\n")
+ gp.print_error("BMC is not communicating. Terminating FFDC"
+ + " collection.\n")
return ffdc_file_list
gp.qprint_timen("Collecting FFDC.")
@@ -69,9 +69,9 @@
grp.rqpissuing_keyword(cmd_buf)
status, output = BuiltIn().run_keyword_and_ignore_error(*cmd_buf)
if status != "PASS":
- error_message = grp.sprint_error_report("Create Directory failed" +
- " with the following" +
- " error:\n" + output)
+ error_message = grp.sprint_error_report("Create Directory failed"
+ + " with the following"
+ + " error:\n" + output)
BuiltIn().fail(error_message)
# FFDC_FILE_PATH is used by Header Message.
@@ -80,12 +80,11 @@
status, ffdc_file_list = grk.run_key("Header Message")
status, ffdc_file_sub_list = \
- grk.run_key_u("Call FFDC Methods ffdc_function_list=" +
- ffdc_function_list)
+ grk.run_key_u("Call FFDC Methods ffdc_function_list="
+ + ffdc_function_list)
# Combine lists, remove duplicates and sort.
- ffdc_file_list = list(set(ffdc_file_list + ffdc_file_sub_list))
- ffdc_file_list.sort()
+ ffdc_file_list = sorted(set(ffdc_file_list + ffdc_file_sub_list))
gp.qprint_timen("Finished collecting FFDC.")
diff --git a/lib/openbmc_ffdc_list.py b/lib/openbmc_ffdc_list.py
index b3b031b..ca56263 100755
--- a/lib/openbmc_ffdc_list.py
+++ b/lib/openbmc_ffdc_list.py
@@ -129,7 +129,7 @@
FFDC_METHOD_CALL = {
'BMC LOGS':
{
- # Description Keyword name
+ # Description Keyword name
'FFDC Generic Report': 'BMC FFDC Manifest',
'BMC Specific Files': 'BMC FFDC Files',
'Get Request FFDC': 'BMC FFDC Get Requests',
@@ -148,134 +148,134 @@
class openbmc_ffdc_list():
def get_ffdc_bmc_cmd(self, i_type):
r"""
- ########################################################################
+ #######################################################################
# @brief This method returns the list from the dictionary for cmds
# @param i_type: @type string: string index lookup
# @return List of key pair from the dictionary
- ########################################################################
+ #######################################################################
"""
return FFDC_BMC_CMD[i_type].items()
def get_ffdc_bmc_file(self, i_type):
r"""
- ########################################################################
+ #######################################################################
# @brief This method returns the list from the dictionary for scp
# @param i_type: @type string: string index lookup
# @return List of key pair from the dictionary
- ########################################################################
+ #######################################################################
"""
return FFDC_BMC_FILE[i_type].items()
def get_ffdc_get_request(self, i_type):
r"""
- ########################################################################
+ #######################################################################
# @brief This method returns the list from the dictionary for scp
# @param i_type: @type string: string index lookup
# @return List of key pair from the dictionary
- ########################################################################
+ #######################################################################
"""
return FFDC_GET_REQUEST[i_type].items()
def get_ffdc_cmd_index(self):
r"""
- ########################################################################
+ #######################################################################
# @brief This method returns the list index from dictionary
# @return List of index to the dictionary
- ########################################################################
+ #######################################################################
"""
return FFDC_BMC_CMD.keys()
def get_ffdc_get_request_index(self):
r"""
- ########################################################################
+ #######################################################################
# @brief This method returns the list index from dictionary
# @return List of index to the dictionary
- ########################################################################
+ #######################################################################
"""
return FFDC_GET_REQUEST.keys()
def get_ffdc_file_index(self):
r"""
- ########################################################################
+ #######################################################################
# @brief This method returns the list index from dictionary
# @return List of index to the dictionary
- ########################################################################
+ #######################################################################
"""
return FFDC_BMC_FILE.keys()
def get_ffdc_method_index(self):
r"""
- ########################################################################
+ #######################################################################
# @brief This method returns the key pair from the dictionary
# @return Index of the method dictionary
- ########################################################################
+ #######################################################################
"""
return FFDC_METHOD_CALL.keys()
def get_ffdc_method_desc(self,
index):
r"""
- ########################################################################
+ #######################################################################
# @brief This method returns the just the keys from the dictionary.
# @return List of ffdc descriptions.
- ########################################################################
+ #######################################################################
"""
return FFDC_METHOD_CALL[index].keys()
def get_ffdc_method_call(self, i_type):
r"""
- ########################################################################
+ #######################################################################
# @brief This method returns the key pair from the dictionary
# @return List of key pair keywords
- ########################################################################
+ #######################################################################
"""
return FFDC_METHOD_CALL[i_type].items()
def get_ffdc_os_all_distros_index(self):
r"""
- ########################################################################
+ #######################################################################
# @brief This method returns the key pair from the dictionary
# @return Index of the method dictionary
- ########################################################################
+ #######################################################################
"""
return FFDC_OS_ALL_DISTROS_FILE.keys()
def get_ffdc_os_all_distros_call(self, i_type):
r"""
- ########################################################################
+ #######################################################################
# @brief This method returns the key pair from the dictionary
# @return List of key pair keywords
- ########################################################################
+ #######################################################################
"""
return FFDC_OS_ALL_DISTROS_FILE[i_type].items()
def get_ffdc_os_distro_index(self, distro):
r"""
- ########################################################################
+ #######################################################################
# @brief This method returns the key pair from the dictionary
# @return Index of the method dictionary
- ########################################################################
+ #######################################################################
"""
distro_file = "FFDC_OS_" + str(distro).upper() + "_FILE"
return eval(distro_file).keys()
def get_ffdc_os_distro_call(self, i_type, distro):
r"""
- ########################################################################
+ #######################################################################
# @brief This method returns the key pair from the dictionary
# @return List of key pair keywords
- ########################################################################
+ #######################################################################
"""
distro_file = "FFDC_OS_" + str(distro).upper() + "_FILE"
return eval(distro_file)[i_type].items()
def get_strip_string(self, i_str):
r"""
- ########################################################################
+ #######################################################################
# @brief Returns the stripped strings
# @param i_str: @type string: string name
# @return Remove all special chars and return the string
- ########################################################################
+ #######################################################################
"""
return ''.join(e for e in i_str if e.isalnum())
diff --git a/lib/pythonutil.py b/lib/pythonutil.py
index dd23168..3fd6ffb 100644
--- a/lib/pythonutil.py
+++ b/lib/pythonutil.py
@@ -4,7 +4,7 @@
def calcDottedNetmask(mask):
bits = 0
- for i in xrange(32-mask, 32):
+ for i in xrange(32 - mask, 32):
bits |= (1 << i)
packed_value = pack('!I', bits)
addr = inet_ntoa(packed_value)
diff --git a/lib/state.py b/lib/state.py
index cddcf79..d078483 100755
--- a/lib/state.py
+++ b/lib/state.py
@@ -536,8 +536,8 @@
# wait_until_keyword_succeeds to ensure a non-blank value is obtained.
remote_cmd_buf = "read uptime filler 2>/dev/null < /proc/uptime" +\
" && [ ! -z \"${uptime}\" ] && echo ${uptime}"
- cmd_buf = ["BMC Execute Command", re.sub(r'\$', '\$', remote_cmd_buf),
- 'quiet=1']
+ cmd_buf = ["BMC Execute Command",
+ re.sub(r'\\$', '\\$', remote_cmd_buf), 'quiet=1']
if not quiet:
grp.rpissuing_keyword(cmd_buf)
grp.rpissuing(remote_cmd_buf)
@@ -592,7 +592,7 @@
for url_path in ret_values:
for attr_name in ret_values[url_path]:
# Create a state key value based on the attr_name.
- if type(ret_values[url_path][attr_name]) is unicode:
+ if isinstance(ret_values[url_path][attr_name], unicode):
ret_values[url_path][attr_name] = \
re.sub(r'.*\.', "",
ret_values[url_path][attr_name])
@@ -783,9 +783,9 @@
alt_text = "cease to "
else:
alt_text = ""
- gp.print_timen("Checking every " + str(interval) + " for up to " +
- str(wait_time) + " for the state of the machine to " +
- alt_text + "match the state shown below.")
+ gp.print_timen("Checking every " + str(interval) + " for up to "
+ + str(wait_time) + " for the state of the machine to "
+ + alt_text + "match the state shown below.")
gp.print_var(match_state)
if quiet:
@@ -864,7 +864,7 @@
# a reboot has indeed occurred (vs random network instability giving a
# false positive. We also use wait_state because the BMC may take a short
# while to be ready to process SSH requests.
- match_state = DotDict([('uptime', '^[0-9\.]+$'),
+ match_state = DotDict([('uptime', '^[0-9\\.]+$'),
('epoch_seconds', '^[0-9]+$')])
state = wait_state(match_state, wait_time="2 mins", interval="1 second")
@@ -877,8 +877,8 @@
if int(float(state['uptime'])) < elapsed_boot_time:
uptime = state['uptime']
gp.qprint_var(uptime)
- gp.qprint_timen("The uptime is less than the elapsed boot time," +
- " as expected.")
+ gp.qprint_timen("The uptime is less than the elapsed boot time,"
+ + " as expected.")
else:
error_message = "The uptime is greater than the elapsed boot time," +\
" which is unexpected:\n" +\
diff --git a/lib/state_map.py b/lib/state_map.py
index 191de65..a54ea6b 100644
--- a/lib/state_map.py
+++ b/lib/state_map.py
@@ -104,8 +104,8 @@
BootProgress and OperatingSystemState.
"""
- status, state = keyword.run_key("Read Properties " +
- var.SYSTEM_STATE_URI + "enumerate")
+ status, state = keyword.run_key("Read Properties "
+ + var.SYSTEM_STATE_URI + "enumerate")
bmc_state = state[var.SYSTEM_STATE_URI + 'bmc0']['CurrentBMCState']
chassis_state = \
state[var.SYSTEM_STATE_URI + 'chassis0']['CurrentPowerState']
@@ -125,9 +125,10 @@
Validate a given set of states is valid.
Description of argument(s):
- boot_type Boot type (e.g. off/running/host booted etc.)
- state_set State set
- (e.g.bmc,chassis,host,BootProgress,OperatingSystemState)
+ boot_type Boot type (e.g. off/running/host booted
+ etc.)
+ state_set State set (e.g.bmc,chassis,host,
+ BootProgress,OperatingSystemState)
"""
if state_set in set(VALID_BOOT_STATES[boot_type]):
diff --git a/lib/tally_sheet.py b/lib/tally_sheet.py
index 7e6c7ed..76a2673 100755
--- a/lib/tally_sheet.py
+++ b/lib/tally_sheet.py
@@ -271,7 +271,7 @@
first_rec = next(iter(self.__table.items()))
for row_key, value in first_rec[1].items():
field_num += 1
- if type(value) is int:
+ if isinstance(value, int):
align = ':>'
else:
align = ':<'
diff --git a/lib/utilities.py b/lib/utilities.py
index 8f23b33..ce8fa3b 100755
--- a/lib/utilities.py
+++ b/lib/utilities.py
@@ -60,15 +60,15 @@
################################################################
def get_inventory_list(module_name):
- l = []
+ inventory_list = []
m = imp.load_source('module.name', module_name)
for i in m.ID_LOOKUP['FRU']:
s = m.ID_LOOKUP['FRU'][i]
s = s.replace('<inventory_root>', m.INVENTORY_ROOT)
- l.append(s)
+ inventory_list.append(s)
- return l
+ return inventory_list
################################################################
@@ -80,15 +80,15 @@
# /org/openbmc/inventory//system/chassis/motherboard/cpu1]
################################################################
def get_inventory_fru_type_list(module_name, fru):
- l = []
+ inventory_list = []
m = imp.load_source('module.name', module_name)
for i in m.FRU_INSTANCES.keys():
if m.FRU_INSTANCES[i]['fru_type'] == fru:
s = i.replace('<inventory_root>', m.INVENTORY_ROOT)
- l.append(s)
+ inventory_list.append(s)
- return l
+ return inventory_list
################################################################
@@ -100,7 +100,7 @@
# /org/openbmc/inventory/system/chassis/motherboard/dimm1]
################################################################
def get_vpd_inventory_list(module_name, fru):
- l = []
+ inventory_list = []
m = imp.load_source('module.name', module_name)
for i in m.ID_LOOKUP['FRU_STR']:
@@ -108,9 +108,9 @@
if m.FRU_INSTANCES[x]['fru_type'] == fru:
s = x.replace('<inventory_root>', m.INVENTORY_ROOT)
- l.append(s)
+ inventory_list.append(s)
- return l
+ return inventory_list
def call_keyword(keyword):
diff --git a/lib/wrap_utils.py b/lib/wrap_utils.py
index 2f4ee62..5513b07 100755
--- a/lib/wrap_utils.py
+++ b/lib/wrap_utils.py
@@ -85,7 +85,7 @@
base_arg_default_list = list(base_arg_list)
for ix in range(num_non_defaults, len(base_arg_default_list)):
base_default_ix = ix - num_non_defaults
- if type(base_default_list[base_default_ix]) is str:
+ if isinstance(base_default_list[base_default_ix], str):
default_string = "'" + base_default_list[base_default_ix] + "'"
# Convert "\n" to "\\n".
default_string = default_string.replace("\n", "\\n")
@@ -97,8 +97,8 @@
# Create the argument string which can be used to call the base function.
# Example call_arg_string:
# headers=headers, last=last, first=first
- call_arg_string = ', '.join([val + "=" + val for val in base_arg_list] +
- var_args)
+ call_arg_string = ', '.join([val + "=" + val for val in base_arg_list]
+ + var_args)
# Compose the result values.
func_def_line = "def " + wrap_func_name + "(" + base_arg_default_string +\
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..eef2f84
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,3 @@
+[pycodestyle]
+ignore = E402,W503
+max-line-length = 110
diff --git a/syslib/utils_os.py b/syslib/utils_os.py
index 10ebc19..5e6ef9c 100755
--- a/syslib/utils_os.py
+++ b/syslib/utils_os.py
@@ -12,6 +12,7 @@
import bmc_ssh_utils
import var_funcs
+
def get_os_release_info():
r"""
diff --git a/tools/github_issues_to_csv b/tools/github_issues_to_csv
index 224bad2..c432772 100644
--- a/tools/github_issues_to_csv
+++ b/tools/github_issues_to_csv
@@ -66,11 +66,11 @@
# Multiple requests are required if response is paged
if 'link' in response.headers:
- pages = {rel[6:-1]: url[url.index('<')+1:-1] for url, rel in
+ pages = {rel[6:-1]: url[url.index('<') + 1:-1] for url, rel in
(link.split(';') for link in
response.headers['link'].split(','))}
while 'last' in pages and 'next' in pages:
- pages = {rel[6:-1]: url[url.index('<')+1:-1] for url, rel in
+ pages = {rel[6:-1]: url[url.index('<') + 1:-1] for url, rel in
(link.split(';') for link in
response.headers['link'].split(','))}
response = requests.get(pages['next'], auth=auth)
@@ -106,8 +106,8 @@
csvfilename = ""
for repository in args.repositories:
csvfilename_temp = '{}'.format(repository.replace('/', '-'))
- csvfilename = csvfilename+csvfilename_temp
-csvfilename = csvfilename+'-issues.csv'
+ csvfilename = csvfilename + csvfilename_temp
+csvfilename = csvfilename + '-issues.csv'
with open(csvfilename, 'wb') as csvfileout:
csv_out = csv.writer(csvfileout)
csv_out.writerow(['Labels', 'Title', 'State', 'Open Date',
diff --git a/tools/oem/ibm/gen_csv_results.py b/tools/oem/ibm/gen_csv_results.py
index ae9aab8..a2a6735 100755
--- a/tools/oem/ibm/gen_csv_results.py
+++ b/tools/oem/ibm/gen_csv_results.py
@@ -123,13 +123,16 @@
folder.
Description of argument(s):
- xml_file_path The path to a Robot-generated output.xml file.
- csv_dir_path The path to the directory that is to contain the .csv files
- generated by this function.
- version_id Version of the openbmc firmware
- (e.g. "v2.1-215-g6e7eacb").
- platform Platform of the openbmc system.
- level Release level of the OpenBMC system (e.g. "OBMC920").
+ xml_file_path The path to a Robot-generated output.xml
+ file.
+ csv_dir_path The path to the directory that is to
+ contain the .csv files generated by
+ this function.
+ version_id Version of the openbmc firmware
+ (e.g. "v2.1-215-g6e7eacb").
+ platform Platform of the openbmc system.
+ level Release level of the OpenBMC system
+ (e.g. "OBMC920").
"""
result = ExecutionResult(xml_file_path)
@@ -174,7 +177,7 @@
l_func_area = ""
# System data from XML meta data
- #l_system_info = get_system_details(xml_file_path)
+ # l_system_info = get_system_details(xml_file_path)
# First let us try to collect information from keyboard input
# If keyboard input cannot give both information, then find from xml file.
@@ -190,7 +193,8 @@
l_platform_type = l_system_info[1]
# Driver version id and platform are mandatorily required for CSV file
- # generation. If any one is not avaulable, exit CSV file generation process.
+ # generation. If any one is not avaulable, exit CSV file generation
+ # process.
if l_driver and l_platform_type:
print "Driver and system info set."
else:
@@ -249,8 +253,9 @@
and return it.
Description of argument(s):
- datetime The date in the following format: %Y%m%d %H:%M:%S.%f
- (This is the format typically found in an XML file.)
+ datetime The date in the following format: %Y%m%d
+ %H:%M:%S.%f (This is the format
+ typically found in an XML file.)
The date returned will be in the following format: %Y-%m-%d-%H-%M-%S
"""
@@ -268,7 +273,8 @@
The list returned will be in the following order: [driver,platform]
Description of argument(s):
- xml_file_path The relative or absolute path to the output.xml file.
+ xml_file_path The relative or absolute path to the
+ output.xml file.
"""
bmc_version_id = ""