blob: f549d4d99413513613b8542b8480d88e07a4bfd2 [file] [log] [blame]
Sweta Potthuri4a556022017-11-24 04:03:37 -06001*** Settings ***
2Documentation Test IPMI sensor IDs
3
4Resource ../../lib/rest_client.robot
5Resource ../../lib/ipmi_client.robot
6Resource ../../lib/openbmc_ffdc.robot
7Resource ../../lib/state_manager.robot
8Library ../../data/model.py
9Resource ../../lib/boot_utils.robot
10Resource ../../lib/utils.robot
11
12Test Setup Open Connection And Log In
13Test Teardown Test Teardown Execution
14
15*** Test Cases ***
16
17DIMM Present And Not Present
18 [Documentation] Verify the IPMI sensor for present and not present.
19 [Tags] DIMM_Present_And_Not_Present
20
21 # Set the dimm3 Present to 1
22 Run IPMI Command
23 ... 0x04 0x30 0xac 0xa9 0x00 0x40 0x00 0x00 0x00 0x00 0x20 0x00
24 Verify The Attribute
25 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/dimm3 Present ${1}
26
27 # Set the dimm3 Present to 0
28 Run IPMI Command
29 ... 0x04 0x30 0xac 0xa9 0xff 0x00 0x00 0x40 0x00 0x00 0x20 0x00
30 Verify The Attribute
31 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/dimm3 Present ${0}
32
33DIMM Functional And Not Functional
34 [Documentation] Verify that the DIMM is Functional.
35 [Tags] DIMM_Functional_And_Not_Functional
36
37 # Set the dimm3 Functional to 0
38 Run IPMI Command
39 ... 0x04 0x30 0xac 0x00 0x00 0x10 0x00 0x00 0x00 0x00 0x20 0x00
40 Verify The Attribute
41 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/dimm3
42 ... Functional ${0}
43
44 # Set the dimm3 Functional to 1
45 Run IPMI Command
46 ... 0x04 0x30 0xac 0x00 0x00 0x00 0x00 0x10 0x00 0x00 0x20 0x00
47 Verify The Attribute
48 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/dimm3
49 ... Functional ${1}
50
51CPU Present And Not Present
52 [Documentation] Verify the IPMI sensor for present and not present.
53 [Tags] CPU_Present_And_Not_Present
54
55 # Set the cpu0 Present to 1
56 Run IPMI Command
57 ... 0x04 0x30 0x5a 0xa9 0x00 0x80 0x00 0x00 0x00 0x00 0x20 0x00
58 Verify The Attribute
59 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/cpu0 Present ${1}
60
61 # Set the cpu0 Present to 0
62 Run IPMI Command
63 ... 0x04 0x30 0x5a 0xa9 0x00 0x00 0x00 0x80 0x00 0x00 0x20 0x00
64 Verify The Attribute
65 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/cpu0 Present ${0}
66
67CPU Functional And Not Functional
68 [Documentation] Verify that the CPU is Functional.
69 [Tags] CPU_Functional_And_Not_Functional
70
71 # Set the cpu0 Functional to 0
72 Run IPMI Command
73 ... 0x04 0x30 0x5a 0xa9 0xff 0x00 0x01 0x00 0x00 0x00 0x20 0x00
74 Verify The Attribute
75 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/cpu0
76 ... Functional ${0}
77
78 # Set the cpu0 Functional to 1
79 Run IPMI Command
80 ... 0x04 0x30 0x5a 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x20 0x00
81 Verify The Attribute
82 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/cpu0
83 ... Functional ${1}
84
85Core Present And Not Present
86 [Documentation] Verify the IPMI sensor for present and not present.
87 [Tags] Core_Present_And_Not_Present
88
89 # Set the Core Present to 1
90 Run IPMI Command
91 ... 0x04 0x30 0x1e 0xa9 0x00 0x80 0x00 0x00 0x00 0x00 0x20 0x00
92 Verify The Attribute
93 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/cpu0/core4
94 ... Present ${1}
95
96 # Set the core4 of cpu0 Present to 0
97 Run IPMI Command
98 ... 0x04 0x30 0x1e 0xa9 0x00 0x00 0x00 0x80 0x00 0x00 0x20 0x00
99 Verify The Attribute
100 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/cpu0/core4
101 ... Present ${0}
102
103Core Functional And Not Functional
104 [Documentation] Verify that the Core is Functional.
105 [Tags] Core_Functional_And_Not_Functional
106
107 # Set the core4 of cpu0 Functional to 0
108 Run IPMI Command
109 ... 0x04 0x30 0x1e 0xa9 0xff 0x00 0x01 0x00 0x00 0x00 0x20 0x00
110 Verify The Attribute
111 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/cpu0/core4
112 ... Functional ${0}
113
114 # Set the core4 of cpu0 Functional to 1
115 Run IPMI Command
116 ... 0x04 0x30 0x1e 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x20 0x00
117 Verify The Attribute
118 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/cpu0/core4
119 ... Functional ${1}
120
121GPU Present And Not Present
122 [Documentation] Verify the IPMI sensor for present and not present.
123 [Tags] GPU_Present_And_Not_Present
124
125 # Set GPU card0 Present to 1
126 Run IPMI Command
127 ... 0x04 0x30 0xC5 0xa9 0x00 0x80 0x00 0x00 0x00 0x00 0x20 0x00
128 Verify The Attribute
129 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/gv100card0
130 ... Present ${1}
131
132 # Set the GPU card0 Present to 0
133 Run IPMI Command
134 ... 0x04 0x30 0xC5 0xa9 0x00 0x00 0x00 0x80 0x00 0x00 0x20 0x00
135 Verify The Attribute
136 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/gv100card0
137 ... Present ${0}
138
139GPU Functional And Not Functional
140 [Documentation] Verify that the GPU is Functional.
141 [Tags] GPU_Functional_And_Not_Functional
142
143 # Set the GPU card0 Functional to 0
144 Run IPMI Command
145 ... 0x04 0x30 0xC5 0xa9 0xff 0x00 0x01 0x00 0x00 0x00 0x20 0x00
146 Verify The Attribute
147 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/gv100card0
148 ... Functional ${0}
149
150 # Set the GPU card0 Functional to 1
151 Run IPMI Command
152 ... 0x04 0x30 0xC5 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x20 0x00
153 Verify The Attribute
154 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/gv100card0
155 ... Functional ${1}
156
157TPM Enable and Disable
158 [Documentation] Enable and disable TPM.
159 [Tags] TPM_Enable_and_Disable
160
161 # Set the TPMEnable to 0
162 Run IPMI Command
163 ... 0x04 0x30 0xD7 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x20 0x00
164 Verify The Attribute ${CONTROL_URI}/host0/TPMEnable TPMEnable ${0}
165
166 # Set the TPMEnable to 1
167 Run IPMI Command
168 ... 0x04 0x30 0xD7 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x20 0x00
169 Verify The Attribute ${CONTROL_URI}/host0/TPMEnable TPMEnable ${1}
170
171Autoreboot Enable and Disable
172 [Documentation] Enable and disable Autoreboot.
173 [Tags] Autoreboot_Enable_and_Disable
174
175 # Set the TPMEnable to 0
176 Run IPMI Command
177 ... 0x04 0x30 0xDA 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x20 0x00
178 Verify The Attribute ${CONTROL_URI}/host0/auto_reboot AutoReboot ${0}
179
180 # Set the TPMEnable to 1
181 Run IPMI Command
182 ... 0x04 0x30 0xDA 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x20 0x00
183 Verify The Attribute ${CONTROL_URI}/host0/auto_reboot AutoReboot ${1}
184
185OS Status Sensor Progress
186 [Documentation] OS Status Sensor Progress.
187 [Tags] OS_Status_Sensor_Progress
188
189 # Set the OS Sensor Progress to PXEBoot
190 Run IPMI Command
191 ... 0x04 0x30 0x05 0x00 0x00 0x04 0x00 0x00 0x00 0x00 0x20 0x00
192 ${resp}= Read Attribute ${SYSTEM_STATE_URI}/host0 OperatingSystemState
193 Should Be Equal
194 ... xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.PXEBoot
195 ... ${resp}
196
197Boot Progress Sensor Unspecified Error
198 [Documentation] Boot Progress Sensor Unspecified Error.
199 [Tags] Boot_Progress_Sensor_Unspecified_Error
200
201 # Set the Boot Progress as Unspecified
202 Run IPMI Command
203 ... 0x04 0x30 0x03 0xa9 0x00 0x02 0x00 0x00 0x00 0x00 0x00 0x00
204 ${resp}= Read Attribute ${SYSTEM_STATE_URI}/host0 BootProgress
205 Should Be Equal ${OS_BOOT_OFF} ${resp}
206
207*** Keywords ***
208
209Verify The Attribute
210 [Arguments] ${uri} ${parm} ${value}
211 # Description of arguments:
212 # ${uri} URI path.
213 # ${parm} Attribute.
214 # ${value} Output to be compared.
215
216 ${output}= Read Attribute ${uri} ${parm}
217 Should Be Equal ${value} ${output}
218
219Test Teardown Execution
220 [Documentation] Do the post test teardown.
221 ... 1. Capture FFDC on test failure.
222 ... 2. Close all open SSH connections.
223
224 FFDC On Test Case Fail
225 Close All Connections
226