From 0b364a4f4162b1a7aa97189a3a1426708e85d411 Mon Sep 17 00:00:00 2001 From: Giacomo Bernini Date: Tue, 9 Apr 2019 11:41:46 +0200 Subject: [PATCH] fixed http response variable --- .../VNFConfiguration-API/Configuration.robot | 26 ++++----- .../environment/variables.txt | 2 +- .../IndividualSubscription.robot | 32 +++++------ .../IndividualVNFindicator.robot | 30 +++++----- SOL002/VNFIndicator-API/VNFIndicators.robot | 30 +++++----- .../VnfIndicatorsInVnfInstanceId.robot | 26 ++++----- .../environment/individualSubscription.txt | 4 +- .../environment/individualVnfIndicator.txt | 2 +- .../environment/vnfIndicatorinVnfInstance.txt | 2 +- .../IndividualPmJob.robot | 36 ++++++------ .../IndividualReport.robot | 30 +++++----- .../IndividualThreshold.robot | 20 +++---- .../VNFPerformanceManagement-API/PMJobs.robot | 56 +++++++++---------- .../Thresholds.robot | 28 +++++----- .../environment/IndividualPmJob.txt | 4 +- .../environment/individualSubscription.txt | 1 + .../environment/individualThresholds.txt | 4 +- .../environment/pmJobs.txt | 2 +- .../environment/reports.txt | 4 +- .../environment/subscriptions.txt | 1 + .../environment/thresholds.txt | 2 +- 21 files changed, 172 insertions(+), 170 deletions(-) diff --git a/SOL002/VNFConfiguration-API/Configuration.robot b/SOL002/VNFConfiguration-API/Configuration.robot index 4fb16d3b..3d7bebc2 100644 --- a/SOL002/VNFConfiguration-API/Configuration.robot +++ b/SOL002/VNFConfiguration-API/Configuration.robot @@ -112,7 +112,7 @@ Get VNF configuration Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiVersion}/configuration ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send VNF configuration log Trying to perform a PATCH. This method modifies the configuration @@ -121,27 +121,27 @@ Send VNF configuration Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${body}= Get File jsons/vnfConfigModifications.json Patch ${apiRoot}/${apiName}/${apiVersion}/configuration ${body} - Set Suite Variable &{etag} ${response[0]['headers']['ETag']} + Set Suite Variable &{etag} ${response['headers']['ETag']} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is [Arguments] ${expected_status} ${status}= Convert To Integer ${expected_status} - Should Be Equal ${response[0]['status']} ${status} + Should Be Equal ${response['status']} ${status} Log Status code validated Check HTTP Response Header Contains [Arguments] ${CONTENT_TYPE} - Log ${response[0]['headers']} - Should Contain ${response[0]['headers']} ${CONTENT_TYPE} + Log ${response['headers']} + Should Contain ${response['headers']} ${CONTENT_TYPE} Log Header is present Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response[0]['headers']['Content-Type']} application/json + Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response[0]['body']} + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK Check Postcondition VNF Configuration Unmodified (Implicit) @@ -157,7 +157,7 @@ Check Postcondition VNF Is Configured Get VNF configuration ${input_file}= Get File jsons/vnfConfigModifications.json ${input}= evaluate json.loads('''${input_file}''') json - Should Be Equal ${response[0]['body']} ${input} + Should Be Equal ${response['body']} ${input} Send Duplicated VNF configuration Depends On Test Send VNF configuration # If the previous test scceeded, it means that Etag has been modified @@ -169,7 +169,7 @@ Send Duplicated VNF configuration ${body}= Get File jsons/vnfConfigModifications.json Patch ${apiRoot}/${apiName}/${apiVersion}/configuration ${body} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send POST Request for VNF Configuration log Trying to perform a POST. This method should not be implemented @@ -177,7 +177,7 @@ Send POST Request for VNF Configuration Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Post ${apiRoot}/${apiName}/${apiVersion}/configuration ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send PUT Request for VNF Configuration log Trying to perform a POST. This method should not be implemented @@ -185,7 +185,7 @@ Send PUT Request for VNF Configuration Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Put ${apiRoot}/${apiName}/${apiVersion}/configuration ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send DELETE Request for VNF Configuration log Trying to perform a POST. This method should not be implemented @@ -193,4 +193,4 @@ Send DELETE Request for VNF Configuration Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Delete ${apiRoot}/${apiName}/${apiVersion}/configuration ${output}= Output response - Set Suite Variable @{response} ${output} \ No newline at end of file + Set Suite Variable ${response} ${output} \ No newline at end of file diff --git a/SOL002/VNFConfiguration-API/environment/variables.txt b/SOL002/VNFConfiguration-API/environment/variables.txt index dec9d551..6a8e9626 100644 --- a/SOL002/VNFConfiguration-API/environment/variables.txt +++ b/SOL002/VNFConfiguration-API/environment/variables.txt @@ -2,7 +2,7 @@ ${Etag}= an etag ${Etag_modified}= 12345 -@{response}= httpresponse +${response}= httpresponse ${EM-VNF_HOST} localhost # Hostname of the NFVO ${EM-VNF_PORT} 8081 # Listening port of the NFVO diff --git a/SOL002/VNFIndicator-API/IndividualSubscription.robot b/SOL002/VNFIndicator-API/IndividualSubscription.robot index 291d7beb..a96d1f30 100644 --- a/SOL002/VNFIndicator-API/IndividualSubscription.robot +++ b/SOL002/VNFIndicator-API/IndividualSubscription.robot @@ -104,7 +104,7 @@ Get Individual VNF Indicator Subscription Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} GET Individual VNF Indicator Subscription with invalid resource identifier Log Trying to perform a request on a subscriptionID which doesn't exist @@ -112,7 +112,7 @@ GET Individual VNF Indicator Subscription with invalid resource identifier Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send Delete Request for Individual VNF Indicator Subscription Log Trying to perform a DELETE on a subscriptionId @@ -120,7 +120,7 @@ Send Delete Request for Individual VNF Indicator Subscription Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send Delete Request for Individual VNF Indicator Subscription with invalid resource identifier Log Trying to perform a DELETE on a subscriptionId which doesn't exist @@ -128,14 +128,14 @@ Send Delete Request for Individual VNF Indicator Subscription with invalid resou Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send Post Request for Individual VNF Indicator Subscription Log Trying to create a new subscription Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send Put Request for Individual VNF Indicator Subscription Log Trying to perform a PUT. This method should not be implemented @@ -143,38 +143,38 @@ Send Put Request for Individual VNF Indicator Subscription Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response - Set Suite Variable @{origResponse} ${origOutput} + Set Suite Variable ${origResponse} ${origOutput} PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send Patch Request for Individual VNF Indicator Subscription Log Trying to create a new subscription Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response - Set Suite Variable @{origResponse} ${origOutput} + Set Suite Variable ${origResponse} ${origOutput} PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is [Arguments] ${expected_status} ${status}= Convert To Integer ${expected_status} - Should Be Equal ${response[0]['status']} ${status} + Should Be Equal ${response['status']} ${status} Log Status code validated Check HTTP Response Header Contains [Arguments] ${CONTENT_TYPE} - Log ${response[0]['headers']} - Should Contain ${response[0]['headers']} ${CONTENT_TYPE} + Log ${response['headers']} + Should Contain ${response['headers']} ${CONTENT_TYPE} Log Header is present Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response[0]['headers']['Content-Type']} application/json + Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response[0]['body']} + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK Check Postcondition Individual VNF Indicator Subscription is Deleted @@ -186,8 +186,8 @@ Check Postcondition VNF individual subscription Unmodified (Implicit) Log Check Postcondition subscription is not modified GET Individual VNF Indicator Subscription Log Check Response matches original subscription - ${subscription}= evaluate json.loads('''${response[0]['body']}''') json - Should Be Equal ${origResponse[0]['body']['callbackUri']} ${subscription.callbackUri} + ${subscription}= evaluate json.loads('''${response['body']}''') json + Should Be Equal ${origResponse['body']['callbackUri']} ${subscription.callbackUri} Check Postcondition VNF individual subscription is not created Log Check Postcondition subscription is not created diff --git a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot index 7945638d..6b470282 100644 --- a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot +++ b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot @@ -89,7 +89,7 @@ Get Individual Indicator for a VNF instance Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Get Individual Indicator for a VNF instance with invalid indicator identifier Log Trying to perform a negative get, using wrong identifier @@ -97,7 +97,7 @@ Get Individual Indicator for a VNF instance with invalid indicator identifier Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${erroneousIndicatorId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send POST Request for individual indicator in VNF instance Log Trying to perform a POST (method should not be implemented) @@ -105,7 +105,7 @@ Send POST Request for individual indicator in VNF instance Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send PUT Request for individual indicator in VNF instance Log Trying to perform a PUT. This method should not be implemented @@ -113,7 +113,7 @@ Send PUT Request for individual indicator in VNF instance Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send PATCH Request for individual indicator in VNF instance Log Trying to perform a PATCH. This method should not be implemented @@ -121,7 +121,7 @@ Send PATCH Request for individual indicator in VNF instance Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send DELETE Request for individual indicator in VNF instance Log Trying to perform a DELETE. This method should not be implemented @@ -129,37 +129,37 @@ Send DELETE Request for individual indicator in VNF instance Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is [Arguments] ${expected_status} ${status}= Convert To Integer ${expected_status} - Should Be Equal ${response[0]['status']} ${status} + Should Be Equal ${response['status']} ${status} Log Status code validated Check HTTP Response Header Contains [Arguments] ${CONTENT_TYPE} - Log ${response[0]['headers']} - Should Contain ${response[0]['headers']} ${CONTENT_TYPE} + Log ${response['headers']} + Should Contain ${response['headers']} ${CONTENT_TYPE} Log Header is present Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response[0]['headers']['Content-Type']} application/json + Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response[0]['body']} + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK Check HTTP Response Body Includes Requested Indicator ID Log Check Response includes propoer VNF instance and Indicator identifiers - Should Be Equal ${response[0]['body']['id']} ${indicatorId} + Should Be Equal ${response['body']['id']} ${indicatorId} Check HTTP Response Body Includes Requested VNF Instance ID Log Check Response includes propoer VNF instance and Indicator identifiers - Should Be Equal ${response[0]['body']['vnfInstanceId']} ${vnfInstanceId} + Should Be Equal ${response['body']['vnfInstanceId']} ${vnfInstanceId} Check Postcondition Indicator for VNF instance Exist Log Check Response includes VNF Indicator Get Individual Indicator for a VNF instance - Should Be Equal ${response[0]['body']['vnfInstanceId']} ${vnfInstanceId} - Should Be Equal ${response[0]['body']['id']} ${indicatorId} + Should Be Equal ${response['body']['vnfInstanceId']} ${vnfInstanceId} + Should Be Equal ${response['body']['id']} ${indicatorId} diff --git a/SOL002/VNFIndicator-API/VNFIndicators.robot b/SOL002/VNFIndicator-API/VNFIndicators.robot index 86746cd1..bf0fa1d4 100644 --- a/SOL002/VNFIndicator-API/VNFIndicators.robot +++ b/SOL002/VNFIndicator-API/VNFIndicators.robot @@ -143,7 +143,7 @@ Get all VNF indicators Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiVersion}/indicators ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} ${body}= evaluate json.loads('''${response.body}''') json Set Suite Variable @{vnfIndicators} ${body} @@ -154,7 +154,7 @@ Get VNF indicators with filter Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiVersion}/indicators?${POS_FIELDS} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Get VNF indicators with invalid filter Log The GET method queries multiple VNF indicators using invalid Attribute-based filtering parameters @@ -163,7 +163,7 @@ Get VNF indicators with invalid filter Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiVersion}/indicators?${NEG_FIELDS} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Get all VNF indicators with invalid authorization token Pass Execution If ${AUTH_USAGE} == 0 Skipping test as EM/VNF is not supporting authentication @@ -173,7 +173,7 @@ Get all VNF indicators with invalid authorization token Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiVersion}/indicators ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Get all VNF indicators without authorization token Pass Execution If ${AUTH_USAGE} == 0 Skipping test as EM/VNF is not supporting authentication @@ -182,7 +182,7 @@ Get all VNF indicators without authorization token Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiVersion}/indicators ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Get all VNF indicators with invalid resource endpoint Log The GET method queries multiple VNF indicators omitting token @@ -191,7 +191,7 @@ Get all VNF indicators with invalid resource endpoint Log Execute Query and validate response Get ${apiRoot}/${apiName}/${apiVersion}/indicators ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send POST Request for all VNF indicators log Trying to perform a POST. This method should not be implemented @@ -199,7 +199,7 @@ Send POST Request for all VNF indicators Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Post ${apiRoot}/${apiName}/${apiVersion}/indicators ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send PUT Request for all VNF indicators log Trying to perform a PUT. This method should not be implemented @@ -207,7 +207,7 @@ Send PUT Request for all VNF indicators Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Post ${apiRoot}/${apiName}/${apiVersion}/indicators ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send PATCH Request for all VNF indicators log Trying to perform a PATCH. This method should not be implemented @@ -215,7 +215,7 @@ Send PATCH Request for all VNF indicators Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Post ${apiRoot}/${apiName}/${apiVersion}/indicators ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send DELETE Request for all VNF indicators log Trying to perform a DELETE. This method should not be implemented @@ -223,27 +223,27 @@ Send DELETE Request for all VNF indicators Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Post ${apiRoot}/${apiName}/${apiVersion}/indicators ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is [Arguments] ${expected_status} ${status}= Convert To Integer ${expected_status} - Should Be Equal ${response[0]['status']} ${status} + Should Be Equal ${response['status']} ${status} Log Status code validated Check HTTP Response Status Code Is 40x - Should Contain Any ${response[0]['status']} 401 403 + Should Contain Any ${response['status']} 401 403 Log Status code validated Check HTTP Response Header Contains [Arguments] ${CONTENT_TYPE} - Should Contain ${response[0]['headers']} ${CONTENT_TYPE} + Should Contain ${response['headers']} ${CONTENT_TYPE} Log Header is present Check HTTP Response Body Json Schema Is [Arguments] ${schema} - Should Contain ${response[0]['headers']['Content-Type']} application/json - Validate Json ${schema} ${response[0]['body']} + Should Contain ${response['headers']['Content-Type']} application/json + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK Check Postcondition VNF Indicators Exist diff --git a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot index 290bbdb7..7d32ac83 100644 --- a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot +++ b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot @@ -117,7 +117,7 @@ Get all indicators for a VNF instance Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Get all indicators for a VNF instance with filter Log This resource represents VNF indicators related to a VNF instance. @@ -125,7 +125,7 @@ Get all indicators for a VNF instance with filter Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}?${POS_FIELDS} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Get all indicators for a VNF instance with invalid filter Log This resource represents VNF indicators related to a VNF instance. @@ -133,7 +133,7 @@ Get all indicators for a VNF instance with invalid filter Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}?${NEG_FIELDS} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Get all indicators for a VNF instance with invalid resource identifier Log Trying to perform a negative get, using wrong identifier @@ -141,7 +141,7 @@ Get all indicators for a VNF instance with invalid resource identifier Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${erroneousVnfInstanceId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send POST Request for indicators in VNF instance Log Trying to perform a POST (method should not be implemented) @@ -149,7 +149,7 @@ Send POST Request for indicators in VNF instance Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send PUT Request for indicators in VNF instance Log Trying to perform a PUT. This method should not be implemented @@ -157,7 +157,7 @@ Send PUT Request for indicators in VNF instance Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send PATCH Request for indicators in VNF instance Log Trying to perform a PATCH. This method should not be implemented @@ -165,7 +165,7 @@ Send PATCH Request for indicators in VNF instance Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send DELETE Request for indicators in VNF instance Log Trying to perform a DELETE. This method should not be implemented @@ -173,25 +173,25 @@ Send DELETE Request for indicators in VNF instance Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is [Arguments] ${expected_status} ${status}= Convert To Integer ${expected_status} - Should Be Equal ${response[0]['status']} ${status} + Should Be Equal ${response['status']} ${status} Log Status code validated Check HTTP Response Header Contains [Arguments] ${CONTENT_TYPE} - Log ${response[0]['headers']} - Should Contain ${response[0]['headers']} ${CONTENT_TYPE} + Log ${response['headers']} + Should Contain ${response['headers']} ${CONTENT_TYPE} Log Header is present Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response[0]['headers']['Content-Type']} application/json + Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response[0]['body']} + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK Check HTTP Response Body Includes Requested VNF Instance ID diff --git a/SOL002/VNFIndicator-API/environment/individualSubscription.txt b/SOL002/VNFIndicator-API/environment/individualSubscription.txt index 3250487a..1ae75929 100644 --- a/SOL002/VNFIndicator-API/environment/individualSubscription.txt +++ b/SOL002/VNFIndicator-API/environment/individualSubscription.txt @@ -1,5 +1,5 @@ *** Variables *** ${subscriptionId} f3ae6df7-07e1-47c9-8924-9ebe10343586 ${erroneousSubscriptionId} 442e3ee5-0499-4849-9b31-eb91ce1638f1 # Not existing ID on the subscriptions -@{response}= httpresponse -@{origResponse}= httpresponse \ No newline at end of file +${response}= httpresponse +${origResponse}= httpresponse \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/environment/individualVnfIndicator.txt b/SOL002/VNFIndicator-API/environment/individualVnfIndicator.txt index 2570ae39..5e90a5d7 100644 --- a/SOL002/VNFIndicator-API/environment/individualVnfIndicator.txt +++ b/SOL002/VNFIndicator-API/environment/individualVnfIndicator.txt @@ -3,4 +3,4 @@ ${vnfInstanceId} 80b0deba-c398-445b-bef0-ac0fe733e3d0 ${indicatorId} 34e70855-a9d3-4fef-aece-76a3cd266ec8 ${notAllowedIndicatorId} notAllowedId ${erroneousIndicatorId} erroneousIndicatorId -@{response}= httpresponse +${response}= httpresponse diff --git a/SOL002/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt b/SOL002/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt index b07991d9..4ebe5488 100644 --- a/SOL002/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt +++ b/SOL002/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt @@ -3,4 +3,4 @@ ${vnfInstanceId} 80b0deba-c398-445b-bef0-ac0fe733e3d0 ${erroneousVnfInstanceId} erroneousVnfInstanceId ${POS_FIELDS} name=vnfIndicator ${NEG_FIELDS} wrongName=any_value -@{response}= httpresponse +${response}= httpresponse diff --git a/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot b/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot index 9ab9dec9..fe227d6c 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot @@ -105,7 +105,7 @@ GET individual VNF Performance Job Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} GET individual VNF Performance Job with invalid resource identifier Log Trying to perform a negative get, using erroneous PM Job identifier @@ -113,7 +113,7 @@ GET individual VNF Performance Job with invalid resource identifier Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${erroneousPmJobId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Job Log Trying to delete an existing PM Job @@ -121,7 +121,7 @@ Send Delete request for individual VNF Performance Job Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Job with invalid resource identifier Log Trying to perform a negative delete, using erroneous PM Job identifier @@ -129,7 +129,7 @@ Send Delete request for individual VNF Performance Job with invalid resource ide Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${erroneousPmJobId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send Post request for individual VNF Performance Job Log Trying to perform a POST (method should not be implemented) @@ -137,7 +137,7 @@ Send Post request for individual VNF Performance Job Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${newPmJobId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send Put request for individual VNF Performance Job Log Trying to perform a POST (method should not be implemented) @@ -145,10 +145,10 @@ Send Put request for individual VNF Performance Job Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response - Set Suite Variable @{origResponse} ${origOutput} + Set Suite Variable ${origResponse} ${origOutput} PUT ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send Patch request for individual VNF Performance Job Log Trying to perform a PATCH (method should not be implemented) @@ -156,7 +156,7 @@ Send Patch request for individual VNF Performance Job Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Check Postcondition VNF Performance Job is not Created Log Trying to get a new Pm Job @@ -164,17 +164,17 @@ Check Postcondition VNF Performance Job is not Created Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${newPmJobId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 404 Check Postcondition VNF Performance Job is Unmodified (Implicit) Log Check Postcondition VNF PM job is not modified GET individual VNF Performance Job Log Check Response matches original VNF Pm Job - ${pmJob}= evaluate json.loads('''${response[0]['body']}''') json - Should Be Equal ${origResponse[0]['body']['id']} ${pmJob.id} - Should Be Equal ${origResponse[0]['body']['criteria']} ${pmJob.criteria} - Should Be Equal ${origResponse[0]['body']['_links']} ${pmJob._links} + ${pmJob}= evaluate json.loads('''${response['body']}''') json + Should Be Equal ${origresponse['body']['id']} ${pmJob.id} + Should Be Equal ${origresponse['body']['criteria']} ${pmJob.criteria} + Should Be Equal ${origresponse['body']['_links']} ${pmJob._links} Check Postcondition VNF Pm Job is Deleted Log Check Postcondition @@ -183,24 +183,24 @@ Check Postcondition VNF Pm Job is Deleted Check HTTP Response Body Pm Job Identifier matches the requested Pm Job Log Going to validate Pm Job info retrieved - Should Be Equal ${response[0]['body']['id']} ${pmJobId} + Should Be Equal ${response['body']['id']} ${pmJobId} Log Pm Job identifier as expected Check HTTP Response Status Code Is [Arguments] ${expected_status} ${status}= Convert To Integer ${expected_status} - Should Be Equal ${response[0]['status']} ${status} + Should Be Equal ${response['status']} ${status} Log Status code validated Check HTTP Response Header Contains [Arguments] ${CONTENT_TYPE} - Should Contain ${response[0]['headers']} ${CONTENT_TYPE} + Should Contain ${response['headers']} ${CONTENT_TYPE} Log Header is present Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response[0]['headers']['Content-Type']} application/json + Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response[0]['body']} + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFPerformanceManagement-API/IndividualReport.robot b/SOL002/VNFPerformanceManagement-API/IndividualReport.robot index 0d214c0b..8ee08506 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualReport.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualReport.robot @@ -91,7 +91,7 @@ Get Individual Performance Report Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Get Individual Performance Report with invalid resource endpoint Log Trying to get a performance report with invalid resource endpoint @@ -99,41 +99,41 @@ Get Individual Performance Report with invalid resource endpoint Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${erroneousReportId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send Post request for Individual Performance Report Log Trying to create new performance report Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${newReportId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send Put request for Individual Performance Report Log Trying to update performance report Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response - Set Suite Variable @{origResponse} ${origOutput} + Set Suite Variable ${origResponse} ${origOutput} PUT ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send Patch request for Individual Performance Report Log Trying to update performance report Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response - Set Suite Variable @{origResponse} ${origOutput} + Set Suite Variable ${origResponse} ${origOutput} PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send Delete request for Individual Performance Report Log Trying to delete performance report Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Check Postcondition VNF Individual Performance Report Exists Log Checking that report still exists @@ -145,31 +145,31 @@ Check Postcondition VNF Individual Performance Report is not Created Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${newReportId} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 404 Check Postcondition VNF Individual Performance Report is Unmodified (Implicit) Log Check Postcondition VNF PM job is not modified Get Individual Performance Report Log Check Response matches original VNF report - ${report}= evaluate json.loads('''${response[0]['body']}''') json - Should Be Equal ${origResponse[0]['body']['entries'][0]['objectInstanceId']} ${report['entries'][0]['objectInstanceId']} + ${report}= evaluate json.loads('''${response['body']}''') json + Should Be Equal ${origResponse['body']['entries'][0]['objectInstanceId']} ${report['entries'][0]['objectInstanceId']} Check HTTP Response Status Code Is [Arguments] ${expected_status} ${status}= Convert To Integer ${expected_status} - Should Be Equal ${response[0]['status']} ${status} + Should Be Equal ${response['status']} ${status} Log Status code validated Check HTTP Response Header Contains [Arguments] ${CONTENT_TYPE} - Should Contain ${response[0]['headers']} ${CONTENT_TYPE} + Should Contain ${response['headers']} ${CONTENT_TYPE} Log Header is present Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response[0]['headers']['Content-Type']} application/json + Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response[0]['body']} + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot b/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot index d8c52f1e..ccc32980 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot @@ -141,7 +141,7 @@ Send Put request for individual VNF Performance Threshold Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} ${origOutput}= Output response - Set Suite Variable @{origResponse} ${origOutput} + Set Suite Variable ${origResponse} ${origOutput} PUT ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable @{response} ${output} @@ -152,7 +152,7 @@ Send Patch request for individual VNF Performance Threshold Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} ${origOutput}= Output response - Set Suite Variable @{origResponse} ${origOutput} + Set Suite Variable ${origResponse} ${origOutput} PATCH ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable @{response} ${output} @@ -161,9 +161,9 @@ Check Postcondition VNF Performance Threshold is Unmodified (Implicit) Log Check postconidtion threshold not modified GET individual VNF Performance Threshold Log Check Response matches original VNF Threshold - ${threshold}= evaluate json.loads('''${response[0]['body']}''') json - Should Be Equal ${origResponse[0]['body']['id']} ${threshold.id} - Should Be Equal ${origResponse[0]['body']['criteria']} ${threshold.criteria} + ${threshold}= evaluate json.loads('''${response['body']}''') json + Should Be Equal ${origresponse['body']['id']} ${threshold.id} + Should Be Equal ${origresponse['body']['criteria']} ${threshold.criteria} Check Postcondition VNF Performance Threshold is not Created Log Trying to get a new Threshold @@ -181,25 +181,25 @@ Check Postcondition VNF Performance Threshold is Deleted Check HTTP Response Body Threshold Identifier matches the requested Threshold Log Trying to check response ID - Should Be Equal ${response[0]['body']['id']} ${thresholdId} + Should Be Equal ${response['body']['id']} ${thresholdId} Log Pm Job identifier as expected Check HTTP Response Status Code Is [Arguments] ${expected_status} ${status}= Convert To Integer ${expected_status} - Should Be Equal ${response[0]['status']} ${status} + Should Be Equal ${response['status']} ${status} Log Status code validated Check HTTP Response Header Contains [Arguments] ${CONTENT_TYPE} - Should Contain ${response[0]['headers']} ${CONTENT_TYPE} + Should Contain ${response['headers']} ${CONTENT_TYPE} Log Header is present Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response[0]['headers']['Content-Type']} application/json + Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response[0]['body']} + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFPerformanceManagement-API/PMJobs.robot b/SOL002/VNFPerformanceManagement-API/PMJobs.robot index ee9964a8..6fb56481 100644 --- a/SOL002/VNFPerformanceManagement-API/PMJobs.robot +++ b/SOL002/VNFPerformanceManagement-API/PMJobs.robot @@ -175,7 +175,7 @@ GET all VNF Performance Monitoring Jobs Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} GET VNF Performance Monitoring Jobs with attribute-based filter Log Trying to get all PM Jobs present in the VNFM, using filter params @@ -183,7 +183,7 @@ GET VNF Performance Monitoring Jobs with attribute-based filter Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?${POS_FILTER} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} GET VNF Performance Monitoring Jobs with all_fields attribute selector Log Trying to get all PM Jobs present in the VNFM, using 'all_fields' filter @@ -191,7 +191,7 @@ GET VNF Performance Monitoring Jobs with all_fields attribute selector Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?all_fields ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} GET VNF Performance Monitoring Jobs with exclude_default attribute selector Log Trying to get all VNF Packages present in the VNFM, using filter params @@ -199,7 +199,7 @@ GET VNF Performance Monitoring Jobs with exclude_default attribute selector Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?exclude_default ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} GET VNF Performance Monitoring Jobs with fields attribute selector Log Trying to get all VNF Packages present in the VNFM, using filter params @@ -208,7 +208,7 @@ GET VNF Performance Monitoring Jobs with fields attribute selector Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?fields=${fields} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} GET VNF Performance Monitoring Jobs with exclude_fields attribute selector Log Trying to get all VNF Packages present in the VNFM, using filter params @@ -217,7 +217,7 @@ GET VNF Performance Monitoring Jobs with exclude_fields attribute selector Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?fields=${fields} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} GET VNF Performance Monitoring Jobs with invalid attribute-based filter Log Trying to get all PM Jobs present in the VNFM, using an erroneous filter param @@ -225,7 +225,7 @@ GET VNF Performance Monitoring Jobs with invalid attribute-based filter Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?${NEG_FILTER} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} GET VNF Performance Monitoring Jobs with invalid resource endpoint Log Trying to perform a GET on a erroneous URI @@ -233,7 +233,7 @@ GET VNF Performance Monitoring Jobs with invalid resource endpoint Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_job # wrong URI /pm_job instead of /pm_jobs ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send Post Request Create new VNF Performance Monitoring Job Log Creating a new PM Job @@ -243,7 +243,7 @@ Send Post Request Create new VNF Performance Monitoring Job ${body}= Get File jsons/CreatePmJobRequest.json POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs ${body} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send PUT Request for all VNF Performance Monitoring Jobs Log Trying to perform a PUT. This method should not be implemented @@ -251,7 +251,7 @@ Send PUT Request for all VNF Performance Monitoring Jobs Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/pm_jobs ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send PATCH Request for all VNF Performance Monitoring Jobs Log Trying to perform a PUT. This method should not be implemented @@ -259,7 +259,7 @@ Send PATCH Request for all VNF Performance Monitoring Jobs Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send DELETE Request for all VNF Performance Monitoring Jobs Log Trying to perform a PUT. This method should not be implemented @@ -267,7 +267,7 @@ Send DELETE Request for all VNF Performance Monitoring Jobs Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Check Postcondition VNF Performance Monitoring Jobs Exist Log Checking that Pm Job still exists @@ -277,48 +277,48 @@ Check Postcondition PmJob Exists Log Checking that Pm Job exists Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${response[0]['body']['id']} + GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${response['body']['id']} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is PmJob Check HTTP Response Body Matches exclude_fields selector Log Checking that reports element is missing - ${reports}= Get Value From Json ${response[0]['body']} $..reports + ${reports}= Get Value From Json ${response['body']} $..reports Should Be Empty ${reports} Log Checking that reports element is missing - ${criteria}= Get Value From Json ${response[0]['body']} $..criteria + ${criteria}= Get Value From Json ${response['body']} $..criteria Should Be Empty ${criteria} Log Reports element is empty as expected Check HTTP Response Body Matches fields selector Log Trying to validate criteria schema - ${criteria}= Get Value From Json ${response[0]['body']} $..criteria + ${criteria}= Get Value From Json ${response['body']} $..criteria Validate Json criteria.schema.json ${criteria[0]} Log Validation for criteria schema OK Log Trying to validate criteria schema - ${reports}= Get Value From Json ${response[0]['body']} $..reports + ${reports}= Get Value From Json ${response['body']} $..reports Validate Json reports.schema.json ${reports[0]} Log Validation for reports schema OK Check HTTP Response Body Matches exclude_default selector Log Checking that reports element is missing - ${reports}= Get Value From Json ${response[0]['body']} $..reports + ${reports}= Get Value From Json ${response['body']} $..reports Should Be Empty ${reports} Log Reports element is empty as expected Check HTTP Response Body Matches all_fields selector Log Trying to validate criteria schema - ${criteria}= Get Value From Json ${response[0]['body']} $..criteria + ${criteria}= Get Value From Json ${response['body']} $..criteria Validate Json criteria.schema.json ${criteria[0]} Log Validation for criteria schema OK Log Trying to validate criteria schema - ${reports}= Get Value From Json ${response[0]['body']} $..reports + ${reports}= Get Value From Json ${response['body']} $..reports Validate Json reports.schema.json ${reports[0]} Log Validation for reports schema OK Log Validating _links schema - ${links}= Get Value From Json ${response[0]['body']} $.._links + ${links}= Get Value From Json ${response['body']} $.._links Validate Json links.schema.json ${links[0]} Log Validation for _links schema OK @@ -328,29 +328,29 @@ Check HTTP Response Body Matches filter Check HTTP Response Body Does Not Contain reports Log Checking that field element is missing - ${reports}= Get Value From Json ${response[0]['body']} $..reports + ${reports}= Get Value From Json ${response['body']} $..reports Should Be Empty ${reports} Log Reports element is empty as expected Check HTTP Response Status Code Is [Arguments] ${expected_status} ${status}= Convert To Integer ${expected_status} - Should Be Equal ${response[0]['status']} ${status} + Should Be Equal ${response['status']} ${status} Log Status code validated Check HTTP Response Status Code Is 40x - Should Contain Any ${response[0]['status']} 401 403 + Should Contain Any ${response['status']} 401 403 Log Status code validated Check HTTP Response Header Contains [Arguments] ${CONTENT_TYPE} - Should Contain ${response[0]['headers']} ${CONTENT_TYPE} + Should Contain ${response['headers']} ${CONTENT_TYPE} Log Header is present Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response[0]['headers']['Content-Type']} application/json + Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response[0]['body']} + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFPerformanceManagement-API/Thresholds.robot b/SOL002/VNFPerformanceManagement-API/Thresholds.robot index 4a70b2f2..c7737154 100644 --- a/SOL002/VNFPerformanceManagement-API/Thresholds.robot +++ b/SOL002/VNFPerformanceManagement-API/Thresholds.robot @@ -119,7 +119,7 @@ GET all Performance Thresholds Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} GET Performance Thresholds with attribute-based filter Log Trying to get thresholds present in the VNFM with filter @@ -127,7 +127,7 @@ GET Performance Thresholds with attribute-based filter Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_OK} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} GET Performance Thresholds with invalid attribute-based filter Log Trying to get thresholds present in the VNFM with invalid filter @@ -135,7 +135,7 @@ GET Performance Thresholds with invalid attribute-based filter Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_KO} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} GET VNF Performance Thresholds with invalid resource endpoint Log Trying to get thresholds present in the VNFM with invalid resource endpoint @@ -143,7 +143,7 @@ GET VNF Performance Thresholds with invalid resource endpoint Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/threshold ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send Post Request Create new Performance Threshold Log Creating a new THreshold @@ -153,7 +153,7 @@ Send Post Request Create new Performance Threshold ${request}= Get File jsons/CreateThresholdRequest.json POST ${apiRoot}/${apiName}/${apiVersion}/thresholds ${request} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send PUT Request for all Performance Thresholds Log PUT THresholds @@ -162,7 +162,7 @@ Send PUT Request for all Performance Thresholds Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} PUT ${apiRoot}/${apiName}/${apiVersion}/thresholds ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send PATCH Request for all Performance Thresholds Log PUT THresholds @@ -171,14 +171,14 @@ Send PATCH Request for all Performance Thresholds Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/thresholds ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Send DELETE Request for all Performance Thresholds Log DELETE THresholds Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Check Postcondition Thresholds Exist Log Checking that Thresholds still exists @@ -188,9 +188,9 @@ Check Postcondition Threshold Exists Log Checking that Threshold exists Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${response[0]['body']['id']} + GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${response['body']['id']} ${output}= Output response - Set Suite Variable @{response} ${output} + Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is Threshold @@ -201,19 +201,19 @@ Check HTTP Response Body Thresholds match the requested attribute-based filter Check HTTP Response Status Code Is [Arguments] ${expected_status} ${status}= Convert To Integer ${expected_status} - Should Be Equal ${response[0]['status']} ${status} + Should Be Equal ${response['status']} ${status} Log Status code validated Check HTTP Response Header Contains [Arguments] ${CONTENT_TYPE} - Should Contain ${response[0]['headers']} ${CONTENT_TYPE} + Should Contain ${response['headers']} ${CONTENT_TYPE} Log Header is present Check HTTP Response Body Json Schema Is [Arguments] ${input} - Should Contain ${response[0]['headers']['Content-Type']} application/json + Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response[0]['body']} + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK diff --git a/SOL002/VNFPerformanceManagement-API/environment/IndividualPmJob.txt b/SOL002/VNFPerformanceManagement-API/environment/IndividualPmJob.txt index d1a5866b..3fc3b0a0 100644 --- a/SOL002/VNFPerformanceManagement-API/environment/IndividualPmJob.txt +++ b/SOL002/VNFPerformanceManagement-API/environment/IndividualPmJob.txt @@ -2,5 +2,5 @@ ${pmJobId} 29f4ff6a-be91-4ec8-856e-fcf1e2479e4e ${erroneousPmJobId} erroneousPmJobId ${newPmJobId} newPmJobId -@{response}= httpresponse -@{OrigResponse}= httpresponse +${response}= httpresponse +${OrigResponse}= httpresponse diff --git a/SOL002/VNFPerformanceManagement-API/environment/individualSubscription.txt b/SOL002/VNFPerformanceManagement-API/environment/individualSubscription.txt index f5aa4ba9..311bfbe3 100644 --- a/SOL002/VNFPerformanceManagement-API/environment/individualSubscription.txt +++ b/SOL002/VNFPerformanceManagement-API/environment/individualSubscription.txt @@ -1,3 +1,4 @@ *** Variables *** ${subscriptionId} 17563e75-0e14-4bd7-94b4-6bbb869c79aa ${erroneousSubscriptionId} erroneousSubscriptionId +${response}= httpresponse diff --git a/SOL002/VNFPerformanceManagement-API/environment/individualThresholds.txt b/SOL002/VNFPerformanceManagement-API/environment/individualThresholds.txt index 99085ee5..1efba79c 100644 --- a/SOL002/VNFPerformanceManagement-API/environment/individualThresholds.txt +++ b/SOL002/VNFPerformanceManagement-API/environment/individualThresholds.txt @@ -2,5 +2,5 @@ ${thresholdId} 1f50d68b-82e8-4deb-bd40-c934d4d1ac0a ${erroneousThresholdId} erroneousThresholdId ${newThresholdId} newThresholdId -@{response}= httpresponse -@{origResponse}= httpresponse \ No newline at end of file +${response}= httpresponse +${origResponse}= httpresponse \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/environment/pmJobs.txt b/SOL002/VNFPerformanceManagement-API/environment/pmJobs.txt index d3bffe49..6c80ca05 100644 --- a/SOL002/VNFPerformanceManagement-API/environment/pmJobs.txt +++ b/SOL002/VNFPerformanceManagement-API/environment/pmJobs.txt @@ -2,4 +2,4 @@ ${POS_FILTER} objectInstanceIds=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a ${NEG_FILTER} criteriaPmJob=erroneousAttributeName ${fields} criteria,reports -@{response}= httpresponse +${response}= httpresponse diff --git a/SOL002/VNFPerformanceManagement-API/environment/reports.txt b/SOL002/VNFPerformanceManagement-API/environment/reports.txt index 590559d4..6ac5f7c0 100644 --- a/SOL002/VNFPerformanceManagement-API/environment/reports.txt +++ b/SOL002/VNFPerformanceManagement-API/environment/reports.txt @@ -3,5 +3,5 @@ ${pmJobId} 1f50d68b-82e8-4deb-bd40-c934d4d1ac0a ${reportId} 0fb4c875-e07f-46ca-a9dd-13907667a568 ${erroneousReportId} erroneousReportId ${newReportId} newReportId -@{response}= httpresponse -@{OrigResponse}= httpresponse +${response}= httpresponse +${OrigResponse}= httpresponse diff --git a/SOL002/VNFPerformanceManagement-API/environment/subscriptions.txt b/SOL002/VNFPerformanceManagement-API/environment/subscriptions.txt index fec8c84b..89a2b8bc 100644 --- a/SOL002/VNFPerformanceManagement-API/environment/subscriptions.txt +++ b/SOL002/VNFPerformanceManagement-API/environment/subscriptions.txt @@ -1,3 +1,4 @@ *** Variables *** ${filter_ok} callbackUri=http://localhost/subscriptions ${filter_ko} erroneousFilter=erroneous +${response}= httpresponse diff --git a/SOL002/VNFPerformanceManagement-API/environment/thresholds.txt b/SOL002/VNFPerformanceManagement-API/environment/thresholds.txt index 4dbb5520..256e2c90 100644 --- a/SOL002/VNFPerformanceManagement-API/environment/thresholds.txt +++ b/SOL002/VNFPerformanceManagement-API/environment/thresholds.txt @@ -1,4 +1,4 @@ *** Variables *** ${FILTER_OK} objectInstanceId=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a ${FILTER_KO} criterias=erroneousFilter -@{response}= httpresponse +${response}= httpresponse -- GitLab