-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test(Plugin(network::hp::procurve::snmp)): mode=spanning-tree,list-sp…
…anning-trees
- Loading branch information
1 parent
9a32b9b
commit c717e3e
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
*** Settings *** | ||
Documentation List ports using Spanning Tree Protocol. | ||
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource | ||
|
||
Test Timeout 120s | ||
Test Setup Ctn Generic Suite Setup | ||
|
||
*** Variables *** | ||
${CMD} ${CENTREON_PLUGINS} --plugin=network::hp::procurve::snmp::plugin | ||
|
||
*** Test Cases *** | ||
list-spanning-trees ${tc} | ||
[Tags] network hp | ||
${command} Catenate | ||
... ${CMD} | ||
... --mode=list-spanning-trees | ||
... --hostname=${HOSTNAME} | ||
... --snmp-version=${SNMPVERSION} | ||
... --snmp-port=${SNMPPORT} | ||
... --snmp-community=network/hp/procurve/snmp/slim_procurve-spanning-tree | ||
... --snmp-timeout=1 | ||
... ${extra_options} | ||
|
||
# first run to build cache | ||
Run ${command} | ||
# second run to control the output | ||
Ctn Run Command And Check Result As Strings ${command} ${expected_result} | ||
|
||
Examples: tc extra_options expected_result -- | ||
... 1 --filter-port='Anonymized 053' List ports with spanning tree protocol: [port = Anonymized 053] [state = forwarding] [op_status = up] [admin_status = up] [index = 28] | ||
... 2 --filter-port List ports with spanning tree protocol: [port = Anonymized 147] [state = blocking] [op_status = down] [admin_status = up] [index = 1] [port = Anonymized 026] [state = blocking] [op_status = down] [admin_status = up] [index = 10] [port = Anonymized 232] [state = blocking] [op_status = down] [admin_status = up] [index = 11] [port = Anonymized 093] [state = blocking] [op_status = down] [admin_status = up] [index = 12] [port = Anonymized 058] [state = blocking] [op_status = down] [admin_status = up] [index = 13] [port = Anonymized 118] [state = blocking] [op_status = down] [admin_status = up] [index = 14] [port = Anonymized 158] [state = blocking] [op_status = down] [admin_status = up] [index = 15] [port = Anonymized 191] [state = blocking] [op_status = down] [admin_status = up] [index = 16] [port = Anonymized 160] [state = blocking] [op_status = down] [admin_status = up] [index = 17] [port = Anonymized 188] [state = blocking] [op_status = down] [admin_status = up] [index = 18] [port = Anonymized 034] [state = blocking] [op_status = down] [admin_status = up] [index = 19] [port = Anonymized 029] [state = forwarding] [op_status = up] [admin_status = up] [index = 2] [port = Anonymized 203] [state = forwarding] [op_status = up] [admin_status = up] [index = 20] [port = Anonymized 054] [state = blocking] [op_status = down] [admin_status = up] [index = 21] [port = Anonymized 189] [state = blocking] [op_status = down] [admin_status = up] [index = 22] [port = Anonymized 056] [state = forwarding] [op_status = up] [admin_status = up] [index = 23] [port = Anonymized 204] [state = blocking] [op_status = down] [admin_status = up] [index = 24] [port = Anonymized 026] [state = blocking] [op_status = down] [admin_status = up] [index = 25] [port = Anonymized 135] [state = blocking] [op_status = down] [admin_status = up] [index = 26] [port = Anonymized 182] [state = blocking] [op_status = down] [admin_status = up] [index = 27] [port = Anonymized 053] [state = forwarding] [op_status = up] [admin_status = up] [index = 28] [port = Anonymized 088] [state = blocking] [op_status = down] [admin_status = up] [index = 3] [port = Anonymized 220] [state = blocking] [op_status = down] [admin_status = up] [index = 4] [port = Anonymized 003] [state = blocking] [op_status = down] [admin_status = up] [index = 5] [port = Anonymized 118] [state = blocking] [op_status = down] [admin_status = up] [index = 6] [port = Anonymized 192] [state = blocking] [op_status = down] [admin_status = up] [index = 7] [port = Anonymized 123] [state = forwarding] [op_status = up] [admin_status = up] [index = 8] [port = Anonymized 203] [state = blocking] [op_status = down] [admin_status = up] [index = 9] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
*** Settings *** | ||
Documentation Check port Spanning Tree Protocol current state (BRIDGE-MIB). | ||
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource | ||
|
||
Test Timeout 120s | ||
Test Setup Ctn Generic Suite Setup | ||
|
||
*** Variables *** | ||
${CMD} ${CENTREON_PLUGINS} --plugin=network::hp::procurve::snmp::plugin | ||
|
||
*** Test Cases *** | ||
spanning-tree ${tc} | ||
[Tags] network hp | ||
${command} Catenate | ||
... ${CMD} | ||
... --mode=spanning-tree | ||
... --hostname=${HOSTNAME} | ||
... --snmp-version=${SNMPVERSION} | ||
... --snmp-port=${SNMPPORT} | ||
... --snmp-community=network/hp/procurve/snmp/slim_procurve-spanning-tree | ||
... --snmp-timeout=1 | ||
... ${extra_options} | ||
|
||
# first run to build cache | ||
Run ${command} | ||
# second run to control the output | ||
Ctn Run Command And Check Result As Strings ${command} ${expected_result} | ||
|
||
Examples: tc extra_options expected_result -- | ||
... 1 --verbose OK: All spanning trees are ok Port 'Anonymized 147' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '1'] Port 'Anonymized 026' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '10'] Port 'Anonymized 232' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '11'] Port 'Anonymized 093' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '12'] Port 'Anonymized 058' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '13'] Port 'Anonymized 118' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '14'] Port 'Anonymized 158' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '15'] Port 'Anonymized 191' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '16'] Port 'Anonymized 160' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '17'] Port 'Anonymized 188' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '18'] Port 'Anonymized 034' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '19'] Port 'Anonymized 029' spanning tree state is 'forwarding' [op status: 'up'] [admin status: 'up'] [index: '2'] Port 'Anonymized 203' spanning tree state is 'forwarding' [op status: 'up'] [admin status: 'up'] [index: '20'] Port 'Anonymized 054' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '21'] Port 'Anonymized 189' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '22'] Port 'Anonymized 056' spanning tree state is 'forwarding' [op status: 'up'] [admin status: 'up'] [index: '23'] Port 'Anonymized 204' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '24'] Port 'Anonymized 026' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '25'] Port 'Anonymized 135' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '26'] Port 'Anonymized 182' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '27'] Port 'Anonymized 053' spanning tree state is 'forwarding' [op status: 'up'] [admin status: 'up'] [index: '28'] Port 'Anonymized 088' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '3'] Port 'Anonymized 220' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '4'] Port 'Anonymized 003' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '5'] Port 'Anonymized 118' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '6'] Port 'Anonymized 192' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '7'] Port 'Anonymized 123' spanning tree state is 'forwarding' [op status: 'up'] [admin status: 'up'] [index: '8'] Port 'Anonymized 203' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '9'] | ||
... 2 --filter-port OK: All spanning trees are ok | ||
... 3 --warning-status='\\\%{op_status} ne "up"' WARNING: Port 'Anonymized 147' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '1'] - Port 'Anonymized 026' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '10'] - Port 'Anonymized 232' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '11'] - Port 'Anonymized 093' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '12'] - Port 'Anonymized 058' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '13'] - Port 'Anonymized 118' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '14'] - Port 'Anonymized 158' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '15'] - Port 'Anonymized 191' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '16'] - Port 'Anonymized 160' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '17'] - Port 'Anonymized 188' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '18'] - Port 'Anonymized 034' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '19'] - Port 'Anonymized 054' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '21'] - Port 'Anonymized 189' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '22'] - Port 'Anonymized 204' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '24'] - Port 'Anonymized 026' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '25'] - Port 'Anonymized 135' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '26'] - Port 'Anonymized 182' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '27'] - Port 'Anonymized 088' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '3'] - Port 'Anonymized 220' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '4'] - Port 'Anonymized 003' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '5'] - Port 'Anonymized 118' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '6'] - Port 'Anonymized 192' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '7'] - Port 'Anonymized 203' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '9'] | ||
... 4 --critical-status='\\\%{op_status} ne "up"' CRITICAL: Port 'Anonymized 147' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '1'] - Port 'Anonymized 026' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '10'] - Port 'Anonymized 232' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '11'] - Port 'Anonymized 093' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '12'] - Port 'Anonymized 058' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '13'] - Port 'Anonymized 118' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '14'] - Port 'Anonymized 158' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '15'] - Port 'Anonymized 191' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '16'] - Port 'Anonymized 160' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '17'] - Port 'Anonymized 188' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '18'] - Port 'Anonymized 034' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '19'] - Port 'Anonymized 054' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '21'] - Port 'Anonymized 189' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '22'] - Port 'Anonymized 204' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '24'] - Port 'Anonymized 026' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '25'] - Port 'Anonymized 135' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '26'] - Port 'Anonymized 182' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '27'] - Port 'Anonymized 088' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '3'] - Port 'Anonymized 220' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '4'] - Port 'Anonymized 003' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '5'] - Port 'Anonymized 118' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '6'] - Port 'Anonymized 192' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '7'] - Port 'Anonymized 203' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '9'] | ||
... 5 --warning-status='\\\%{admin_status} eq "up"' WARNING: Port 'Anonymized 147' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '1'] - Port 'Anonymized 026' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '10'] - Port 'Anonymized 232' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '11'] - Port 'Anonymized 093' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '12'] - Port 'Anonymized 058' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '13'] - Port 'Anonymized 118' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '14'] - Port 'Anonymized 158' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '15'] - Port 'Anonymized 191' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '16'] - Port 'Anonymized 160' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '17'] - Port 'Anonymized 188' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '18'] - Port 'Anonymized 034' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '19'] - Port 'Anonymized 029' spanning tree state is 'forwarding' [op status: 'up'] [admin status: 'up'] [index: '2'] - Port 'Anonymized 203' spanning tree state is 'forwarding' [op status: 'up'] [admin status: 'up'] [index: '20'] - Port 'Anonymized 054' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '21'] - Port 'Anonymized 189' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '22'] - Port 'Anonymized 056' spanning tree state is 'forwarding' [op status: 'up'] [admin status: 'up'] [index: '23'] - Port 'Anonymized 204' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '24'] - Port 'Anonymized 026' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '25'] - Port 'Anonymized 135' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '26'] - Port 'Anonymized 182' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '27'] - Port 'Anonymized 053' spanning tree state is 'forwarding' [op status: 'up'] [admin status: 'up'] [index: '28'] - Port 'Anonymized 088' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '3'] - Port 'Anonymized 220' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '4'] - Port 'Anonymized 003' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '5'] - Port 'Anonymized 118' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '6'] - Port 'Anonymized 192' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '7'] - Port 'Anonymized 123' spanning tree state is 'forwarding' [op status: 'up'] [admin status: 'up'] [index: '8'] - Port 'Anonymized 203' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '9'] | ||
... 6 --critical-status='\\\%{op_status} eq "down"' CRITICAL: Port 'Anonymized 147' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '1'] - Port 'Anonymized 026' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '10'] - Port 'Anonymized 232' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '11'] - Port 'Anonymized 093' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '12'] - Port 'Anonymized 058' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '13'] - Port 'Anonymized 118' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '14'] - Port 'Anonymized 158' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '15'] - Port 'Anonymized 191' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '16'] - Port 'Anonymized 160' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '17'] - Port 'Anonymized 188' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '18'] - Port 'Anonymized 034' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '19'] - Port 'Anonymized 054' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '21'] - Port 'Anonymized 189' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '22'] - Port 'Anonymized 204' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '24'] - Port 'Anonymized 026' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '25'] - Port 'Anonymized 135' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '26'] - Port 'Anonymized 182' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '27'] - Port 'Anonymized 088' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '3'] - Port 'Anonymized 220' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '4'] - Port 'Anonymized 003' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '5'] - Port 'Anonymized 118' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '6'] - Port 'Anonymized 192' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '7'] - Port 'Anonymized 203' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '9'] |