Debian Codegraph @

tests/storage/wd/nas/snmp/hardware.robot

raw
1 *** Settings ***
2 Documentation Check WD (Western Digital) NAS in SNMP
3
4 Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource
5
6 Test Timeout 120s
7
8
9 *** Variables ***
10 ${CMD} ${CENTREON_PLUGINS} --plugin=storage::wd::nas::snmp::plugin
11
12 *** Test Cases ***
13 Hardware${tc}
14 [Tags] hardware storage snmp
15 ${command} Catenate
16 ... ${CMD}
17 ... --mode=hardware
18 ... --hostname=${HOSTNAME}
19 ... --snmp-version=${SNMPVERSION}
20 ... --snmp-port=${SNMPPORT}
21 ... --snmp-community=storage/wd/nas/snmp/nas-wd
22 ... ${extra_option}
23
24 Ctn Run Command And Check Result As Strings ${command} ${expected_result}
25
26 Examples: tc extra_option expected_result --
27 ... 1 --warning-fan-status='\\\%{status} =~ "running"' WARNING: fan '0' status: running | 'system#hardware.temperature.celsius'=34C;;;; 'drive:WD-WCC130163701#hardware.temperature.celsius'=40C;;;; 'drive:WD-WCC4E0HRX2TN#hardware.temperature.celsius'=36C;;;; 'drive:WD-WCC4E6KA8V1T#hardware.temperature.celsius'=37C;;;; 'drive:WD-WCC4E7ZHA6A7#hardware.temperature.celsius'=36C;;;;
28 ... 2 --critical-fan-status='\\\%{status} =~ "running"' CRITICAL: fan '0' status: running | 'system#hardware.temperature.celsius'=34C;;;; 'drive:WD-WCC130163701#hardware.temperature.celsius'=40C;;;; 'drive:WD-WCC4E0HRX2TN#hardware.temperature.celsius'=36C;;;; 'drive:WD-WCC4E6KA8V1T#hardware.temperature.celsius'=37C;;;; 'drive:WD-WCC4E7ZHA6A7#hardware.temperature.celsius'=36C;;;;
29 ... 3 --warning-system-temperature='0' WARNING: system temperature: 34 C | 'system#hardware.temperature.celsius'=34C;0:0;;; 'drive:WD-WCC130163701#hardware.temperature.celsius'=40C;;;; 'drive:WD-WCC4E0HRX2TN#hardware.temperature.celsius'=36C;;;; 'drive:WD-WCC4E6KA8V1T#hardware.temperature.celsius'=37C;;;; 'drive:WD-WCC4E7ZHA6A7#hardware.temperature.celsius'=36C;;;;
30 ... 4 --warning-system-temperature='36' OK: system temperature: 34 C - fan '0' status: running | 'system#hardware.temperature.celsius'=34C;0:36;;; 'drive:WD-WCC130163701#hardware.temperature.celsius'=40C;;;; 'drive:WD-WCC4E0HRX2TN#hardware.temperature.celsius'=36C;;;; 'drive:WD-WCC4E6KA8V1T#hardware.temperature.celsius'=37C;;;; 'drive:WD-WCC4E7ZHA6A7#hardware.temperature.celsius'=36C;;;;
31 ... 5 --warning-drive-temperature='0' WARNING: drive 'WD-WCC130163701' temperature: 40 C - drive 'WD-WCC4E0HRX2TN' temperature: 36 C - drive 'WD-WCC4E6KA8V1T' temperature: 37 C - drive 'WD-WCC4E7ZHA6A7' temperature: 36 C | 'system#hardware.temperature.celsius'=34C;;;; 'drive:WD-WCC130163701#hardware.temperature.celsius'=40C;0:0;;; 'drive:WD-WCC4E0HRX2TN#hardware.temperature.celsius'=36C;0:0;;; 'drive:WD-WCC4E6KA8V1T#hardware.temperature.celsius'=37C;0:0;;; 'drive:WD-WCC4E7ZHA6A7#hardware.temperature.celsius'=36C;0:0;;;
32 ... 6 --warning-drive-temperature='70' OK: system temperature: 34 C - fan '0' status: running | 'system#hardware.temperature.celsius'=34C;;;; 'drive:WD-WCC130163701#hardware.temperature.celsius'=40C;0:70;;; 'drive:WD-WCC4E0HRX2TN#hardware.temperature.celsius'=36C;0:70;;; 'drive:WD-WCC4E6KA8V1T#hardware.temperature.celsius'=37C;0:70;;; 'drive:WD-WCC4E7ZHA6A7#hardware.temperature.celsius'=36C;0:70;;;
33 ... 7 --critical-system-temperature='0' CRITICAL: system temperature: 34 C | 'system#hardware.temperature.celsius'=34C;;0:0;; 'drive:WD-WCC130163701#hardware.temperature.celsius'=40C;;;; 'drive:WD-WCC4E0HRX2TN#hardware.temperature.celsius'=36C;;;; 'drive:WD-WCC4E6KA8V1T#hardware.temperature.celsius'=37C;;;; 'drive:WD-WCC4E7ZHA6A7#hardware.temperature.celsius'=36C;;;;
34 ... 8 --critical-system-temperature='70' OK: system temperature: 34 C - fan '0' status: running | 'system#hardware.temperature.celsius'=34C;;0:70;; 'drive:WD-WCC130163701#hardware.temperature.celsius'=40C;;;; 'drive:WD-WCC4E0HRX2TN#hardware.temperature.celsius'=36C;;;; 'drive:WD-WCC4E6KA8V1T#hardware.temperature.celsius'=37C;;;; 'drive:WD-WCC4E7ZHA6A7#hardware.temperature.celsius'=36C;;;;
35 ... 9 --critical-drive-temperature='0' CRITICAL: drive 'WD-WCC130163701' temperature: 40 C - drive 'WD-WCC4E0HRX2TN' temperature: 36 C - drive 'WD-WCC4E6KA8V1T' temperature: 37 C - drive 'WD-WCC4E7ZHA6A7' temperature: 36 C | 'system#hardware.temperature.celsius'=34C;;;; 'drive:WD-WCC130163701#hardware.temperature.celsius'=40C;;0:0;; 'drive:WD-WCC4E0HRX2TN#hardware.temperature.celsius'=36C;;0:0;; 'drive:WD-WCC4E6KA8V1T#hardware.temperature.celsius'=37C;;0:0;; 'drive:WD-WCC4E7ZHA6A7#hardware.temperature.celsius'=36C;;0:0;;
36 ... 10 --critical-drive-temperature='36' CRITICAL: drive 'WD-WCC130163701' temperature: 40 C - drive 'WD-WCC4E6KA8V1T' temperature: 37 C | 'system#hardware.temperature.celsius'=34C;;;; 'drive:WD-WCC130163701#hardware.temperature.celsius'=40C;;0:36;; 'drive:WD-WCC4E0HRX2TN#hardware.temperature.celsius'=36C;;0:36;; 'drive:WD-WCC4E6KA8V1T#hardware.temperature.celsius'=37C;;0:36;; 'drive:WD-WCC4E7ZHA6A7#hardware.temperature.celsius'=36C;;0:36;;