Pldm automation fix
Change-Id: Ib0740f2d511b5978ca171746e24e63a2b580dcab
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
diff --git a/data/pldm_variables.py b/data/pldm_variables.py
index d140c29..f3f8ce9 100755
--- a/data/pldm_variables.py
+++ b/data/pldm_variables.py
@@ -96,7 +96,6 @@
'PDRHeaderVersion': [1],
'PDRType': ['State Effecter PDR'],
'recordChangeNumber': [0],
- 'PLDMTerminusHandle': [0, 1, 2],
'effecterID': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
'entityType': ['Virtual Machine Manager', 'System chassis (main enclosure)',
'System Firmware', 'Processor Module', '32801(OEM)',
@@ -113,7 +112,6 @@
'PDRType': ['FRU Record Set PDR'],
'recordChangeNumber': [0],
'dataLength': [10],
- 'PLDMTerminusHandle': [0, 2],
'entityType': ['System Board', 'Chassis front panel board (control panel)',
'Management Controller', 'OEM', 'Power converter',
'System (logical)', 'System chassis (main enclosure)',
@@ -142,9 +140,8 @@
'PDRHeaderVersion': [1],
'PDRType': ['Terminus Locator PDR'],
'recordChangeNumber': [0],
- 'PLDMTerminusHandle': [1],
'validity': ['valid'],
- 'TID': [1, 208],
+ 'TID': [0, 1, 208],
'containerID': [0, 1],
'terminusLocatorType': ['MCTP_EID'],
'terminusLocatorValueSize': [1]}
@@ -153,7 +150,6 @@
'PDRHeaderVersion': [1],
'PDRType': ['Numeric Effecter PDR'],
'recordChangeNumber': [0],
- 'PLDMTerminusHandle': [0, 1],
'entityInstanceNumber': [0, 1],
'containerID': [0],
'effecterSemanticID': [0],
@@ -190,21 +186,5 @@
'PLDM_TERMINUS_LOCATOR_PDR': 'Terminus Locator PDR',
'PLDM_COMPACT_NUMERIC_SENSOR_PDR': '21'}
-RESPONSE_LIST_GETBIOSTABLE_STRTABLE = [
- 'Allowed', 'Disabled', 'Enabled', 'IPv4DHCP', 'IPv4Static', 'Not Allowed',
- 'Perm', 'Temp', 'pvm_fw_boot_side', 'pvm_inband_code_update', 'pvm_os_boot_side',
- 'pvm_pcie_error_inject', 'pvm_surveillance', 'pvm_system_name', 'vmi_hostname',
- 'vmi_if_count', 'vmi_if0_ipv4_ipaddr', 'vmi_if0_ipv4_method',
- 'vmi_if0_ipv4_prefix_length', 'vmi_if1_ipv4_ipaddr', 'vmi_if1_ipv4_method',
- 'vmi_if1_ipv4_prefix_length']
-
-
-RESPONSE_LIST_GETBIOSTABLE_ATTRTABLE = [
- 'pvm_fw_boot_side', 'pvm_inband_code_update', 'pvm_os_boot_side',
- 'pvm_pcie_error_inject', 'pvm_surveillance', 'pvm_system_name', 'vmi_hostname',
- 'vmi_if_count', 'vmi_if0_ipv4_ipaddr', 'vmi_if0_ipv4_method',
- 'vmi_if0_ipv4_prefix_length', 'vmi_if1_ipv4_ipaddr', 'vmi_if1_ipv4_method',
- 'vmi_if1_ipv4_prefix_length']
-
RESPONSE_LIST_GETBIOSTABLE_ATTRVALTABLE = [
'BIOSString', 'BIOSInteger', 'BIOSEnumeration']
diff --git a/lib/pldm_utils.py b/lib/pldm_utils.py
index 661e8ab..bcd5282 100755
--- a/lib/pldm_utils.py
+++ b/lib/pldm_utils.py
@@ -161,6 +161,10 @@
data = string.ascii_uppercase + string.digits
attr_random_value = ''.join(random.choice(data) for _ in range(int(count)))
+ elif 'mfg_flags' in attr_name:
+ data = string.ascii_uppercase + string.digits
+ attr_random_value = ''.join(random.choice(data) for _ in range(int(count)))
+
else:
attr_random_value = random.randint(0, int(count))
return attr_random_value
diff --git a/pldm/test_pldm_bios.robot b/pldm/test_pldm_bios.robot
index f3b5788..bde9106 100755
--- a/pldm/test_pldm_bios.robot
+++ b/pldm/test_pldm_bios.robot
@@ -70,62 +70,6 @@
${pldm_output}= Pldmtool ${cmd_set_time}
-Verify GetBIOSTable For StringTable
-
- [Documentation] Verify GetBIOSTable for table type string table.
- [Tags] Verify_GetBIOSTable_For_StringTable
-
- # Example pldm_output:
- # [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
-
- ${pldm_output}= Pldmtool bios GetBIOSTable --type StringTable
- @{keys}= Get Dictionary Keys ${pldm_output}
- ${string_list}= Create List
- FOR ${key} IN @{keys}
- Append To List ${string_list} ${pldm_output['${key}']}
- END
- Valid List string_list required_values=${RESPONSE_LIST_GETBIOSTABLE_ATTRTABLE}
-
-
-Verify GetBIOSTable For AttributeTable
-
- [Documentation] Verify if attribute table content exist for
- ... GetBIOSTable with table type attribute table.
- [Tags] Verify_GetBIOSTable_For_AttributeTable
-
- # Example pldm_output:
- # [pldm_attributetable]: True
- # [attributehandle]: 0
- # [ AttributeNameHandle]: 20(vmi-if1-ipv4-method)
- # [ attributetype]: BIOSStringReadOnly
- # [ StringType]: 0x01
- # [ minimumstringlength]: 1
- # [ maximumstringlength]: 100
- # [ defaultstringlength]: 15
-
- ${count}= Get Length ${attr_table_data}
- ${attr_list}= Create List
- FOR ${i} IN RANGE ${count}
- ${data}= Set Variable ${attr_table_data}[${i}][AttributeNameHandle]
- ${sub_string}= Get Substring ${data} 3 -1
- Append To List ${attr_list} ${sub_string}
- END
- Valid List attr_list required_values=${RESPONSE_LIST_GETBIOSTABLE_ATTRTABLE}
-
-
Verify GetBIOSTable For AttributeValueTable
[Documentation] Verify if attribute value table content exist for