blob: b4dbab743ad4b80d6290c0faff1bc04a71a82ff2 [file] [log] [blame]
Prashanth Katti081b3d92018-06-15 05:13:11 -05001*** Settings ***
Naman Navin Hegdebf181332019-06-26 02:08:18 -05002Documentation This testing requires special setup where SNMP trapd is
Prashanth Katti081b3d92018-06-15 05:13:11 -05003... configured and installed. For download, installation and
4... configuration refer http://www.net-snmp.org/.
5
Sandhya Somashekar839a0c22019-01-31 05:05:43 -06006Resource ../lib/snmp/resource.robot
Prashanth Katti081b3d92018-06-15 05:13:11 -05007Resource ../lib/snmp/snmp_utils.robot
Prashanth Katti7dae0e82019-01-09 01:35:42 -06008Resource ../lib/openbmc_ffdc.robot
Naman Navin Hegdebf181332019-06-26 02:08:18 -05009Resource ../lib/logging_utils.robot
Prashanth Katti081b3d92018-06-15 05:13:11 -050010
11Library String
12Library SSHLibrary
13
Prashanth Katti7dae0e82019-01-09 01:35:42 -060014Test Teardown FFDC On Test Case Fail
15
Prashanth Katti081b3d92018-06-15 05:13:11 -050016*** Test Cases ***
17Configure SNMP Manager On BMC And Verify
18 [Documentation] Configure SNMP Manager On BMC And Verify.
19 [Tags] Configure_SNMP_Manager_On_BMC_And_Verify
20
21 Configure SNMP Manager On BMC ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT} Valid
22 Verify SNMP Manager ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT}
23
24 Delete SNMP Manager And Object ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT}
25
26Configure SNMP Manager On BMC With Non-default Port And Verify
27 [Documentation] Configure SNMP Manager On BMC And Verify.
28 [Tags] Configure_SNMP_Manager_On_BMC_With_Non_Default_Port_And_Verify
29
30 Configure SNMP Manager On BMC ${SNMP_MGR1_IP} ${NON_DEFAULT_PORT1} Valid
31 Verify SNMP Manager ${SNMP_MGR1_IP} ${NON_DEFAULT_PORT1}
32
33 Delete SNMP Manager And Object ${SNMP_MGR1_IP} ${NON_DEFAULT_PORT1}
34
35Configure SNMP Manager On BMC With Out Of Range Port And Verify
Prashanth Katti081b3d92018-06-15 05:13:11 -050036 [Documentation] Configure SNMP Manager On BMC with out-of range port and verify.
37 [Tags] Configure_SNMP_Manager_On_BMC_With_Out_Of_Range_Port_And_Verify
Prashanth Katti081b3d92018-06-15 05:13:11 -050038 [Template] Configure SNMP Manager On BMC
39
George Keishing5abfe602018-07-05 11:54:37 -050040 # SNMP manager IP Port Scenario
41 ${SNMP_MGR1_IP} ${out_of_range_port} error
42
Prashanth Katti081b3d92018-06-15 05:13:11 -050043Configure SNMP Manager On BMC With Alpha Port And Verify
Prashanth Katti081b3d92018-06-15 05:13:11 -050044 [Documentation] Configure SNMP Manager On BMC with alpha port and verify.
45 [Tags] Configure_SNMP_Manager_On_BMC_With_Alpha_Port_And_Verify
Prashanth Katti081b3d92018-06-15 05:13:11 -050046 [Template] Configure SNMP Manager On BMC
47
George Keishing5abfe602018-07-05 11:54:37 -050048 # SNMP manager IP Port Scenario
49 ${SNMP_MGR1_IP} ${alpha_port} error
50
Prashanth Katti081b3d92018-06-15 05:13:11 -050051Configure SNMP Manager On BMC With Negative Port And Verify
Prashanth Katti081b3d92018-06-15 05:13:11 -050052 [Documentation] Configure SNMP Manager On BMC with negative port and verify.
53 [Tags] Configure_SNMP_Manager_On_BMC_With_Negative_Port_And_Verify
Prashanth Katti081b3d92018-06-15 05:13:11 -050054 [Template] Configure SNMP Manager On BMC
55
George Keishing5abfe602018-07-05 11:54:37 -050056 # SNMP manager IP Port Scenario
57 ${SNMP_MGR1_IP} ${negative_port} error
58
Prashanth Katti081b3d92018-06-15 05:13:11 -050059Configure SNMP Manager On BMC With Empty Port And Verify
Prashanth Katti081b3d92018-06-15 05:13:11 -050060 [Documentation] Configure SNMP Manager On BMC with empty port and verify.
61 [Tags] Configure_SNMP_Manager_On_BMC_With_Empty_Port_And_Verify
Prashanth Katti081b3d92018-06-15 05:13:11 -050062 [Template] Configure SNMP Manager On BMC
63
George Keishing5abfe602018-07-05 11:54:37 -050064 # SNMP manager IP Port Scenario
65 ${SNMP_MGR1_IP} ${empty_port} error
66
Prashanth Katti081b3d92018-06-15 05:13:11 -050067Configure SNMP Manager On BMC With Out Of Range IP And Verify
Prashanth Katti081b3d92018-06-15 05:13:11 -050068 [Documentation] Configure SNMP Manager On BMC with out-of range IP and verify.
69 [Tags] Configure_SNMP_Manager_On_BMC_With_Out_Of_Range_IP_And_Verify
Prashanth Katti081b3d92018-06-15 05:13:11 -050070 [Template] Configure SNMP Manager On BMC
71
George Keishing5abfe602018-07-05 11:54:37 -050072 # SNMP manager IP Port Scenario
73 ${out_of_range_ip} ${SNMP_DEFAULT_PORT} error
74
Prashanth Katti081b3d92018-06-15 05:13:11 -050075Configure Multiple SNMP Managers And Verify
76 [Documentation] Configure multiple SNMP Managers And Verify.
77 [Tags] Configure_Multiple_SNMP_Managers_And_Verify
78
79 Configure SNMP Manager On BMC ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT} Valid
80 Configure SNMP Manager On BMC ${SNMP_MGR2_IP} ${SNMP_DEFAULT_PORT} Valid
81 Verify SNMP Manager ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT}
82 Verify SNMP Manager ${SNMP_MGR2_IP} ${SNMP_DEFAULT_PORT}
83
84 Delete SNMP Manager And Object ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT}
85 Delete SNMP Manager And Object ${SNMP_MGR2_IP} ${SNMP_DEFAULT_PORT}
86
87Configure Multiple SNMP Managers With Non-default Port And Verify
88 [Documentation] Configure multiple SNMP Managers with non-default port And Verify.
89 [Tags] Configure_Multiple_SNMP_Managers_With_Non_Default_Port_And_Verify
90
91 Configure SNMP Manager On BMC ${SNMP_MGR1_IP} ${NON_DEFAULT_PORT1} Valid
92 Configure SNMP Manager On BMC ${SNMP_MGR2_IP} ${NON_DEFAULT_PORT1} Valid
93 Verify SNMP Manager ${SNMP_MGR1_IP} ${NON_DEFAULT_PORT1}
94 Verify SNMP Manager ${SNMP_MGR2_IP} ${NON_DEFAULT_PORT1}
95
96 Delete SNMP Manager And Object ${SNMP_MGR1_IP} ${NON_DEFAULT_PORT1}
97 Delete SNMP Manager And Object ${SNMP_MGR2_IP} ${NON_DEFAULT_PORT1}
98
99Configure Multiple SNMP Managers With Different Ports And Verify
100 [Documentation] Configure multiple SNMP Managers with different ports And Verify.
101 [Tags] Configure_Multiple_SNMP_Managers_With_Different_Ports_And_Verify
102
103 Configure SNMP Manager On BMC ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT} Valid
104 Configure SNMP Manager On BMC ${SNMP_MGR2_IP} ${NON_DEFAULT_PORT1} Valid
105 Configure SNMP Manager On BMC ${SNMP_MGR3_IP} ${NON_DEFAULT_PORT2} Valid
106
107 Verify SNMP Manager ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT}
108 Verify SNMP Manager ${SNMP_MGR2_IP} ${NON_DEFAULT_PORT1}
109 Verify SNMP Manager ${SNMP_MGR3_IP} ${NON_DEFAULT_PORT2}
110
111 Delete SNMP Manager And Object ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT}
112 Delete SNMP Manager And Object ${SNMP_MGR2_IP} ${NON_DEFAULT_PORT1}
113 Delete SNMP Manager And Object ${SNMP_MGR3_IP} ${NON_DEFAULT_PORT2}
114
Naman Navin Hegdebf181332019-06-26 02:08:18 -0500115Generate Error On BMC And Verify If Trap Is Sent
116 [Documentation] Generate Error On BMC And Verify If Trap Is Sent.
117 [Tags] Generate_Error_On_BMC_And_Verify_If_Trap_Is_Sent
118 [Setup] Install Tarball
119
120 Configure SNMP Manager On BMC ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT} Valid
121
122 Start SNMP Manager
123 BMC Execute Command /tmp/tarball/bin/logging-test -c AutoTestSimple
124 SSHLibrary.Switch Connection snmp_server
125 ${SNMP_LISTEN_OUT}= Read delay=1s
Prashanth Kattic6a0acf2019-08-09 04:16:41 -0500126 Delete SNMP Manager And Object ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT}
Naman Navin Hegdebf181332019-06-26 02:08:18 -0500127 SSHLibrary.Execute Command sudo killall snmptrapd
128
129 Should Contain ${SNMP_LISTEN_OUT} ${SNMP_TRAP_BMC_ERROR}
130 ... msg=Failed to receive trap message.