blob: d5ba53f3a0e699bef3bc58e95357765616de01c0 [file] [log] [blame]
Rahul Maheshwari38b3d722020-04-06 00:43:34 -05001*** Settings ***
2Documentation This suite tests Vital Product Data (VPD) via busctl command.
Rahul Maheshwari83b2f102020-12-02 05:39:50 -06003... Before running this suite, create a data/vpd_data.py file with
4... all VPD data to verify from system.
5...
6... #!/usr/bin/python
7... VPD_DETAILS = {
8... "/system/chassis/motherboard": {
9... "DR": "SYSTEM BACKPLANE",
10... "LocationCode": "ABCD.EF1.1234567-P0",
11... "PN": "PN12345",
12... "SN": "SN1234567890",
13... },
14... "/system/chassis/motherboard/base_op_panel_blyth": {
15... "DR": "CEC OP PANEL",
16... "LocationCode": "ABCD.EF1.1234567-D0",
17... "PN": "PN12345",
18... "SN": "SN1234567890",
19... }
20... }
Rahul Maheshwari38b3d722020-04-06 00:43:34 -050021
22Variables ../../data/vpd_data.py
23Resource ../../lib/openbmc_ffdc.robot
24
25Test Teardown FFDC On Test Case Fail
26
27
28*** Variables ***
29
30${CMD_INVENTORY_PREFIX} busctl get-property xyz.openbmc_project.Inventory.Manager
31... /xyz/openbmc_project/inventory
32
33
34*** Test Cases ***
35
Rahul Maheshwari83b2f102020-12-02 05:39:50 -060036Verify Vital Product Data
Rahul Maheshwari38b3d722020-04-06 00:43:34 -050037 [Documentation] Verify VPD via busctl command.
Rahul Maheshwari83b2f102020-12-02 05:39:50 -060038 [Tags] Verify_Vital_Product_Data
Rahul Maheshwari38b3d722020-04-06 00:43:34 -050039
Rahul Maheshwari83b2f102020-12-02 05:39:50 -060040 ${components}= Get Dictionary Keys ${VPD_DETAILS}
41 FOR ${component} IN @{components}
42 Verify VPD Via Busctl ${component}
43 END
Rahul Maheshwari38b3d722020-04-06 00:43:34 -050044
45
46*** Keywords ***
47
48Verify VPD Via Busctl
49 [Documentation] Verify VPD details via busctl.
50 [Arguments] ${component}
51
52 # Description of argument(s):
53 # component VPD component (e.g. /system/chassis/motherboard/vdd_vrm1).
54
55 # Verify Location code
56 ${busctl_output}= BMC Execute Command
57 ... ${CMD_INVENTORY_PREFIX}${component} com.ibm.ipzvpd.Location LocationCode
58 Should Be Equal ${busctl_output[0].split('"')[1].strip('"')}
59 ... ${VPD_DETAILS['${component}']['LocationCode']}
60
61 # Verify PrettyName
62 ${busctl_output}= BMC Execute Command
63 ... ${CMD_INVENTORY_PREFIX}${component} xyz.openbmc_project.Inventory.Item PrettyName
Rahul Maheshwari2ab8e052020-10-28 00:07:12 -050064 Should Contain ${busctl_output[0].split('"')[1].strip('"')}
Rahul Maheshwari38b3d722020-04-06 00:43:34 -050065 ... ${VPD_DETAILS['${component}']['DR']}
66
67 # Verify Part Number
68 ${busctl_output}= BMC Execute Command
69 ... ${CMD_INVENTORY_PREFIX}${component} xyz.openbmc_project.Inventory.Decorator.Asset PartNumber
70 Should Be Equal ${busctl_output[0].split('"')[1].strip('"')}
71 ... ${VPD_DETAILS['${component}']['PN']}
72
73 # Verify Serial Number
74 ${busctl_output}= BMC Execute Command
75 ... ${CMD_INVENTORY_PREFIX}${component} xyz.openbmc_project.Inventory.Decorator.Asset SerialNumber
76 Should Be Equal ${busctl_output[0].split('"')[1].strip('"')}
77 ... ${VPD_DETAILS['${component}']['SN']}