Added additional  bmc ffdc.

Added the following bmc ffdc:
sensor_list
inventory
led
record_log
dmesg
meminfo

Change-Id: Iacde007b7f3107a820ebbc6640abcebc3448bdef
Signed-off-by: Gunnar Mills  <gmills@us.ibm.com>
diff --git a/lib/openbmc_ffdc.robot b/lib/openbmc_ffdc.robot
old mode 100644
new mode 100755
index 0215234..c9440b8
--- a/lib/openbmc_ffdc.robot
+++ b/lib/openbmc_ffdc.robot
@@ -9,6 +9,11 @@
 ...                │   └── 20160909102538035251_TestWarmResetviaREST
 ...                │       ├── 20160909102538035251_BMC_journalctl.log
 ...                │       ├── 20160909102538035251_BMC_proc_list
+...                │       ├── 20160909102538035251_BMC_dmesg
+...                │       ├── 20160909102538035251_BMC_inventory
+...                │       ├── 20160909102538035251_BMC_led
+...                │       ├── 20160909102538035251_BMC_record_log
+...                │       ├── 20160909102538035251_BMC_sensor_list
 ...                │       └── 20160909102538035251_ffdc_report.txt
 ...                └── test_history.txt
 
diff --git a/lib/openbmc_ffdc_list.py b/lib/openbmc_ffdc_list.py
old mode 100644
new mode 100755
index 15cd86f..b367e8b
--- a/lib/openbmc_ffdc_list.py
+++ b/lib/openbmc_ffdc_list.py
@@ -1,5 +1,5 @@
 #!/usr/bin/python
