Skip to content
Snippets Groups Projects
Commit f9e60421 authored by AHMADABB's avatar AHMADABB
Browse files
parents e823155a 93a423f3
No related branches found
No related tags found
1 merge request!30Master
Showing
with 670 additions and 360 deletions
......@@ -76,7 +76,7 @@ Create new VNF Performance subscription
Send Post Request for VNF Performance Subscription
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is PmSubscription
Check HTTP Response Body Matches the Subscription
Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription
Check Postcondition VNF Performance Subscription Is Set
......@@ -109,7 +109,7 @@ Create duplicated VNF Performance subscription with VNFM creating duplicated sub
Send Post Request for Duplicated VNF Performance Subscription
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is PmSubscription
Check HTTP Response Body Matches the Subscription
Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription
Check Postcondition VNF Performance Subscription Is Set
PUT VNF Performance Subscriptions - Method not implemented
......
......@@ -286,7 +286,7 @@ Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filte
# Should Be Equal As Strings ${response['body']['callbackUri']} ${callbackUri}
#TODO
Check HTTP Response Body Matches the Subscription
Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription
Log Check Response matches subscription
${body}= Get File jsons/subscriptions.json
${subscription}= evaluate json.loads('''${body}''') json
......
......@@ -2,65 +2,82 @@
Library JSONSchemaLibrary schemas/
Resource environment/variables.txt # Generic Parameters
Resource environment/individualVnfPackage.txt
Resource VNFPackageManagementKeywords.robot
Library JSONLibrary
Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}
*** Test Cases ***
GET Individual VNF Package
Log Trying to get a VNF Package present in the NFVO Catalogue
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
Integer response status 200
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE_JSON}
Log Trying to validate response
${vnfPkgInfo}= Output response body
Validate Json vnfPkgInfo.schema.json ${vnfPkgInfo}
Log Validation OK
[Documentation] Test ID: 7.3.3.2.1
... Test title: GET Individual VNF Package
... Test objective: The objective is to test the retrieval of an individual VNF package information perform a JSON schema validation of the collected data structure
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: section 10.4.3.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
GET Individual VNF Package
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is vnfPkgInfo
Check HTTP Response Body vnfPkgInfo Identifier matches the requested VNF Package
GET Individual VNF Package - Negative (Not Found)
Log Trying to perform a negative get, using wrong authorization bearer
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${erroneousVnfPackageId}
Integer response status 404
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 Individual VNF Package with invalid resource identifier
[Documentation] Test ID: 7.3.3.2.2
... Test title: GET Individual VNF Package with invalid resource identifier
... Test objective: The objective is to test that the retrieval of an individual VNF package fails when using an invalid resource identifier
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: section 10.4.3.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
GET Individual VNF Package with invalid resource identifier
Check HTTP Response Status Code Is 404
POST Individual VNF Package - (Method not implemented)
Log Trying to perform a POST (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
Integer response status 405
Log Received 405 Method not implemented as expected
POST Individual VNF Package - Method not implemented
[Documentation] Test ID: 7.3.3.2.3
... Test title: POST Individual VNF Package - Method not implemented
... Test objective: The objective is to test that POST method is not allowed to create new VNF Package
... Pre-conditions: none
... Reference: section 10.4.3.3.1 - SOL003 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Send POST Request for individual VNF Package
Check HTTP Response Status Code Is 405
PUT Individual VNF Package - (Method not implemented)
Log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
Integer response status 405
Log Received 405 Method not implemented as expected
PUT Individual VNF Package - Method not implemented
[Documentation] Test ID: 7.3.3.2.4
... Test title: PUT Individual VNF Package - Method not implemented
... Test objective: The objective is to test that PUT method is not allowed to modify a VNF Package
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: section 10.4.3.3.3 - SOL003 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Send PUT Request for individual VNF Package
Check HTTP Response Status Code Is 405
PATCH Individual VNF Package - (Method not implemented)
Log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
Integer response status 405
Log Received 405 Method not implemented as expected
PATCH Individual VNF Package - Method not implemented
[Documentation] Test ID: 7.3.3.2.5
... Test title: PATCH Individual VNF Package - Method not implemented
... Test objective: The objective is to test that PATCH method is not allowed to update a VNF Package
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: section 10.4.3.3.4 - SOL003 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Send PATCH Request for individual VNF Package
Check HTTP Response Status Code Is 405
DELETE Individual VNF Package - (Method not implemented)
Log Trying to perform a DELETE. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
Integer response status 405
Log Received 405 Method not implemented as expected
DELETE Individual VNF Package - Method not implemented
[Documentation] Test ID: 7.3.3.2.6
... Test title: DELETE Individual VNF Package - Method not implemented
... Test objective: The objective is to test that DELETE method is not allowed to delete a VNF Package
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: section 10.4.3.3.5 - SOL003 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: The VNF Package is not deleted by the failed operation
Send DELETE Request for individual VNF Package
Check HTTP Response Status Code Is 405
Check Postcondition VNF Package Exist
\ No newline at end of file
......@@ -2,107 +2,134 @@
Library JSONSchemaLibrary schemas/
Resource environment/variables.txt # Generic Parameters
Resource environment/vnfPackageContent.txt
Resource VNFPackageManagementKeywords.robot
Library JSONLibrary
Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT}
*** Test Cases ***
GET VNF Package Content
Log Trying to get a VNF Package Content
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
Integer response status 200
${contentType}= Output response headers Content-Type
Should Contain ${contentType} ${CONTENT_TYPE_ZIP}
GET Individual VNF Package Content
[Documentation] Test ID: 7.3.3.3.1
... Test title: GET Individual VNF Package Content
... Test objective: The objective is to test the retrieval of an individual VNF package content and perform a validation that returned content is in zip format
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: section 10.4.5.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
GET Individual VNF Package Content
Check HTTP Response Status Code Is 200
Check HTTP Response Header Content-Type Is application/zip
GET VNF Package Content - Range
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.
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Set Headers {"Range": "${range}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
Integer response status 206
Log Received 206 Partial Content as expected.
${headers}= Output response headers
Should Contain ${headers} Content-Range
Log Header Content-Range is present
Should Contain ${headers} Content-Length
Log Header Content-Length is present
GET Individual VNF Package Content with Range Request and NFVO supporting Range Requests
[Documentation] Test ID: 7.3.3.3.2
... Test title: GET Individual VNF Package Content with Range Request and NFVO supporting Range Requests
... Test objective: The objective is to test the retrieval of an individual VNF package content when using a range request to return single range of bytes from the file, with the NFVO supporting it. The test also perform a validation that returned content matches the issued range
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: section 10.4.5.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: The NFVO supports range requests to return single range of bytes from the VNF package file
... Post-Conditions: none
GET Individual VNF Package Content with Range Request
Check HTTP Response Status Code Is 206
Check HTTP Response Header Content-Type Is application/zip
Check HTTP Response Header Content-Range Is Present and Matches the requested range
Check HTTP Response Header Content-Length Is Present and Matches the requested range length
GET Individual VNF Package Content with Range Request and NFVO not supporting Range Requests
[Documentation] Test ID: 7.3.3.3.3
... Test title: GET Individual VNF Package Content with Range Request and NFVO not supporting Range Requests
... Test objective: The objective is to test that the retrieval of an individual VNF package content, when using a range request to return single range of bytes from the file and the NFVO not supporting it, returns the full VNF Package file.
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: section 10.4.5.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: The NFVO does not support range requests to return single range of bytes from the VNF package file
... Post-Conditions: none
GET Individual VNF Package Content with Range Request
Check HTTP Response Status Code Is 200
Check HTTP Response Header Content-Type Is application/zip
GET VNF Package Content - Negative Range
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.
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Set Headers {"Range": "${erroneousRange}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
Integer response status 416
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 Individual VNF Package Content with invalid Range Request
[Documentation] Test ID: 7.3.3.3.4
... Test title: GET Individual VNF Package Content with invalid Range Request
... Test objective: The objective is to test that the retrieval of an individual VNF package content fails when using a range request that does not match any available byte range in the file.
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: section 10.4.5.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: The NFVO supports range requests to return single range of bytes from the VNF package file
... Post-Conditions: none
GET Individual VNF Package Content with invalid Range Request
Check HTTP Response Status Code Is 416
GET Individual VNF Package Content with invalid resource identifier
[Documentation] Test ID: 7.3.3.3.5
... Test title: GET Individual VNF Package Content with invalid resource identifier
... Test objective: The objective is to test that the retrieval of an individual VNF package content fails when using an invalid resource identifier
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: section 10.4.5.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
GET Individual VNF Package Content with invalid resource identifier
Check HTTP Response Status Code Is 404
GET VNF Package Content - Negative (Not Found)
Log Trying to perform a negative get, using an erroneous package ID
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${erroneousVnfPkgId}/package_content
Integer response status 404
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 Individual VNF Package Content with conflict due to onboarding state
[Documentation] Test ID: 7.3.3.3.6
... Test title: GET Individual VNF Package Content with conflict due to onboarding state
... Test objective: The objective is to test that the retrieval of an individual VNF package content fails due to a conflict when the VNF Package is not in onboarding state ONBOARDED in the NFVO. The test also performs a validation of the JSON schema validation of the failed operation HTTP response
... Pre-conditions: The onboarding state of the VNF package for which the content is requested is different from ONBOARDED.
... Reference: section 10.4.5.3.2 - SOL003 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
GET Content for VNF Package in onboarding state different from ONBOARDED
Check HTTP Response Status Code Is 409
Check HTTP Response Body Json Schema Is ProblemDetails
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
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${onboardingStateVnfPkgId}/package_content
Integer response status 409
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
POST Individual VNF Package Content - Method not implemented
[Documentation] Test ID: 7.3.3.3.7
... Test title: POST Individual VNF Package Content - Method not implemented
... Test objective: The objective is to test that POST method is not allowed to create new VNF Package content
... Pre-conditions: none
... Reference: section 10.4.3.5.1 - SOL003 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Send POST Request for individual VNF Package
Check HTTP Response Status Code Is 405
POST VNF Package Content - (Method not implemented)
Log Trying to perform a POST (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
Integer response status 405
Log Received 405 Method not implemented as expected
PUT Individual VNF Package Content - Method not implemented
[Documentation] Test ID: 7.3.3.3.8
... Test title: PUT Individual VNF Package Content - Method not implemented
... Test objective: The objective is to test that PUT method is not allowed to modify a VNF Package content
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: section 10.4.3.5.3 - SOL003 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Send PUT Request for individual VNF Package
Check HTTP Response Status Code Is 405
PUT VNF Package Content - (Method not implemented)
Log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
Integer response status 405
Log Received 405 Method not implemented as expected
PATCH Individual VNF Package Content - Method not implemented
[Documentation] Test ID: 7.3.3.3.9
... Test title: PATCH Individual VNF Package Content - Method not implemented
... Test objective: The objective is to test that PATCH method is not allowed to update a VNF Package content
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: section 10.4.3.5.4 - SOL003 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Send PATCH Request for individual VNF Package
Check HTTP Response Status Code Is 405
PATCH VNF Package Content - (Method not implemented)
Log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
Integer response status 405
Log Received 405 Method not implemented as expected
DELETE VNF Package Content - (Method not implemented)
Log Trying to perform a DELETE. This method should not be implemented
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
Integer response status 405
Log Received 405 Method not implemented as expected
DELETE Individual VNF Package Content - Method not implemented
[Documentation] Test ID: 7.3.3.3.10
... Test title: DELETE Individual VNF Package Content - Method not implemented
... Test objective: The objective is to test that DELETE method is not allowed to delete a VNF Package content
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: section 10.4.3.5.5 - SOL003 v2.4.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: The VNF Package content is not deleted by the failed operation
Send DELETE Request for individual VNF Package
Check HTTP Response Status Code Is 405
Check Postcondition VNF Package Content Exist
\ No newline at end of file
*** Settings ***
Resource environment/variables.txt
Resource environment/subscriptions.txt
Resource environment/vnfPackages.txt
Resource environment/individualVnfPackage.txt
Resource environment/vnfPackageContent.txt
Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false
Library MockServerLibrary
Library OperatingSystem
......@@ -12,6 +15,326 @@ Library Process
*** Keywords ***
Get all VNF Packages
Log Trying to get all VNF Packages present in the NFVO Catalogue
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Body Does Not Contain softwareImages
Log Checking that field element is missing
${softwareImages}= Get Value From Json ${response['body']} $..softwareImages
Should Be Empty ${softwareImages}
Log Element is empty as expected
Check HTTP Response Body Does Not Contain additionalArtifacts
Log Checking that field element is missing
${additionalArtifacts}= Get Value From Json ${response['body']} $..additionalArtifacts
Should Be Empty ${additionalArtifacts}
Log Element is empty as expected
Check HTTP Response Body Does Not Contain userDefinedData
Log Checking that field element is missing
${userDefinedData}= Get Value From Json ${response['body']} $..userDefinedData
Should Be Empty ${userDefinedData}
Log Element is empty as expected
GET VNF Packages with attribute-based filter
Log Trying to get all VNF Packages present in the NFVO Catalogue, using filter params
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages?${POS_FILTER}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Body VnfPkgsInfo Matches the requested Attribute-Based Filter
Log Checking that attribute-based filter is matched
#todo
GET VNF Packages with invalid attribute-based filter
Log Trying to perform a negative get, filtering by the inexistent filter 'nfvId'
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages?${NEG_FILTER}
${output}= Output response
Set Suite Variable ${response} ${output}
GET VNF Packages with all_fields attribute selector
Log Trying to get all VNF Packages present in the NFVO Catalogue, using filter params
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages?all_fields
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Body VnfPkgsInfo Matches the requested all_fields selector
Log Trying to validate softwareImages schema
${softwareImages}= Get Value From Json ${response['body']} $..softwareImages
Validate Json softwareImage.schema.json ${softwareImages[0]}
Log Validation for softwareImage schema OK
Log Trying to validate additionalArtifacts schema
${additional_artifacts}= Get Value From Json ${response['body']} $..additionalArtifacts
Validate Json additionalArtifacts.schema.json ${additional_artifacts[0]}
Log Validation for additionalArtifacts schema OK
${links}= Get Value From Json ${response['body']} $.._links
Validate Json links.schema.json ${links[0]}
Log Validation for _links schema OK
GET VNF Packages with exclude_default attribute selector
Log Trying to get all VNF Packages present in the NFVO Catalogue, using exclude_default filter.
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages?exclude_default
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Body VnfPkgsInfo Matches the requested exclude_default selector
Log Checking missing information for softwareImages element
${softwareImages}= Get Value From Json ${response['body']} $..softwareImages
Should Be Empty ${softwareImages}
Log softwareImages element is missing as excepted
Log Checking missing information for additionalArtifact element
${additional_artifacts}= Get Value From Json ${response['body']} $..additionalArtifacts
Should Be Empty ${additional_artifacts}
Log additionalArtifact element is missing as excepted
GET VNF Packages with fields attribute selector
Log Trying to get all VNF Packages present in the NFVO Catalogue, using fields
Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use fields parameter
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages?fields=${fields}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Body vnfPkgsInfo Matches the requested fields selector
Log Trying to validate softwareImages schema
${softwareImages}= Get Value From Json ${response['body']} $..softwareImages
Validate Json softwareImage.schema.json ${softwareImages[0]}
Log Validation for softwareImage schema OK
Log Trying to validate additionalArtifacts schema
${additional_artifacts}= Get Value From Json ${response['body']} $..additionalArtifacts
Validate Json additionalArtifacts.schema.json ${additional_artifacts[0]}
Log Validation for additionalArtifacts schema OK
GET VNF Packages with exclude_fields attribute selector
Log Trying to get all VNF Packages present in the NFVO Catalogue, using fields
Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use fields parameter
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages?exclude_fields=${fields}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Body vnfPkgsInfo Matches the requested exclude_fields selector
Log Checking missing information for softwareImages element
${softwareImages}= Get Value From Json ${response['body']} $..softwareImages
Should Be Empty ${softwareImages}
Log softwareImages element is missing as excepted
Log Checking missing information for additionalArtifact element
${additional_artifacts}= Get Value From Json ${response['body']} $..additionalArtifacts
Should Be Empty ${additional_artifacts}
Log additionalArtifact element is missing as excepted
GET all VNF Packages with invalid resource endpoint
Log Trying to perform a GET on a erroneous URI
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_package
${output}= Output response
Set Suite Variable ${response} ${output}
Send POST Request for all VNF Packages
Log Trying to perform a POST (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages
${output}= Output response
Set Suite Variable ${response} ${output}
Send PUT Request for all VNF Packages
Log Trying to perform a PUT (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages
${output}= Output response
Set Suite Variable ${response} ${output}
Send PATCH Request for all VNF Packages
Log Trying to perform a PATCH (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages
${output}= Output response
Set Suite Variable ${response} ${output}
Send DELETE Request for all VNF Packages
Log Trying to perform a DELETE (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/vnf_packages
${output}= Output response
Set Suite Variable ${response} ${output}
Check Postcondition VNF Packages Exist
Log Checking that Pm Job still exists
GET all VNF Packages
GET Individual VNF Package
Log Trying to get a VNF Package present in the NFVO Catalogue
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Body vnfPkgInfo Identifier matches the requested VNF Package
Log Going to validate pacakge info retrieved
Should Be Equal ${response['body']['id']} ${vnfPackageId}
Log Pacakge identifier as expected
GET Individual VNF Package with invalid resource identifier
Log Trying to perform a negative get, using wrong authorization bearer
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${erroneousVnfPackageId}
${output}= Output response
Set Suite Variable ${response} ${output}
Send POST Request for individual VNF Package
Log Trying to perform a POST (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
${output}= Output response
Set Suite Variable ${response} ${output}
Send PUT Request for individual VNF Package
Log Trying to perform a PUT (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
${output}= Output response
Set Suite Variable ${response} ${output}
Send PATCH Request for individual VNF Package
Log Trying to perform a PATCH (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
${output}= Output response
Set Suite Variable ${response} ${output}
Send DELETE Request for individual VNF Package
Log Trying to perform a DELETE (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}
${output}= Output response
Set Suite Variable ${response} ${output}
Check Postcondition VNF Package Exist
Log Checking that vnf pacakge still exists
GET Individual VNF Package
GET Individual VNF Package Content
Log Trying to get a VNF Package Content
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Header Content-Type Is
[Arguments] ${header}
Should Contain ${response['headers']['Content-Type']} ${header}
GET Individual VNF Package Content with Range Request
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.
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Set Headers {"Range": "${range}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
${output}= Output response
Set Suite Variable ${response} ${output}
Check HTTP Response Header Content-Range Is Present and Matches the requested range
Log Check Content-Range HTTP Header
Should Contain ${response['headers']} Content-Range
Should Be Equal As Strings ${response['headers']['Content-Range']} ${range}
Log Header Content-Range is present
Check HTTP Response Header Content-Length Is Present and Matches the requested range length
Log Check Content-Length HTTP Header
Should Contain ${response['headers']} Content-Length
Should Be Equal As Integers ${response['headers']['Content-Length']} ${length}
Log Header Content-Length is present
GET Individual VNF Package Content with invalid Range Request
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.
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Set Headers {"Range": "${erroneousRange}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
${output}= Output response
Set Suite Variable ${response} ${output}
GET Individual VNF Package Content with invalid resource identifier
Log Trying to perform a negative get, using an erroneous package ID
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${erroneousVnfPkgId}/package_content
${output}= Output response
Set Suite Variable ${response} ${output}
GET Content for VNF Package in onboarding state different from ONBOARDED
Log Trying to get a VNF Package content present in the NFVO Catalogue, but not in ONBOARDED operationalStatus
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${onboardingStateVnfPkgId}/package_content
${output}= Output response
Set Suite Variable ${response} ${output}
Send POST Request for individual VNF Package Content
Log Trying to perform a POST (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
${output}= Output response
Set Suite Variable ${response} ${output}
Send PUT Request for individual VNF Package Content
Log Trying to perform a PUT (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
${output}= Output response
Set Suite Variable ${response} ${output}
Send PATCH Request for individual VNF Package Content
Log Trying to perform a PATCH (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
${output}= Output response
Set Suite Variable ${response} ${output}
Send DELETE Request for individual VNF Package Content
Log Trying to perform a DELETE (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/package_content
${output}= Output response
Set Suite Variable ${response} ${output}
Check Postcondition VNF Package Content Exist
Log Checking that vnf pacakge still exists
GET Individual VNF Package Content
Get all VNF Package Subscriptions
Log Trying to get the list of subscriptions
Set Headers {"Accept": "${ACCEPT_JSON}"}
......@@ -20,8 +343,6 @@ Get all VNF Package Subscriptions
${output}= Output response
Set Suite Variable ${response} ${output}
Get VNF Package Subscriptions with attribute-based filters
Log Trying to get the list of subscriptions using filters
Set Headers {"Accept": "${ACCEPT_JSON}"}
......@@ -29,9 +350,6 @@ Get VNF Package Subscriptions with attribute-based filters
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ok}
${output}= Output response
Set Suite Variable ${response} ${output}
Get VNF Package Subscriptions with invalid attribute-based filters
Log Trying to get the list of subscriptions using filters with wrong attribute name
......@@ -40,9 +358,7 @@ Get VNF Package Subscriptions with invalid attribute-based filters
GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ko}
${output}= Output response
Set Suite Variable ${response} ${output}
Get VNF Package Subscriptions with invalid resource endpoint
Log Trying to perform a request on a Uri which doesn't exist
Set Headers {"Accept": "${ACCEPT_JSON}"}
......@@ -51,8 +367,6 @@ Get VNF Package Subscriptions with invalid resource endpoint
${output}= Output response
Set Suite Variable ${response} ${output}
Send Post Request for VNF Package Subscription
Log Trying to create a new subscription
Set Headers {"Accept": "${ACCEPT_JSON}"}
......@@ -110,8 +424,7 @@ Check HTTP Response Status Code Is
Should Be Equal ${response['status']} ${expected_status}
Log Status code validated
Check HTTP Response Body Json Schema Is
[Arguments] ${input}
Should Contain ${response['headers']['Content-Type']} application/json
......
This diff is collapsed.
......@@ -2,6 +2,7 @@
${ACCEPT_ZIP} application/zip
${NFVO_RANGE_OK} 1 # If 1 means that Range is supported by the NFVO
${range} bytes=0-1023
${length} 1024
${erroneousRange} bytes=10000000-1000000000 # Requesting a out of range number of bytes
${erroneousVnfPkgId} erroneousPkgId
${CONTENT_TYPE_ZIP} application/zip
......@@ -2,3 +2,4 @@
${POS_FILTER} vnfdId=41fdd38a-3d4c-465c-83e0-f80e014425f8 ,vnfProvider=NXW # Positive case, suing compiant fields name for filtering get request
${NEG_FILTER} nfvId=41fdd38a-3d4c-465c-83e0-f80e014425f8 # Negative case, using wrong name of field
${fields} softwareImages,additionalArtifacts
${response} httpresponse
......@@ -76,7 +76,7 @@ Create new VNF Performance subscription
Send Post Request for VNF Performance Subscription
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is PmSubscription
Check HTTP Response Body Matches the Subscription
Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription
Check Postcondition VNF Performance Subscription Is Set
......@@ -109,7 +109,7 @@ Create duplicated VNF Performance subscription with VNFM creating duplicated sub
Send Post Request for Duplicated VNF Performance Subscription
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is PmSubscription
Check HTTP Response Body Matches the Subscription
Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription
Check Postcondition VNF Performance Subscription Is Set
PUT VNF Performance Subscriptions - Method not implemented
......
......@@ -286,7 +286,7 @@ Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filte
# Should Be Equal As Strings ${response['body']['callbackUri']} ${callbackUri}
#TODO
Check HTTP Response Body Matches the Subscription
Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription
Log Check Response matches subscription
${body}= Get File jsons/subscriptions.json
${subscription}= evaluate json.loads('''${body}''') json
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment