Prashanth Katti | 081b3d9 | 2018-06-15 05:13:11 -0500 | [diff] [blame] | 1 | *** Settings *** |
Naman Navin Hegde | bf18133 | 2019-06-26 02:08:18 -0500 | [diff] [blame] | 2 | Documentation This testing requires special setup where SNMP trapd is |
Prashanth Katti | 081b3d9 | 2018-06-15 05:13:11 -0500 | [diff] [blame] | 3 | ... configured and installed. For download, installation and |
| 4 | ... configuration refer http://www.net-snmp.org/. |
| 5 | |
Sandhya Somashekar | 839a0c2 | 2019-01-31 05:05:43 -0600 | [diff] [blame] | 6 | Resource ../lib/snmp/resource.robot |
Prashanth Katti | 081b3d9 | 2018-06-15 05:13:11 -0500 | [diff] [blame] | 7 | Resource ../lib/snmp/snmp_utils.robot |
Prashanth Katti | 7dae0e8 | 2019-01-09 01:35:42 -0600 | [diff] [blame] | 8 | Resource ../lib/openbmc_ffdc.robot |
Naman Navin Hegde | bf18133 | 2019-06-26 02:08:18 -0500 | [diff] [blame] | 9 | Resource ../lib/logging_utils.robot |
Prashanth Katti | 081b3d9 | 2018-06-15 05:13:11 -0500 | [diff] [blame] | 10 | |
| 11 | Library String |
| 12 | Library SSHLibrary |
| 13 | |
Prashanth Katti | 7dae0e8 | 2019-01-09 01:35:42 -0600 | [diff] [blame] | 14 | Test Teardown FFDC On Test Case Fail |
| 15 | |
Prashanth Katti | 081b3d9 | 2018-06-15 05:13:11 -0500 | [diff] [blame] | 16 | *** Test Cases *** |
| 17 | Configure 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 | |
| 26 | Configure 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 | |
| 35 | Configure SNMP Manager On BMC With Out Of Range Port And Verify |
Prashanth Katti | 081b3d9 | 2018-06-15 05:13:11 -0500 | [diff] [blame] | 36 | [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 Katti | 081b3d9 | 2018-06-15 05:13:11 -0500 | [diff] [blame] | 38 | [Template] Configure SNMP Manager On BMC |
| 39 | |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 40 | # SNMP manager IP Port Scenario |
| 41 | ${SNMP_MGR1_IP} ${out_of_range_port} error |
| 42 | |
Prashanth Katti | 081b3d9 | 2018-06-15 05:13:11 -0500 | [diff] [blame] | 43 | Configure SNMP Manager On BMC With Alpha Port And Verify |
Prashanth Katti | 081b3d9 | 2018-06-15 05:13:11 -0500 | [diff] [blame] | 44 | [Documentation] Configure SNMP Manager On BMC with alpha port and verify. |
| 45 | [Tags] Configure_SNMP_Manager_On_BMC_With_Alpha_Port_And_Verify |
Prashanth Katti | 081b3d9 | 2018-06-15 05:13:11 -0500 | [diff] [blame] | 46 | [Template] Configure SNMP Manager On BMC |
| 47 | |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 48 | # SNMP manager IP Port Scenario |
| 49 | ${SNMP_MGR1_IP} ${alpha_port} error |
| 50 | |
Prashanth Katti | 081b3d9 | 2018-06-15 05:13:11 -0500 | [diff] [blame] | 51 | Configure SNMP Manager On BMC With Negative Port And Verify |
Prashanth Katti | 081b3d9 | 2018-06-15 05:13:11 -0500 | [diff] [blame] | 52 | [Documentation] Configure SNMP Manager On BMC with negative port and verify. |
| 53 | [Tags] Configure_SNMP_Manager_On_BMC_With_Negative_Port_And_Verify |
Prashanth Katti | 081b3d9 | 2018-06-15 05:13:11 -0500 | [diff] [blame] | 54 | [Template] Configure SNMP Manager On BMC |
| 55 | |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 56 | # SNMP manager IP Port Scenario |
| 57 | ${SNMP_MGR1_IP} ${negative_port} error |
| 58 | |
Prashanth Katti | 081b3d9 | 2018-06-15 05:13:11 -0500 | [diff] [blame] | 59 | Configure SNMP Manager On BMC With Empty Port And Verify |
Prashanth Katti | 081b3d9 | 2018-06-15 05:13:11 -0500 | [diff] [blame] | 60 | [Documentation] Configure SNMP Manager On BMC with empty port and verify. |
| 61 | [Tags] Configure_SNMP_Manager_On_BMC_With_Empty_Port_And_Verify |
Prashanth Katti | 081b3d9 | 2018-06-15 05:13:11 -0500 | [diff] [blame] | 62 | [Template] Configure SNMP Manager On BMC |
| 63 | |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 64 | # SNMP manager IP Port Scenario |
| 65 | ${SNMP_MGR1_IP} ${empty_port} error |
| 66 | |
Prashanth Katti | 081b3d9 | 2018-06-15 05:13:11 -0500 | [diff] [blame] | 67 | Configure SNMP Manager On BMC With Out Of Range IP And Verify |
Prashanth Katti | 081b3d9 | 2018-06-15 05:13:11 -0500 | [diff] [blame] | 68 | [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 Katti | 081b3d9 | 2018-06-15 05:13:11 -0500 | [diff] [blame] | 70 | [Template] Configure SNMP Manager On BMC |
| 71 | |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 72 | # SNMP manager IP Port Scenario |
| 73 | ${out_of_range_ip} ${SNMP_DEFAULT_PORT} error |
| 74 | |
Prashanth Katti | 081b3d9 | 2018-06-15 05:13:11 -0500 | [diff] [blame] | 75 | Configure 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 | |
| 87 | Configure 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 | |
| 99 | Configure 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 Hegde | bf18133 | 2019-06-26 02:08:18 -0500 | [diff] [blame] | 115 | Generate 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 Katti | c6a0acf | 2019-08-09 04:16:41 -0500 | [diff] [blame] | 126 | Delete SNMP Manager And Object ${SNMP_MGR1_IP} ${SNMP_DEFAULT_PORT} |
Naman Navin Hegde | bf18133 | 2019-06-26 02:08:18 -0500 | [diff] [blame] | 127 | SSHLibrary.Execute Command sudo killall snmptrapd |
| 128 | |
| 129 | Should Contain ${SNMP_LISTEN_OUT} ${SNMP_TRAP_BMC_ERROR} |
| 130 | ... msg=Failed to receive trap message. |