Commit 0b364a4f authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

fixed http response variable

parent e82d84ad
......@@ -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
......@@ -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
......
......@@ -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
......
......@@ -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}
......@@ -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
......
......@@ -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
......
*** 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
......@@ -3,4 +3,4 @@ ${vnfInstanceId} 80b0deba-c398-445b-bef0-ac0fe733e3d0
${indicatorId} 34e70855-a9d3-4fef-aece-76a3cd266ec8
${notAllowedIndicatorId} notAllowedId
${erroneousIndicatorId} erroneousIndicatorId
@{response}= httpresponse
${response}= httpresponse
......@@ -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
......@@ -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}"}