ganesanb | ec44d61 | 2023-05-01 18:31:35 +0000 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Module to test dcmi get capabilites functionality. |
| 4 | Resource ../../lib/ipmi_client.robot |
| 5 | |
Matt Fischer | 6fb70d9 | 2023-10-24 19:06:33 -0600 | [diff] [blame^] | 6 | Test Tags DCMI_Get_Capabilities |
George Keishing | 87dc442 | 2023-10-20 12:56:30 +0530 | [diff] [blame] | 7 | |
ganesanb | 1965a49 | 2023-05-25 16:14:13 +0000 | [diff] [blame] | 8 | *** Variables *** |
George Keishing | 87dc442 | 2023-10-20 12:56:30 +0530 | [diff] [blame] | 9 | |
ganesanb | 1965a49 | 2023-05-25 16:14:13 +0000 | [diff] [blame] | 10 | @{slave_address_list} Slave address of device: 0h (8bits)(Satellite/External controller) |
| 11 | ... Slave address of device: 20h (BMC) |
| 12 | |
ganesanb | ec44d61 | 2023-05-01 18:31:35 +0000 | [diff] [blame] | 13 | *** Test Cases *** |
| 14 | |
| 15 | Verify Get DCMI Capabilities |
| 16 | [Documentation] Verify get DCMI capabilities command output. |
| 17 | [Tags] Verify_Get_DCMI_Capabilities |
| 18 | ${cmd_output}= Run IPMI Standard Command dcmi discover |
| 19 | |
| 20 | @{supported_capabilities}= Create List |
| 21 | # Supported DCMI capabilities: |
| 22 | ... Mandatory platform capabilties |
| 23 | ... Optional platform capabilties |
| 24 | ... Power management available |
| 25 | ... Managebility access capabilties |
| 26 | ... In-band KCS channel available |
| 27 | # Mandatory platform attributes: |
| 28 | ... 200 SEL entries |
| 29 | ... SEL automatic rollover is enabled |
| 30 | # Optional Platform Attributes: |
ganesanb | ec44d61 | 2023-05-01 18:31:35 +0000 | [diff] [blame] | 31 | ... Channel number is 0h (Primary BMC) |
| 32 | ... Device revision is 0 |
| 33 | # Manageability Access Attributes: |
ganesanb | 1965a49 | 2023-05-25 16:14:13 +0000 | [diff] [blame] | 34 | ... Primary LAN channel number: ${CHANNEL_NUMBER} is available |
ganesanb | ec44d61 | 2023-05-01 18:31:35 +0000 | [diff] [blame] | 35 | ... Secondary LAN channel is not available for OOB |
| 36 | ... No serial channel is available |
| 37 | |
| 38 | FOR ${capability} IN @{supported_capabilities} |
| 39 | Run Keyword And Continue On Failure Should Contain ${cmd_output} ${capability} ignore_case=True |
| 40 | ... msg=Supported DCMI capabilities not present. |
| 41 | END |
ganesanb | 1965a49 | 2023-05-25 16:14:13 +0000 | [diff] [blame] | 42 | |
| 43 | FOR ${slave_address} IN @{slave_address_list} |
| 44 | ${slave_address_status}= Run Keyword And Return Status |
| 45 | ... Should Contain ${cmd_output} ${slave_address} ignore_case=True |
| 46 | Exit For Loop IF ${slave_address_status} == True |
| 47 | END |
| 48 | |
George Keishing | 87dc442 | 2023-10-20 12:56:30 +0530 | [diff] [blame] | 49 | Run Keyword IF ${slave_address_status} == False Fail msg=Slave address is showing wrongly. |
manimozhik | 3c619b1 | 2023-11-08 18:29:45 +0000 | [diff] [blame] | 50 | |
| 51 | ${output}= Get Lines Containing String ${cmd_output} Slave address of device: |
| 52 | ${slave_address_status_1}= Run Keyword And Return Status |
| 53 | ... Should Be Equal ${output.strip()} ${slave_address_list[1]} ignore_case=True |
| 54 | ${output_1}= Get Lines Containing String ${cmd_output} Channel number is |
| 55 | Run Keyword IF ${slave_address_status_1} == True |
| 56 | ... Should Be Equal ${output_1.strip()} ${supported_capabilities[7]} |
| 57 | ... ELSE Should Match Regexp ${output.strip()} [1-9]+h |