Debian Codegraph @

tests/network/cyberoam/snmp/vpn-status.robot

raw
1 *** Settings ***
2 Documentation Check VPN status. VPN-Connection-Status: inactive, active,partiallyActive.
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::cyberoam::snmp::plugin
11
12
13 *** Test Cases ***
14 vpn-status ${tc}
15 [Tags] network cyberoam
16 ${command} Catenate
17 ... ${CMD}
18 ... --mode=vpn-status
19 ... --hostname=${HOSTNAME}
20 ... --snmp-version=${SNMPVERSION}
21 ... --snmp-port=${SNMPPORT}
22 ... --snmp-community=network/cyberoam/snmp/slim_sophos
23 ... --snmp-timeout=1
24 ... ${extra_options}
25
26 Ctn Run Command And Check Result As Strings ${command} ${expected_result}
27
28 Examples: tc extra_options expected_result --
29 ... 1 --filter-counters='^total$|^total-normal$' OK: VPN total: 4 - All VPNs are ok | 'total'=4;;;0;
30 ... 2 --filter-name='Anonymized 029' CRITICAL: VPN 'Anonymized 029' (Anonymized 157) status: inactive | 'total'=1;;;0; 'total_inactive'=1;;;0; 'total_active'=0;;;0; 'total_partially_active'=0;;;0;
31 ... 3 --filter-name='Anonymized 132' OK: VPN total: 1, inactive: 0, active: 1, partially active: 0 - VPN 'Anonymized 132' status: active | 'total'=1;;;0; 'total_inactive'=0;;;0; 'total_active'=1;;;0; 'total_partially_active'=0;;;0;
32 ... 4 --filter-vpn-activated='^inactive$' OK: VPN total : skipped (no value(s)), inactive: 0, active: 0, partially active: 0 | 'total_inactive'=0;;;0; 'total_active'=0;;;0; 'total_partially_active'=0;;;0;
33 ... 5 --filter-vpn-activated='^active$' CRITICAL: VPN 'Anonymized 029' (Anonymized 157) status: inactive | 'total'=4;;;0; 'total_inactive'=1;;;0; 'total_active'=3;;;0; 'total_partially_active'=0;;;0;
34 ... 6 --filter-connection-type='host-to-host' OK: VPN total : skipped (no value(s)), inactive: 0, active: 0, partially active: 0 | 'total_inactive'=0;;;0; 'total_active'=0;;;0; 'total_partially_active'=0;;;0;
35 ... 7 --filter-connection-type='site-to-site' CRITICAL: VPN 'Anonymized 029' (Anonymized 157) status: inactive | 'total'=4;;;0; 'total_inactive'=1;;;0; 'total_active'=3;;;0; 'total_partially_active'=0;;;0;
36 ... 8 --filter-connection-type='tunnel-interface' OK: VPN total : skipped (no value(s)), inactive: 0, active: 0, partially active: 0 | 'total_inactive'=0;;;0; 'total_active'=0;;;0; 'total_partially_active'=0;;;0;
37 ... 9 --critical-status='' --warning-status='\\\%{connection_status} ne "active"' WARNING: VPN 'Anonymized 029' (Anonymized 157) status: inactive | 'total'=4;;;0; 'total_inactive'=1;;;0; 'total_active'=3;;;0; 'total_partially_active'=0;;;0;
38 ... 10 --critical-status='' --warning-total=0 --critical-total=20 WARNING: VPN total: 4 | 'total'=4;0:0;0:20;0; 'total_inactive'=1;;;0; 'total_active'=3;;;0; 'total_partially_active'=0;;;0;
39 ... 11 --critical-status='' --warning-total-inactive=10 --critical-total-inactive=0 CRITICAL: VPN inactive: 1 | 'total'=4;;;0; 'total_inactive'=1;0:10;0:0;0; 'total_active'=3;;;0; 'total_partially_active'=0;;;0;
40 ... 12 --critical-status='' --warning-total-active=0 --critical-total-active=0 CRITICAL: VPN active: 3 | 'total'=4;;;0; 'total_inactive'=1;;;0; 'total_active'=3;0:0;0:0;0; 'total_partially_active'=0;;;0;
41 ... 13 --critical-status='0' --warning-total-partially-active=1:1 WARNING: VPN partially active: 0 | 'total'=4;;;0; 'total_inactive'=1;;;0; 'total_active'=3;;;0; 'total_partially_active'=0;1:1;;0;
42 ... 14 --critical-status='0' --critical-total-partially-active=1:1 CRITICAL: VPN partially active: 0 | 'total'=4;;;0; 'total_inactive'=1;;;0; 'total_active'=3;;;0; 'total_partially_active'=0;;1:1;0;
43