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 |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 23 | ${count}= Get Total Present cpu |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 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 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 29 | ${count}= Get Total Present dimm |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 30 | Should Be True ${count}>=${2} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 31 | |
| 32 | minimal core inventory |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 33 | ${count}= Get Total Present core |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 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 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 39 | ${count}= Get Total Present membuf |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 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 |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 44 | ${count}= Get Total Present fan |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 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 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 50 | ${count}= Get Total Present motherboard |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 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 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 56 | ${count}= Get Total Present system |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 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 | |
George Keishing | ec80737 | 2016-12-05 03:54:51 -0600 | [diff] [blame] | 84 | ${resp}= Read Properties ${INVENTORY_URI}enumerate |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 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 |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 89 | [Arguments] ${type} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 90 | ${l}= Create List [] |
| 91 | ${resp}= Get Dictionary Keys ${SYSTEM_INFO} |
| 92 | ${list}= Get Matches ${resp} regexp=^.*[0-9a-z_].${type}[0-9]*$ |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 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 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 96 | ${sum}= Get Count ${l} True |
Gunnar Mills | c9ea936 | 2016-12-13 16:21:13 -0600 | [diff] [blame] | 97 | [Return] ${sum} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 98 | |
| 99 | Verify Properties |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 100 | [Arguments] ${type} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 101 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 102 | ${list}= Get VPD Inventory List ${OPENBMC_MODEL} ${type} |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 103 | : FOR ${element} IN @{list} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 104 | \ ${d}= Get From Dictionary ${SYSTEM_INFO} ${element} |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 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 |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 108 | [Arguments] ${d} ${type} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 109 | ${keys}= Get Dictionary Keys ${d} |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 110 | Log List ${keys} |
| 111 | Log List ${INVENTORY_ITEMS['${type}']} |
| 112 | Lists Should Be Equal ${INVENTORY_ITEMS['${type}']} ${keys} |