Ctor 396 pack centreon plugin cloud vmware velocloud restapi mode list edges don t retrieve informations and get http code 400 (#5133)
This commit is contained in:
parent
0e252334d8
commit
792cefd77b
|
@ -283,7 +283,8 @@ sub get_entreprise_id {
|
|||
|
||||
my $response = $self->request_api(
|
||||
method => 'POST',
|
||||
endpoint => '/enterprise/getEnterprise'
|
||||
endpoint => '/enterprise/getEnterprise',
|
||||
query_form_post => {}
|
||||
);
|
||||
|
||||
$self->{entreprise_id} = $response->{id};
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
--api-filter-orgs
|
||||
--api-password
|
||||
--api-password
|
||||
--api-path
|
||||
--api-token
|
||||
--api-username
|
||||
--api-version
|
||||
|
@ -165,5 +166,7 @@ v1
|
|||
v2
|
||||
VDSL2
|
||||
Veeam
|
||||
VeloCloud
|
||||
VMware
|
||||
WSMAN
|
||||
Kubernetes
|
|
@ -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
|
|
@ -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
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue