OS FFDC for all linux distributions
This commit contains the following ffdc functions that will be run on all linux distros:
OS_msglog
OS_cpufrequency
OS_dmesg
OS_boot
Later I will add functions for specific linux distros (i.e. ubuntu, rhel)
Change-Id: I7460459e2c42818b8322f0d88d76a5d0e7beb524
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/lib/openbmc_ffdc_methods.robot b/lib/openbmc_ffdc_methods.robot
index 5c4b9cf..6bdf5e8 100755
--- a/lib/openbmc_ffdc_methods.robot
+++ b/lib/openbmc_ffdc_methods.robot
@@ -5,6 +5,7 @@
Resource openbmc_ffdc_utils.robot
Resource rest_client.robot
+
*** Keywords ***
################################################################
@@ -160,3 +161,27 @@
@{entries}= Get ffdc get request index
:FOR ${index} IN @{entries}
\ Log FFDC Get Requests ${index}
+
+
+Log OS FFDC
+ [Documentation] Create file in current FFDC log directory.
+ ... Executes OS command and write to
+ ... corresponding file name.
+ [Arguments] ${key_index}
+
+ Open Connection And Log In host=${OS_HOST} username=${OS_USERNAME}
+ ... password=${OS_PASSWORD}
+ @{cmd_list}= get ffdc os all distros call ${key_index}
+ :FOR ${cmd} IN @{cmd_list}
+ \ ${logpath}= Catenate SEPARATOR= ${LOG_PREFIX} ${cmd[0]}
+ \ Execute Command and Write FFDC ${cmd[0]} ${cmd[1]} ${logpath}
+
+
+OS FFDC
+ [Documentation] Get the command list and iterate
+
+ Return From Keyword If '${OS_HOST}' == '${EMPTY}'
+ ... No OS Host Provided
+ @{entries}= Get ffdc os all distros index
+ :FOR ${index} IN @{entries}
+ \ Log OS FFDC ${index}