1*** Settings ***
2
3Documentation    Module to test dcmi get capabilites functionality.
4Resource         ../../lib/ipmi_client.robot
5
6*** Variables ***
7@{slave_address_list}  Slave address of device: 0h (8bits)(Satellite/External controller)
8...                    Slave address of device: 20h (BMC)
9
10*** Test Cases ***
11
12Verify Get DCMI Capabilities
13    [Documentation]  Verify get DCMI capabilities command output.
14    [Tags]  Verify_Get_DCMI_Capabilities
15    ${cmd_output}=  Run IPMI Standard Command  dcmi discover
16
17    @{supported_capabilities}=  Create List
18    # Supported DCMI capabilities:
19    ...  Mandatory platform capabilties
20    ...  Optional platform capabilties
21    ...  Power management available
22    ...  Managebility access capabilties
23    ...  In-band KCS channel available
24    # Mandatory platform attributes:
25    ...  200 SEL entries
26    ...  SEL automatic rollover is enabled
27    # Optional Platform Attributes:
28    ...  Channel number is 0h (Primary BMC)
29    ...  Device revision is 0
30    # Manageability Access Attributes:
31    ...  Primary LAN channel number: ${CHANNEL_NUMBER} is available
32    ...  Secondary LAN channel is not available for OOB
33    ...  No serial channel is available
34
35    FOR  ${capability}  IN  @{supported_capabilities}
36      Run Keyword And Continue On Failure  Should Contain  ${cmd_output}  ${capability}  ignore_case=True
37      ...  msg=Supported DCMI capabilities not present.
38    END
39
40    FOR  ${slave_address}  IN  @{slave_address_list}
41      ${slave_address_status}=  Run Keyword And Return Status
42      ...  Should Contain  ${cmd_output}  ${slave_address}  ignore_case=True
43      Exit For Loop IF  ${slave_address_status} == True
44    END
45
46    Run Keyword IF  ${slave_address_status} == False  Fail  msg=Slave address is showing wrongly.