Rahul Maheshwari | d2a2018 | 2019-07-30 00:55:27 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Module to test IPMI management controller ID functionality. |
| 4 | Resource ../lib/ipmi_client.robot |
| 5 | Resource ../lib/openbmc_ffdc.robot |
| 6 | Variables ../data/ipmi_raw_cmd_table.py |
| 7 | |
| 8 | Test Teardown FFDC On Test Case Fail |
| 9 | |
George Keishing | 87dc442 | 2023-10-20 12:56:30 +0530 | [diff] [blame] | 10 | Force Tags IPMI_MC_ID |
Rahul Maheshwari | d2a2018 | 2019-07-30 00:55:27 -0500 | [diff] [blame] | 11 | |
| 12 | *** Variables *** |
| 13 | |
| 14 | ${new_mc_id}= HOST |
| 15 | |
| 16 | |
| 17 | *** Test Cases *** |
| 18 | |
| 19 | Verify Get And Set Management Controller ID String |
| 20 | [Documentation] Verify get and set management controller ID string. |
| 21 | [Tags] Verify_Get_And_Set_Management_Controller_ID_String |
| 22 | # Get the value of the managemment controller ID string. |
| 23 | # Example: |
| 24 | # Get Management Controller Identifier String: witherspoon |
| 25 | |
Rahul Maheshwari | ceb282e | 2019-09-16 00:11:41 -0500 | [diff] [blame] | 26 | ${cmd_output}= Wait Until Keyword Succeeds 15 sec 5 sec |
| 27 | ... Run IPMI Standard Command dcmi get_mc_id_string |
Rahul Maheshwari | d2a2018 | 2019-07-30 00:55:27 -0500 | [diff] [blame] | 28 | |
| 29 | # Extract management controller ID from cmd_output. |
| 30 | ${initial_mc_id}= Fetch From Right ${cmd_output} :${SPACE} |
| 31 | |
| 32 | # Set the management controller ID string to other value. |
| 33 | # Example: |
| 34 | # Set Management Controller Identifier String Command: HOST |
| 35 | |
| 36 | Set Management Controller ID String ${new_mc_id} |
| 37 | |
| 38 | # Get the management controller ID and verify. |
| 39 | Get Management Controller ID String And Verify ${new_mc_id} |
| 40 | |
| 41 | # Set the value back to the initial value and verify. |
| 42 | Set Management Controller ID String ${initial_mc_id} |
| 43 | |
| 44 | # Get the management controller ID and verify. |
| 45 | Get Management Controller ID String And Verify ${initial_mc_id} |
| 46 | |
| 47 | |
| 48 | Test Management Controller ID String Status via IPMI |
| 49 | [Documentation] Test management controller ID string status via IPMI. |
| 50 | [Tags] Test_Management_Controller_ID_String_Status_via_IPMI |
| 51 | # Disable management controller ID string status via IPMI and verify. |
| 52 | Run IPMI Standard Command dcmi set_conf_param dhcp_config 0x00 |
| 53 | Verify Management Controller ID String Status disable |
| 54 | |
| 55 | # Enable management controller ID string status via IPMI and verify. |
| 56 | Run IPMI Standard Command dcmi set_conf_param dhcp_config 0x01 |
| 57 | Verify Management Controller ID String Status enable |
| 58 | |
| 59 | |
| 60 | Test Management Controller ID String Status via Raw IPMI |
| 61 | [Documentation] Test management controller ID string status via IPMI. |
| 62 | [Tags] Test_Management_Controller_ID_String_Status_via_Raw_IPMI |
| 63 | # Disable management controller ID string status via raw IPMI and verify. |
| 64 | Run IPMI Standard Command raw ${IPMI_RAW_CMD['conf_param']['Disabled'][0]} |
| 65 | Verify Management Controller ID String Status disable |
| 66 | |
| 67 | # Enable management controller ID string status via raw IPMI and verify. |
| 68 | Run IPMI Standard Command raw ${IPMI_RAW_CMD['conf_param']['Enabled'][0]} |
| 69 | Verify Management Controller ID String Status enable |
| 70 | |
| 71 | |
| 72 | *** Keywords *** |
| 73 | |
| 74 | Set Management Controller ID String |
| 75 | [Documentation] Set the management controller ID string. |
| 76 | [Arguments] ${string} |
| 77 | |
| 78 | # Description of argument(s): |
| 79 | # string Management Controller ID String to be set |
| 80 | |
| 81 | ${set_mc_id_string}= Run IPMI Standard Command |
| 82 | ... dcmi set_mc_id_string ${string} |
| 83 | |
| 84 | |
| 85 | Get Management Controller ID String And Verify |
| 86 | [Documentation] Get the management controller ID string. |
| 87 | [Arguments] ${string} |
| 88 | |
| 89 | # Description of argument(s): |
| 90 | # string Management Controller ID string |
| 91 | |
| 92 | ${get_mc_id}= Run IPMI Standard Command dcmi get_mc_id_string |
| 93 | Should Contain ${get_mc_id} ${string} |
| 94 | ... msg=Command failed: get_mc_id. |
| 95 | |
| 96 | |
| 97 | Verify Management Controller ID String Status |
| 98 | [Documentation] Verify management controller ID string status via IPMI. |
| 99 | [Arguments] ${status} |
| 100 | |
| 101 | # Example of dcmi get_conf_param command output: |
| 102 | # DHCP Discovery method : |
| 103 | # Management Controller ID String is disabled |
| 104 | # Vendor class identifier DCMI IANA and Vendor class-specific Informationa are disabled |
| 105 | # Initial timeout interval : 4 seconds |
| 106 | # Server contact timeout interval : 120 seconds |
| 107 | # Server contact retry interval : 64 seconds |
| 108 | |
| 109 | ${resp}= Run IPMI Standard Command dcmi get_conf_param |
| 110 | ${resp}= Get Lines Containing String ${resp} |
| 111 | ... Management Controller ID String case_insensitive=True |
| 112 | Should Contain ${resp} ${status} |
| 113 | ... msg=Management controller ID string is not ${status} |