OS FFDC for RHEL, Ubuntu, IBM POWERKVM

This commit contains the following ffdc functions:
For Ubuntu:
OS_isusb
OS_kern
OS_authlog
OS_syslog
OS_info

For RHEL:
OS_secure
OS_rsct
OS_syslog
OS_info

For IBM POWERKVM:
OS_secure
OS_syslog
OS_info

Change-Id: I2d435c3f941402ee094d7f07ae0462f4b36125ed
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/lib/openbmc_ffdc_methods.robot b/lib/openbmc_ffdc_methods.robot
index 9bf2b11..ac866e6 100755
--- a/lib/openbmc_ffdc_methods.robot
+++ b/lib/openbmc_ffdc_methods.robot
@@ -67,7 +67,7 @@
 
 
 Execute Command and Write FFDC
-    [Documentation]    Execute command on BMC and write to ffdc
+    [Documentation]    Execute command on BMC or OS and write to ffdc
     ...                By default to ffdc_report.txt file else to
     ...                specified file path.
     [Arguments]        ${key_index}
@@ -163,25 +163,50 @@
     \   Log FFDC Get Requests   ${index}
 
 
-Log OS FFDC
+Log OS ALL DISTROS 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}
 
 
+Log OS SPECIFIC DISTRO FFDC
+    [Documentation]    Create file in current FFDC log directory.
+    ...                Executes OS command and write to
+    ...                corresponding file name.
+    [Arguments]        ${key_index}  ${linux_distro}
+
+    @{cmd_list}=  get ffdc os distro call  ${key_index}  ${linux_distro}
+    :FOR  ${cmd}  IN  @{cmd_list}
+    \   ${logpath}=  Catenate  SEPARATOR=  ${LOG_PREFIX}  ${cmd[0]}
+    \   Execute Command and Write FFDC  ${cmd[0]}  ${cmd[1]}   ${logpath}
+
+
+
 OS FFDC Files
     [Documentation]    Get the command list and iterate
 
     Return From Keyword If  '${OS_HOST}' == '${EMPTY}'
     ...   No OS Host Provided
+    Open Connection And Log In  host=${OS_HOST}  username=${OS_USERNAME}
+    ...   password=${OS_PASSWORD}
+
     @{entries}=  Get ffdc os all distros index
     :FOR  ${index}  IN  @{entries}
-    \   Log OS FFDC  ${index}
+    \   Log OS ALL DISTROS FFDC  ${index}
+
+    ${linux_distro}=  Execute Command
+    ...   . /etc/os-release; echo $ID
+    ...   return_stdout=True  return_stderr=False  return_rc=False
+
+    Return From Keyword If  '${linux_distro}' == '${EMPTY}' or '${linux_distro}' == 'None'
+    ...   Could not determine Linux Distribution
+
+    @{entries}=  Get ffdc os distro index  ${linux_distro}
+    :FOR  ${index}  IN  @{entries}
+    \   Log OS SPECIFIC DISTRO FFDC  ${index}  ${linux_distro}