Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation This testsuite is for testing inventory |
| 3 | Suite Teardown Delete All Sessions |
| 4 | Resource ../lib/rest_client.robot |
| 5 | Resource ../lib/utils.robot |
George Keishing | d55a4be | 2016-08-26 03:28:17 -0500 | [diff] [blame] | 6 | Resource ../lib/openbmc_ffdc.robot |
George Keishing | 1d5ec74 | 2016-09-02 05:29:14 -0500 | [diff] [blame] | 7 | Resource ../lib/boot/boot_resource_master.robot |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 8 | Library ../lib/utilities.py |
| 9 | Library String |
| 10 | Library Collections |
Gunnar Mills | eac1af2 | 2016-11-14 15:30:09 -0600 | [diff] [blame] | 11 | Test Teardown FFDC On Test Case Fail |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 12 | |
| 13 | Variables ../data/variables.py |
| 14 | |
| 15 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 16 | Suite setup setup the suite |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 17 | |
George Keishing | 9aa0f65 | 2016-11-08 03:28:56 -0600 | [diff] [blame] | 18 | Force Tags chassisboot inventory |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 19 | |
| 20 | *** Test Cases *** |
| 21 | |
| 22 | minimal cpu inventory |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 23 | ${count} = Get Total Present cpu |
| 24 | Should Be True ${count}>${0} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 25 | |
| 26 | minimal dimm inventory |
Rahul Maheshwari | bb20f73 | 2016-10-24 06:27:14 -0500 | [diff] [blame] | 27 | [Tags] minimal_dimm_inventory |
| 28 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 29 | ${count} = Get Total Present dimm |
| 30 | Should Be True ${count}>=${2} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 31 | |
| 32 | minimal core inventory |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 33 | ${count} = Get Total Present core |
| 34 | Should Be True ${count}>${0} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 35 | |
| 36 | minimal memory buffer inventory |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 37 | [Tags] minimal_memory_buffer_inventory |
| 38 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 39 | ${count} = Get Total Present membuf |
| 40 | Should Be True ${count}>${0} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 41 | |
| 42 | minimal fan inventory |
George Keishing | 8c0a4e5 | 2016-09-27 11:21:50 -0500 | [diff] [blame] | 43 | [Tags] minimal_fan_inventory |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 44 | ${count} = Get Total Present fan |
| 45 | Should Be True ${count}>${2} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 46 | |
| 47 | minimal main planar inventory |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 48 | [Tags] minimal_main_planar_inventory |
| 49 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 50 | ${count} = Get Total Present motherboard |
| 51 | Should Be True ${count}>${0} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 52 | |
| 53 | minimal system inventory |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 54 | [Tags] minimal_system_inventory |
| 55 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 56 | ${count} = Get Total Present system |
| 57 | Should Be True ${count}>${0} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 58 | |
| 59 | Verify CPU VPD Properties |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 60 | Verify Properties CPU |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 61 | |
| 62 | Verify DIMM VPD Properties |
Rahul Maheshwari | bb20f73 | 2016-10-24 06:27:14 -0500 | [diff] [blame] | 63 | [Tags] Verify_DIMM_VPD_Properties |
| 64 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 65 | Verify Properties DIMM |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 66 | |
| 67 | Verify Memory Buffer VPD Properties |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 68 | Verify Properties MEMORY_BUFFER |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 69 | |
| 70 | Verify Fan VPD Properties |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 71 | Verify Properties FAN |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 72 | |
| 73 | Verify System VPD Properties |
George Keishing | 8c0a4e5 | 2016-09-27 11:21:50 -0500 | [diff] [blame] | 74 | [Tags] Verify_System_VPD_Properties |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 75 | Verify Properties SYSTEM |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 76 | |
| 77 | |
| 78 | *** Keywords *** |
| 79 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 80 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 81 | Setup The Suite |
| 82 | BMC Power On |
| 83 | |
| 84 | ${resp} = Read Properties /org/openbmc/inventory/enumerate |
| 85 | Set Suite Variable ${SYSTEM_INFO} ${resp} |
| 86 | log Dictionary ${resp} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 87 | |
| 88 | Get Total Present |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 89 | [arguments] ${type} |
| 90 | ${l} = Create List [] |
| 91 | ${resp} = Get Dictionary Keys ${SYSTEM_INFO} |
| 92 | ${list} = Get Matches ${resp} regexp=^.*[0-9a-z_].${type}[0-9]*$ |
| 93 | : FOR ${element} IN @{list} |
| 94 | \ Append To List ${l} ${SYSTEM_INFO['${element}']['present']} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 95 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 96 | ${sum} = Get Count ${l} True |
| 97 | [return] ${sum} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 98 | |
| 99 | Verify Properties |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 100 | [arguments] ${type} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 101 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 102 | ${list} = Get VPD Inventory List ${OPENBMC_MODEL} ${type} |
| 103 | : FOR ${element} IN @{list} |
| 104 | \ ${d} = Get From Dictionary ${SYSTEM_INFO} ${element} |
| 105 | \ Run Keyword If ${d['present']} == True Verify Present Properties ${d} ${type} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 106 | |
| 107 | Verify Present Properties |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 108 | [arguments] ${d} ${type} |
| 109 | ${keys} = Get Dictionary Keys ${d} |
| 110 | Log List ${keys} |
| 111 | Log List ${INVENTORY_ITEMS['${type}']} |
| 112 | Lists Should Be Equal ${INVENTORY_ITEMS['${type}']} ${keys} |