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 |
George Keishing | d55a4be | 2016-08-26 03:28:17 -0500 | [diff] [blame] | 11 | Test Teardown Log FFDC |
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 | |
causten | 147f575 | 2016-08-11 16:24:45 -0500 | [diff] [blame] | 18 | Force Tags chassisboot |
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 | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 27 | ${count} = Get Total Present dimm |
| 28 | Should Be True ${count}>=${2} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 29 | |
| 30 | minimal core inventory |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 31 | ${count} = Get Total Present core |
| 32 | Should Be True ${count}>${0} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 33 | |
| 34 | minimal memory buffer inventory |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 35 | ${count} = Get Total Present membuf |
| 36 | Should Be True ${count}>${0} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 37 | |
| 38 | minimal fan inventory |
George Keishing | 8c0a4e5 | 2016-09-27 11:21:50 -0500 | [diff] [blame] | 39 | [Tags] minimal_fan_inventory |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 40 | ${count} = Get Total Present fan |
| 41 | Should Be True ${count}>${2} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 42 | |
| 43 | minimal main planar inventory |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 44 | ${count} = Get Total Present motherboard |
| 45 | Should Be True ${count}>${0} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 46 | |
| 47 | minimal system inventory |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 48 | ${count} = Get Total Present system |
| 49 | Should Be True ${count}>${0} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 50 | |
| 51 | Verify CPU VPD Properties |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 52 | Verify Properties CPU |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 53 | |
| 54 | Verify DIMM VPD Properties |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 55 | Verify Properties DIMM |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 56 | |
| 57 | Verify Memory Buffer VPD Properties |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 58 | Verify Properties MEMORY_BUFFER |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 59 | |
| 60 | Verify Fan VPD Properties |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 61 | Verify Properties FAN |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 62 | |
| 63 | Verify System VPD Properties |
George Keishing | 8c0a4e5 | 2016-09-27 11:21:50 -0500 | [diff] [blame] | 64 | [Tags] Verify_System_VPD_Properties |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 65 | Verify Properties SYSTEM |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 66 | |
| 67 | |
| 68 | *** Keywords *** |
| 69 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 70 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 71 | Setup The Suite |
| 72 | BMC Power On |
| 73 | |
| 74 | ${resp} = Read Properties /org/openbmc/inventory/enumerate |
| 75 | Set Suite Variable ${SYSTEM_INFO} ${resp} |
| 76 | log Dictionary ${resp} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 77 | |
| 78 | Get Total Present |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 79 | [arguments] ${type} |
| 80 | ${l} = Create List [] |
| 81 | ${resp} = Get Dictionary Keys ${SYSTEM_INFO} |
| 82 | ${list} = Get Matches ${resp} regexp=^.*[0-9a-z_].${type}[0-9]*$ |
| 83 | : FOR ${element} IN @{list} |
| 84 | \ Append To List ${l} ${SYSTEM_INFO['${element}']['present']} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 85 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 86 | ${sum} = Get Count ${l} True |
| 87 | [return] ${sum} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 88 | |
| 89 | Verify Properties |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 90 | [arguments] ${type} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 91 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 92 | ${list} = Get VPD Inventory List ${OPENBMC_MODEL} ${type} |
| 93 | : FOR ${element} IN @{list} |
| 94 | \ ${d} = Get From Dictionary ${SYSTEM_INFO} ${element} |
| 95 | \ Run Keyword If ${d['present']} == True Verify Present Properties ${d} ${type} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 96 | |
| 97 | Verify Present Properties |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 98 | [arguments] ${d} ${type} |
| 99 | ${keys} = Get Dictionary Keys ${d} |
| 100 | Log List ${keys} |
| 101 | Log List ${INVENTORY_ITEMS['${type}']} |
| 102 | Lists Should Be Equal ${INVENTORY_ITEMS['${type}']} ${keys} |