Debian Codegraph @

tests/network/hp/procurve/snmp/spanning-tree.robot

raw
1 *** Settings ***
2 Documentation Check port Spanning Tree Protocol current state (BRIDGE-MIB).
3
4 Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource
5
6 Test Timeout 120s
7 Test Setup Ctn Generic Suite Setup
8
9 *** Variables ***
10 ${CMD} ${CENTREON_PLUGINS} --plugin=network::hp::procurve::snmp::plugin
11
12 *** Test Cases ***
13 spanning-tree ${tc}
14 [Tags] network hp
15 ${command} Catenate
16 ... ${CMD}
17 ... --mode=spanning-tree
18 ... --hostname=${HOSTNAME}
19 ... --snmp-version=${SNMPVERSION}
20 ... --snmp-port=${SNMPPORT}
21 ... --snmp-community=network/hp/procurve/snmp/slim_procurve-spanning-tree
22 ... --snmp-timeout=1
23 ... ${extra_options}
24
25 Ctn Run Command And Check Result As Strings ${command} ${expected_result}
26
27 Examples: tc extra_options expected_result --
28 ... 1 ${EMPTY} OK: All spanning trees are ok
29 ... 2 --filter-port='Anonymized 147' OK: Port 'Anonymized 147' spanning tree state is 'blocking' [op status: 'down'] [admin status: 'up'] [index: '1']
30 ... 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 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']
31 ... 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 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']
32 ... 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 029' spanning tree state is 'forwarding' [op status: 'up'] [admin status: 'up'] [index: '2'] - 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']
33 ... 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 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']