-'''
+r"""
 #############################################################
 #    @file     openbmc_ffdc_list.py
 #
@@ -7,110 +7,159 @@
 #              commands and files to be collected as a part
 #              of the test case failure.
 #############################################################
-'''
+"""
 
-#-------------------
+# -------------------
 # FFDC default list
-#-------------------
+# -------------------
 
-#-----------------------------------------------------------------
-#Dict Name {  Index string : { Key String :  Comand string} }
-#-----------------------------------------------------------------
+# -----------------------------------------------------------------
+# Dict Name {  Index string : { Key String :  Comand string} }
+# -----------------------------------------------------------------
 # Add cmd's needed to be part of the ffdc report manifest file
 FFDC_BMC_CMD = {
-             'DRIVER INFO' :
-                     {
-                        #String Name         Command
-                        'Build Info' : 'cat /etc/version',
-                        'FW Level'   : 'cat /etc/os-release',
-                     },
-             'BMC DATA' :
-                     {
-                        'BMC OS'     : 'uname -a',
-                        'BMC Uptime' : 'uptime',
-                        'BMC Proc Info' : 'cat /proc/cpuinfo',
-                        'BMC File System Disk Space Usage' : 'df -hT',
-                     },
-             'APPLICATION DATA' :
-                     {
-                        'BMC state' : '/usr/sbin/obmcutil  state',
-                     },
-           }
+    'DRIVER INFO':
+    {
+        # String Name         Command
+        'Build Info': 'cat /etc/version',
+        'FW Level': 'cat /etc/os-release',
+    },
+    'BMC DATA':
+    {
+        'BMC OS': 'uname -a',
+        'BMC Uptime': 'uptime',
+        'BMC Proc Info': 'cat /proc/cpuinfo',
+        'BMC Mem Info': 'cat /proc/meminfo',
+        'BMC File System Disk Space Usage': 'df -hT',
+    },
+    'APPLICATION DATA':
+    {
+        'BMC state': '/usr/sbin/obmcutil  state',
+    },
+}
 
 # Add file name and correcponding command needed for BMC
 FFDC_BMC_FILE = {
-             'BMC FILES' :
-                     {
-                        #File Name         Command
-                        'BMC_proc_list' : 'top -n 1 -b',
-                        'BMC_journalctl.log' : 'journalctl --no-pager',
-                     },
-           }
+    'BMC FILES':
+    {
+        # File Name         Command
+        'BMC_proc_list': 'top -n 1 -b',
+        'BMC_journalctl.log': 'journalctl --no-pager',
+        'BMC_dmesg': 'dmesg',
+    },
+}
+
+# Add file name and correcponding Get Request
+FFDC_GET_REQUEST = {
+    'GET REQUESTS':
+    {
+        # File Name         Command
+        'BMC_sensor_list': '/org/openbmc/sensors/enumerate',
+        'BMC_inventory': '/org/openbmc/inventory/system/enumerate',
+        'BMC_led': '/org/openbmc/control/led/enumerate',
+        'BMC_record_log': '/org/openbmc/records/events/enumerate',
+    },
+}
+
 
 # Define your keywords in method/utils and call here
 FFDC_METHOD_CALL = {
-             'BMC LOGS' :
-                     {
-                        #Description             Keyword name 
-                        'FFDC Generic Report' : 'BMC FFDC Manifest',
-                        'BMC Specific Files'  : 'BMC FFDC Files',
-                     },
-           }
+    'BMC LOGS':
+    {
+        # Description             Keyword name
+        'FFDC Generic Report': 'BMC FFDC Manifest',
+        'BMC Specific Files': 'BMC FFDC Files',
+        'Get Request FFDC': 'BMC FFDC Get Requests',
+    },
+}
 
-#-----------------------------------------------------------------
+# -----------------------------------------------------------------
 
 
 # base class for FFDC default list
 class openbmc_ffdc_list():
 
-    ########################################################################
-    #   @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
-    ########################################################################
-    def get_ffdc_bmc_cmd(self,i_type):
+    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()
 
-    ########################################################################
-    #   @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
-    ########################################################################
-    def get_ffdc_bmc_file(self,i_type):
+    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()
 
-    ########################################################################
-    #   @brief    This method returns the list index from dictionary
-    #   @return   List of index to the dictionary
-    ########################################################################
+    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()
 
-    ########################################################################
-    #   @brief    This method returns the list index from dictionary
-    #   @return   List of index to the dictionary
-    ########################################################################
+    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()
 
-    ########################################################################
-    #   @brief    This method returns the key pair from the dictionary
-    #   @return   Index of the method dictionary
-    ########################################################################
     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()
 
-    ########################################################################
-    #   @brief    This method returns the key pair from the dictionary
-    #   @return   List of key pair keywords
-    ########################################################################
-    def get_ffdc_method_call(self,i_type):
+    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()
 
-    ########################################################################
-    #   @brief    Returns the stripped strings
-    #   @param    i_str: @type string: string name
-    #   @return   Remove all special chars and return the string
-    ########################################################################
     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/openbmc_ffdc_methods.robot b/lib/openbmc_ffdc_methods.robot
old mode 100644
new mode 100755
index b3f7e5e..39d2796
--- a/lib/openbmc_ffdc_methods.robot
+++ b/lib/openbmc_ffdc_methods.robot
@@ -134,3 +134,24 @@
     Append To File    ${TEST_HISTORY}
     ...   ${cur_time}:${SUITE_NAME}:${TEST_NAME}:${TEST_STATUS}${\n}
 
+
+Log FFDC Get Requests
+    [Documentation]    Create file in current FFDC log directory.
+    ...                Do openbmc get request and write to
+    ...                corresponding file name.
+    [Arguments]        ${key_index}
+
+    @{cmd_list}=  Get ffdc get request  ${key_index}
+    :FOR  ${cmd}  IN  @{cmd_list}
+    \   ${logpath}=  Catenate  SEPARATOR=  ${LOG_PREFIX}  ${cmd[0]}
+    \   ${resp}=  OpenBMC Get Request  ${cmd[1]}
+    \   ${jsondata}=  to json  ${resp.content}
+    \   Write Data to File  ${jsondata["data"]}${\n}  ${logpath}
+
+
+BMC FFDC Get Requests
+    [Documentation]    Get the command list and iterate
+    Open Connection And Log In
+    @{entries}=  Get ffdc get request index
+    :FOR  ${index}  IN  @{entries}
+    \   Log FFDC Get Requests   ${index}