1*** Settings *** 2Documentation This suite tests System Vital Product Data (VPD) using vpdtool. 3 4Library ../../lib/vpd_utils.py 5Variables ../../data/vpd_variables.py 6 7Resource ../../lib/openbmc_ffdc.robot 8Resource ../../lib/boot_utils.robot 9Resource ../../lib/vpd_tool_resource.robot 10 11Test Teardown FFDC On Test Case Fail 12 13Test Tags VPD_Tool 14 15*** Variables *** 16 17${CMD_GET_PROPERTY_INVENTORY} busctl get-property xyz.openbmc_project.Inventory.Manager 18 19*** Test Cases *** 20 21Verify System VPD Data Via Vpdtool 22 [Documentation] Verify the system VPD details via vpdtool output. 23 [Tags] Verify_System_VPD_Data_Via_Vpdtool 24 [Template] Verify VPD Data Via Vpdtool 25 26 # Component Field 27 System Model 28 System SerialNumber 29 System LocationCode 30 31 32Verify VPD Component Read 33 [Documentation] Verify details of all VPD component via vpdtool. 34 [Tags] Verify_VPD_Component_Read 35 36 ${vpd_records}= Vpdtool -i 37 ${components}= Get Dictionary Keys ${vpd_records} 38 FOR ${component} IN @{components} 39 Verify VPD Component Read Operation ${component} 40 END 41 42 43Verify VPD Field Read 44 [Documentation] Verify reading VPD field value via vpdtool. 45 [Tags] Verify_VPD_Field_Read 46 47 ${vpd_records}= Vpdtool -i 48 ${components}= Get Dictionary Keys ${vpd_records} 49 FOR ${component} IN @{components} 50 # Drive component field values response in ascii format 51 # due to that skipping here. 52 IF 'drive' in '${component}' 53 CONTINUE 54 ELSE 55 Verify VPD Field Read Operation ${component} 56 END 57 END 58 59 60Verify VPD Field Write 61 [Documentation] Verify writing VPD field value via vpdtool. 62 [Tags] Verify_VPD_Field_Write 63 64 # Put system to power off state before VPD write operation. 65 Redfish Power Off stack_mode=skip 66 67 ${components}= Get Dictionary Keys ${VPD_DETAILS} 68 FOR ${component} IN @{components} 69 # VPD fields "DR", "CC" and "FN" will be added later. 70 @{vpd_fields}= Create List SN PN 71 ${field}= Evaluate random.choice($vpd_fields) random 72 Verify VPD Field Write Operation ${component} ${field} 73 END 74