blob: 7d0c4ee131bd900af46129811f6806d8df3bc76f [file] [log] [blame]
meghagn62945e22021-10-04 02:33:17 -05001*** Settings ***
2
3Documentation Test OpenBMC GUI "SNMP Alerts" sub-menu of "Settings".
4
Rahul Maheshwaric27708e2021-12-21 06:35:27 -06005Resource ../../../lib/snmp/redfish_snmp_utils.robot
Megha G Nb9ae25a2023-01-27 06:25:00 -06006Resource ../../../lib/snmp/resource.robot
7Resource ../../lib/gui_resource.robot
Megha G N2a31e512023-01-18 04:23:20 -06008Resource ../../lib/bmc_network_utils.robot
meghagn705c3642021-10-12 04:14:02 -05009
meghagn62945e22021-10-04 02:33:17 -050010Suite Setup Suite Setup Execution
11Suite Teardown Close Browser
12
13
14*** Variables ***
15
meghagn705c3642021-10-12 04:14:02 -050016${xpath_snmp_alerts_sub_menu} //*[@data-test-id='nav-item-snmp-alerts']
rramyasr-ine71ba072022-06-13 11:12:06 -050017${xpath_snmp_alerts_heading} //h1[text()="SNMP alerts"]
meghagn705c3642021-10-12 04:14:02 -050018${xpath_select_all_snmp} //*[@data-test-id='snmpAlerts-checkbox-selectAll']
19${xpath_add_destination} //button[contains(text(),'Add destination')]
20${xpath_snmp_alert_destination_heading} //h5[contains(text(),'Add SNMP alert destination')]
21${xpath_ip_address_input_button} //*[@data-test-id='snmpAlerts-input-ipAddress']
22${xpath_port_optional_input_button} //*[@data-test-id='snmpAlerts-input-port']
23${xpath_snmp_add_destination_button} //*[@data-test-id='snmpAlerts-button-ok']
24${xpath_cancel_button} //button[contains(text(),'Cancel')]
25${xpath_delete_button} //*[@data-test-id='snmpAlerts-button-deleteRow-undefined']
26${xpath_delete_destination} //button[contains(text(),'Delete destination')]
meghagn62945e22021-10-04 02:33:17 -050027
Megha GNc7bcf7c2022-08-04 05:30:58 -050028${snmp_page_heading} SNMP alerts
29${invalid_port_error} Value must be between 0 65535
30${invalid_destination_error} Error in adding SNMP alert destination
Megha G Nb9ae25a2023-01-27 06:25:00 -060031${invalid_ip_error} Field required
Megha G N2a31e512023-01-18 04:23:20 -060032${dns_server} 10.10.10.10
Megha GNc7bcf7c2022-08-04 05:30:58 -050033
meghagn62945e22021-10-04 02:33:17 -050034
35*** Test Cases ***
36
37Verify Navigation To SNMP Alerts Page
38 [Documentation] Verify navigation to SNMP alerts page.
39 [Tags] Verify_Navigation_To_SNMP_Alerts_Page
40
41 Page Should Contain Element ${xpath_snmp_alerts_heading}
42
43
44Verify Existence Of All Input Boxes In SNMP Alerts Page
45 [Documentation] Verify existence of all sections in SNMP alerts page.
46 [Tags] Verify_Existence_Of_All_Input_Boxes_In_SNMP_Alerts_Page
47
meghagn705c3642021-10-12 04:14:02 -050048 Page Should Contain Checkbox ${xpath_select_all_snmp}
meghagn62945e22021-10-04 02:33:17 -050049
50
51Verify Existence Of All Buttons In SNMP Alerts Page
52 [Documentation] Verify existence of all buttons in SNMP alerts page.
53 [Tags] Verify_Existence_Of_All_Buttons_In_SNMP_Alerts_Page
54
55 Page should Contain Button ${xpath_add_destination}
56
57
58Verify Existence Of All Fields In Add Destination
59 [Documentation] Verify existence of all buttons and fields in add destination page.
George Keishingd6a77972022-01-31 12:50:29 -060060 [Tags] Verify_Existence_Of_All_Fields_In_Add_Destination
meghagn705c3642021-10-12 04:14:02 -050061 [Teardown] Run Keywords Click Button ${xpath_cancel_button} AND
62 ... Wait Until Keyword Succeeds 10 sec 5 sec
Megha GNc7bcf7c2022-08-04 05:30:58 -050063 ... Refresh GUI And Verify Element Value ${xpath_snmp_alerts_heading} ${snmp_page_heading}
meghagn62945e22021-10-04 02:33:17 -050064
65 Click Element ${xpath_add_destination}
66 Wait Until Page Contains Element ${xpath_snmp_alert_destination_heading}
67 Page Should Contain Element ${xpath_ip_address_input_button}
68 Page Should Contain Element ${xpath_port_optional_input_button}
69 Page Should Contain Element ${xpath_cancel_button}
70 Page Should Contain Element ${xpath_snmp_add_destination_button}
71
72
George Keishingd6a77972022-01-31 12:50:29 -060073Configure SNMP Settings On BMC With Non Default Port Via GUI And Verify
meghagn705c3642021-10-12 04:14:02 -050074 [Documentation] Configure SNMP settings on BMC with non default port via GUI and verify.
75 [Tags] Configure_SNMP_Settings_On_BMC_With_Non_Default_Port_Via_GUI_And_Verify
Megha G N8caf4a82023-02-22 01:01:03 -060076 [Teardown] Delete SNMP Manager Via Redfish ${SNMP_MGR1_IP} ${NON_DEFAULT_PORT1}
meghagn705c3642021-10-12 04:14:02 -050077
78 Configure SNMP Manager Via GUI ${SNMP_MGR1_IP} ${NON_DEFAULT_PORT1}
79
meghagna80e4d42021-12-14 05:46:15 -060080 Wait Until Page Contains ${SNMP_MGR1_IP} timeout=45s
meghagn705c3642021-10-12 04:14:02 -050081
82 Verify SNMP Manager Configured On BMC ${SNMP_MGR1_IP} ${NON_DEFAULT_PORT1}
Megha G N2b98bc02023-01-20 02:01:48 -060083
meghagn705c3642021-10-12 04:14:02 -050084
meghagnc2436bc2021-10-11 03:49:21 -050085Configure SNMP Settings On BMC Via GUI And Verify
86 [Documentation] Configure SNMP settings on BMC via GUI and verify.
87 [Tags] Configure_SNMP_Settings_On_BMC_Via_GUI_And_Verify
Megha G N8caf4a82023-02-22 01:01:03 -060088 [Teardown] Delete SNMP Manager Via Redfish ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT}
meghagnc2436bc2021-10-11 03:49:21 -050089
90 Configure SNMP Manager Via GUI ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT}
91
meghagna80e4d42021-12-14 05:46:15 -060092 Wait Until Page Contains ${SNMP_MGR1_IP} timeout=45s
meghagnc2436bc2021-10-11 03:49:21 -050093
94 Verify SNMP Manager Configured On BMC ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT}
95
96
meghagnd3b19ac2021-10-22 01:09:25 -050097Configure SNMP Settings On BMC With Empty Port Via GUI And Verify
98 [Documentation] Configure SNMP settings on BMC with empty port via GUI and verify.
99 [Tags] Configure_SNMP_Settings_On_BMC_With_Empty_Port_Via_GUI_And_Verify
Megha G N8caf4a82023-02-22 01:01:03 -0600100 [Teardown] Delete SNMP Manager Via Redfish ${SNMP_MGR1_IP} ${empty_port}
meghagnd3b19ac2021-10-22 01:09:25 -0500101
102 Configure SNMP Manager Via GUI ${SNMP_MGR1_IP} ${empty_port}
103
meghagna80e4d42021-12-14 05:46:15 -0600104 Wait Until Page Contains ${SNMP_MGR1_IP} timeout=45s
meghagnd3b19ac2021-10-22 01:09:25 -0500105
106 # SNMP Manager IP is set with default port number when no port number is provided.
107 Verify SNMP Manager Configured On BMC ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT}
108
109
110Configure Invalid SNMP Settings On BMC Via GUI And Verify
111
112 [Documentation] Configure invalid SNMP settings on BMC via GUI and verify.
113 [Tags] Configure_Invalid_SNMP_Settings_On_BMC_Via_GUI_And_Verify
114 [Template] Configure SNMP Manager On BMC With Invalid Setting Via GUI And Verify
115
116 # snmp_manager_ip snmp_manager_port Expected status
Megha GNc7bcf7c2022-08-04 05:30:58 -0500117 ${SNMP_MGR1_IP} ${out_of_range_port} ${invalid_port_error}
118 ${SNMP_MGR1_IP} ${alpha_port} ${invalid_port_error}
119 ${SNMP_MGR1_IP} ${negative_port} ${invalid_port_error}
Megha G N999964d2022-12-06 04:38:10 -0600120 ${SNMP_MGR1_IP} ${alphanumeric_port} ${invalid_port_error}
Megha G Nb9ae25a2023-01-27 06:25:00 -0600121 ${empty_ip} ${NON_DEFAULT_PORT1} ${invalid_ip_error}
Megha GNc7bcf7c2022-08-04 05:30:58 -0500122 ${out_of_range_ip} ${NON_DEFAULT_PORT1} ${invalid_destination_error}
123 ${alpha_ip} ${NON_DEFAULT_PORT1} ${invalid_destination_error}
Megha G N999964d2022-12-06 04:38:10 -0600124 ${negative_ip} ${NON_DEFAULT_PORT1} ${invalid_destination_error}
Megha G N2b98bc02023-01-20 02:01:48 -0600125 ${less_octet_ip} ${NON_DEFAULT_PORT1} ${invalid_destination_error}
meghagnd3b19ac2021-10-22 01:09:25 -0500126
127
meghagn5a4ddb02021-11-09 01:49:23 -0600128Configure Multiple SNMP Managers On BMC Via GUI And Verify
129 [Documentation] Configure multiple SNMP managers on BMC via GUI and verify.
George Keishingd6a77972022-01-31 12:50:29 -0600130 [Tags] Configure_Multiple_SNMP_Managers_On_BMC_Via_GUI_And_Verify
meghagn5a4ddb02021-11-09 01:49:23 -0600131 [Template] Configure Multiple SNMP Managers On BMC With Valid Port Via GUI And Verify
132
133 # snmp_manager_ip snmp_port
134 ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT}
135 ${SNMP_MGR2_IP} ${SNMP_DEFAULT_PORT}
136
137
138Configure Multiple SNMP Managers With Non Default Port Via GUI And Verify
139 [Documentation] Configure multiple SNMP managers with non-default port via GUI and verify.
140 [Tags] Configure_Multiple_SNMP_Managers_With_Non_Default_Port_Via_GUI_And_Verify
141 [Template] Configure Multiple SNMP Managers On BMC With Valid Port Via GUI And Verify
142
143 # snmp_manager_ip snmp_port
144 ${SNMP_MGR1_IP} ${NON_DEFAULT_PORT1}
145 ${SNMP_MGR2_IP} ${NON_DEFAULT_PORT1}
146
147
148Configure Multiple SNMP Managers With Different Ports Via GUI And Verify
149 [Documentation] Configure multiple SNMP managers with different ports via GUI and verify.
150 [Tags] Configure_Multiple_SNMP_Managers_With_Different_Ports_Via_GUI_And_Verify
151 [Template] Configure Multiple SNMP Managers On BMC With Valid Port Via GUI And Verify
152
153 # snmp_manager_ip snmp_port
154 ${SNMP_MGR1_IP} ${NON_DEFAULT_PORT1}
155 ${SNMP_MGR2_IP} ${SNMP_DEFAULT_PORT}
156 ${SNMP_MGR3_IP} ${NON_DEFAULT_PORT2}
157
158
meghagnfe16be92022-01-28 05:50:19 -0600159Configure Multiple SNMP Managers On BMC Via GUI And Verify Persistency On BMC Reboot
160 [Documentation] Login GUI SNMP alerts page and
161 ... add multiple SNMP Managers on BMC via GUI and verify persistency on BMC reboot.
162 [Tags] Configure_Multiple_SNMP_Managers_On_BMC_Via_GUI_And_Verify_Persistency_On_BMC_Reboot
Megha G Ncd990b32023-02-23 09:33:10 -0600163 [Teardown] Run Keywords Delete SNMP Manager Via Redfish ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT}
Megha G N8caf4a82023-02-22 01:01:03 -0600164 ... AND Delete SNMP Manager Via Redfish ${SNMP_MGR2_IP} ${SNMP_DEFAULT_PORT}
meghagnfe16be92022-01-28 05:50:19 -0600165
Megha G Ncce57cc2023-02-15 23:40:15 -0600166 ${ip_address_list}= Create list ${SNMP_MGR1_IP} ${SNMP_MGR2_IP}
meghagnfe16be92022-01-28 05:50:19 -0600167 Configure SNMP Manager Via GUI ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT}
168 Wait Until Page Contains ${SNMP_MGR1_IP} timeout=45s
169
170 Configure SNMP Manager Via GUI ${SNMP_MGR2_IP} ${SNMP_DEFAULT_PORT}
171 Wait Until Page Contains ${SNMP_MGR2_IP} timeout=45s
172
173 # Reboot BMC and check persistency SNMP manager.
174 Reboot BMC via GUI
175
Megha G Ncce57cc2023-02-15 23:40:15 -0600176 Navigate To SNMP Alerts Page
Megha G N8caf4a82023-02-22 01:01:03 -0600177
meghagnfe16be92022-01-28 05:50:19 -0600178 Verify SNMP Manager Configured On BMC ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT}
179 Verify SNMP Manager Configured On BMC ${SNMP_MGR2_IP} ${SNMP_DEFAULT_PORT}
180
181
meghagn725ccdd2022-02-09 04:55:52 -0600182Configure SNMP Manager Via GUI And Verify SNMP Trap
183 [Documentation] Login GUI SNMP alerts page and add SNMP manager via GUI
184 ... and generate error on BMC and verify trap and its fields.
185 [Tags] Configure_SNMP_Manager_Via_GUI_And_Verify_SNMP_Trap
186 [Template] Create Error On BMC And Verify Trap On Default Port
Megha G N8caf4a82023-02-22 01:01:03 -0600187 [Teardown] Delete SNMP Manager Via Redfish ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT}
meghagn725ccdd2022-02-09 04:55:52 -0600188
189 # event_log expected_error
190
191 # Generate internal failure error.
192 ${CMD_INTERNAL_FAILURE} ${SNMP_TRAP_BMC_INTERNAL_FAILURE}
193
194 # Generate timeout error.
195 ${CMD_FRU_CALLOUT} ${SNMP_TRAP_BMC_CALLOUT_ERROR}
196
197 # Generate informational error.
198 ${CMD_INFORMATIONAL_ERROR} ${SNMP_TRAP_BMC_INFORMATIONAL_ERROR}
199
200
George Keishing354091f2023-02-09 23:13:01 -0600201Configure SNMP Manager By Its Hostname Via GUI And Verify
Megha G N2a31e512023-01-18 04:23:20 -0600202 [Documentation] Login GUI SNMP alerts page and add SNMP manager with its hostname
203 ... via GUI and verify.
204 [Tags] Configure_SNMP_Manager_By_Its_Hostname_Via_GUI_And_Verify
205
206 Set DNS Server IP
207
208 # Navigate to SNMP page and configure SNMP manager.
209 Click Element ${xpath_snmp_alerts_sub_menu}
210 Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain snmp-alerts
211
212 Configure SNMP Manager Via GUI ${SNMP_HOSTNAME} ${SNMP_DEFAULT_PORT}
Megha G Ncce57cc2023-02-15 23:40:15 -0600213 Wait Until Page Contains ${SNMP_HOSTNAME} timeout=15s
214
215
216Verify Persistency Of SNMP Manager And Trap On BMC Reboot
217 [Documentation] Configure the SNMP manager and verify that it remains operational
218 ... after a BMC system reboot. Also, confirm that a trap is successfully sent.
219 [Tags] Verify_Persistency_Of_SNMP_Manager_And_Trap_On_BMC_Reboot
220 [Template] Create Error On BMC And Verify Trap On Default Port
Megha G N8caf4a82023-02-22 01:01:03 -0600221 [Teardown] Delete SNMP Manager Via Redfish ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT}
Megha G Ncce57cc2023-02-15 23:40:15 -0600222
223 # event_log expected_error persistency_check
224
225 # Generate internal failure error.
226 ${CMD_INTERNAL_FAILURE} ${SNMP_TRAP_BMC_INTERNAL_FAILURE} ${True}
227
228 # Generate timeout error.
229 ${CMD_FRU_CALLOUT} ${SNMP_TRAP_BMC_CALLOUT_ERROR} ${True}
230
231 # Generate informational error.
232 ${CMD_INFORMATIONAL_ERROR} ${SNMP_TRAP_BMC_INFORMATIONAL_ERROR} ${True}
Megha G N2a31e512023-01-18 04:23:20 -0600233
234
meghagn62945e22021-10-04 02:33:17 -0500235*** Keywords ***
236
237Suite Setup Execution
238 [Documentation] Do test case setup tasks.
239
240 Launch Browser And Login GUI
241
242 Click Element ${xpath_settings_menu}
243 Click Element ${xpath_snmp_alerts_sub_menu}
244 Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain snmp-alerts
rramyasr-in9e2c96f2023-01-24 07:59:34 -0600245 Wait Until Element Is Not Visible ${xpath_page_loading_progress_bar} timeout=30
meghagn705c3642021-10-12 04:14:02 -0500246
247Configure SNMP Manager Via GUI
248 [Documentation] Configure SNMP manager via GUI.
249 [Arguments] ${snmp_ip} ${port}
250
251 # Description of argument(s):
252 # snmp_ip SNMP manager IP address.
253 # port SNMP manager port.
254
255 Click Element ${xpath_add_destination}
256 Wait Until Page Contains Element ${xpath_snmp_alert_destination_heading}
257 Input Text ${xpath_ip_address_input_button} ${snmp_ip}
258 Wait Until Keyword Succeeds 30 sec 5 sec Get Value ${xpath_ip_address_input_button}
259 Input Text ${xpath_port_optional_input_button} ${port}
260 Click Element ${xpath_snmp_add_destination_button}
261
262
Megha G N8caf4a82023-02-22 01:01:03 -0600263Delete All SNMP Managers Via GUI
meghagn705c3642021-10-12 04:14:02 -0500264 [Documentation] Delete SNMP manager via GUI.
265
Megha G N8caf4a82023-02-22 01:01:03 -0600266 Wait Until Page Contains Element ${xpath_select_all_snmp} timeout=30s
meghagn705c3642021-10-12 04:14:02 -0500267 Click Element At Coordinates ${xpath_select_all_snmp} 0 0
268 Wait Until Keyword Succeeds 30 sec 5 sec Click Element ${xpath_delete_button}
269 Wait Until Page Contains Delete SNMP alert destination
270 Click Element ${xpath_delete_destination}
meghagna80e4d42021-12-14 05:46:15 -0600271 Wait Until Page Contains Successfully deleted SNMP alert destination timeout=45s
meghagnc2436bc2021-10-11 03:49:21 -0500272 Wait Until Keyword Succeeds 30 sec 10 sec Refresh GUI And Verify Element Value
Megha GNc7bcf7c2022-08-04 05:30:58 -0500273 ... ${xpath_snmp_alerts_heading} ${snmp_page_heading}
meghagnd3b19ac2021-10-22 01:09:25 -0500274
275
276Configure SNMP Manager On BMC With Invalid Setting Via GUI And Verify
277
278 [Documentation] Configure SNMP manager on BMC with invalid setting via GUI and verify.
279 [Arguments] ${snmp_manager_ip} ${snmp_manager_port} ${expected_error}
Megha G Nb9ae25a2023-01-27 06:25:00 -0600280 [Teardown] Close Add SNMP Alerts Destination Window ${expected_error}
meghagnd3b19ac2021-10-22 01:09:25 -0500281
282 # Description of argument(s):
283 # snmp_manager_ip SNMP manager IP address.
284 # snmp_manager_port SNMP manager port.
285 # expected_error Expected error optionally provided in testcase
286 # .... (e.g. Invalid format / Value must be between 0 – 65535).
287
288 Configure SNMP Manager Via GUI ${snmp_manager_ip} ${snmp_manager_port}
Megha G Ncce57cc2023-02-15 23:40:15 -0600289 Wait Until Page Contains ${expected_error} timeout=10sec
meghagnd3b19ac2021-10-22 01:09:25 -0500290 ${status}= Run Keyword And Return Status
291 ... Verify SNMP Manager Configured On BMC ${snmp_manager_ip} ${snmp_manager_port}
292 Should Be Equal As Strings ${status} False
293 ... msg=BMC is allowing to configure with invalid SNMP settings.
meghagn5a4ddb02021-11-09 01:49:23 -0600294
295
296Configure Multiple SNMP Managers On BMC With Valid Port Via GUI And Verify
297 [Documentation] Configure multiple SNMP managers on BMC with valid port value via GUI and verify.
298 [Arguments] ${snmp_ip_value} ${snmp_port_value}
Megha G N8caf4a82023-02-22 01:01:03 -0600299 [Teardown] Delete SNMP Manager Via Redfish ${snmp_ip_value} ${snmp_port_value}
meghagn5a4ddb02021-11-09 01:49:23 -0600300
301 # Description of argument(s):
302 # snmp_ip_value SNMP manager IP address.
303 # snmp_port_value SNMP manager port.
304
305 Configure SNMP Manager Via GUI ${snmp_ip_value} ${snmp_port_value}
306 Verify SNMP Manager Configured On BMC ${snmp_ip_value} ${snmp_port_value}
meghagn725ccdd2022-02-09 04:55:52 -0600307
308
309Create Error On BMC And Verify Trap On Default Port
310 [Documentation] Generate error on BMC and verify if trap is sent to default port.
311 [Arguments] ${event_log}=${CMD_INTERNAL_FAILURE} ${expected_error}=${SNMP_TRAP_BMC_INTERNAL_FAILURE}
Megha G Ncce57cc2023-02-15 23:40:15 -0600312 ... ${persistency_check}=${False}
meghagn725ccdd2022-02-09 04:55:52 -0600313
314 # Description of argument(s):
Megha G Ncce57cc2023-02-15 23:40:15 -0600315 # event_log Event logs to be created.
316 # expected_error Expected error on SNMP.
317 # persistency_check Check whether reboot is required or not (e.g. True, False).
meghagn725ccdd2022-02-09 04:55:52 -0600318
319 Configure SNMP Manager Via GUI ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT}
320
Megha G Ncce57cc2023-02-15 23:40:15 -0600321 Run Keyword If ${persistency_check} == ${True}
322 ... Run Keywords Reboot BMC via GUI AND Navigate To SNMP Alerts Page
323
meghagn725ccdd2022-02-09 04:55:52 -0600324 Start SNMP Manager
325
326 # Generate error log.
327 BMC Execute Command ${event_log}
328
329 SSHLibrary.Switch Connection snmp_server
330 ${SNMP_LISTEN_OUT}= Read delay=1s
331
332 # Stop SNMP manager process.
333 SSHLibrary.Execute Command sudo killall snmptrapd
334
335 # Sample SNMP trap:
336 # 2021-06-16 07:05:29 xx.xx.xx.xx [UDP: [xx.xx.xx.xx]:58154->[xx.xx.xx.xx]:xxx]:
337 # DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (2100473) 5:50:04.73
338 # SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-SMI::enterprises.49871.1.0.0.1
339 # SNMPv2-SMI::enterprises.49871.1.0.1.1 = Gauge32: 369 SNMPv2-SMI::enterprises.49871.1.0.1.2 = Opaque:
340 # UInt64: 1397718405502468474 SNMPv2-SMI::enterprises.49871.1.0.1.3 = INTEGER: 3
341 # SNMPv2-SMI::enterprises.49871.1.0.1.4 = STRING: "xxx.xx.xx Failure"
342
343 ${lines}= Split To Lines ${SNMP_LISTEN_OUT}
344 ${trap_info}= Get From List ${lines} -1
345 ${snmp_trap}= Split String ${trap_info} \t
346
347 Verify SNMP Trap ${snmp_trap} ${expected_error}
Megha G Nb9ae25a2023-01-27 06:25:00 -0600348
349
350Close Add SNMP Alerts Destination Window
351 [Documentation] Close Add SNMP Alerts Destination window.
352 [Arguments] ${expected_error}=${invalid_port_error}
353
354 # Description of argument(s):
355 # expected_error Expected error on SNMP alerts page.
356
357 Run Keyword If '${expected_error}' == '${invalid_port_error}'
358 ... Click Element ${xpath_cancel_button}
359 ... ELSE IF '${expected_error}' == '${invalid_ip_error}'
360 ... Click Element ${xpath_cancel_button}
Megha G N2a31e512023-01-18 04:23:20 -0600361
362
363Set DNS Server IP
364 [Documentation] Add static DNS IP.
George Keishing354091f2023-02-09 23:13:01 -0600365
Megha G N8caf4a82023-02-22 01:01:03 -0600366 Wait Until Page Contains Element ${xpath_settings_menu} timeout=30s
367 Click Element ${xpath_settings_menu}
Megha G N2a31e512023-01-18 04:23:20 -0600368 Click Element ${xpath_network_sub_menu}
369 Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain network
370
371 Add DNS Servers And Verify ${dns_server}
Megha G Ncce57cc2023-02-15 23:40:15 -0600372
373
374Delete Multiple SNMP Managers With Default Port Via GUI
375 [Documentation] Delete multiple SNMP managers with default port on BMC via GUI.
376 [Arguments] ${ip_address_list}
377
378 # Description of argument(s):
379 # ${ip_address_list} List of IP address.
380
381 FOR ${ip_address} IN @{ip_address_list}
382 Wait Until Keyword Succeeds 30 sec 10 sec
383 ... Delete SNMP Manager Via GUI ${ip_address} ${SNMP_DEFAULT_PORT}
384 END
385
386
387Navigate To SNMP Alerts Page
388 [Documentation] Navigate to SNMP alerts page.
389
390 Click Element ${xpath_settings_menu}
391 Click Element ${xpath_snmp_alerts_sub_menu}
392 Wait Until Keyword Succeeds 30 sec 10 sec Location Should Contain snmp-alerts