Collect the BMC dump if exists during FFDC collection.
Resolves openbmc/openbmc-test-automation#981
Change-Id: I4c1490333fa8e0701e682e56894f0d496dd4c16d
Signed-off-by: Sweta Potthuri <spotthur@in.ibm.com>
diff --git a/lib/openbmc_ffdc_list.py b/lib/openbmc_ffdc_list.py
index c260740..376d50d 100755
--- a/lib/openbmc_ffdc_list.py
+++ b/lib/openbmc_ffdc_list.py
@@ -106,6 +106,8 @@
ENUMERATE_CONTROL = OPENBMC_BASE + 'control/enumerate'
ENUMERATE_STATE = OPENBMC_BASE + 'state/enumerate'
ENUMERATE_OCC = OPENPOWER_BASE + 'control/enumerate'
+ENUMERATE_DUMPS = OPENBMC_BASE + 'dumps/enumerate'
+
# Add file name and correcponding Get Request
FFDC_GET_REQUEST = {
'GET REQUESTS':
@@ -119,6 +121,7 @@
'BMC_led': ENUMERATE_LED,
'BMC_state': ENUMERATE_STATE,
'OCC_state': ENUMERATE_OCC,
+ 'BMC_dumps': ENUMERATE_DUMPS,
},
}
# Define your keywords in method/utils and call here
@@ -133,6 +136,8 @@
'Core Files': 'SCP Coredump Files',
'SEL Log': 'Collect eSEL Log',
'Sys Inventory Files': 'System Inventory Files',
+ 'Dump Log': 'Collect Dump Log',
+ 'Dump Files': 'SCP Dump Files'
},
}
# -----------------------------------------------------------------
@@ -267,3 +272,15 @@
"""
index = [i for i, str in enumerate(esel_list) if 'ESEL=' in str]
return index[0]
+
+ def get_dump_index(self, dump_list):
+ r"""
+ #######################################################################
+ # @brief Returns the eSEL binary index.
+ # @param esel_ist: @type list: eSEL list.
+ # @return Index of "ESEL=" in the list.
+ #######################################################################
+ """
+ index = [i for i, str in enumerate(dump_list) if 'DUMP=' in str]
+ return index[0]
+