| Rahul Maheshwari | 38b3d72 | 2020-04-06 00:43:34 -0500 | [diff] [blame] | 1 | *** Settings *** | 
 | 2 | Documentation   This suite tests Vital Product Data (VPD) via busctl command. | 
 | 3 |  | 
 | 4 | Variables       ../../data/vpd_data.py | 
 | 5 | Resource        ../../lib/openbmc_ffdc.robot | 
 | 6 |  | 
 | 7 | Test Teardown   FFDC On Test Case Fail | 
 | 8 |  | 
 | 9 |  | 
 | 10 | *** Variables *** | 
 | 11 |  | 
 | 12 | ${CMD_INVENTORY_PREFIX}  busctl get-property xyz.openbmc_project.Inventory.Manager | 
 | 13 | ...  /xyz/openbmc_project/inventory | 
 | 14 |  | 
 | 15 |  | 
 | 16 | *** Test Cases *** | 
 | 17 |  | 
 | 18 | Verify VPD Data | 
 | 19 |     [Documentation]  Verify VPD via busctl command. | 
 | 20 |     [Tags]  Verify_VPD_Data | 
 | 21 |     [Template]  Verify VPD Via Busctl | 
 | 22 |  | 
 | 23 |     # Component name | 
 | 24 |     /system/chassis/motherboard | 
 | 25 |     /system/chassis/motherboard/base_op_panel_blyth | 
 | 26 |     /system/chassis/motherboard/ebmc_card_bmc | 
 | 27 |     /system/chassis/motherboard/lcd_op_panel_hill | 
 | 28 |     /system/chassis/motherboard/tpm_wilson | 
 | 29 |     /system/chassis/motherboard/vdd_vrm0 | 
 | 30 |     /system/chassis/motherboard/vdd_vrm1 | 
 | 31 |  | 
 | 32 |  | 
 | 33 | *** Keywords *** | 
 | 34 |  | 
 | 35 | Verify VPD Via Busctl | 
 | 36 |     [Documentation]  Verify VPD details via busctl. | 
 | 37 |     [Arguments]  ${component} | 
 | 38 |  | 
 | 39 |     # Description of argument(s): | 
 | 40 |     # component       VPD component (e.g. /system/chassis/motherboard/vdd_vrm1). | 
 | 41 |  | 
 | 42 |     # Verify Location code | 
 | 43 |     ${busctl_output}=  BMC Execute Command | 
 | 44 |     ...  ${CMD_INVENTORY_PREFIX}${component} com.ibm.ipzvpd.Location LocationCode | 
 | 45 |     Should Be Equal  ${busctl_output[0].split('"')[1].strip('"')} | 
 | 46 |     ...  ${VPD_DETAILS['${component}']['LocationCode']} | 
 | 47 |  | 
 | 48 |     # Verify PrettyName | 
 | 49 |     ${busctl_output}=  BMC Execute Command | 
 | 50 |     ...  ${CMD_INVENTORY_PREFIX}${component} xyz.openbmc_project.Inventory.Item PrettyName | 
 | 51 |     Should Be Equal  ${busctl_output[0].split('"')[1].strip('"')} | 
 | 52 |     ...  ${VPD_DETAILS['${component}']['DR']} | 
 | 53 |  | 
 | 54 |     # Verify Part Number | 
 | 55 |     ${busctl_output}=  BMC Execute Command | 
 | 56 |     ...  ${CMD_INVENTORY_PREFIX}${component} xyz.openbmc_project.Inventory.Decorator.Asset PartNumber | 
 | 57 |     Should Be Equal  ${busctl_output[0].split('"')[1].strip('"')} | 
 | 58 |     ...  ${VPD_DETAILS['${component}']['PN']} | 
 | 59 |  | 
 | 60 |     # Verify Serial Number | 
 | 61 |     ${busctl_output}=  BMC Execute Command | 
 | 62 |     ...  ${CMD_INVENTORY_PREFIX}${component} xyz.openbmc_project.Inventory.Decorator.Asset SerialNumber | 
 | 63 |     Should Be Equal  ${busctl_output[0].split('"')[1].strip('"')} | 
 | 64 |     ...  ${VPD_DETAILS['${component}']['SN']} |