Rahul Maheshwari | d4d43fc | 2019-06-24 00:54:19 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Module to test IPMI chipher functionality. |
| 3 | Resource ../lib/ipmi_client.robot |
| 4 | Resource ../lib/openbmc_ffdc.robot |
| 5 | Library ../lib/ipmi_utils.py |
George Keishing | 45511e8 | 2019-10-15 01:26:55 -0500 | [diff] [blame] | 6 | Library ../lib/var_funcs.py |
Rahul Maheshwari | d4d43fc | 2019-06-24 00:54:19 -0500 | [diff] [blame] | 7 | Variables ../data/ipmi_raw_cmd_table.py |
George Keishing | 45511e8 | 2019-10-15 01:26:55 -0500 | [diff] [blame] | 8 | Library String |
Rahul Maheshwari | d4d43fc | 2019-06-24 00:54:19 -0500 | [diff] [blame] | 9 | |
George Keishing | 45511e8 | 2019-10-15 01:26:55 -0500 | [diff] [blame] | 10 | Test Setup Printn |
Rahul Maheshwari | d4d43fc | 2019-06-24 00:54:19 -0500 | [diff] [blame] | 11 | Test Teardown FFDC On Test Case Fail |
| 12 | |
Rahul Maheshwari | d4d43fc | 2019-06-24 00:54:19 -0500 | [diff] [blame] | 13 | *** Test Cases *** |
| 14 | |
George Keishing | 45511e8 | 2019-10-15 01:26:55 -0500 | [diff] [blame] | 15 | Verify Supported Ciphers |
| 16 | [Documentation] Execute all supported ciphers and verify. |
| 17 | [Tags] Verify_Supported_Ciphers |
| 18 | FOR ${cipher} IN @{valid_ciphers} |
| 19 | Run External IPMI Standard Command power status C=${cipher} |
| 20 | END |
Rahul Maheshwari | d4d43fc | 2019-06-24 00:54:19 -0500 | [diff] [blame] | 21 | |
| 22 | |
George Keishing | 45511e8 | 2019-10-15 01:26:55 -0500 | [diff] [blame] | 23 | Verify Unsupported Ciphers |
| 24 | [Documentation] Execute all unsupported ciphers and verify error. |
| 25 | [Tags] Verify_Unsupported_Ciphers |
| 26 | FOR ${cipher} IN @{unsupported_ciphers} |
| 27 | Run Keyword And Expect Error *invalid * algorithm* |
| 28 | ... Run External IPMI Standard Command power status C=${cipher} |
| 29 | END |
Rahul Maheshwari | d4d43fc | 2019-06-24 00:54:19 -0500 | [diff] [blame] | 30 | |
| 31 | |
George Keishing | 45511e8 | 2019-10-15 01:26:55 -0500 | [diff] [blame] | 32 | Verify Supported Ciphers Via Lan Print |
| 33 | [Documentation] Verify supported ciphers via IPMI lan print command. |
| 34 | [Tags] Verify_Supported_Ciphers_Via_Lan_Print |
| 35 | |
| 36 | ${lan_print}= Get Lan Print Dict |
Rahul Maheshwari | d4d43fc | 2019-06-24 00:54:19 -0500 | [diff] [blame] | 37 | # Example 'RMCP+ Cipher Suites' entry: 3,17 |
George Keishing | 45511e8 | 2019-10-15 01:26:55 -0500 | [diff] [blame] | 38 | ${ciphers}= Split String ${lan_print['RMCP+ Cipher Suites']} , |
| 39 | Rprint Vars ciphers |
| 40 | Valid List ciphers valid_values=${valid_ciphers} |
Rahul Maheshwari | d4d43fc | 2019-06-24 00:54:19 -0500 | [diff] [blame] | 41 | |
| 42 | |
| 43 | Verify Supported Cipher Via Getciphers |
George Keishing | fc3d8f1 | 2022-03-24 10:57:31 -0500 | [diff] [blame] | 44 | [Documentation] Verify supported ciphers via IPMI getciphers command. |
Rahul Maheshwari | d4d43fc | 2019-06-24 00:54:19 -0500 | [diff] [blame] | 45 | [Tags] Verify_Supported_Cipher_Via_Getciphers |
Rahul Maheshwari | d4d43fc | 2019-06-24 00:54:19 -0500 | [diff] [blame] | 46 | |
George Keishing | 45511e8 | 2019-10-15 01:26:55 -0500 | [diff] [blame] | 47 | # Example output from 'Channel Getciphers IPMI': |
| 48 | # ipmi_channel_ciphers: |
| 49 | # [0]: |
| 50 | # [id]: 3 |
| 51 | # [iana]: N/A |
| 52 | # [auth_alg]: hmac_sha1 |
| 53 | # [integrity_alg]: hmac_sha1_96 |
| 54 | # [confidentiality_alg]: aes_cbc_128 |
| 55 | # [1]: |
| 56 | # [id]: 17 |
| 57 | # [iana]: N/A |
| 58 | # [auth_alg]: hmac_sha256 |
| 59 | # [integrity_alg]: sha256_128 |
| 60 | # [confidentiality_alg]: aes_cbc_128 |
Rahul Maheshwari | d4d43fc | 2019-06-24 00:54:19 -0500 | [diff] [blame] | 61 | |
George Keishing | 45511e8 | 2019-10-15 01:26:55 -0500 | [diff] [blame] | 62 | ${ipmi_channel_ciphers}= Channel Getciphers IPMI |
| 63 | # Example cipher entry: 3 17 |
| 64 | Rprint Vars ipmi_channel_ciphers |
| 65 | ${ipmi_channel_cipher_ids}= Nested Get id ${ipmi_channel_ciphers} |
| 66 | Rpvars ipmi_channel_cipher_ids |
| 67 | Valid List ipmi_channel_cipher_ids valid_values=${valid_ciphers} |