From a8a0d03a8ab5596bee4e63830ec1fe455f783a82 Mon Sep 17 00:00:00 2001 From: sfarouq-ext <116093375+sfarouq-ext@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:29:59 +0100 Subject: [PATCH] Ctor 323 refactor robot tests (#5164) --- .gitattributes | 1 + ...ud-azure-policyinsights-policystates.robot | 58 +-- tests/database/database-mysql.robot | 27 +- .../snmp/hardware-ups-standard-snmp.robot | 107 +---- .../instant/snmp/aruba-instant-ap-usage.robot | 70 +-- .../fortigate/snmp/link-monitor.robot | 53 +++ .../fortigate/snmp/list-link-monitor.robot | 33 ++ .../network-fortinet-fortigate-snmp.robot | 420 ------------------ tests/resources/spellcheck/stopwords.txt | 1 + 9 files changed, 145 insertions(+), 625 deletions(-) create mode 100644 .gitattributes create mode 100644 tests/network/fortinet/fortigate/snmp/link-monitor.robot create mode 100644 tests/network/fortinet/fortigate/snmp/list-link-monitor.robot delete mode 100644 tests/network/fortinet/fortigate/snmp/network-fortinet-fortigate-snmp.robot diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..e429594e5 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +tests/resources/spellcheck/*.txt diff \ No newline at end of file diff --git a/tests/cloud/azure/policyinsights/policystates/cloud-azure-policyinsights-policystates.robot b/tests/cloud/azure/policyinsights/policystates/cloud-azure-policyinsights-policystates.robot index 0bbf1a974..8b7c3d58d 100644 --- a/tests/cloud/azure/policyinsights/policystates/cloud-azure-policyinsights-policystates.robot +++ b/tests/cloud/azure/policyinsights/policystates/cloud-azure-policyinsights-policystates.robot @@ -15,54 +15,20 @@ ${BASE_URL} http://${HOSTNAME}:${APIPORT} ${LOGIN_ENDPOINT} ${BASE_URL}/login ${CMD} ${CENTREON_PLUGINS} --plugin=cloud::azure::policyinsights::policystates::plugin --subscription=subscription --tenant=tenant --client-id=client_id --client-secret=secret --statefile-dir=/dev/shm/ --login-endpoint=${LOGIN_ENDPOINT} -&{compliance_value1} -... endpoint=${BASE_URL}/ok -... policyname= -... resourcelocation= -... resourcetype= -... result=OK: Number of non compliant policies: 0 - All compliances states are ok | 'policies.non_compliant.count'=0;;;0; -&{compliance_value2} -... endpoint=${BASE_URL}/oknextlink -... policyname=9daedab3-fb2d-461e-b861-71790eead4f6 -... resourcelocation= -... resourcetype= -... result=OK: Number of non compliant policies: 0 - All compliances states are ok | 'policies.non_compliant.count'=0;;;0; -&{compliance_value3} -... endpoint=${BASE_URL}/nok1 -... policyname=9daedab3-fb2d-461e-b861-71790eead4f6 -... resourcelocation=fr -... resourcetype= -... result=CRITICAL: Compliance state for policy '9daedab3-fb2d-461e-b861-71790eead4f6' on resource 'mypubip1' is 'NonCompliant' | 'policies.non_compliant.count'=1;;;0; -&{compliance_value4} -... endpoint=${BASE_URL}/nok2 -... policyname=9daedab3-fb2d-461e-b861-71790eead4f6 -... resourcelocation=fr -... resourcetype=ip -... result=CRITICAL: Compliance state for policy '9daedab3-fb2d-461e-b861-71790eead4f6' on resource 'mypubip1' is 'NonCompliant' - Compliance state for policy '9daedab3-fb2d-461e-b861-71790eead4f6' on resource 'mypubip2' is 'NonCompliant' | 'policies.non_compliant.count'=2;;;0; -@{compliance_values} &{compliance_value1} &{compliance_value2} &{compliance_value3} &{compliance_value4} - *** Test Cases *** -Azure PolicyInsights PolicyStates compliance +Azure PolicyInsights PolicyStates compliance ${tc} [Documentation] Check Azure PolicyInsights PolicyStates compliance [Tags] cloud azure policyinsights policystates - FOR ${compliance_value} IN @{compliance_values} - ${command} Catenate - ... ${CMD} - ... --mode=compliance - ... --management-endpoint=${compliance_value.endpoint} - ${length} Get Length ${compliance_value.policyname} - IF ${length} > 0 - ${command} Catenate ${command} --policy-name=${compliance_value.policyname} - END - ${length} Get Length ${compliance_value.resourcelocation} - IF ${length} > 0 - ${command} Catenate ${command} --resource-location=${compliance_value.resourcelocation} - END - ${length} Get Length ${compliance_value.resourcetype} - IF ${length} > 0 - ${command} Catenate ${command} --resource-type=${compliance_value.resourcetype} - END + ${command} Catenate + ... ${CMD} + ... --mode=compliance + ... --management-endpoint=${endpoint} - Ctn Run Command And Check Result As Strings ${command} ${compliance_value.result} - END + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + Examples: tc endpoint policyname resourcelocation resourcetype expected_result -- + ... 1 ${BASE_URL}/ok ${EMPTY} ${EMPTY} ${EMPTY} OK: Number of non compliant policies: 0 - All compliances states are ok | 'policies.non_compliant.count'=0;;;0; + ... 2 ${BASE_URL}/oknextlink 9daedab3-fb2d-461e-b861-71790eead4f6 ${EMPTY} ${EMPTY} OK: Number of non compliant policies: 0 - All compliances states are ok | 'policies.non_compliant.count'=0;;;0; + ... 3 ${BASE_URL}/nok1 9daedab3-fb2d-461e-b861-71790eead4f6 fr ${EMPTY} CRITICAL: Compliance state for policy '9daedab3-fb2d-461e-b861-71790eead4f6' on resource 'mypubip1' is 'NonCompliant' | 'policies.non_compliant.count'=1;;;0; + ... 4 ${BASE_URL}/nok2 9daedab3-fb2d-461e-b861-71790eead4f6 fr ip CRITICAL: Compliance state for policy '9daedab3-fb2d-461e-b861-71790eead4f6' on resource 'mypubip1' is 'NonCompliant' - Compliance state for policy '9daedab3-fb2d-461e-b861-71790eead4f6' on resource 'mypubip2' is 'NonCompliant' | 'policies.non_compliant.count'=2;;;0; \ No newline at end of file diff --git a/tests/database/database-mysql.robot b/tests/database/database-mysql.robot index 83f933fed..91a196fc6 100644 --- a/tests/database/database-mysql.robot +++ b/tests/database/database-mysql.robot @@ -9,24 +9,15 @@ Test Timeout 120s *** Variables *** ${CMD} ${CENTREON_PLUGINS} --plugin=database::mysql::plugin -&{sql_string_test1} -... result=UNKNOWN: Need to specify data_source arguments. -@{sql_string_tests} -... &{sql_string_test1} - - *** Test Cases *** -Database Mysql sql string mode +Database Mysql sql string mode ${tc} [Documentation] Mode sql string (common protocol database) [Tags] database mysql sql-string - FOR ${sql_string_test} IN @{sql_string_tests} - ${command} Catenate - ... ${CMD} - ... --mode=sql-string - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${sql_string_test.result} - ... Wrong output result for compliance of ${sql_string_test.result}{\n}Command output:{\n}${output}{\n}{\n}{\n} - END + ${command} Catenate + ... ${CMD} + ... --mode=sql-string + + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + Examples: tc expected_result -- + ... 1 UNKNOWN: Need to specify data_source arguments. diff --git a/tests/hardware/ups/standard/snmp/hardware-ups-standard-snmp.robot b/tests/hardware/ups/standard/snmp/hardware-ups-standard-snmp.robot index 5f0c76626..90647bf96 100644 --- a/tests/hardware/ups/standard/snmp/hardware-ups-standard-snmp.robot +++ b/tests/hardware/ups/standard/snmp/hardware-ups-standard-snmp.robot @@ -9,90 +9,27 @@ Test Timeout 120s *** Variables *** ${CMD} ${CENTREON_PLUGINS} --plugin=hardware::ups::standard::rfc1628::snmp::plugin -&{ups_standard_test_with_values} -... snmpcommunity=hardware/ups/standard/snmp/ups-standard -... warningpower= -... criticalcurrent= -... warningvoltage= -... warningfrequence= -... excludeid= -... result=OK: All input lines are ok | '1#line.input.frequence.hertz'=49.9Hz;;;; '1#line.input.voltage.volt'=233V;;;; '1#line.input.current.ampere'=0A;;;; '1#line.input.power.watt'=0W;;;; '2#line.input.frequence.hertz'=49.9Hz;;;; '2#line.input.voltage.volt'=234V;;;; '2#line.input.current.ampere'=0A;;;; '2#line.input.power.watt'=0W;;;; '3#line.input.frequence.hertz'=49.9Hz;;;; '3#line.input.voltage.volt'=234V;;;; '3#line.input.current.ampere'=0A;;;; '3#line.input.power.watt'=0W;;;; -&{ups_standard_test_critical_with_null_values} -... snmpcommunity=hardware/ups/standard/snmp/ups-standard-null-val -... warningpower='215:' -... criticalcurrent='@0:214' -... warningvoltage='@0:214' -... warningfrequence='@0:214' -... excludeid= -... result=CRITICAL: Input Line '1' Frequence : 0.00 Hz, Voltage : 0.00 V, Current : 0.00 A, Power : 0.00 W - Input Line '2' Frequence : 0.00 Hz, Voltage : 0.00 V, Current : 0.00 A, Power : 0.00 W - Input Line '3' Frequence : 0.00 Hz, Voltage : 0.00 V, Current : 0.00 A, Power : 0.00 W | '1#line.input.frequence.hertz'=0Hz;@0:214;;; '1#line.input.voltage.volt'=0V;@0:214;;; '1#line.input.current.ampere'=0A;;@0:214;; '1#line.input.power.watt'=0W;215:;;; '2#line.input.frequence.hertz'=0Hz;@0:214;;; '2#line.input.voltage.volt'=0V;@0:214;;; '2#line.input.current.ampere'=0A;;@0:214;; '2#line.input.power.watt'=0W;215:;;; '3#line.input.frequence.hertz'=0Hz;@0:214;;; '3#line.input.voltage.volt'=0V;@0:214;;; '3#line.input.current.ampere'=0A;;@0:214;; '3#line.input.power.watt'=0W;215:;;; -&{ups_standard_test_with_exclude_option_1} -... snmpcommunity=hardware/ups/standard/snmp/ups-standard -... warningpower= -... criticalcurrent= -... warningvoltage= -... warningfrequence= -... excludeid='1,2' -... result=OK: Input Line '3' Frequence : 49.90 Hz, Voltage : 234.00 V, Current : 0.00 A, Power : 0.00 W | '3#line.input.frequence.hertz'=49.9Hz;;;; '3#line.input.voltage.volt'=234V;;;; '3#line.input.current.ampere'=0A;;;; '3#line.input.power.watt'=0W;;;; -&{ups_standard_test_with_exclude_option_2} -... snmpcommunity=hardware/ups/standard/snmp/ups-standard -... warningpower= -... criticalcurrent= -... warningvoltage= -... warningfrequence= -... excludeid='1, 2' -... result=OK: Input Line '3' Frequence : 49.90 Hz, Voltage : 234.00 V, Current : 0.00 A, Power : 0.00 W | '3#line.input.frequence.hertz'=49.9Hz;;;; '3#line.input.voltage.volt'=234V;;;; '3#line.input.current.ampere'=0A;;;; '3#line.input.power.watt'=0W;;;; -&{ups_standard_test_with_exclude_option_3} -... snmpcommunity=hardware/ups/standard/snmp/ups-standard -... warningpower= -... criticalcurrent= -... warningvoltage= -... warningfrequence= -... excludeid='1 ,3' -... result=OK: Input Line '2' Frequence : 49.90 Hz, Voltage : 234.00 V, Current : 0.00 A, Power : 0.00 W | '2#line.input.frequence.hertz'=49.9Hz;;;; '2#line.input.voltage.volt'=234V;;;; '2#line.input.current.ampere'=0A;;;; '2#line.input.power.watt'=0W;;;; -@{ups_standard_tests} -... &{ups_standard_test_with_values} -... &{ups_standard_test_critical_with_null_values} -... &{ups_standard_test_with_exclude_option_1} -... &{ups_standard_test_with_exclude_option_2} -... &{ups_standard_test_with_exclude_option_3} - - *** Test Cases *** -Hardware UPS Standard SNMP input lines - [Documentation] Hardware UPS standard SNMP input lines +Hardware UPS Standard SNMP input lines ${tc} [Tags] hardware ups snmp - FOR ${ups_standard_test} IN @{ups_standard_tests} - ${command} Catenate - ... ${CMD} - ... --mode=input-lines - ... --hostname=${HOSTNAME} - ... --snmp-version=${SNMPVERSION} - ... --snmp-port=${SNMPPORT} - ... --snmp-community=${ups_standard_test.snmpcommunity} - ${length} Get Length ${ups_standard_test.warningpower} - IF ${length} > 0 - ${command} Catenate ${command} --warning-power=${ups_standard_test.warningpower} - END - ${length} Get Length ${ups_standard_test.criticalcurrent} - IF ${length} > 0 - ${command} Catenate ${command} --critical-current=${ups_standard_test.criticalcurrent} - END - ${length} Get Length ${ups_standard_test.warningvoltage} - IF ${length} > 0 - ${command} Catenate ${command} --warning-voltage=${ups_standard_test.warningvoltage} - END - ${length} Get Length ${ups_standard_test.warningfrequence} - IF ${length} > 0 - ${command} Catenate ${command} --warning-frequence=${ups_standard_test.warningfrequence} - END - ${length} Get Length ${ups_standard_test.excludeid} - IF ${length} > 0 - ${command} Catenate ${command} --exclude-id=${ups_standard_test.excludeid} - END - ${output} Run ${command} - ${output} Strip String ${output} - Should Be Equal As Strings - ... ${output} - ... ${ups_standard_test.result} - ... Wrong output result for compliance of ${ups_standard_test.result}{\n}Command output:{\n}${output}{\n}{\n}{\n} - END + ${command} Catenate + ... ${CMD} + ... --mode=input-lines + ... --hostname=${HOSTNAME} + ... --snmp-version=${SNMPVERSION} + ... --snmp-port=${SNMPPORT} + ... --snmp-community=${snmpcommunity} + ... --warning-power=${warningpower} + ... --critical-current=${criticalcurrent} + ... --warning-voltage=${warningvoltage} + ... --warning-frequence=${warningfrequence} + ... --exclude-id=${excludeid} + + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + Examples: tc snmpcommunity warningpower criticalcurrent warningvoltage warningfrequence excludeid expected_result -- + ... 1 hardware/ups/standard/snmp/ups-standard ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} OK: All input lines are ok | '1#line.input.frequence.hertz'=49.9Hz;;;; '1#line.input.voltage.volt'=233V;;;; '1#line.input.current.ampere'=0A;;;; '1#line.input.power.watt'=0W;;;; '2#line.input.frequence.hertz'=49.9Hz;;;; '2#line.input.voltage.volt'=234V;;;; '2#line.input.current.ampere'=0A;;;; '2#line.input.power.watt'=0W;;;; '3#line.input.frequence.hertz'=49.9Hz;;;; '3#line.input.voltage.volt'=234V;;;; '3#line.input.current.ampere'=0A;;;; '3#line.input.power.watt'=0W;;;; + ... 2 hardware/ups/standard/snmp/ups-standard-null-val '215:' '@0:214' '@0:214' '@0:214' ${EMPTY} CRITICAL: Input Line '1' Frequence : 0.00 Hz, Voltage : 0.00 V, Current : 0.00 A, Power : 0.00 W - Input Line '2' Frequence : 0.00 Hz, Voltage : 0.00 V, Current : 0.00 A, Power : 0.00 W - Input Line '3' Frequence : 0.00 Hz, Voltage : 0.00 V, Current : 0.00 A, Power : 0.00 W | '1#line.input.frequence.hertz'=0Hz;@0:214;;; '1#line.input.voltage.volt'=0V;@0:214;;; '1#line.input.current.ampere'=0A;;@0:214;; '1#line.input.power.watt'=0W;215:;;; '2#line.input.frequence.hertz'=0Hz;@0:214;;; '2#line.input.voltage.volt'=0V;@0:214;;; '2#line.input.current.ampere'=0A;;@0:214;; '2#line.input.power.watt'=0W;215:;;; '3#line.input.frequence.hertz'=0Hz;@0:214;;; '3#line.input.voltage.volt'=0V;@0:214;;; '3#line.input.current.ampere'=0A;;@0:214;; '3#line.input.power.watt'=0W;215:;;; + ... 3 hardware/ups/standard/snmp/ups-standard ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} '1,2' OK: Input Line '3' Frequence : 49.90 Hz, Voltage : 234.00 V, Current : 0.00 A, Power : 0.00 W | '3#line.input.frequence.hertz'=49.9Hz;;;; '3#line.input.voltage.volt'=234V;;;; '3#line.input.current.ampere'=0A;;;; '3#line.input.power.watt'=0W;;;; + ... 4 hardware/ups/standard/snmp/ups-standard ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} '1, 2' OK: Input Line '3' Frequence : 49.90 Hz, Voltage : 234.00 V, Current : 0.00 A, Power : 0.00 W | '3#line.input.frequence.hertz'=49.9Hz;;;; '3#line.input.voltage.volt'=234V;;;; '3#line.input.current.ampere'=0A;;;; '3#line.input.power.watt'=0W;;;; + ... 5 hardware/ups/standard/snmp/ups-standard ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} '1 ,3' OK: Input Line '2' Frequence : 49.90 Hz, Voltage : 234.00 V, Current : 0.00 A, Power : 0.00 W | '2#line.input.frequence.hertz'=49.9Hz;;;; '2#line.input.voltage.volt'=234V;;;; '2#line.input.current.ampere'=0A;;;; '2#line.input.power.watt'=0W;;;; \ No newline at end of file diff --git a/tests/network/aruba/instant/snmp/aruba-instant-ap-usage.robot b/tests/network/aruba/instant/snmp/aruba-instant-ap-usage.robot index 45d0c083b..80bb70e4d 100644 --- a/tests/network/aruba/instant/snmp/aruba-instant-ap-usage.robot +++ b/tests/network/aruba/instant/snmp/aruba-instant-ap-usage.robot @@ -9,62 +9,20 @@ Test Timeout 120s *** Variables *** ${CMD} ${CENTREON_PLUGINS} --plugin=network::aruba::instant::snmp::plugin --mode=ap-usage --hostname=${HOSTNAME} --snmp-version=${SNMPVERSION} --snmp-port=${SNMPPORT} -&{ap_usage_test_1} -... documentation=Test AP usage without filters -... snmpcommunity=network/aruba/instant/snmp/ap-usage -... filtercounters= -... filtername= -... warningclients= -... criticalclients= -... result=OK: total access points: 5 - All access points are ok | 'accesspoints.total.count'=5;;;0; 'AP Piso 1#clients.current.count'=4;;;0; 'AP Piso 1#cpu.utilization.percentage'=3.00%;;;0;100 'AP Piso 1#memory.usage.bytes'=215711744B;;;0;527028224 'AP Piso 1#memory.free.bytes'=311316480B;;;0;527028224 'AP Piso 1#memory.usage.percentage'=40.93%;;;0;100 'AP Piso 2#clients.current.count'=17;;;0; 'AP Piso 2#cpu.utilization.percentage'=18.00%;;;0;100 'AP Piso 2#memory.usage.bytes'=219455488B;;;0;527028224 'AP Piso 2#memory.free.bytes'=307572736B;;;0;527028224 'AP Piso 2#memory.usage.percentage'=41.64%;;;0;100 'AP Piso 3#clients.current.count'=14;;;0; 'AP Piso 3#cpu.utilization.percentage'=18.00%;;;0;100 'AP Piso 3#memory.usage.bytes'=219185152B;;;0;527028224 'AP Piso 3#memory.free.bytes'=307843072B;;;0;527028224 'AP Piso 3#memory.usage.percentage'=41.59%;;;0;100 'AP Piso 4#clients.current.count'=11;;;0; 'AP Piso 4#cpu.utilization.percentage'=11.00%;;;0;100 'AP Piso 4#memory.usage.bytes'=221700096B;;;0;527028224 'AP Piso 4#memory.free.bytes'=305328128B;;;0;527028224 'AP Piso 4#memory.usage.percentage'=42.07%;;;0;100 'AP Sotano#clients.current.count'=4;;;0; 'AP Sotano#cpu.utilization.percentage'=4.00%;;;0;100 'AP Sotano#memory.usage.bytes'=217473024B;;;0;527028224 'AP Sotano#memory.free.bytes'=309555200B;;;0;527028224 'AP Sotano#memory.usage.percentage'=41.26%;;;0;100 - -&{ap_usage_test_2} -... documentation=Test AP usage with filter on clients -... snmpcommunity=network/aruba/instant/snmp/ap-usage -... filtercounters=clients -... filtername= -... warningclients= -... criticalclients= -... result=OK: All access points are ok | 'AP Piso 1#clients.current.count'=4;;;0; 'AP Piso 2#clients.current.count'=17;;;0; 'AP Piso 3#clients.current.count'=14;;;0; 'AP Piso 4#clients.current.count'=11;;;0; 'AP Sotano#clients.current.count'=4;;;0; - -&{ap_usage_test_3} -... documentation=Test AP usage with filter on clients and filter on name -... snmpcommunity=network/aruba/instant/snmp/ap-usage -... filtercounters=clients -... filtername=Piso 4 -... warningclients= -... criticalclients= -... result=OK: Access Point 'AP Piso 4' Current Clients: 11 | 'AP Piso 4#clients.current.count'=11;;;0; - -&{ap_usage_test_4} -... documentation=Test AP usage without filters with warning when less than 20 clients -... snmpcommunity=network/aruba/instant/snmp/ap-usage -... filtercounters= -... filtername= -... warningclients=20: -... criticalclients= -... result=WARNING: Access Point 'AP Piso 1' Current Clients: 4 - Access Point 'AP Piso 2' Current Clients: 17 - Access Point 'AP Piso 3' Current Clients: 14 - Access Point 'AP Piso 4' Current Clients: 11 - Access Point 'AP Sotano' Current Clients: 4 | 'accesspoints.total.count'=5;;;0; 'AP Piso 1#clients.current.count'=4;20:;;0; 'AP Piso 1#cpu.utilization.percentage'=3.00%;;;0;100 'AP Piso 1#memory.usage.bytes'=215711744B;;;0;527028224 'AP Piso 1#memory.free.bytes'=311316480B;;;0;527028224 'AP Piso 1#memory.usage.percentage'=40.93%;;;0;100 'AP Piso 2#clients.current.count'=17;20:;;0; 'AP Piso 2#cpu.utilization.percentage'=18.00%;;;0;100 'AP Piso 2#memory.usage.bytes'=219455488B;;;0;527028224 'AP Piso 2#memory.free.bytes'=307572736B;;;0;527028224 'AP Piso 2#memory.usage.percentage'=41.64%;;;0;100 'AP Piso 3#clients.current.count'=14;20:;;0; 'AP Piso 3#cpu.utilization.percentage'=18.00%;;;0;100 'AP Piso 3#memory.usage.bytes'=219185152B;;;0;527028224 'AP Piso 3#memory.free.bytes'=307843072B;;;0;527028224 'AP Piso 3#memory.usage.percentage'=41.59%;;;0;100 'AP Piso 4#clients.current.count'=11;20:;;0; 'AP Piso 4#cpu.utilization.percentage'=11.00%;;;0;100 'AP Piso 4#memory.usage.bytes'=221700096B;;;0;527028224 'AP Piso 4#memory.free.bytes'=305328128B;;;0;527028224 'AP Piso 4#memory.usage.percentage'=42.07%;;;0;100 'AP Sotano#clients.current.count'=4;20:;;0; 'AP Sotano#cpu.utilization.percentage'=4.00%;;;0;100 'AP Sotano#memory.usage.bytes'=217473024B;;;0;527028224 'AP Sotano#memory.free.bytes'=309555200B;;;0;527028224 'AP Sotano#memory.usage.percentage'=41.26%;;;0;100 - -@{ap_usage_tests} -... &{ap_usage_test_1} -... &{ap_usage_test_2} -... &{ap_usage_test_3} -... &{ap_usage_test_4} - - *** Test Cases *** -Network Aruba Instant SNMP plugin - [Documentation] AP Usage +Test AP usage ${documentation} ${tc} [Tags] network aruba snmp - FOR ${ap_usage_tc} IN @{ap_usage_tests} - ${command} Catenate - ... ${CMD} - ... --filter-counters='${ap_usage_tc.filtercounters}' - ... --filter-name='${ap_usage_tc.filtername}' - ... --warning-clients='${ap_usage_tc.warningclients}' - ... --critical-clients='${ap_usage_tc.criticalclients}' - ... --snmp-community=${ap_usage_tc.snmpcommunity} + ${command} Catenate + ... ${CMD} + ... --filter-counters='${filtercounters}' + ... --filter-name='${filtername}' + ... --warning-clients='${warningclients}' + ... --snmp-community=${snmpcommunity} - Log To Console ${command} - Ctn Run Command And Check Result As Strings ${command} ${ap_usage_tc.result} - END + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + Examples: tc documentation snmpcommunity filtercounters filtername warningclients expected_result -- + ... 1 without filters network/aruba/instant/snmp/ap-usage ${EMPTY} ${EMPTY} ${EMPTY} OK: total access points: 5 - All access points are ok | 'accesspoints.total.count'=5;;;0; 'AP Piso 1#clients.current.count'=4;;;0; 'AP Piso 1#cpu.utilization.percentage'=3.00%;;;0;100 'AP Piso 1#memory.usage.bytes'=215711744B;;;0;527028224 'AP Piso 1#memory.free.bytes'=311316480B;;;0;527028224 'AP Piso 1#memory.usage.percentage'=40.93%;;;0;100 'AP Piso 2#clients.current.count'=17;;;0; 'AP Piso 2#cpu.utilization.percentage'=18.00%;;;0;100 'AP Piso 2#memory.usage.bytes'=219455488B;;;0;527028224 'AP Piso 2#memory.free.bytes'=307572736B;;;0;527028224 'AP Piso 2#memory.usage.percentage'=41.64%;;;0;100 'AP Piso 3#clients.current.count'=14;;;0; 'AP Piso 3#cpu.utilization.percentage'=18.00%;;;0;100 'AP Piso 3#memory.usage.bytes'=219185152B;;;0;527028224 'AP Piso 3#memory.free.bytes'=307843072B;;;0;527028224 'AP Piso 3#memory.usage.percentage'=41.59%;;;0;100 'AP Piso 4#clients.current.count'=11;;;0; 'AP Piso 4#cpu.utilization.percentage'=11.00%;;;0;100 'AP Piso 4#memory.usage.bytes'=221700096B;;;0;527028224 'AP Piso 4#memory.free.bytes'=305328128B;;;0;527028224 'AP Piso 4#memory.usage.percentage'=42.07%;;;0;100 'AP Sotano#clients.current.count'=4;;;0; 'AP Sotano#cpu.utilization.percentage'=4.00%;;;0;100 'AP Sotano#memory.usage.bytes'=217473024B;;;0;527028224 'AP Sotano#memory.free.bytes'=309555200B;;;0;527028224 'AP Sotano#memory.usage.percentage'=41.26%;;;0;100 + ... 2 with filter on clients network/aruba/instant/snmp/ap-usage clients ${EMPTY} ${EMPTY} OK: All access points are ok | 'AP Piso 1#clients.current.count'=4;;;0; 'AP Piso 2#clients.current.count'=17;;;0; 'AP Piso 3#clients.current.count'=14;;;0; 'AP Piso 4#clients.current.count'=11;;;0; 'AP Sotano#clients.current.count'=4;;;0; + ... 4 with filter on clients and filter on name network/aruba/instant/snmp/ap-usage clients Piso 4 ${EMPTY} OK: Access Point 'AP Piso 4' Current Clients: 11 | 'AP Piso 4#clients.current.count'=11;;;0; + ... 5 without filters with warning when less than 20 clients network/aruba/instant/snmp/ap-usage ${EMPTY} ${EMPTY} 20: WARNING: Access Point 'AP Piso 1' Current Clients: 4 - Access Point 'AP Piso 2' Current Clients: 17 - Access Point 'AP Piso 3' Current Clients: 14 - Access Point 'AP Piso 4' Current Clients: 11 - Access Point 'AP Sotano' Current Clients: 4 | 'accesspoints.total.count'=5;;;0; 'AP Piso 1#clients.current.count'=4;20:;;0; 'AP Piso 1#cpu.utilization.percentage'=3.00%;;;0;100 'AP Piso 1#memory.usage.bytes'=215711744B;;;0;527028224 'AP Piso 1#memory.free.bytes'=311316480B;;;0;527028224 'AP Piso 1#memory.usage.percentage'=40.93%;;;0;100 'AP Piso 2#clients.current.count'=17;20:;;0; 'AP Piso 2#cpu.utilization.percentage'=18.00%;;;0;100 'AP Piso 2#memory.usage.bytes'=219455488B;;;0;527028224 'AP Piso 2#memory.free.bytes'=307572736B;;;0;527028224 'AP Piso 2#memory.usage.percentage'=41.64%;;;0;100 'AP Piso 3#clients.current.count'=14;20:;;0; 'AP Piso 3#cpu.utilization.percentage'=18.00%;;;0;100 'AP Piso 3#memory.usage.bytes'=219185152B;;;0;527028224 'AP Piso 3#memory.free.bytes'=307843072B;;;0;527028224 'AP Piso 3#memory.usage.percentage'=41.59%;;;0;100 'AP Piso 4#clients.current.count'=11;20:;;0; 'AP Piso 4#cpu.utilization.percentage'=11.00%;;;0;100 'AP Piso 4#memory.usage.bytes'=221700096B;;;0;527028224 'AP Piso 4#memory.free.bytes'=305328128B;;;0;527028224 'AP Piso 4#memory.usage.percentage'=42.07%;;;0;100 'AP Sotano#clients.current.count'=4;20:;;0; 'AP Sotano#cpu.utilization.percentage'=4.00%;;;0;100 'AP Sotano#memory.usage.bytes'=217473024B;;;0;527028224 'AP Sotano#memory.free.bytes'=309555200B;;;0;527028224 'AP Sotano#memory.usage.percentage'=41.26%;;;0;100 \ No newline at end of file diff --git a/tests/network/fortinet/fortigate/snmp/link-monitor.robot b/tests/network/fortinet/fortigate/snmp/link-monitor.robot new file mode 100644 index 000000000..854474e2f --- /dev/null +++ b/tests/network/fortinet/fortigate/snmp/link-monitor.robot @@ -0,0 +1,53 @@ +*** Settings *** +Documentation Network Fortinet Fortigate SNMP plugin + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource + +Test Timeout 120s + + +*** Variables *** +${CMD} ${CENTREON_PLUGINS} --plugin=network::fortinet::fortigate::snmp::plugin + +*** Test Cases *** +Network Fortinet Fortigate SNMP link monitor ${tc} + [Documentation] Network Fortinet Fortigate SNMP link-monitor + [Tags] network fortinet fortigate snmp + ${command} Catenate + ... ${CMD} + ... --mode=link-monitor + ... --hostname=${HOSTNAME} + ... --snmp-version=${SNMPVERSION} + ... --snmp-port=${SNMPPORT} + ... --snmp-community=network/fortinet/fortigate/snmp/linkmonitor + ... --filter-id=${filterid} + ... --filter-name=${filtername} + ... --filter-vdom=${filtervdom} + ... --custom-perfdata-instances=${customperfdatainstances} + ... --unknown-status=${unknownstatus} + ... --warning-status=${warningstatus} + ... --critical-status=${criticalstatus} + ... --warning-latency=${warninglatency} + ... --critical-latency=${criticallatency} + ... --warning-jitter=${warningjitter} + ... --critical-jitter=${criticaljitter} + ... --warning-packet-loss=${warningpacketloss} + ... --critical-packet-loss=${criticalpacketloss} + + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + Examples: tc filterid filtername filtervdom customperfdatainstances unknownstatus warningstatus criticalstatus warninglatency criticallatency warningjitter criticaljitter warningpacketloss criticalpacketloss expected_result -- + ... 1 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} OK: All link monitors are ok | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;;;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;;;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;;;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;;0; + ... 2 3 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} OK: Link monitor 'MonitorWAN3' [vdom: root] [id: 3] state: dead, latency: 0.000ms, jitter: 0.000ms, packet loss: 100.000% | 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;;0; + ... 3 ${EMPTY} 'MonitorWAN1' ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} OK: Link monitor 'MonitorWAN1' [vdom: root] [id: 1] state: alive, latency: 39.739ms, jitter: 0.096ms, packet loss: 0.000% | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;;0; + ... 4 ${EMPTY} ${EMPTY} 'root' ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} OK: All link monitors are ok | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;;;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;;;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;;;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;;0; + ... 5 ${EMPTY} ${EMPTY} ${EMPTY} '\\\%(name) %(id)' ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} OK: All link monitors are ok | 'MonitorWAN1~1#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~1#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~1#linkmonitor.packet.loss.percentage'=0;;;0; 'MonitorWAN2~2#linkmonitor.latency.milliseconds'=46.446;;;0; 'MonitorWAN2~2#linkmonitor.jitter.milliseconds'=1.868;;;0; 'MonitorWAN2~2#linkmonitor.packet.loss.percentage'=1;;;0; 'MonitorWAN3~3#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~3#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~3#linkmonitor.packet.loss.percentage'=100;;;0; + ... 6 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} '\\\%{state} =~ /alive/' ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} UNKNOWN: Link monitor 'MonitorWAN1' [vdom: root] [id: 1] state: alive - Link monitor 'MonitorWAN2' [vdom: root] [id: 2] state: alive | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;;;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;;;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;;;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;;0; + ... 7 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} '\\\%{state} =~ /alive/' ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} WARNING: Link monitor 'MonitorWAN1' [vdom: root] [id: 1] state: alive - Link monitor 'MonitorWAN2' [vdom: root] [id: 2] state: alive | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;;;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;;;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;;;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;;0; + ... 8 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} '\\\%{state} =~ /alive/' ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} CRITICAL: Link monitor 'MonitorWAN1' [vdom: root] [id: 1] state: alive - Link monitor 'MonitorWAN2' [vdom: root] [id: 2] state: alive | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;;;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;;;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;;;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;;0; + ... 9 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 40 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} WARNING: Link monitor 'MonitorWAN2' [vdom: root] [id: 2] latency: 46.446ms | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;0:40;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;0:40;;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;;;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;;;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;0:40;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;;0; + ... 10 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 40 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} CRITICAL: Link monitor 'MonitorWAN2' [vdom: root] [id: 2] latency: 46.446ms | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;0:40;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;;0:40;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;;;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;;;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;0:40;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;;0; + ... 11 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 1 ${EMPTY} ${EMPTY} ${EMPTY} WARNING: Link monitor 'MonitorWAN2' [vdom: root] [id: 2] jitter: 1.868ms | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;0:1;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;;;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;0:1;;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;;;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;0:1;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;;0; + ... 12 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 1 ${EMPTY} ${EMPTY} CRITICAL: Link monitor 'MonitorWAN2' [vdom: root] [id: 2] jitter: 1.868ms | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;0:1;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;;;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;;0:1;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;;;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;0:1;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;;0; + ... 13 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 0.5 ${EMPTY} WARNING: Link monitor 'MonitorWAN2' [vdom: root] [id: 2] packet loss: 1.000% - Link monitor 'MonitorWAN3' [vdom: root] [id: 3] packet loss: 100.000% | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;0:0.5;;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;;;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;;;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;0:0.5;;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;0:0.5;;0; + ... 14 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} 0.5 CRITICAL: Link monitor 'MonitorWAN2' [vdom: root] [id: 2] packet loss: 1.000% - Link monitor 'MonitorWAN3' [vdom: root] [id: 3] packet loss: 100.000% | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;0:0.5;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;;;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;;;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;;0:0.5;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;0:0.5;0; \ No newline at end of file diff --git a/tests/network/fortinet/fortigate/snmp/list-link-monitor.robot b/tests/network/fortinet/fortigate/snmp/list-link-monitor.robot new file mode 100644 index 000000000..53ddfd361 --- /dev/null +++ b/tests/network/fortinet/fortigate/snmp/list-link-monitor.robot @@ -0,0 +1,33 @@ +*** Settings *** +Documentation Network Fortinet Fortigate SNMP plugin + +Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource + +Test Timeout 120s + + +*** Variables *** +${CMD} ${CENTREON_PLUGINS} --plugin=network::fortinet::fortigate::snmp::plugin + +*** Test Cases *** +Network Fortinet Fortigate SNMP list link monitor ${tc} + [Documentation] Network Fortinet Fortigate SNMP list-linkmonitors + [Tags] network fortinet fortigate snmp + ${command} Catenate + ... ${CMD} + ... --mode=list-link-monitors + ... --hostname=${HOSTNAME} + ... --snmp-version=${SNMPVERSION} + ... --snmp-port=${SNMPPORT} + ... --snmp-community=network/fortinet/fortigate/snmp/linkmonitor + ... --filter-state=${filterstate} + ... --filter-name=${filtername} + ... --filter-vdom=${filtervdom} + + Ctn Run Command And Check Result As Strings ${command} ${expected_result} + + Examples: tc filterstate filtername filtervdom expected_result -- + ... 1 ${EMPTY} ${EMPTY} ${EMPTY} List link monitors: \n[Name = MonitorWAN1] [Vdom = root] [State = alive]\n[Name = MonitorWAN2] [Vdom = root] [State = alive]\n[Name = MonitorWAN3] [Vdom = root] [State = dead] + ... 2 ${EMPTY} 'MonitorWAN1' ${EMPTY} List link monitors: \n[Name = MonitorWAN1] [Vdom = root] [State = alive] + ... 3 'alive' ${EMPTY} ${EMPTY} List link monitors: \n[Name = MonitorWAN1] [Vdom = root] [State = alive]\n[Name = MonitorWAN2] [Vdom = root] [State = alive] + ... 4 ${EMPTY} ${EMPTY} 'root' List link monitors: \n[Name = MonitorWAN1] [Vdom = root] [State = alive]\n[Name = MonitorWAN2] [Vdom = root] [State = alive]\n[Name = MonitorWAN3] [Vdom = root] [State = dead] diff --git a/tests/network/fortinet/fortigate/snmp/network-fortinet-fortigate-snmp.robot b/tests/network/fortinet/fortigate/snmp/network-fortinet-fortigate-snmp.robot deleted file mode 100644 index c3d253df4..000000000 --- a/tests/network/fortinet/fortigate/snmp/network-fortinet-fortigate-snmp.robot +++ /dev/null @@ -1,420 +0,0 @@ -*** Settings *** -Documentation Network Fortinet Fortigate SNMP plugin - -Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource - -Test Timeout 120s - - -*** Variables *** -${CMD} ${CENTREON_PLUGINS} --plugin=network::fortinet::fortigate::snmp::plugin - -# Test simple usage of the linkmonitor mode -&{fortinet_fortigate_linkmonitor_test1} -... filterid= -... filtername= -... filtervdom= -... customperfdatainstances= -... unknownstatus= -... warningstatus= -... criticalstatus= -... warninglatency= -... criticallatency= -... warningjitter= -... criticaljitter= -... warningpacketloss= -... criticalpacketloss= -... result=CRITICAL: Link monitor 'MonitorWAN3' [vdom: root] [id: 3] state: dead | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;;;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;;;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;;;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;;0; - -# Test linkmonitor mode with filter-id option set to 3 -&{fortinet_fortigate_linkmonitor_test2} -... filterid=3 -... filtername= -... filtervdom= -... customperfdatainstances= -... unknownstatus= -... warningstatus= -... criticalstatus= -... warninglatency= -... criticallatency= -... warningjitter= -... criticaljitter= -... warningpacketloss= -... criticalpacketloss= -... result=CRITICAL: Link monitor 'MonitorWAN3' [vdom: root] [id: 3] state: dead | 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;;0; - -# Test linkmonitor mode with filter-name option set to MonitorWAN1 -&{fortinet_fortigate_linkmonitor_test3} -... filterid= -... filtername='MonitorWAN1' -... filtervdom= -... customperfdatainstances= -... unknownstatus= -... warningstatus= -... criticalstatus= -... warninglatency= -... criticallatency= -... warningjitter= -... criticaljitter= -... warningpacketloss= -... criticalpacketloss= -... result=OK: Link monitor 'MonitorWAN1' [vdom: root] [id: 1] state: alive, latency: 39.739ms, jitter: 0.096ms, packet loss: 0.000% | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;;0; - -# Test linkmonitor mode with filter-vdom option set to 'root' -&{fortinet_fortigate_linkmonitor_test4} -... filterid= -... filtername= -... filtervdom='root' -... customperfdatainstances= -... unknownstatus= -... warningstatus= -... criticalstatus= -... warninglatency= -... criticallatency= -... warningjitter= -... criticaljitter= -... warningpacketloss= -... criticalpacketloss= -... result=CRITICAL: Link monitor 'MonitorWAN3' [vdom: root] [id: 3] state: dead | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;;;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;;;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;;;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;;0; - -# Test linkmonitor mode with custom-perf-data-instances option set to '%(name) %(id)' -&{fortinet_fortigate_linkmonitor_test5} -... filterid= -... filtername= -... filtervdom= -... customperfdatainstances='%(name) %(id)' -... unknownstatus= -... warningstatus= -... criticalstatus= -... warninglatency= -... criticallatency= -... warningjitter= -... criticaljitter= -... warningpacketloss= -... criticalpacketloss= -... result=CRITICAL: Link monitor 'MonitorWAN3' [vdom: root] [id: 3] state: dead | 'MonitorWAN1~1#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~1#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~1#linkmonitor.packet.loss.percentage'=0;;;0; 'MonitorWAN2~2#linkmonitor.latency.milliseconds'=46.446;;;0; 'MonitorWAN2~2#linkmonitor.jitter.milliseconds'=1.868;;;0; 'MonitorWAN2~2#linkmonitor.packet.loss.percentage'=1;;;0; 'MonitorWAN3~3#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~3#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~3#linkmonitor.packet.loss.percentage'=100;;;0; - -# Test linkmonitor mode with unknown-status option set to '%{state} eq "alive"' -&{fortinet_fortigate_linkmonitor_test6} -... filterid= -... filtername= -... filtervdom= -... customperfdatainstances= -... unknownstatus='\%{state} eq "alive"' -... warningstatus= -... criticalstatus= -... warninglatency= -... criticallatency= -... warningjitter= -... criticaljitter= -... warningpacketloss= -... criticalpacketloss= -... result=CRITICAL: Link monitor 'MonitorWAN3' [vdom: root] [id: 3] state: dead UNKNOWN: Link monitor 'MonitorWAN1' [vdom: root] [id: 1] state: alive - Link monitor 'MonitorWAN2' [vdom: root] [id: 2] state: alive | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;;;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;;;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;;;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;;0; - -# Test linkmonitor mode with warning-status option set to '%{state} eq "alive"' -&{fortinet_fortigate_linkmonitor_test7} -... filterid= -... filtername= -... filtervdom= -... customperfdatainstances= -... unknownstatus= -... warningstatus='\%{state} eq "alive"' -... criticalstatus= -... warninglatency= -... criticallatency= -... warningjitter= -... criticaljitter= -... warningpacketloss= -... criticalpacketloss= -... result=CRITICAL: Link monitor 'MonitorWAN3' [vdom: root] [id: 3] state: dead WARNING: Link monitor 'MonitorWAN1' [vdom: root] [id: 1] state: alive - Link monitor 'MonitorWAN2' [vdom: root] [id: 2] state: alive | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;;;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;;;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;;;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;;0; - -# Test linkmonitor mode with critical-status option set to '%{state} eq "alive"' -&{fortinet_fortigate_linkmonitor_test8} -... filterid= -... filtername= -... filtervdom= -... customperfdatainstances= -... unknownstatus= -... warningstatus= -... criticalstatus='\%{state} eq "alive"' -... warninglatency= -... criticallatency= -... warningjitter= -... criticaljitter= -... warningpacketloss= -... criticalpacketloss= -... result=CRITICAL: Link monitor 'MonitorWAN1' [vdom: root] [id: 1] state: alive - Link monitor 'MonitorWAN2' [vdom: root] [id: 2] state: alive | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;;;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;;;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;;;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;;0; - -# Test linkmonitor mode with warning-latency option set to 40 -&{fortinet_fortigate_linkmonitor_test9} -... filterid= -... filtername= -... filtervdom= -... customperfdatainstances= -... unknownstatus= -... warningstatus= -... criticalstatus= -... warninglatency=40 -... criticallatency= -... warningjitter= -... criticaljitter= -... warningpacketloss= -... criticalpacketloss= -... result=CRITICAL: Link monitor 'MonitorWAN3' [vdom: root] [id: 3] state: dead WARNING: Link monitor 'MonitorWAN2' [vdom: root] [id: 2] latency: 46.446ms | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;0:40;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;0:40;;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;;;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;;;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;0:40;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;;0; - -# Test linkmonitor mode with critical-latency option set to 40 -&{fortinet_fortigate_linkmonitor_test10} -... filterid= -... filtername= -... filtervdom= -... customperfdatainstances= -... unknownstatus= -... warningstatus= -... criticalstatus= -... warninglatency= -... criticallatency=40 -... warningjitter= -... criticaljitter= -... warningpacketloss= -... criticalpacketloss= -... result=CRITICAL: Link monitor 'MonitorWAN2' [vdom: root] [id: 2] latency: 46.446ms - Link monitor 'MonitorWAN3' [vdom: root] [id: 3] state: dead | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;0:40;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;;0:40;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;;;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;;;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;0:40;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;;0; - -# Test linkmonitor mode with warning-jitter option set to 1 -&{fortinet_fortigate_linkmonitor_test11} -... filterid= -... filtername= -... filtervdom= -... customperfdatainstances= -... unknownstatus= -... warningstatus= -... criticalstatus= -... warninglatency= -... criticallatency= -... warningjitter=1 -... criticaljitter= -... warningpacketloss= -... criticalpacketloss= -... result=CRITICAL: Link monitor 'MonitorWAN3' [vdom: root] [id: 3] state: dead WARNING: Link monitor 'MonitorWAN2' [vdom: root] [id: 2] jitter: 1.868ms | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;0:1;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;;;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;0:1;;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;;;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;0:1;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;;0; - -# Test linkmonitor mode with critical-jitter option set to 1 -&{fortinet_fortigate_linkmonitor_test12} -... filterid= -... filtername= -... filtervdom= -... customperfdatainstances= -... unknownstatus= -... warningstatus= -... criticalstatus= -... warninglatency= -... criticallatency= -... warningjitter= -... criticaljitter=1 -... warningpacketloss= -... criticalpacketloss= -... result=CRITICAL: Link monitor 'MonitorWAN2' [vdom: root] [id: 2] jitter: 1.868ms - Link monitor 'MonitorWAN3' [vdom: root] [id: 3] state: dead | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;0:1;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;;;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;;0:1;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;;;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;0:1;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;;0; - -# Test linkmonitor mode with warning-packetloss option set to 0.5 -&{fortinet_fortigate_linkmonitor_test13} -... filterid= -... filtername= -... filtervdom= -... customperfdatainstances= -... unknownstatus= -... warningstatus= -... criticalstatus= -... warninglatency= -... criticallatency= -... warningjitter= -... criticaljitter= -... warningpacketloss=0.5 -... criticalpacketloss= -... result=CRITICAL: Link monitor 'MonitorWAN3' [vdom: root] [id: 3] state: dead, packet loss: 100.000% WARNING: Link monitor 'MonitorWAN2' [vdom: root] [id: 2] packet loss: 1.000% | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;0:0.5;;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;;;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;;;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;0:0.5;;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;0:0.5;;0; - -# Test linkmonitor mode with critical-packetloss option set to 0.5 -&{fortinet_fortigate_linkmonitor_test14} -... filterid= -... filtername= -... filtervdom= -... customperfdatainstances= -... unknownstatus= -... warningstatus= -... criticalstatus= -... warninglatency= -... criticallatency= -... warningjitter= -... criticaljitter= -... warningpacketloss= -... criticalpacketloss=0.5 -... result=CRITICAL: Link monitor 'MonitorWAN2' [vdom: root] [id: 2] packet loss: 1.000% - Link monitor 'MonitorWAN3' [vdom: root] [id: 3] state: dead, packet loss: 100.000% | 'MonitorWAN1~root#linkmonitor.latency.milliseconds'=39.739;;;0; 'MonitorWAN1~root#linkmonitor.jitter.milliseconds'=0.096;;;0; 'MonitorWAN1~root#linkmonitor.packet.loss.percentage'=0;;0:0.5;0; 'MonitorWAN2~root#linkmonitor.latency.milliseconds'=46.446;;;0; 'MonitorWAN2~root#linkmonitor.jitter.milliseconds'=1.868;;;0; 'MonitorWAN2~root#linkmonitor.packet.loss.percentage'=1;;0:0.5;0; 'MonitorWAN3~root#linkmonitor.latency.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.jitter.milliseconds'=0.000;;;0; 'MonitorWAN3~root#linkmonitor.packet.loss.percentage'=100;;0:0.5;0; - -@{fortinet_fortigate_linkmonitor_tests} -... &{fortinet_fortigate_linkmonitor_test1} -... &{fortinet_fortigate_linkmonitor_test2} -... &{fortinet_fortigate_linkmonitor_test3} -... &{fortinet_fortigate_linkmonitor_test4} -... &{fortinet_fortigate_linkmonitor_test5} -... &{fortinet_fortigate_linkmonitor_test6} -... &{fortinet_fortigate_linkmonitor_test7} -... &{fortinet_fortigate_linkmonitor_test8} -... &{fortinet_fortigate_linkmonitor_test9} -... &{fortinet_fortigate_linkmonitor_test10} -... &{fortinet_fortigate_linkmonitor_test11} -... &{fortinet_fortigate_linkmonitor_test12} -... &{fortinet_fortigate_linkmonitor_test13} -... &{fortinet_fortigate_linkmonitor_test14} - -# Test simple usage of the list-linkmonitors mode -&{fortinet_fortigate_listlinkmonitors_test1} -... filterstate= -... filtername= -... filtervdom= -... result=List link monitors: \n[Name = MonitorWAN1] [Vdom = root] [State = alive]\n[Name = MonitorWAN2] [Vdom = root] [State = alive]\n[Name = MonitorWAN3] [Vdom = root] [State = dead] - -# Test list-linkmonitors mode with filter-name option set to MonitorWAN1 -&{fortinet_fortigate_listlinkmonitors_test2} -... filterstate= -... filtername='MonitorWAN1' -... filtervdom= -... result=List link monitors: \n[Name = MonitorWAN1] [Vdom = root] [State = alive] - -# Test list-linkmonitors mode with filter-state option set to alive -&{fortinet_fortigate_listlinkmonitors_test3} -... filterstate='alive' -... filtername= -... filtervdom= -... result=List link monitors: \n[Name = MonitorWAN1] [Vdom = root] [State = alive]\n[Name = MonitorWAN2] [Vdom = root] [State = alive] - -# Test list-linkmonitors mode with filter-vdom option set to root -&{fortinet_fortigate_listlinkmonitors_test4} -... filterstate= -... filtername= -... filtervdom='root' -... result=List link monitors: \n[Name = MonitorWAN1] [Vdom = root] [State = alive]\n[Name = MonitorWAN2] [Vdom = root] [State = alive]\n[Name = MonitorWAN3] [Vdom = root] [State = dead] - -@{fortinet_fortigate_listlinkmonitors_tests} -... &{fortinet_fortigate_listlinkmonitors_test1} -... &{fortinet_fortigate_listlinkmonitors_test2} -... &{fortinet_fortigate_listlinkmonitors_test3} -... &{fortinet_fortigate_listlinkmonitors_test4} - - -*** Test Cases *** -Network Fortinet Fortigate SNMP link monitor - [Documentation] Network Fortinet Fortigate SNMP link-monitor - [Tags] network fortinet fortigate snmp - FOR ${fortinet_fortigate_linkmonitor_test} IN @{fortinet_fortigate_linkmonitor_tests} - ${command} Catenate - ... ${CMD} - ... --mode=link-monitor - ... --hostname=${HOSTNAME} - ... --snmp-version=${SNMPVERSION} - ... --snmp-port=${SNMPPORT} - ... --snmp-community=network/fortinet/fortigate/snmp/linkmonitor - ${length} Get Length ${fortinet_fortigate_linkmonitor_test.filterid} - IF ${length} > 0 - ${command} Catenate ${command} --filter-id=${fortinet_fortigate_linkmonitor_test.filterid} - END - ${length} Get Length ${fortinet_fortigate_linkmonitor_test.filtername} - IF ${length} > 0 - ${command} Catenate ${command} --filter-name=${fortinet_fortigate_linkmonitor_test.filtername} - END - ${length} Get Length ${fortinet_fortigate_linkmonitor_test.filtervdom} - IF ${length} > 0 - ${command} Catenate ${command} --filter-vdom=${fortinet_fortigate_linkmonitor_test.filtervdom} - END - ${length} Get Length ${fortinet_fortigate_linkmonitor_test.customperfdatainstances} - IF ${length} > 0 - ${command} Catenate - ... ${command} - ... --custom-perfdata-instances=${fortinet_fortigate_linkmonitor_test.customperfdatainstances} - END - ${length} Get Length ${fortinet_fortigate_linkmonitor_test.unknownstatus} - IF ${length} > 0 - ${command} Catenate - ... ${command} - ... --unknown-status=${fortinet_fortigate_linkmonitor_test.unknownstatus} - END - ${length} Get Length ${fortinet_fortigate_linkmonitor_test.warningstatus} - IF ${length} > 0 - ${command} Catenate - ... ${command} - ... --warning-status=${fortinet_fortigate_linkmonitor_test.warningstatus} - END - ${length} Get Length ${fortinet_fortigate_linkmonitor_test.criticalstatus} - IF ${length} > 0 - ${command} Catenate - ... ${command} - ... --critical-status=${fortinet_fortigate_linkmonitor_test.criticalstatus} - END - ${length} Get Length ${fortinet_fortigate_linkmonitor_test.warninglatency} - IF ${length} > 0 - ${command} Catenate - ... ${command} - ... --warning-latency=${fortinet_fortigate_linkmonitor_test.warninglatency} - END - ${length} Get Length ${fortinet_fortigate_linkmonitor_test.criticallatency} - IF ${length} > 0 - ${command} Catenate - ... ${command} - ... --critical-latency=${fortinet_fortigate_linkmonitor_test.criticallatency} - END - ${length} Get Length ${fortinet_fortigate_linkmonitor_test.warningjitter} - IF ${length} > 0 - ${command} Catenate - ... ${command} - ... --warning-jitter=${fortinet_fortigate_linkmonitor_test.warningjitter} - END - ${length} Get Length ${fortinet_fortigate_linkmonitor_test.criticaljitter} - IF ${length} > 0 - ${command} Catenate - ... ${command} - ... --critical-jitter=${fortinet_fortigate_linkmonitor_test.criticaljitter} - END - ${length} Get Length ${fortinet_fortigate_linkmonitor_test.warningpacketloss} - IF ${length} > 0 - ${command} Catenate - ... ${command} - ... --warning-packet-loss=${fortinet_fortigate_linkmonitor_test.warningpacketloss} - END - ${length} Get Length ${fortinet_fortigate_linkmonitor_test.criticalpacketloss} - IF ${length} > 0 - ${command} Catenate - ... ${command} - ... --critical-packet-loss=${fortinet_fortigate_linkmonitor_test.criticalpacketloss} - END - - Log To Console . no_newline=true - Ctn Run Command And Check Result As Strings ${command} ${fortinet_fortigate_linkmonitor_test.result} - END - -Network Fortinet Fortigate SNMP list link monitor - [Documentation] Network Fortinet Fortigate SNMP list-linkmonitors - [Tags] network fortinet fortigate snmp - FOR ${fortinet_fortigate_listlinkmonitors_test} IN @{fortinet_fortigate_listlinkmonitors_tests} - ${command} Catenate - ... ${CMD} - ... --mode=list-link-monitors - ... --hostname=${HOSTNAME} - ... --snmp-version=${SNMPVERSION} - ... --snmp-port=${SNMPPORT} - ... --snmp-community=network/fortinet/fortigate/snmp/linkmonitor - ${length} Get Length ${fortinet_fortigate_listlinkmonitors_test.filterstate} - IF ${length} > 0 - ${command} Catenate - ... ${command} - ... --filter-state=${fortinet_fortigate_listlinkmonitors_test.filterstate} - END - ${length} Get Length ${fortinet_fortigate_listlinkmonitors_test.filtername} - IF ${length} > 0 - ${command} Catenate - ... ${command} - ... --filter-name=${fortinet_fortigate_listlinkmonitors_test.filtername} - END - ${length} Get Length ${fortinet_fortigate_listlinkmonitors_test.filtervdom} - IF ${length} > 0 - ${command} Catenate - ... ${command} - ... --filter-vdom=${fortinet_fortigate_listlinkmonitors_test.filtervdom} - END - Ctn Run Command And Check Result As Strings ${command} ${fortinet_fortigate_listlinkmonitors_test.result} - END diff --git a/tests/resources/spellcheck/stopwords.txt b/tests/resources/spellcheck/stopwords.txt index c50fe041f..83a61c5df 100644 --- a/tests/resources/spellcheck/stopwords.txt +++ b/tests/resources/spellcheck/stopwords.txt @@ -170,6 +170,7 @@ out-mcast out-ucast overprovisioning perfdata +physicaldrive powershell powershell.exe prct