Update new PDR type info for pldm platform subsytem.

Change-Id: I27b09c132c7dcfdd2c07fc11406b357ad8c1bc22
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
diff --git a/data/pldm_variables.py b/data/pldm_variables.py
index 4995c1d..7b5297a 100755
--- a/data/pldm_variables.py
+++ b/data/pldm_variables.py
@@ -118,7 +118,7 @@
     'datalength': ['10'],
     'pldmterminushandle': ['0', '2'],
     'entitytype': ['System Board', 'Chassis front panel board (control panel)',
-                   'Management Controller', '208(OEM)', 'Power converter',
+                   'Management Controller', 'OEM', 'Power converter',
                    'System (logical)', 'System chassis (main enclosure)',
                    'Chassis front panel board (control panel)',
                    'Processor Module', 'Memory Module'],
@@ -137,7 +137,9 @@
 PLDM_PDR_TYPES = {
     'PLDM_STATE_EFFECTER_PDR': '11',
     'PLDM_PDR_FRU_RECORD_SET': '20',
-    'PLDM_PDR_ENTITY_ASSOCIATION': '15'}
+    'PLDM_PDR_ENTITY_ASSOCIATION': '15',
+    'PLDM_STATE_SENSOR_PDR': '4',
+    'PLDM_NUMERIC_EFFECTER_PDR': '9'}
 
 RESPONSE_LIST_GETBIOSTABLE_STRTABLE = [
     'Allowed', 'Disabled', 'Enabled', 'IPv4DHCP', 'IPv4Static', 'Not Allowed',
diff --git a/lib/pldm_utils.py b/lib/pldm_utils.py
index 7aec8c0..ea41125 100644
--- a/lib/pldm_utils.py
+++ b/lib/pldm_utils.py
@@ -93,6 +93,13 @@
             dict_data1, dict_data2 = vf.split_dict_on_key('containerentitycontainerid', result)
             return dict_data1
 
+        elif 'entitytype' in result:
+            # Example :
+            # entityType: 24576(OEM)
+            # Note: OEM type number is dynamic
+            if 'OEM' in result['entitytype']:
+                result['entitytype'] = 'OEM'
+
         # Collect bios strings from bios string table in to list.
         # Example output for pldmtool GetBIOSTable --type stringTable
         # PLDM StringTable:
diff --git a/pldm/test_pldm_platform.robot b/pldm/test_pldm_platform.robot
index 7b04003..d2f1662 100644
--- a/pldm/test_pldm_platform.robot
+++ b/pldm/test_pldm_platform.robot
@@ -26,6 +26,7 @@
        ${record_handle}=  Set Variable  ${next_record_handle}
     END
 
+
 Verify SetStateEffecterStates
     [Documentation]  Verify set state effecter states response message.
     [Tags]  Verify_SetStateEffecterStates
@@ -74,12 +75,21 @@
     ${pldm_cmd}=  Evaluate  $CMD_GETPDR % ${record_handle}
     ${pldm_output}=  Pldmtool  ${pldm_cmd}
     Rprint Vars  pldm_output
+    # Note: Output of GetPDR type 'PLDM_NUMERIC_EFFECTER_PDR' has dynamic content
+    #       hence just checking pdrtype only
+    #       GetPDR type 'PLDM_STATE_SENSOR_PDR' Dev implementation is still in progress
+    #       TODO: Verify output of GetPDR type 'PLDM_STATE_SENSOR_PDR'
     Run Keyword If  ${pldm_output['pdrtype']} == ${PLDM_PDR_TYPES['PLDM_STATE_EFFECTER_PDR']}
     ...  Valid Dict  pldm_output  valid_values=${RESPONSE_DICT_GETPDR_SETSTATEEFFECTER}
     ...  ELSE IF  ${pldm_output['pdrtype']} == ${PLDM_PDR_TYPES['PLDM_PDR_FRU_RECORD_SET']}
     ...  Valid Dict  pldm_output  valid_values=${RESPONSE_DICT_GETPDR_FRURECORDSETIDENTIFIER}
     ...  ELSE IF  ${pldm_output['pdrtype']} == ${PLDM_PDR_TYPES['PLDM_PDR_ENTITY_ASSOCIATION']}
     ...  Valid Dict  pldm_output  valid_values=${RESPONSE_DICT_GETPDR_PDRENTITYASSOCIATION}
+    ...  ELSE IF  ${pldm_output['pdrtype']} == ${PLDM_PDR_TYPES['PLDM_NUMERIC_EFFECTER_PDR']}
+    ...  Log To Console  "Found PDR Type - PLDM_NUMERIC_EFFECTER_PDR"
+    ...  ELSE IF  ${pldm_output['pdrtype']} == ${PLDM_PDR_TYPES['PLDM_STATE_SENSOR_PDR']}
+    ...  Log To Console  "Found PDR Type - PLDM_STATE_SENSOR_PDR"
+    ...  ELSE  Fail  msg="Unknown PDR Type is received"
 
     Should be equal as strings  ${pldm_output['recordhandle']}  ${record_handle}
     [Return]  ${pldm_output['nextrecordhandle']}
@@ -97,7 +107,7 @@
     #                      e.g. '1 1'.
 
     # Example output:
-    # SetStateEffecterStates ]: SUCCESS
+    # [SetStateEffecterStates ]: SUCCESS
 
     ${pldm_cmd}=  Evaluate  $CMD_SETSTATEEFFECTERSTATES % (${effecter_handle}, ${count}, ${effecter_states})
     ${pldm_output}=  Pldmtool  ${pldm_cmd}
@@ -108,4 +118,4 @@
     [Documentation]    Reset BMC at suite cleanup.
 
     Redfish Hard Power Off
-    Redfish OBMC Reboot (off)
+    Redfish Power On