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