blob: 9b3e981382a5550c1b54f1a4fc330f8a987c8d73 [file] [log] [blame]
ganesanbec44d612023-05-01 18:31:35 +00001*** Settings ***
2
3Documentation Module to test dcmi get capabilites functionality.
4Resource ../../lib/ipmi_client.robot
5
George Keishing87dc4422023-10-20 12:56:30 +05306Force Tags DCMI_Get_Capabilities
7
ganesanb1965a492023-05-25 16:14:13 +00008*** Variables ***
George Keishing87dc4422023-10-20 12:56:30 +05309
ganesanb1965a492023-05-25 16:14:13 +000010@{slave_address_list} Slave address of device: 0h (8bits)(Satellite/External controller)
11... Slave address of device: 20h (BMC)
12
ganesanbec44d612023-05-01 18:31:35 +000013*** Test Cases ***
14
15Verify 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:
ganesanbec44d612023-05-01 18:31:35 +000031 ... Channel number is 0h (Primary BMC)
32 ... Device revision is 0
33 # Manageability Access Attributes:
ganesanb1965a492023-05-25 16:14:13 +000034 ... Primary LAN channel number: ${CHANNEL_NUMBER} is available
ganesanbec44d612023-05-01 18:31:35 +000035 ... 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
ganesanb1965a492023-05-25 16:14:13 +000042
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 Keishing87dc4422023-10-20 12:56:30 +053049 Run Keyword IF ${slave_address_status} == False Fail msg=Slave address is showing wrongly.
manimozhik3c619b12023-11-08 18:29:45 +000050
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