-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ctor 396 pack centreon plugin cloud vmware velocloud restapi mode lis…
…t edges don t retrieve informations and get http code 400 (#5133)
- Loading branch information
Showing
5 changed files
with
380 additions
and
1 deletion.
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
43 changes: 43 additions & 0 deletions
43
tests/robot/cloud/vmware/velocloud/restapi/edgestatus.robot
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,43 @@ | ||
*** Settings *** | ||
Documentation VeloCloud REST API Edge Status | ||
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource | ||
|
||
Suite Setup Start Mockoon ${MOCKOON_JSON} | ||
Suite Teardown Stop Mockoon | ||
Test Timeout 120s | ||
|
||
|
||
*** Variables *** | ||
${MOCKOON_JSON} ${CURDIR}${/}velocloud.mockoon.json | ||
${HOSTNAME} 127.0.0.1 | ||
${APIPORT} 3000 | ||
${CMD} ${CENTREON_PLUGINS} | ||
... --plugin=cloud::vmware::velocloud::restapi::plugin | ||
... --mode edge-status | ||
... --hostname=${HOSTNAME} | ||
... --username=XloginX | ||
... --password=XpasswordX | ||
... --proto=http | ||
... --port=${APIPORT} | ||
... --custommode=api | ||
... --statefile-dir=/dev/shm/ | ||
|
||
*** Test Cases *** | ||
Edge Status ${tc} | ||
[Tags] cloud api vmware | ||
${command} Catenate ${CMD} ${extraoptions} | ||
${output} Run ${command} | ||
|
||
${output} Strip String ${output} | ||
Should Be Equal As Strings | ||
... ${output} | ||
... ${expected_result} | ||
... Wrong output result for command:\n${command}\n\nObtained:\n${output}\n\nExpected:\n${expected_result}\n | ||
... values=False | ||
... collapse_spaces=True | ||
|
||
|
||
Examples: tc extraoptions expected_result -- | ||
... 1 ${EMPTY} CRITICAL: Edge 'MYEDGE#02' State is 'OFFLINE', Service State is 'IN_SERVICE', HA State is 'READY', Activation State is 'ACTIVATED' | ||
... 2 --critical-status='' OK: All edges status are ok |
42 changes: 42 additions & 0 deletions
42
tests/robot/cloud/vmware/velocloud/restapi/listedges.robot
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,42 @@ | ||
*** Settings *** | ||
Documentation VeloCloud REST API Edge Status | ||
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource | ||
|
||
Suite Setup Start Mockoon ${MOCKOON_JSON} | ||
Suite Teardown Stop Mockoon | ||
Test Timeout 120s | ||
|
||
|
||
*** Variables *** | ||
${MOCKOON_JSON} ${CURDIR}${/}velocloud.mockoon.json | ||
${HOSTNAME} 127.0.0.1 | ||
${APIPORT} 3000 | ||
${CMD} ${CENTREON_PLUGINS} | ||
... --plugin=cloud::vmware::velocloud::restapi::plugin | ||
... --mode list-edges | ||
... --hostname=${HOSTNAME} | ||
... --username=XloginX | ||
... --password=XpasswordX | ||
... --proto=http | ||
... --port=${APIPORT} | ||
... --custommode=api | ||
... --statefile-dir=/dev/shm/ | ||
|
||
*** Test Cases *** | ||
List Edges ${tc} | ||
[Tags] cloud api vmware discovery | ||
${command} Catenate ${CMD} ${extraoptions} | wc -l | ||
${output} Run ${command} | ||
|
||
${output} Strip String ${output} | ||
Should Be Equal As Strings | ||
... ${output} | ||
... ${expected_result} | ||
... Wrong output result for command:\n${command}\n\nObtained:\n${output}\n\nExpected:\n${expected_result}\n | ||
... values=False | ||
... collapse_spaces=True | ||
|
||
|
||
Examples: tc extraoptions expected_result -- | ||
... 1 ${EMPTY} 9 |
290 changes: 290 additions & 0 deletions
290
tests/robot/cloud/vmware/velocloud/restapi/velocloud.mockoon.json
Large diffs are not rendered by default.
Oops, something went wrong.