Automation of pldmtool bios GetBIOSTable test cases.

    - verification part for GetBIOSTable for table type 'StringTable'.
    - Add TCs for GetBIOSTable for table type 'AttributeTable' and
      'AttributeValueTable'.

Change-Id: I2a5220ac9b518daec54407292ee0d2adb3061731
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
diff --git a/lib/pldm_utils.py b/lib/pldm_utils.py
index dd0a91f..99fa3ff 100644
--- a/lib/pldm_utils.py
+++ b/lib/pldm_utils.py
@@ -93,6 +93,34 @@
             dict_data1, dict_data2 = vf.split_dict_on_key('containerentitycontainerid', result)
             return dict_data1
 
+        # Collect bios strings from bios string table in to list.
+        # Example output for pldmtool GetBIOSTable --type stringTable
+        # PLDM StringTable:
+        # BIOSStringHandle : BIOSString
+        # 0 : Allowed
+        # 1 : Disabled
+        # 2 : Enabled
+        elif 'pldm_stringtable' in result:
+            result.pop('pldm_stringtable')
+            result.pop('biosstringhandle')
+            bios_string_list = []
+            for data in result:
+                bios_string_list.append(result[data])
+            # Example for bios_string_list:
+            # bios_string_list = ['Allowed', 'Disabled', 'Enabled']
+            return bios_string_list
+
+        # Check if parameter pldm_attributetable/pldm_attributevaluetable present for
+        # pldmtool GetBIOSTable --type AttributeTable/AttributeValueTable.
+        # Note: Ouput for AttributeTable/AttributeValueTable is huge and verification of
+        #       table content is not available.
+        elif 'pldm_attributetable' in result:
+            result['pldm_attributetable'] = True
+            return result
+        elif 'pldm_attributevaluetable' in result:
+            result['pldm_attributevaluetable'] = True
+            return result
+
         return result
 
     return stdout