Commit bc3466f5 authored by Najam UI Hassan's avatar Najam UI Hassan
Browse files

test cases added for VNF Package Artifacts

parent 9a3d00dc
......@@ -142,7 +142,7 @@ DELETE Individual VNF Package Artifact - Method not implemented
... Post-Conditions: The VNF Package artifact is not deleted by the failed operation
Send DELETE Request for individual VNF Package Artifact
Check HTTP Response Status Code Is 405
Check Postcondition VNF Package Artifact Exist
Check Postcondition Individual VNF Package Artifact Exist
GET Individual OnBoarded VNF Package Artifact
[Documentation] Test ID: 7.3.3.5.12
......
*** Settings ***
Library JSONSchemaLibrary schemas/
Resource environment/variables.txt
Resource VNFPackageManagementKeywords.robot
Library JSONLibrary
Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false
*** Test Cases ***
Get VNF Package Artifact
[Documentation] Test ID: 7.3.3.11.1
... Test title: Get VNF Package Artifact
... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully, and perform a validation that returned content is in Zip format
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Get Artifact in VNF Package
Check HTTP Response Status Code Is 200
Check HTTP Response Header Content-Type Is application/zip
Get VNF Package Artifact with "exclude_all_mano_artifacts" parameter
[Documentation] Test ID: 7.3.3.11.2
... Test title: Get VNF Package Artifact with "exclude_all_mano_artifacts" parameter
... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully and it doesnot contain additional MANO artifacts when requested with "exclude_all_mano_artifacts" parameter
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Get Artifact in VNF Package with exclude_all_mano_artifacts parameter
Check HTTP Response Status Code Is 200
Check HTTP Response Header Content-Type Is application/zip
Get VNF Package Artifact with "exclude_all_non_mano_artifacts" parameter
[Documentation] Test ID: 7.3.3.11.3
... Test title: Get VNF Package Artifact with "exclude_all_non_mano_artifacts" parameter
... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully and it doesnot contain non-MANO Artifacts when requested with "exclude_all_non_mano_artifacts" parameter
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Get Artifact in VNF Package with exclude_all_non_mano_artifacts parameter
Check HTTP Response Status Code Is 200
Check HTTP Response Header Content-Type Is application/zip
Get VNF Package Artifact with "select_non_mano_artifact_sets" parameter
[Documentation] Test ID: 7.3.3.11.4
... Test title: Get VNF Package Artifact with "select_non_mano_artifact_sets" parameter
... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully and also contain non_MANO artifacts set when requested with "select_non_mano_artifact_sets" parameter
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Get Artifact in VNF Package with select_non_mano_artifact_sets parameter
Check HTTP Response Status Code Is 200
Check HTTP Response Header Content-Type Is application/zip
Get VNF Package Artifact with "include_signatures" parameter
[Documentation] Test ID: 7.3.3.11.5
... Test title: Get VNF Package Artifact with "include_signatures" parameter
... Test objective: The objective is to test that the GET request read the whole content of the archive containing the artifact files successfully and also contain security certificates when requested with "include_signature" parameter, and perform a validation that returned content is in Zip format
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Get Artifact in VNF Package with include_signatures parameter
Check HTTP Response Status Code Is 200
Check HTTP Response Header Content-Type Is application/zip
Get VNF Package Artifact with Range Request and NFVO supporting Range Requests
[Documentation] Test ID: 7.3.3.11.6
... Test title: Get VNF Package Artifact with Range Request and NFVO supporting Range Requests
... Test objective: The objective is to test the GET request read the whole content of the archive containing the artifact files successfully 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: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_NFVO
... Applicability: The NFVO supports range requests to return single range of bytes from the VNF package artifact
... Post-Conditions: none
Get Artifact in VNF Package with Range Request
Check HTTP Response Status Code Is 206
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 VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "select_non_mano_artifact_sets"
[Documentation] Test ID: 7.3.3.11.7
... Test title: Get VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "select_non_mano_artifact_sets"
... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails when both "exclude_all_non_mano_artifacts" and "select_non_mano_artifact_sets" are present in request
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Get Artifact in VNF Package with exclude_all_non_mano_artifacts and select_non_mano_artifact_sets
Check HTTP Response Status Code Is 400
Check HTTP Response Body Json Schema Is ProblemDetails
Get VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "exclude_all_mano_artifacts"
[Documentation] Test ID: 7.3.3.11.8
... Test title: Get VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "exclude_all_mano_artifactss"
... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails when both "exclude_all_non_mano_artifacts" and "exclude_all_mano_artifacts" are present in request
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Get Artifact in VNF Package with exclude_all_non_mano_artifacts and exclude_all_mano_artifacts
Check HTTP Response Status Code Is 400
Check HTTP Response Body Json Schema Is ProblemDetails
Get VNF Package Artifact with invalid URI parameters undifend select_non_mano_artifact_sets
[Documentation] Test ID: 7.3.3.11.9
... Test title: Get VNF Package Artifact with invalid URI parameters undefined select_non_mano_artifact_sets
... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files fails when one or more value provided in "select_non_mano_artifact_sets" are not provided in Manifest.
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Get Artifact in VNF Package with select_non_mano_artifact_sets parameter
Check HTTP Response Status Code Is 400
Check HTTP Response Body Json Schema Is ProblemDetails
Get VNF Package Artifact with conflict due to onboarding state
[Documentation] Test ID: 7.3.3.11.10
... Test title: Get VNF Package Artifact with conflict due to onboarding state
... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files 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: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
GET Artifact of 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 Artifact with invalid Range Request
[Documentation] Test ID: 7.3.3.11.11
... Test title: GET VNF Package Artifact with invalid Range Request
... Test objective: The objective is to test that the GET request to read the whole content of the archive containing the artifact files 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: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_NFVO
... Applicability: The NFVO supports range requests to return single range of bytes from the VNF package artifact
... Post-Conditions: none
GET VNF Package Artifact with invalid Range Request
Check HTTP Response Status Code Is 416
POST VNF Package Artifact - Method not implemented
[Documentation] Test ID: 7.3.3.11.12
... Test title: POST VNF Package Artifact - Method not implemented
... Test objective: The objective is to test that POST method is not allowed to create new VNF Package artifact
... Pre-conditions: none
... Reference: Clause 10.4.5a.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Send POST Request for VNF Package Artifact
Check HTTP Response Status Code Is 405
PUT VNF Package Artifact - Method not implemented
[Documentation] Test ID: 7.3.3.11.13
... Test title: PUT VNF Package Artifact - Method not implemented
... Test objective: The objective is to test that PUT method is not allowed to modify a VNF Package artifact
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: Clause 10.4.5a.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Send PUT Request for VNF Package Artifact
Check HTTP Response Status Code Is 405
PATCH VNF Package Artifact - Method not implemented
[Documentation] Test ID: 7.3.3.11.14
... Test title: PATCH VNF Package Artifact - Method not implemented
... Test objective: The objective is to test that PATCH method is not allowed to update a VNF Package artifact
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: Clause 10.4.5a.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Send PATCH Request for VNF Package Artifact
Check HTTP Response Status Code Is 405
DELETE VNF Package Artifact - Method not implemented
[Documentation] Test ID: 7.3.3.11.15
... Test title: DELETE VNF Package Artifact - Method not implemented
... Test objective: The objective is to test that DELETE method is not allowed to delete a VNF Package artifact
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: Clause 10.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: The VNF Package artifact is not deleted by the failed operation
Send DELETE Request for VNF Package Artifact
Check HTTP Response Status Code Is 405
Check Postcondition VNF Package Artifact Exist
......@@ -607,7 +607,7 @@ Send DELETE Request for individual VNF Package Artifact
${output}= Output response
Set Suite Variable ${response} ${output}
Check Postcondition VNF Package Artifact Exist
Check Postcondition Individual VNF Package Artifact Exist
Log Checking that vnf pacakge still exists
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
......@@ -1327,4 +1327,126 @@ Send DELETE Request for Manifest in individual OnBoarded VNF Package
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
DELETE ${apiRoot}/${apiName}/${apiVersion}/onboarded_vnf_packages/${vndId}/manifest
${output}= Output response
Set Suite Variable ${response} ${output}
\ No newline at end of file
Set Suite Variable ${response} ${output}
Get Artifact in VNF Package
Log Trying to get Artifact in VNF Package
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
Get Artifact in VNF Package with exclude_all_mano_artifacts parameter
Log Trying to get Artifact in VNF Package with exclude_all_mano_artifacts
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/artifacts/exclude_all_mano_artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
Get Artifact in VNF Package with exclude_all_non_mano_artifacts parameter
Log Trying to get Artifact in VNF Package with security certificates
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/artifacts/exclude_all_non_mano_artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
Get Artifact in VNF Package with select_non_mano_artifact_sets parameter
Log Trying to get Artifact in VNF Package with security certificates
Pass Execution If ${NFVO_non-MANO_OK} == 0 Skipping this test as NFVO is not able to handle partial Requests.
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/artifacts/select_non_mano_artifact_sets=${non_mano_artifact_sets}
${output}= Output response
Set Suite Variable ${response} ${output}
Get Artifact in VNF Package with include_signatures parameter
Log Trying to get Artifact in VNF Package with security certificates
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/artifacts/include_signatures
${output}= Output response
Set Suite Variable ${response} ${output}
Get Artifact in VNF Package with Range Request
Log Trying to get an Artifact using RANGE Header and 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 {"Range": "${range}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
Get Artifact in VNF Package with exclude_all_non_mano_artifacts and select_non_mano_artifact_sets
Log Trying to get Artifact in VNF Package
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/artifacts/exclude_all_non_mano_artifacts&select_non_mano_artifact_sets=${non_mano_artifact_sets}
${output}= Output response
Set Suite Variable ${response} ${output}
Get Artifact in VNF Package with exclude_all_non_mano_artifacts and exclude_all_mano_artifacts
Log Trying to get Artifact in VNF Package
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/artifacts/exclude_all_non_mano_artifacts&exclude_all_non_mano_artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
GET Artifact of VNF Package in onboarding state different from ONBOARDED
Log Trying to get a VNF Package artifact present in the NFVO Catalogue, but not in ONBOARDED operationalStatus
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${onboardingStateVnfPkgId}/artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
GET VNF Package Artifact 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}/artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
Send POST Request for VNF Package Artifact
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}/artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
Send PUT Request for VNF Package Artifact
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}/artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
Send PATCH Request for VNF Package Artifact
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}/artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
Send DELETE Request for VNF Package Artifact
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}/artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
Check Postcondition VNF Package Artifact Exist
Log Checking that vnf pacakge still exists
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"}
GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/artifacts
Check HTTP Response Status Code Is 200
\ No newline at end of file
......@@ -37,4 +37,7 @@ ${polling_interval} 10 sec
${notification_request} []
${notification_response} []
\ No newline at end of file
${notification_response} []
${NFVO_non-MANO_OK} 1 # If 1 means that non-MANO artifacts are supported by the NFVO
${non_mano_artifact_sets}
\ No newline at end of file
......@@ -5,4 +5,4 @@ ${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
${CONTENT_TYPE_ZIP} application/zip
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment