-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
800 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
*** Settings *** | ||
Documentation Netapp Ontap Restapi Aggregates plugin | ||
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource | ||
|
||
Suite Setup Start Mockoon ${MOCKOON_JSON} | ||
Suite Teardown Stop Mockoon | ||
Test Timeout 120s | ||
|
||
|
||
*** Variables *** | ||
${MOCKOON_JSON} ${CURDIR}${/}netapp.json | ||
|
||
${cmd} ${CENTREON_PLUGINS} | ||
... --plugin=storage::netapp::ontap::restapi::plugin | ||
... --hostname=${HOSTNAME} | ||
... --port=${APIPORT} | ||
... --proto=http | ||
... --api-username=username | ||
... --api-password=password | ||
... --mode=aggregates | ||
|
||
|
||
*** Test Cases *** | ||
Aggregates ${tc} | ||
[Tags] storage netapp ontapp api aggregates mockoon | ||
${command} Catenate | ||
... ${CMD} | ||
... ${extra_options} | ||
|
||
Ctn Run Command And Check Result As Strings ${command} ${expected_result} | ||
|
||
Examples: tc extra_options expected_result -- | ||
... 1 ${EMPTY} OK: Aggregates 'aggregate1' state: online, space usage total: 9.46 GB used: 1.99 MB (0.02%) free: 9.46 GB (100.00%), other : skipped (no value(s)), read iops: 500, write iops: 200, other-iops : skipped (no value(s)), total iops: 1000, read latency: 500 µs, write latency: 200 µs, other-latency : skipped (no value(s)), total latency: 1000 µs | 'aggregate1#aggregate.space.usage.bytes'=2088960B;;;0;10156769280 'aggregate1#aggregate.space.free.bytes'=10156560384B;;;0;10156769280 'aggregate1#aggregate.space.usage.percentage'=0.02%;;;0;100 'aggregate1#aggregate.io.read.usage.bytespersecond'=500B/s;;;; 'aggregate1#aggregate.io.write.usage.bytespersecond'=200B/s;;;0; 'aggregate1#aggregate.io.total.usage.bytespersecond'=1000B/s;;;0; 'aggregate1#aggregate.io.read.usage.iops'=500iops;;;0; 'aggregate1#aggregate.io.write.usage.iops'=200iops;;;0; 'aggregate1#aggregate.io.total.usage.iops'=1000iops;;;0; 'aggregate1#aggregate.io.read.latency.microseconds'=500µs;;;0; 'aggregate1#aggregate.io.write.latency.microseconds'=200µs;;;0; 'aggregate1#aggregate.io.total.latency.microseconds'=1000µs;;;0; | ||
... 2 --warning-status='\\\%{state} !~ /notonline/i' WARNING: Aggregates 'aggregate1' state: online | 'aggregate1#aggregate.space.usage.bytes'=2088960B;;;0;10156769280 'aggregate1#aggregate.space.free.bytes'=10156560384B;;;0;10156769280 'aggregate1#aggregate.space.usage.percentage'=0.02%;;;0;100 'aggregate1#aggregate.io.read.usage.bytespersecond'=500B/s;;;; 'aggregate1#aggregate.io.write.usage.bytespersecond'=200B/s;;;0; 'aggregate1#aggregate.io.total.usage.bytespersecond'=1000B/s;;;0; 'aggregate1#aggregate.io.read.usage.iops'=500iops;;;0; 'aggregate1#aggregate.io.write.usage.iops'=200iops;;;0; 'aggregate1#aggregate.io.total.usage.iops'=1000iops;;;0; 'aggregate1#aggregate.io.read.latency.microseconds'=500µs;;;0; 'aggregate1#aggregate.io.write.latency.microseconds'=200µs;;;0; 'aggregate1#aggregate.io.total.latency.microseconds'=1000µs;;;0; | ||
... 3 --critical-status='\\\%{state} !~ /notonline/i' CRITICAL: Aggregates 'aggregate1' state: online | 'aggregate1#aggregate.space.usage.bytes'=2088960B;;;0;10156769280 'aggregate1#aggregate.space.free.bytes'=10156560384B;;;0;10156769280 'aggregate1#aggregate.space.usage.percentage'=0.02%;;;0;100 'aggregate1#aggregate.io.read.usage.bytespersecond'=500B/s;;;; 'aggregate1#aggregate.io.write.usage.bytespersecond'=200B/s;;;0; 'aggregate1#aggregate.io.total.usage.bytespersecond'=1000B/s;;;0; 'aggregate1#aggregate.io.read.usage.iops'=500iops;;;0; 'aggregate1#aggregate.io.write.usage.iops'=200iops;;;0; 'aggregate1#aggregate.io.total.usage.iops'=1000iops;;;0; 'aggregate1#aggregate.io.read.latency.microseconds'=500µs;;;0; 'aggregate1#aggregate.io.write.latency.microseconds'=200µs;;;0; 'aggregate1#aggregate.io.total.latency.microseconds'=1000µs;;;0; | ||
... 6 --warning-usage-prct=50:50 WARNING: Aggregates 'aggregate1' used : 0.02 % | 'aggregate1#aggregate.space.usage.bytes'=2088960B;;;0;10156769280 'aggregate1#aggregate.space.free.bytes'=10156560384B;;;0;10156769280 'aggregate1#aggregate.space.usage.percentage'=0.02%;50:50;;0;100 'aggregate1#aggregate.io.read.usage.bytespersecond'=500B/s;;;; 'aggregate1#aggregate.io.write.usage.bytespersecond'=200B/s;;;0; 'aggregate1#aggregate.io.total.usage.bytespersecond'=1000B/s;;;0; 'aggregate1#aggregate.io.read.usage.iops'=500iops;;;0; 'aggregate1#aggregate.io.write.usage.iops'=200iops;;;0; 'aggregate1#aggregate.io.total.usage.iops'=1000iops;;;0; 'aggregate1#aggregate.io.read.latency.microseconds'=500µs;;;0; 'aggregate1#aggregate.io.write.latency.microseconds'=200µs;;;0; 'aggregate1#aggregate.io.total.latency.microseconds'=1000µs;;;0; | ||
... 7 --critical-usage-prct=50:50 CRITICAL: Aggregates 'aggregate1' used : 0.02 % | 'aggregate1#aggregate.space.usage.bytes'=2088960B;;;0;10156769280 'aggregate1#aggregate.space.free.bytes'=10156560384B;;;0;10156769280 'aggregate1#aggregate.space.usage.percentage'=0.02%;;50:50;0;100 'aggregate1#aggregate.io.read.usage.bytespersecond'=500B/s;;;; 'aggregate1#aggregate.io.write.usage.bytespersecond'=200B/s;;;0; 'aggregate1#aggregate.io.total.usage.bytespersecond'=1000B/s;;;0; 'aggregate1#aggregate.io.read.usage.iops'=500iops;;;0; 'aggregate1#aggregate.io.write.usage.iops'=200iops;;;0; 'aggregate1#aggregate.io.total.usage.iops'=1000iops;;;0; 'aggregate1#aggregate.io.read.latency.microseconds'=500µs;;;0; 'aggregate1#aggregate.io.write.latency.microseconds'=200µs;;;0; 'aggregate1#aggregate.io.total.latency.microseconds'=1000µs;;;0; |
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,36 @@ | ||
*** Settings *** | ||
Documentation Netapp Ontap Restapi Cluster plugin | ||
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource | ||
|
||
Suite Setup Start Mockoon ${MOCKOON_JSON} | ||
Suite Teardown Stop Mockoon | ||
Test Timeout 120s | ||
|
||
|
||
*** Variables *** | ||
${MOCKOON_JSON} ${CURDIR}${/}netapp.json | ||
|
||
${cmd} ${CENTREON_PLUGINS} | ||
... --plugin=storage::netapp::ontap::restapi::plugin | ||
... --hostname=${HOSTNAME} | ||
... --port=${APIPORT} | ||
... --proto=http | ||
... --api-username=username | ||
... --api-password=password | ||
... --mode=cluster | ||
|
||
|
||
*** Test Cases *** | ||
Cluster ${tc} | ||
[Tags] storage netapp ontapp api cluster mockoon | ||
${command} Catenate | ||
... ${CMD} | ||
... ${extra_options} | ||
|
||
Ctn Run Command And Check Result As Strings ${command} ${expected_result} | ||
|
||
Examples: tc extra_options expected_result -- | ||
... 1 ${EMPTY} OK: cluster 'cluster1' other : skipped (no value(s)), read iops: 200, write iops: 100, other-iops : skipped (no value(s)), total iops: 1000, read latency: 200 ms, write latency: 100 ms, other-latency : skipped (no value(s)), total latency: 1000 ms - node 'node-01' state: online [link status: string] | 'cluster1#cluster.io.read.usage.bytespersecond'=0B/s;;;; 'cluster1#cluster.io.write.usage.bytespersecond'=0B/s;;;0; 'cluster1#cluster.io.total.usage.bytespersecond'=0B/s;;;0; 'cluster1#cluster.io.read.usage.iops'=200iops;;;0; 'cluster1#cluster.io.write.usage.iops'=100iops;;;0; 'cluster1#cluster.io.total.usage.iops'=1000iops;;;0; 'cluster.io.read.latency.milliseconds'=200ms;;;0; 'cluster1#cluster.io.write.latency.milliseconds'=100ms;;;0; 'cluster1#cluster.io.total.latency.milliseconds'=1000ms;;;0; | ||
... 2 --warning-node-status='\\\%{state} !~ /notonline/i' WARNING: cluster 'cluster1' node 'node-01' state: online [link status: string] | 'cluster1#cluster.io.read.usage.bytespersecond'=0B/s;;;; 'cluster1#cluster.io.write.usage.bytespersecond'=0B/s;;;0; 'cluster1#cluster.io.total.usage.bytespersecond'=0B/s;;;0; 'cluster1#cluster.io.read.usage.iops'=200iops;;;0; 'cluster1#cluster.io.write.usage.iops'=100iops;;;0; 'cluster1#cluster.io.total.usage.iops'=1000iops;;;0; 'cluster.io.read.latency.milliseconds'=200ms;;;0; 'cluster1#cluster.io.write.latency.milliseconds'=100ms;;;0; 'cluster1#cluster.io.total.latency.milliseconds'=1000ms;;;0; | ||
... 3 --critical-node-status='\\\%{state} !~ /notonline/i' CRITICAL: cluster 'cluster1' node 'node-01' state: online [link status: string] | 'cluster1#cluster.io.read.usage.bytespersecond'=0B/s;;;; 'cluster1#cluster.io.write.usage.bytespersecond'=0B/s;;;0; 'cluster1#cluster.io.total.usage.bytespersecond'=0B/s;;;0; 'cluster1#cluster.io.read.usage.iops'=200iops;;;0; 'cluster1#cluster.io.write.usage.iops'=100iops;;;0; 'cluster1#cluster.io.total.usage.iops'=1000iops;;;0; 'cluster.io.read.latency.milliseconds'=200ms;;;0; 'cluster1#cluster.io.write.latency.milliseconds'=100ms;;;0; 'cluster1#cluster.io.total.latency.milliseconds'=1000ms;;;0; |
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,39 @@ | ||
*** Settings *** | ||
Documentation Netapp Ontap Restapi Quotas plugin | ||
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource | ||
|
||
Suite Setup Start Mockoon ${MOCKOON_JSON} | ||
Suite Teardown Stop Mockoon | ||
Test Timeout 120s | ||
|
||
|
||
*** Variables *** | ||
${MOCKOON_JSON} ${CURDIR}${/}netapp.json | ||
|
||
${cmd} ${CENTREON_PLUGINS} | ||
... --plugin=storage::netapp::ontap::restapi::plugin | ||
... --hostname=${HOSTNAME} | ||
... --port=${APIPORT} | ||
... --proto=http | ||
... --api-username=username | ||
... --api-password=password | ||
... --mode=quotas | ||
|
||
|
||
*** Test Cases *** | ||
Quotas ${tc} | ||
[Tags] storage netapp ontapp api quotas mockoon | ||
${command} Catenate | ||
... ${CMD} | ||
... ${extra_options} | ||
|
||
Ctn Run Command And Check Result As Strings ${command} ${expected_result} | ||
|
||
Examples: tc extra_options expected_result -- | ||
... 1 ${EMPTY} OK: All 4 components are ok [1/1 bays, 1/1 disks, 1/1 frus, 1/1 shelfs]. | 'hardware.bay.count'=1;;;; 'hardware.disk.count'=1;;;; 'hardware.fru.count'=1;;;; 'hardware.shelf.count'=1;;;; | ||
... 2 --component='bay' OK: All 1 components are ok [1/1 bays]. | 'hardware.bay.count'=1;;;; | ||
... 3 --component='disk' OK: All 1 components are ok [1/1 disks]. | 'hardware.disk.count'=1;;;; | ||
... 4 --component='fru' OK: All 1 components are ok [1/1 frus]. | 'hardware.fru.count'=1;;;; | ||
... 5 --component='shelf' OK: All 1 components are ok [1/1 shelfs]. | 'hardware.shelf.count'=1;;;; | ||
|
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,36 @@ | ||
*** Settings *** | ||
Documentation Netapp Ontap Restapi Luns plugin | ||
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource | ||
|
||
Suite Setup Start Mockoon ${MOCKOON_JSON} | ||
Suite Teardown Stop Mockoon | ||
Test Timeout 120s | ||
|
||
|
||
*** Variables *** | ||
${MOCKOON_JSON} ${CURDIR}${/}netapp.json | ||
|
||
${cmd} ${CENTREON_PLUGINS} | ||
... --plugin=storage::netapp::ontap::restapi::plugin | ||
... --hostname=${HOSTNAME} | ||
... --port=${APIPORT} | ||
... --proto=http | ||
... --api-username=username | ||
... --api-password=password | ||
... --mode=luns | ||
|
||
|
||
*** Test Cases *** | ||
Luns ${tc} | ||
[Tags] storage netapp ontapp api luns mockoon | ||
${command} Catenate | ||
... ${CMD} | ||
... ${extra_options} | ||
|
||
Ctn Run Command And Check Result As Strings ${command} ${expected_result} | ||
|
||
Examples: tc extra_options expected_result -- | ||
... 1 ${EMPTY} OK: Lun '/vol/volume1/qtree1/lun1' state: online [container state: string] | ||
... 2 --warning-status='\\\%{state} !~ /notonline/i' WARNING: Lun '/vol/volume1/qtree1/lun1' state: online [container state: string] | ||
... 3 --critical-status='\\\%{state} !~ /notonline/i' CRITICAL: Lun '/vol/volume1/qtree1/lun1' state: online [container state: string] |
Oops, something went wrong.