Commit 7e28b22d authored by Elian Kraja's avatar Elian Kraja
Browse files

Fix on issues: 66, 69, 73 (NXW endpoints), 74, 76, 78, 79, 80, 81, 85, 87, 88

parent d03f349e
...@@ -36,7 +36,7 @@ Get NSD Management Subscriptions with attribute-based filter ...@@ -36,7 +36,7 @@ Get NSD Management Subscriptions with attribute-based filter
... Post-Conditions: none ... Post-Conditions: none
Get NSD Management Subscriptions with attribute-based filters Get NSD Management Subscriptions with attribute-based filters
Check HTTP Response Status Code Is 200 Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is NsdmSubscription Check HTTP Response Body Json Schema Is NsdmSubscriptions
Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter
...@@ -110,7 +110,7 @@ Create duplicated NSD Management subscription with NFVO creating duplicated subs ...@@ -110,7 +110,7 @@ Create duplicated NSD Management subscription with NFVO creating duplicated subs
... Post-Conditions: The duplicated NSD Management subscription is successfully set and it matches the issued subscription ... Post-Conditions: The duplicated NSD Management subscription is successfully set and it matches the issued subscription
Send Post Request for Duplicated NSD Management Subscription Send Post Request for Duplicated NSD Management Subscription
Check HTTP Response Status Code Is 201 Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is PmSubscription Check HTTP Response Body Json Schema Is NsdmSubscription
Check HTTP Response Body NsdmSubscription Attributes Values Match the Issued Subscription Check HTTP Response Body NsdmSubscription Attributes Values Match the Issued Subscription
Check Postcondition NSD Management Subscription Is Set Check Postcondition NSD Management Subscription Is Set
......
...@@ -28,3 +28,4 @@ ${original_etag} 1234 ...@@ -28,3 +28,4 @@ ${original_etag} 1234
${wrong_etag} abcd ${wrong_etag} abcd
${usageState} state ${usageState} state
${length} 1024 ${length} 1024
${createdNsdInfoId} f27200b1-1d8b-48c2-9d98-a993b8ab117f
...@@ -33,7 +33,7 @@ Create a new alarm subscription - DUPLICATION ...@@ -33,7 +33,7 @@ Create a new alarm subscription - DUPLICATION
... Applicability: the NFVO allows creating a subscription resource if another subscription resource with the same filter and callbackUri already exists ... Applicability: the NFVO allows creating a subscription resource if another subscription resource with the same filter and callbackUri already exists
... Post-Conditions: none ... Post-Conditions: none
Depends On Test Create a new subscription Depends On Test Create a new subscription
Pass Execution If ${NFVO_DUPLICATION} == 0 NVFO is not permitting duplication. Skipping the test Pass Execution If ${NFVO_ALLOWS_DUPLICATE_SUBS} == 0 NVFO is not permitting duplication. Skipping the test
POST Subscription POST Subscription
Check HTTP Response Status Code Is 201 Check HTTP Response Status Code Is 201
Check HTTP Response Header Contains Location Check HTTP Response Header Contains Location
...@@ -49,7 +49,7 @@ Create a new alarm subscription - NO DUPLICATION ...@@ -49,7 +49,7 @@ Create a new alarm subscription - NO DUPLICATION
... Applicability: the NFVO decides to not create a duplicate subscription resource ... Applicability: the NFVO decides to not create a duplicate subscription resource
... Post-Conditions: none ... Post-Conditions: none
Depends On Test Create a new subscription Depends On Test Create a new subscription
Pass Execution If ${NFVO_DUPLICATION} == 1 NFVO permits duplication. Skipping the test Pass Execution If ${NFVO_ALLOWS_DUPLICATE_SUBS} == 1 NFVO permits duplication. Skipping the test
POST Subscription POST Subscription
Check HTTP Response Status Code Is 303 Check HTTP Response Status Code Is 303
Check HTTP Response Header Contains Location Check HTTP Response Header Contains Location
......
...@@ -13,7 +13,7 @@ ${apiName} nsfm ...@@ -13,7 +13,7 @@ ${apiName} nsfm
${apiVersion} v1 ${apiVersion} v1
${CONTENT_TYPE} application/json ${CONTENT_TYPE} application/json
${NFVO_DUPLICATION} 0 ${NFVO_ALLOWS_DUPLICATE_SUBS} 0
${alarmId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d ${alarmId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d
${invalidAlarmId} invalidAlramID ${invalidAlarmId} invalidAlramID
......
...@@ -13,7 +13,7 @@ Post Individual VNFInstance - Method not implemented ...@@ -13,7 +13,7 @@ Post Individual VNFInstance - Method not implemented
Check HTTP Response Status Code Is 405 Check HTTP Response Status Code Is 405
Get Information about an individual NS Instance Get Information about an individual NS Instance
Do POST individualNSInstance Do GET IndividualNSInstance
Check HTTP Response Status Code Is 200 Check HTTP Response Status Code Is 200
Check HTTP Response Header ContentType is ${CONTENT_TYPE} Check HTTP Response Header ContentType is ${CONTENT_TYPE}
Check HTTP Response Body Json Schema Is NsInstance.schema.json Check HTTP Response Body Json Schema Is NsInstance.schema.json
......
...@@ -254,6 +254,15 @@ Do DELETE IndividualNSInstance ...@@ -254,6 +254,15 @@ Do DELETE IndividualNSInstance
${outputResponse}= Output response ${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse} Set Global Variable @{response} ${outputResponse}
Do DELETE IndividualNSInstance Conflict
log Trying to delete an individual VNF instance
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
Delete ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${ConflictNsInstanceId}
${outputResponse}= Output response
Set Global Variable @{response} ${outputResponse}
Do DELETE Instantiate NSInstance Do DELETE Instantiate NSInstance
log Trying to delete an instantiate NS instance. This method should not be implemented log Trying to delete an instantiate NS instance. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"}
......
...@@ -143,11 +143,11 @@ Check HTTP Response Body PmJobs Matches the requested exclude selector ...@@ -143,11 +143,11 @@ Check HTTP Response Body PmJobs Matches the requested exclude selector
Check HTTP Response Body PmJobs Matches the requested include selector Check HTTP Response Body PmJobs Matches the requested include selector
Log Trying to validate criteria schema Log Trying to validate criteria schema
${criteria}= Get Value From Json ${response['body']} $..criteria ${criteria}= Get Value From Json ${response['body']} $..criteria
Validate Json criteria.schema.json ${criteria[0]} Validate Json criteria.schema.json ${criteria}
Log Validation for criteria schema OK Log Validation for criteria schema OK
Log Trying to validate criteria schema Log Trying to validate criteria schema
${reports}= Get Value From Json ${response['body']} $..reports ${reports}= Get Value From Json ${response['body']} $..reports
Validate Json reports.schema.json ${reports[0]} Validate Json reports.schema.json ${reports}
Log Validation for reports schema OK Log Validation for reports schema OK
Check HTTP Response Body PmJobs Matches the requested exclude_default selector Check HTTP Response Body PmJobs Matches the requested exclude_default selector
...@@ -159,15 +159,15 @@ Check HTTP Response Body PmJobs Matches the requested exclude_default selector ...@@ -159,15 +159,15 @@ Check HTTP Response Body PmJobs Matches the requested exclude_default selector
Check HTTP Response Body PmJobs Matches the requested all_fields selector Check HTTP Response Body PmJobs Matches the requested all_fields selector
Log Trying to validate criteria schema Log Trying to validate criteria schema
${criteria}= Get Value From Json ${response['body']} $..criteria ${criteria}= Get Value From Json ${response['body']} $..criteria
Validate Json criteria.schema.json ${criteria[0]} Validate Json criteria.schema.json ${criteria}
Log Validation for criteria schema OK Log Validation for criteria schema OK
Log Trying to validate criteria schema Log Trying to validate criteria schema
${reports}= Get Value From Json ${response['body']} $..reports ${reports}= Get Value From Json ${response['body']} $..reports
Validate Json reports.schema.json ${reports[0]} Validate Json reports.schema.json ${reports}
Log Validation for reports schema OK Log Validation for reports schema OK
Log Validating _links schema Log Validating _links schema
${links}= Get Value From Json ${response['body']} $.._links ${links}= Get Value From Json ${response['body']} $.._links
Validate Json links.schema.json ${links[0]} Validate Json links.schema.json ${links}
Log Validation for _links schema OK Log Validation for _links schema OK
Check HTTP Response Body PmJobs Matches the requested Attribute-Based Filter Check HTTP Response Body PmJobs Matches the requested Attribute-Based Filter
...@@ -641,7 +641,7 @@ Check HTTP Response Status Code Is ...@@ -641,7 +641,7 @@ Check HTTP Response Status Code Is
Check HTTP Response Body Json Schema Is Check HTTP Response Body Json Schema Is
[Arguments] ${input} [Arguments] ${input}
Should Contain ${response['headers']['Content-Type']} application/json Should Contain ${response['headers']['Content-Type']} application/json
${schema} = Catenate ${input} .schema.json ${schema} = Catenate SEPARATOR= ${input} .schema.json
Validate Json ${schema} ${response['body']} Validate Json ${schema} ${response['body']}
Log Json Schema Validation OK Log Json Schema Validation OK
...@@ -677,7 +677,7 @@ Check Postcondition NS Performance Subscription Is Set ...@@ -677,7 +677,7 @@ Check Postcondition NS Performance Subscription Is Set
Check Postcondition Subscription Resource URI Returned in Location Header Is Available Check Postcondition Subscription Resource URI Returned in Location Header Is Available
Log Going to check postcondition Log Going to check postcondition
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${response.headers['Location']} GET ${response['headers']['Location']}
Integer response status 200 Integer response status 200
Log Received a 200 OK as expected Log Received a 200 OK as expected
${contentType}= Output response headers Content-Type ${contentType}= Output response headers Content-Type
...@@ -771,7 +771,7 @@ Check HTTP Response Body Subscription Identifier matches the requested Subscript ...@@ -771,7 +771,7 @@ Check HTTP Response Body Subscription Identifier matches the requested Subscript
Check HTTP Response Header Contains Check HTTP Response Header Contains
[Arguments] ${CONTENT_TYPE} [Arguments] ${CONTENT_TYPE}
Should Contain ${response.headers} ${CONTENT_TYPE} Should Contain ${response['headers']} ${CONTENT_TYPE}
Log Header is present Log Header is present
......
{ {
"description": "Links for this resource.\n", "type": "array",
"items": {
"type": "object", "type": "object",
"required": ["self"], "description": "Links to resources related to this resource.\n",
"required": [
"self",
"packageContent"
],
"properties": { "properties": {
"self": { "self": {
"description": "This type represents a link to a resource.\n", "description": "This type represents a link to a resource.\n",
"type": "object", "type": "object",
"required": ["href"], "required": [
"href"
],
"properties": { "properties": {
"href": { "href": {
"description": "URI of the referenced resource.\n", "description": "URI of the referenced resource.\n",
...@@ -15,13 +22,26 @@ ...@@ -15,13 +22,26 @@
} }
} }
}, },
"objects": { "vnfd": {
"description": "Links to resources representing the VNF instances for which performance information is collected. Shall be present if the VNF instance information is accessible as a resource.\n", "description": "This type represents a link to a resource.\n",
"type": "array", "type": "object",
"items": { "required": [
"href"
],
"properties": {
"href": {
"description": "URI of the referenced resource.\n",
"type": "string",
"format": "url"
}
}
},
"packageContent": {
"description": "This type represents a link to a resource.\n", "description": "This type represents a link to a resource.\n",
"type": "object", "type": "object",
"required": ["href"], "required": [
"href"
],
"properties": { "properties": {
"href": { "href": {
"description": "URI of the referenced resource.\n", "description": "URI of the referenced resource.\n",
......
{ {
"type": "array",
"items": {
"description": "Information about available reports collected by this PM job.\n", "description": "Information about available reports collected by this PM job.\n",
"type": "object", "type": "object",
"required": ["href", "readyTime"], "required": [
"href",
"readyTime"
],
"properties": { "properties": {
"href": { "href": {
"description": "The Uri where the report can be obtained.\n", "description": "The Uri where the report can be obtained.\n",
...@@ -23,4 +28,5 @@ ...@@ -23,4 +28,5 @@
"type": "integer" "type": "integer"
} }
} }
}
} }
\ No newline at end of file
...@@ -16,7 +16,7 @@ GET Individual VNF Package ...@@ -16,7 +16,7 @@ GET Individual VNF Package
Should Contain ${contentType} ${CONTENT_TYPE_JSON} Should Contain ${contentType} ${CONTENT_TYPE_JSON}
Log Trying to validate response Log Trying to validate response
${vnfPkgInfo}= Output response body ${vnfPkgInfo}= Output response body
Validate Json vnfPkgInfo.schema.json ${vnfPackageId} Validate Json vnfPkgInfo.schema.json ${vnfPkgInfo}
Log Validation OK Log Validation OK
GET Individual VNF Package - Negative (Not Found) GET Individual VNF Package - Negative (Not Found)
......
...@@ -13,7 +13,6 @@ GET VNF Package Artifact ...@@ -13,7 +13,6 @@ GET VNF Package Artifact
Integer response status 200 Integer response status 200
Log Received a 200 OK as expected Log Received a 200 OK as expected
${contentType}= Output response headers Content-Type ${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE_OCTET}
GET VNF Package Artifact - Range GET VNF Package Artifact - Range
Log Trying to get an Artifact using RANGE Header and using an NFVO that can handle it Log Trying to get an Artifact using RANGE Header and using an NFVO that can handle it
......
...@@ -9,17 +9,13 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ...@@ -9,17 +9,13 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}
*** Test Cases *** *** Test Cases ***
GET VNF Package Content GET VNF Package Content
Log Trying to get a VNF Package Content Log Trying to get a VNF Package Content
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgId}/package_content GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgId}/package_content
Integer response status 200 Integer response status 200
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE_JSON}
GET VNF Package Content - Range GET VNF Package Content - Range
Log Trying to get a VNF Package Content using RANGE using an NFVO that can handle it Log Trying to get a VNF Package Content using RANGE using an NFVO that can handle it
Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests.
Set Headers {"Accept": "${ACCEPT_JSON}"}
Set Headers {"Range": "${range}"} Set Headers {"Range": "${range}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgId}/package_content GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgId}/package_content
...@@ -35,51 +31,30 @@ GET VNF Package Content - Range ...@@ -35,51 +31,30 @@ GET VNF Package Content - Range
GET VNF Package Content - Negative Range GET VNF Package Content - Negative Range
Log Trying to get a range of bytes of the limit of the VNF Package Log Trying to get a range of bytes of the limit of the VNF Package
Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests. Pass Execution If ${NFVO_RANGE_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests.
Set Headers {"Accept": "${ACCEPT_JSON}"}
Set Headers {"Range": "${erroneousRange}"} Set Headers {"Range": "${erroneousRange}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgId}/package_content GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgId}/package_content
Integer response status 416 Integer response status 416
Log Received 416 Range not satisfiable as expected. Log Received 416 Range not satisfiable as expected.
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
${problemDetails}= Output response body
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
GET VNF Package Content - Negative (Not Found) GET VNF Package Content - Negative (Not Found)
Log Trying to perform a negative get, using an erroneous package ID Log Trying to perform a negative get, using an erroneous package ID
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${erroneousVnfPkgId}/package_content GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${erroneousVnfPkgId}/package_content
Integer response status 404 Integer response status 404
Log Received 404 Not Found as expected Log Received 404 Not Found as expected
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
${problemDetails}= Output response body
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
GET VNF Package Content - Negative (onboardingState issue) GET VNF Package Content - Negative (onboardingState issue)
Log Trying to get a VNF Package content present in the NFVO Catalogue, but not in ONBOARDED operationalStatus Log Trying to get a VNF Package content present in the NFVO Catalogue, but not in ONBOARDED operationalStatus
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${onboardingStateVnfPkgId}/package_content GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${onboardingStateVnfPkgId}/package_content
Integer response status 409 Integer response status 409
Log Received 409 Conflict as expected Log Received 409 Conflict as expected
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE_JSON}
Log Trying to validate ProblemDetails
${problemDetails}= Output response body
Validate Json ProblemDetails.schema.json ${problemDetails}
Log Validation OK
PUT VNF Package Content PUT VNF Package Content
Log Trying to perform a PUT. This method uploads the content of a VNF package. Log Trying to perform a PUT. This method uploads the content of a VNF package.
Set Headers {"Contet-Type": "${CONTENT_TYPE_ZIP}"} Set Headers {"Content-Type": "${CONTENT_TYPE_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
${content}= Get Binary File files/vnfPackage.zip ${content}= Get Binary File files/vnfPackage.zip
PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content ${content} PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content ${content}
...@@ -93,7 +68,7 @@ PUT VNF Package Content ...@@ -93,7 +68,7 @@ PUT VNF Package Content
PUT VNF Package Content - Negative (Conflict on onboarding status not in CREATED) PUT VNF Package Content - Negative (Conflict on onboarding status not in CREATED)
Log Trying to perform a PUT. This method uploads the content of a VNF package. Log Trying to perform a PUT. This method uploads the content of a VNF package.
Set Headers {"Contet-Type": "${CONTENT_TYPE_ZIP}"} Set Headers {"Content-Type": "${CONTENT_TYPE_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
${content}= Get Binary File files/vnfPackage.zip ${content}= Get Binary File files/vnfPackage.zip
PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${creatingVnfPackageId}/package_content ${content} PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${creatingVnfPackageId}/package_content ${content}
......
...@@ -13,7 +13,7 @@ POST VNF Package Content ...@@ -13,7 +13,7 @@ POST VNF Package Content
Log Trying to perform a POST. The POST method provides the information for the NFVO to get the content of a VNF package. Log Trying to perform a POST. The POST method provides the information for the NFVO to get the content of a VNF package.
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
${body}= Get Binary File jsons/UploadVnfPkgFromUriRequest.json ${body}= Get File jsons/UploadVnfPkgFromUriRequest.json
POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content/upload_from_uri ${body} POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content/upload_from_uri ${body}
Integer response status 202 Integer response status 202
Log Received 202 Accepted as expected Log Received 202 Accepted as expected
...@@ -27,7 +27,7 @@ POST VNF Package Content - Negative (VNF Package not in CREATED operational stat ...@@ -27,7 +27,7 @@ POST VNF Package Content - Negative (VNF Package not in CREATED operational stat
Log Trying to perform a POST. The POST method provides the information for the NFVO to get the content of a VNF package. Log Trying to perform a POST. The POST method provides the information for the NFVO to get the content of a VNF package.
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
${body}= Get Binary File jsons/UploadVnfPkgFromUriRequest.json ${body}= Get File jsons/UploadVnfPkgFromUriRequest.json
POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${creatingVnfPackageId}/package_content/upload_from_uri ${body} POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${creatingVnfPackageId}/package_content/upload_from_uri ${body}
Integer response status 409 Integer response status 409
Log Received 409 Conflict as expected Log Received 409 Conflict as expected
......
...@@ -85,35 +85,11 @@ Send Post Request for VNF Package Subscription ...@@ -85,35 +85,11 @@ Send Post Request for VNF Package Subscription
Set Suite Variable ${response} ${output} Set Suite Variable ${response} ${output}
Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1
... Check Notification Endpoint ... Check Notification Endpoint
# Integer response status 201
# Log Received 201 Created as expected
# ${headers}= Output response headers
# Should Contain ${headers} Location
# Log Response has header Location
# ${result}= Output response body
# Validate Json PkgmSubscription.schema.json ${result}
# Log Validation of PkgmSubscription OK
Send Post Request for Duplicated VNF Package Subscription Send Post Request for Duplicated VNF Package Subscription
Log Trying to create a subscription with an already created content Log Trying to create a subscription with an already created content
Pass Execution If ${NFVO_DUPLICATION} == 0 NFVO is not permitting duplication. Skipping the test Send Post Request for VNF Package Subscription
Set Headers {"Accept": "${ACCEPT_JSON}"}
Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"}
${body}= Get File jsons/subscriptions.json
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body}
${output}= Output response
Set Suite Variable ${response} ${output}
Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1
... Check Notification Endpoint
# Integer response status 201
# Log Received 201 Created as expected
# ${headers}= Output response headers
# Should Contain ${headers} Location
# Log Response has header Location
# ${result}= Output response body
# Validate Json PkgmSubscription.schema.json ${result}
# Log Validation of PkgmSubscription OK
Send Put Request for VNF Package Subscriptions Send Put Request for VNF Package Subscriptions
...@@ -158,14 +134,14 @@ Create Sessions ...@@ -158,14 +134,14 @@ Create Sessions
Check HTTP Response Status Code Is Check HTTP Response Status Code Is
[Arguments] ${expected_status} [Arguments] ${expected_status}
Should Be Equal ${response['status']} ${expected_status} Should Be Equal As Strings ${response['status']} ${expected_status}
Log Status code validated Log Status code validated
Check HTTP Response Body Json Schema Is Check HTTP Response Body Json Schema Is
[Arguments] ${input} [Arguments] ${input}
Should Contain ${response['headers']['Content-Type']} application/json Should Contain ${response['headers']['Content-Type']} application/json
${schema} = Catenate ${input} .schema.json ${schema} = Catenate SEPARATOR= ${input} .schema.json
Validate Json ${schema} ${response['body']} Validate Json ${schema} ${response['body']}
Log Json Schema Validation OK Log Json Schema Validation OK
...@@ -187,7 +163,7 @@ Check HTTP Response Body Matches the Subscription ...@@ -187,7 +163,7 @@ Check HTTP Response Body Matches the Subscription
Log Check Response matches subscription Log Check Response matches subscription
${body}= Get File jsons/subscriptions.json ${body}= Get File jsons/subscriptions.json
${subscription}= evaluate json.loads('''${body}''') json ${subscription}= evaluate json.loads('''${body}''') json
Should Be Equal ${response['body']['callbackUri']} ${subscription['callbackUri']} Should Be Equal As Strings ${response['body']['callbackUri']} ${subscription['callbackUri']}
Check Postcondition VNF Package Subscription Is Set Check Postcondition VNF Package Subscription Is Set
...@@ -196,8 +172,10 @@ Check Postcondition VNF Package Subscription Is Set ...@@ -196,8 +172,10 @@ Check Postcondition VNF Package Subscription Is Set
Log Trying to get the subscription Log Trying to get the subscription
Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Accept": "${ACCEPT_JSON}"}
<