PLDM: Automate Test Scenarios for pldm commands
- Verify GetPDR
- Verify SetStateEffecterStates
- Verify GetTID
- Verify GetBIOSTable For StringTable
- Verify GetFruRecordTableMetadata
Note: Ouput for GetBIOSTable type stringtable is dynamic
will submit the verification part in the next commit.
Change-Id: I422c2df4485ac25d6ff4183bd51b5ddc6c3bf3cc
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/data/pldm_variables.py b/data/pldm_variables.py
index 1c030b3..d836b4d 100755
--- a/data/pldm_variables.py
+++ b/data/pldm_variables.py
@@ -120,3 +120,70 @@
'''
CMD_SETDATETIME = 'bios SetDateTime -d %s'
+
+
+CMD_GETPDR = 'platform GetPDR -d %s'
+
+'''
+e.g. : SetStateEffecterStates usage
+
+pldmtool platform GetPDR -d <effecterID, requestSet, effecterState>
+
+pldmtool platform SetStateEffecterStates -d 1 1 1
+
+'''
+
+CMD_SETSTATEEFFECTERSTATES = 'platform SetStateEffecterStates -d %s'
+
+# GetPDR parsed response message for record handle.
+# Dictionary value array holds the expected output for record handle 1, 2.
+# e.g. : 'nextrecordhandle': ['0', '2']
+#
+# Note :
+# Record handle - 0 is default & has same behaviour as record handle 1
+# Only record handle 0, 1, 2 are supported as of now.
+
+RESPONSE_DICT_GETPDR = {
+ 'nextrecordhandle': ['0', '2'],
+ 'responsecount': ['29', '30'],
+ 'recordhandle': ['1', '2'],
+ 'pdrheaderversion': ['1'],
+ 'pdrtype': ['11'],
+ 'recordchangenumber': ['0'],
+ 'datalength': ['19', '20'],
+ 'pldmterminushandle': ['0'],
+ 'effecterid': ['1', '2'],
+ 'entitytype': ['33', '45'],
+ 'entityinstancenumber': ['0'],
+ 'containerid': ['0'],
+ 'effectersemanticid': ['0'],
+ 'effecterinit': ['0'],
+ 'effecterdescriptionpdr': ['false'],
+ 'compositeeffectercount': ['1'],
+ 'statesetid': ['196', '260'],
+ 'possiblestatessize': ['1', '2'],
+ 'possiblestates': ['6', '0']}
+
+RESPONSE_DICT_GETFRURECORDTABLEMETADATA = {
+ 'frudatamajorversion': ['1'],
+ 'frudataminorversion': ['0'],
+ 'frutablemaximumsize': ['4294967295'],
+ 'frutablelength': ['60'],
+ 'total_number_of_record_set_identifiers_in_table': ['1'],
+ 'total_number_of_records_in_table': ['1']}
+
+RESPONSE_DICT_GETBIOSTABLE_STRTABLE = {
+ 'biosstringhandle': ['BIOSString'],
+ '0': ['Allowed'],
+ '1': ['Disabled'],
+ '2': ['Enabled'],
+ '3': ['Not Allowed'],
+ '4': ['Perm'],
+ '5': ['Temp'],
+ '6': ['pvm-fw-boot-side'],
+ '7': ['pvm-inband-code-update'],
+ '8': ['pvm-os-boot-side'],
+ '9': ['pvm-pcie-error-inject'],
+ '10': ['pvm-surveillance'],
+ '11': ['pvm-system-name'],
+ '12': ['vmi-if-count']}