| ganesanb | ec44d61 | 2023-05-01 18:31:35 +0000 | [diff] [blame] | 1 | *** Settings *** | 
|  | 2 |  | 
| George Keishing | aaf7d1c | 2024-09-03 13:46:49 +0530 | [diff] [blame] | 3 | Documentation    Module to test dcmi get capabilities functionality. | 
| ganesanb | ec44d61 | 2023-05-01 18:31:35 +0000 | [diff] [blame] | 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: | 
| George Keishing | aaf7d1c | 2024-09-03 13:46:49 +0530 | [diff] [blame] | 22 | ...  Mandatory platform capabilities | 
|  | 23 | ...  Optional platform capabilities | 
| ganesanb | ec44d61 | 2023-05-01 18:31:35 +0000 | [diff] [blame] | 24 | ...  Power management available | 
| George Keishing | aaf7d1c | 2024-09-03 13:46:49 +0530 | [diff] [blame] | 25 | ...  Managebility access capabilities | 
| ganesanb | ec44d61 | 2023-05-01 18:31:35 +0000 | [diff] [blame] | 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 | 
| Sridevi Ramesh | c6e7f93 | 2025-05-07 11:26:54 -0500 | [diff] [blame] | 46 | IF  ${slave_address_status} == True  BREAK | 
| ganesanb | 1965a49 | 2023-05-25 16:14:13 +0000 | [diff] [blame] | 47 | END | 
|  | 48 |  | 
| George Keishing | 923c9df | 2025-05-14 18:14:01 +0530 | [diff] [blame] | 49 | IF  ${slave_address_status} == False | 
|  | 50 | Fail  msg=Slave address is showing wrongly. | 
|  | 51 | END | 
| manimozhik | 3c619b1 | 2023-11-08 18:29:45 +0000 | [diff] [blame] | 52 |  | 
|  | 53 | ${output}=  Get Lines Containing String  ${cmd_output}  Slave address of device: | 
|  | 54 | ${slave_address_status_1}=  Run Keyword And Return Status | 
|  | 55 | ...  Should Be Equal  ${output.strip()}  ${slave_address_list[1]}  ignore_case=True | 
|  | 56 | ${output_1}=  Get Lines Containing String  ${cmd_output}   Channel number is | 
| George Keishing | 923c9df | 2025-05-14 18:14:01 +0530 | [diff] [blame] | 57 | IF  ${slave_address_status_1} == True | 
|  | 58 | Should Be Equal  ${output_1.strip()}   ${supported_capabilities[7]} | 
|  | 59 | ELSE | 
|  | 60 | Should Match Regexp  ${output.strip()}  [1-9]+h | 
|  | 61 | END |