-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enh(aruba-aoscx): add spanning tree (mon+disco) and uptime modes (#5454)
Refs: CTOR-1397
- Loading branch information
Showing
9 changed files
with
1,091 additions
and
9 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
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
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,35 @@ | ||
*** Settings *** | ||
|
||
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource | ||
|
||
Test Timeout 120s | ||
Test Setup Ctn Generic Suite Setup | ||
|
||
*** Variables *** | ||
${CMD} ${CENTREON_PLUGINS} --plugin=network::aruba::aoscx::snmp::plugin | ||
|
||
*** Test Cases *** | ||
hardware ${tc} | ||
[Tags] network aruba | ||
${command} Catenate | ||
... ${CMD} | ||
... --mode=hardware | ||
... --hostname=${HOSTNAME} | ||
... --snmp-version=${SNMPVERSION} | ||
... --snmp-port=${SNMPPORT} | ||
... --snmp-community=network/aruba/aoscx/snmp/slim_aoscx-spanning-tree | ||
... --snmp-timeout=1 | ||
... ${extra_options} | ||
|
||
Ctn Run Command And Check Result As Strings ${command} ${expected_result} | ||
|
||
Examples: tc extra_options expected_result -- | ||
... 1 ${EMPTY} OK: All 7 components are ok [1/1 psu, 6/6 temperatures]. | 'Anonymized 145#hardware.temperature.celsius'=60.00C;;;; 'Anonymized 096#hardware.temperature.celsius'=58.00C;;;; 'Anonymized 138#hardware.temperature.celsius'=20.50C;;;; 'Anonymized 186#hardware.temperature.celsius'=63.50C;;;; 'Anonymized 159#hardware.temperature.celsius'=63.25C;;;; 'Anonymized 101#hardware.temperature.celsius'=63.75C;;;; 'hardware.psu.count'=1;;;; 'hardware.temperature.count'=6;;;; | ||
... 2 --component='.*' OK: All 7 components are ok [1/1 psu, 6/6 temperatures]. | 'Anonymized 145#hardware.temperature.celsius'=60.00C;;;; 'Anonymized 096#hardware.temperature.celsius'=58.00C;;;; 'Anonymized 138#hardware.temperature.celsius'=20.50C;;;; 'Anonymized 186#hardware.temperature.celsius'=63.50C;;;; 'Anonymized 159#hardware.temperature.celsius'=63.25C;;;; 'Anonymized 101#hardware.temperature.celsius'=63.75C;;;; 'hardware.psu.count'=1;;;; 'hardware.temperature.count'=6;;;; | ||
... 3 --filter='psu' OK: All 6 components are ok [6/6 temperatures]. | 'Anonymized 145#hardware.temperature.celsius'=60.00C;;;; 'Anonymized 096#hardware.temperature.celsius'=58.00C;;;; 'Anonymized 138#hardware.temperature.celsius'=20.50C;;;; 'Anonymized 186#hardware.temperature.celsius'=63.50C;;;; 'Anonymized 159#hardware.temperature.celsius'=63.25C;;;; 'Anonymized 101#hardware.temperature.celsius'=63.75C;;;; 'hardware.temperature.count'=6;;;; | ||
... 4 --no-component='CRITICAL' --filter='.*' CRITICAL: No components are checked. | ||
... 5 --threshold-overload='fan,WARNING,string' OK: All 7 components are ok [1/1 psu, 6/6 temperatures]. | 'Anonymized 145#hardware.temperature.celsius'=60.00C;;;; 'Anonymized 096#hardware.temperature.celsius'=58.00C;;;; 'Anonymized 138#hardware.temperature.celsius'=20.50C;;;; 'Anonymized 186#hardware.temperature.celsius'=63.50C;;;; 'Anonymized 159#hardware.temperature.celsius'=63.25C;;;; 'Anonymized 101#hardware.temperature.celsius'=63.75C;;;; 'hardware.psu.count'=1;;;; 'hardware.temperature.count'=6;;;; | ||
... 6 --warning='temperature,.*,30' WARNING: temperature 'Anonymized 145' is 60.00 C - temperature 'Anonymized 096' is 58.00 C - temperature 'Anonymized 186' is 63.50 C - temperature 'Anonymized 159' is 63.25 C - temperature 'Anonymized 101' is 63.75 C | 'Anonymized 145#hardware.temperature.celsius'=60.00C;0:30;;; 'Anonymized 096#hardware.temperature.celsius'=58.00C;0:30;;; 'Anonymized 138#hardware.temperature.celsius'=20.50C;0:30;;; 'Anonymized 186#hardware.temperature.celsius'=63.50C;0:30;;; 'Anonymized 159#hardware.temperature.celsius'=63.25C;0:30;;; 'Anonymized 101#hardware.temperature.celsius'=63.75C;0:30;;; 'hardware.psu.count'=1;;;; 'hardware.temperature.count'=6;;;; | ||
... 7 --critical='temperature,.*,40' CRITICAL: temperature 'Anonymized 145' is 60.00 C - temperature 'Anonymized 096' is 58.00 C - temperature 'Anonymized 186' is 63.50 C - temperature 'Anonymized 159' is 63.25 C - temperature 'Anonymized 101' is 63.75 C | 'Anonymized 145#hardware.temperature.celsius'=60.00C;;0:40;; 'Anonymized 096#hardware.temperature.celsius'=58.00C;;0:40;; 'Anonymized 138#hardware.temperature.celsius'=20.50C;;0:40;; 'Anonymized 186#hardware.temperature.celsius'=63.50C;;0:40;; 'Anonymized 159#hardware.temperature.celsius'=63.25C;;0:40;; 'Anonymized 101#hardware.temperature.celsius'=63.75C;;0:40;; 'hardware.psu.count'=1;;;; 'hardware.temperature.count'=6;;;; | ||
... 8 --warning='fan.speed,.*,1000' OK: All 7 components are ok [1/1 psu, 6/6 temperatures]. | 'Anonymized 145#hardware.temperature.celsius'=60.00C;;;; 'Anonymized 096#hardware.temperature.celsius'=58.00C;;;; 'Anonymized 138#hardware.temperature.celsius'=20.50C;;;; 'Anonymized 186#hardware.temperature.celsius'=63.50C;;;; 'Anonymized 159#hardware.temperature.celsius'=63.25C;;;; 'Anonymized 101#hardware.temperature.celsius'=63.75C;;;; 'hardware.psu.count'=1;;;; 'hardware.temperature.count'=6;;;; | ||
... 9 --critical='fan.speed,.*,2000' OK: All 7 components are ok [1/1 psu, 6/6 temperatures]. | 'Anonymized 145#hardware.temperature.celsius'=60.00C;;;; 'Anonymized 096#hardware.temperature.celsius'=58.00C;;;; 'Anonymized 138#hardware.temperature.celsius'=20.50C;;;; 'Anonymized 186#hardware.temperature.celsius'=63.50C;;;; 'Anonymized 159#hardware.temperature.celsius'=63.25C;;;; 'Anonymized 101#hardware.temperature.celsius'=63.75C;;;; 'hardware.psu.count'=1;;;; 'hardware.temperature.count'=6;;;; |
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,44 @@ | ||
*** Settings *** | ||
|
||
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource | ||
|
||
Test Timeout 120s | ||
Test Setup Ctn Generic Suite Setup | ||
|
||
*** Variables *** | ||
${CMD} ${CENTREON_PLUGINS} --plugin=network::aruba::aoscx::snmp::plugin | ||
|
||
*** Test Cases *** | ||
interfaces ${tc} | ||
[Tags] network aruba interfaces | ||
${command} Catenate | ||
... ${CMD} | ||
... --mode=interfaces | ||
... --hostname=${HOSTNAME} | ||
... --snmp-version=${SNMPVERSION} | ||
... --snmp-port=${SNMPPORT} | ||
... --snmp-community=network/aruba/aoscx/snmp/slim_aoscx-spanning-tree | ||
... --snmp-timeout=1 | ||
... ${extra_options} | ||
|
||
Ctn Run Command And Check Result As Strings ${command} ${expected_result} | ||
|
||
Examples: tc extra_options expected_result -- | ||
... 1 ${EMPTY} CRITICAL: Interface '1/1/10' Status : down (admin: up) - Interface '1/1/11' Status : down (admin: up) - Interface '1/1/12' Status : down (admin: up) - Interface '1/1/13' Status : down (admin: up) - Interface '1/1/14' Status : down (admin: up) - Interface '1/1/2' Status : down (admin: up) - Interface '1/1/4' Status : down (admin: up) - Interface '1/1/5' Status : down (admin: up) - Interface '1/1/6' Status : down (admin: up) - Interface '1/1/7' Status : down (admin: up) - Interface '1/1/8' Status : down (admin: up) - Interface '1/1/9' Status : down (admin: up) | ||
... 2 --add-global OK: Total port : 18, AdminStatus Up : 18, AdminStatus Down : 0, OperStatus Up : 6, OperStatus Down : 12 | 'total_port'=18;;;0;18 'total_admin_up'=18;;;0;18 'total_admin_down'=0;;;0;18 'total_oper_up'=6;;;0;18 'global_oper_down'=12;;;0;18 | ||
... 3 --add-status CRITICAL: Interface '1/1/10' Status : down (admin: up) - Interface '1/1/11' Status : down (admin: up) - Interface '1/1/12' Status : down (admin: up) - Interface '1/1/13' Status : down (admin: up) - Interface '1/1/14' Status : down (admin: up) - Interface '1/1/2' Status : down (admin: up) - Interface '1/1/4' Status : down (admin: up) - Interface '1/1/5' Status : down (admin: up) - Interface '1/1/6' Status : down (admin: up) - Interface '1/1/7' Status : down (admin: up) - Interface '1/1/8' Status : down (admin: up) - Interface '1/1/9' Status : down (admin: up) | ||
... 4 --add-duplex-status --warning-status='\\\%{opstatus} eq "warning"' CRITICAL: Interface '1/1/10' Status : down (admin: up) (duplex: fullDuplex) - Interface '1/1/11' Status : down (admin: up) (duplex: fullDuplex) - Interface '1/1/12' Status : down (admin: up) (duplex: fullDuplex) - Interface '1/1/13' Status : down (admin: up) (duplex: fullDuplex) - Interface '1/1/14' Status : down (admin: up) (duplex: fullDuplex) - Interface '1/1/2' Status : down (admin: up) (duplex: fullDuplex) - Interface '1/1/4' Status : down (admin: up) (duplex: fullDuplex) - Interface '1/1/5' Status : down (admin: up) (duplex: fullDuplex) - Interface '1/1/6' Status : down (admin: up) (duplex: fullDuplex) - Interface '1/1/7' Status : down (admin: up) (duplex: fullDuplex) - Interface '1/1/8' Status : down (admin: up) (duplex: fullDuplex) - Interface '1/1/9' Status : down (admin: up) (duplex: fullDuplex) | ||
... 5 --add-traffic --name --interface='Anonymized 123' --warning-in-traffic=1:1 --speed=1 UNKNOWN: No entry found (maybe you should reload cache file) | ||
... 6 --add-errors OK: All interfaces are ok | ||
... 7 --add-cast --interface='1,1,14' OK: All interfaces are ok | ||
... 8 --add-speed --interface='1,1,16' OK: All interfaces are ok | 'speed_1/1/1'=100000000b/s;;;0; 'speed_1/1/16'=1000000000b/s;;;0; | ||
... 9 --add-volume --interface='1,1,10' --add-status='critical' CRITICAL: Interface '1/1/10' Status : down (admin: up) | ||
... 10 --check-metrics='\\\%{opstatus} eq "up"' CRITICAL: Interface '1/1/10' Status : down (admin: up) - Interface '1/1/11' Status : down (admin: up) - Interface '1/1/12' Status : down (admin: up) - Interface '1/1/13' Status : down (admin: up) - Interface '1/1/14' Status : down (admin: up) - Interface '1/1/2' Status : down (admin: up) - Interface '1/1/4' Status : down (admin: up) - Interface '1/1/5' Status : down (admin: up) - Interface '1/1/6' Status : down (admin: up) - Interface '1/1/7' Status : down (admin: up) - Interface '1/1/8' Status : down (admin: up) - Interface '1/1/9' Status : down (admin: up) | ||
... 11 --warning-status='\\\%{admstatus} eq "up"' --interface='16' WARNING: Interface '1/1/16' Status : up (admin: up) | ||
... 12 --critical-status='\\\%{admstatus} eq "up" and \\\%{opstatus} ne "up"' CRITICAL: Interface '1/1/10' Status : down (admin: up) - Interface '1/1/11' Status : down (admin: up) - Interface '1/1/12' Status : down (admin: up) - Interface '1/1/13' Status : down (admin: up) - Interface '1/1/14' Status : down (admin: up) - Interface '1/1/2' Status : down (admin: up) - Interface '1/1/4' Status : down (admin: up) - Interface '1/1/5' Status : down (admin: up) - Interface '1/1/6' Status : down (admin: up) - Interface '1/1/7' Status : down (admin: up) - Interface '1/1/8' Status : down (admin: up) - Interface '1/1/9' Status : down (admin: up) | ||
... 13 --warning-out-traffic='0' --critical-out-traffic=10 --warning-status='\\\%{opstatus} eq "up"' --interface='16' WARNING: Interface '1/1/16' Status : up (admin: up) | ||
... 14 --warning-in-traffic='0' --critical-in-traffic=10 --critical-status='\\\%{opstatus} eq "up"' CRITICAL: Interface '1/1/1' Status : up (admin: up) - Interface '1/1/15' Status : up (admin: up) - Interface '1/1/16' Status : up (admin: up) - Interface 'Anonymized 124' Status : up (admin: up) - Interface '1/1/3' Status : up (admin: up) - Interface 'Anonymized 066' Status : up (admin: up) | ||
... 15 --units-traffic='12%' CRITICAL: Interface '1/1/10' Status : down (admin: up) - Interface '1/1/11' Status : down (admin: up) - Interface '1/1/12' Status : down (admin: up) - Interface '1/1/13' Status : down (admin: up) - Interface '1/1/14' Status : down (admin: up) - Interface '1/1/2' Status : down (admin: up) - Interface '1/1/4' Status : down (admin: up) - Interface '1/1/5' Status : down (admin: up) - Interface '1/1/6' Status : down (admin: up) - Interface '1/1/7' Status : down (admin: up) - Interface '1/1/8' Status : down (admin: up) - Interface '1/1/9' Status : down (admin: up) | ||
... 16 --units-errors='12%' CRITICAL: Interface '1/1/10' Status : down (admin: up) - Interface '1/1/11' Status : down (admin: up) - Interface '1/1/12' Status : down (admin: up) - Interface '1/1/13' Status : down (admin: up) - Interface '1/1/14' Status : down (admin: up) - Interface '1/1/2' Status : down (admin: up) - Interface '1/1/4' Status : down (admin: up) - Interface '1/1/5' Status : down (admin: up) - Interface '1/1/6' Status : down (admin: up) - Interface '1/1/7' Status : down (admin: up) - Interface '1/1/8' Status : down (admin: up) - Interface '1/1/9' Status : down (admin: up) | ||
... 17 --units-cast='12%' CRITICAL: Interface '1/1/10' Status : down (admin: up) - Interface '1/1/11' Status : down (admin: up) - Interface '1/1/12' Status : down (admin: up) - Interface '1/1/13' Status : down (admin: up) - Interface '1/1/14' Status : down (admin: up) - Interface '1/1/2' Status : down (admin: up) - Interface '1/1/4' Status : down (admin: up) - Interface '1/1/5' Status : down (admin: up) - Interface '1/1/6' Status : down (admin: up) - Interface '1/1/7' Status : down (admin: up) - Interface '1/1/8' Status : down (admin: up) - Interface '1/1/9' Status : down (admin: up) | ||
... 18 --display-transform-src='Anonymized' --display-transform-dst='Interface' --name --interface='Anonymized 124' OK: Interface 'Interface 124' Status : up (admin: up) |
Oops, something went wrong.