Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 1 | *** Settings *** |
Sridevi Ramesh | 206173d | 2016-08-16 05:41:40 -0500 | [diff] [blame] | 2 | Documentation This suite is for Verifying BMC & BIOS version exposed part |
| 3 | ... of system inventory |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 4 | |
| 5 | Resource ../lib/rest_client.robot |
George Keishing | d55a4be | 2016-08-26 03:28:17 -0500 | [diff] [blame] | 6 | Resource ../lib/openbmc_ffdc.robot |
George Keishing | ab5157b | 2017-02-09 12:24:25 -0600 | [diff] [blame] | 7 | Resource ../lib/connection_client.robot |
George Keishing | 0a1044c | 2017-08-09 09:50:51 -0500 | [diff] [blame] | 8 | Resource ../lib/code_update_utils.robot |
Gunnar Mills | eac1af2 | 2016-11-14 15:30:09 -0600 | [diff] [blame] | 9 | Test Teardown FFDC On Test Case Fail |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 10 | |
| 11 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 12 | *** Test Cases *** |
George Keishing | ab5157b | 2017-02-09 12:24:25 -0600 | [diff] [blame] | 13 | |
George Keishing | 0a1044c | 2017-08-09 09:50:51 -0500 | [diff] [blame] | 14 | BMC Software Version |
| 15 | [Documentation] Verify BMC version and activation status. |
| 16 | [Tags] BMC_Software_Version |
| 17 | [Template] Verify Software Version |
| 18 | |
| 19 | # Software Version Purpose |
| 20 | ${VERSION_PURPOSE_BMC} |
| 21 | |
| 22 | Host Software Version |
| 23 | [Documentation] Verify host version and activation status. |
| 24 | [Tags] Host_Software_Version |
| 25 | [Template] Verify Software Version |
| 26 | |
| 27 | # Software Version Purpose |
| 28 | ${VERSION_PURPOSE_HOST} |
George Keishing | ab5157b | 2017-02-09 12:24:25 -0600 | [diff] [blame] | 29 | |
| 30 | |
| 31 | *** Keywords *** |
| 32 | |
George Keishing | 0a1044c | 2017-08-09 09:50:51 -0500 | [diff] [blame] | 33 | Verify Software Version |
| 34 | [Documentation] Verify version and activation status. |
| 35 | [Arguments] ${software_purpose} |
George Keishing | ab5157b | 2017-02-09 12:24:25 -0600 | [diff] [blame] | 36 | |
George Keishing | 0a1044c | 2017-08-09 09:50:51 -0500 | [diff] [blame] | 37 | # Description of argument(s): |
| 38 | # software_purpose BMC or host software purpose. |
| 39 | |
| 40 | # Example: |
| 41 | # /xyz/openbmc_project/software/list |
| 42 | # [ |
| 43 | # "/xyz/openbmc_project/software/2f974579", |
| 44 | # "/xyz/openbmc_project/software/136cf504" |
| 45 | # ] |
| 46 | ${obj_list}= Get Software Objects ${software_purpose} |
| 47 | : FOR ${index} IN @{obj_list} |
| 48 | \ ${resp}= Get Host Software Property ${index} |
| 49 | \ Verify Software Properties ${resp} ${software_purpose} |
George Keishing | ab5157b | 2017-02-09 12:24:25 -0600 | [diff] [blame] | 50 | |
| 51 | |
| 52 | Verify Software Properties |
George Keishing | 0a1044c | 2017-08-09 09:50:51 -0500 | [diff] [blame] | 53 | [Documentation] Verify the software object properties. |
| 54 | [Arguments] ${software_property} ${software_purpose} |
George Keishing | ab5157b | 2017-02-09 12:24:25 -0600 | [diff] [blame] | 55 | |
George Keishing | 0a1044c | 2017-08-09 09:50:51 -0500 | [diff] [blame] | 56 | # Description of argument(s): |
| 57 | # software_property JSON response data. |
| 58 | # software_purpose BMC or host software purpose |
| 59 | # (e.g. "xyz.openbmc_project.Software.Version.VersionPurpose.BMC" |
| 60 | # "xyz.openbmc_project.Software.Version.VersionPurpose.Host"). |
| 61 | |
| 62 | Check Activation Status ${software_property["Activation"]} |
| 63 | Run Keyword If '${software_purpose}' == '${VERSION_PURPOSE_BMC}' |
| 64 | ... Check BMC Version ${software_property["Version"]} |
George Keishing | ab5157b | 2017-02-09 12:24:25 -0600 | [diff] [blame] | 65 | |
| 66 | |
| 67 | Check BMC Version |
| 68 | [Documentation] Get BMC version from /etc/os-release and compare. |
| 69 | [Arguments] ${version} |
George Keishing | 0a1044c | 2017-08-09 09:50:51 -0500 | [diff] [blame] | 70 | |
| 71 | # Description of argument(s): |
George Keishing | ab5157b | 2017-02-09 12:24:25 -0600 | [diff] [blame] | 72 | # version Software version (e.g. "v1.99.2-107-g2be34d2-dirty") |
George Keishing | 0a1044c | 2017-08-09 09:50:51 -0500 | [diff] [blame] | 73 | |
George Keishing | ab5157b | 2017-02-09 12:24:25 -0600 | [diff] [blame] | 74 | Open Connection And Log In |
| 75 | ${cmd}= Set Variable grep ^VERSION_ID= /etc/os-release | cut -f 2 -d '=' |
| 76 | ${output}= Execute Command On BMC ${cmd} |
| 77 | Should Be Equal As Strings ${version} ${output[1:-1]} |
| 78 | |
| 79 | |
| 80 | Check Activation Status |
| 81 | [Documentation] Check if software state is "Active". |
| 82 | [Arguments] ${status} |
George Keishing | 0a1044c | 2017-08-09 09:50:51 -0500 | [diff] [blame] | 83 | |
| 84 | # Description of argument(s): |
George Keishing | ab5157b | 2017-02-09 12:24:25 -0600 | [diff] [blame] | 85 | # status Activation status |
| 86 | # (e.g. "xyz.openbmc_project.Software.Activation.Activations.Active") |
| 87 | Should Be Equal As Strings ${ACTIVE} ${status} |