Commit 11dc0498 authored by Giacomo Bernini's avatar Giacomo Bernini
Browse files

implemented deltas for SOL005 VNF Package Management v2.8.1

parent e90c4b98
......@@ -139,16 +139,16 @@ DELETE Individual VNF Package in operational state ENABLED
Check HTTP Response Body Json Schema Is ProblemDetails
Check Postcondition VNF Package Exists
DELETE Individual VNF Package used for instantiated VNF instances
DELETE Individual VNF Package in usage state IN USE
[Documentation] Test ID: 5.3.5.2.11
... Test title: DELETE Individual VNF Package used for instantiated VNF instances
... Test objective: The objective is to test that the deletion of an individual VNF Package that is used in instantiated VNF instances fails. The test also performs a JSON schema validation of the failed operation HTTP response.
... Pre-conditions: One or more VNF instances are instantiated based on the concerned VNF package.
... Test title: DELETE Individual VNF Package in usage state IN USE
... Test objective: The objective is to test that the deletion of an individual VNF Package in usage state IN USE fails. The test also performs a JSON schema validation of the failed operation HTTP response.
... Pre-conditions: One or more VNF Package are onboarded in the NFVO in IN_USE usage state
... Reference: Clause 9.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.8.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 used for instantiated VNF instances
Send DELETE Request for Individual VNF Package in usage state IN USE
Check HTTP Response Status Code Is 409
Check HTTP Response Body Json Schema Is ProblemDetails
Check Postcondition VNF Package Exists
\ No newline at end of file
......@@ -197,4 +197,17 @@ DELETE VNF Package Artifact - Method not implemented
... Applicability: none
... Post-Conditions: none
Send DELETE Request for VNF Package Artifact
Check HTTP Response Status Code Is 405
\ No newline at end of file
Check HTTP Response Status Code Is 405
Get VNF Package Artifact with "include_external_artifacts" parameter
[Documentation] Test ID: 5.3.5.12.16
... Test title: Get VNF Package Artifact with "include_external_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 contains external artifacts when requested with "include_external_artifacts" parameter
... Pre-conditions: One or more VNF packages are onboarded in the NFVO.
... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [3] v2.8.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
Get Artifact in VNF Package with include_external_artifacts parameter
Check HTTP Response Status Code Is 200
Check HTTP Response Header Content-Type Is application/zip
\ No newline at end of file
......@@ -108,7 +108,8 @@ Upload VNF Package Content
... Applicability: none
... Post-Conditions: The VNF Package content is successfully uploaded and available in the NFVO
Send PUT Request to upload VNF Package Content
Check HTTP Response Status Code Is 204
Check HTTP Response Status Code Is 202
Check HTTP Response Body is Empty
Check Postcondition VNF Package Content is uploaded and available in the NFVO
Upload VNF Package Content with conflict due to onboarding state
......
......@@ -15,10 +15,11 @@ Upload VNF Package Content from URI
... Reference: Clause 9.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.8.1
... Config ID: Config_prod_NFVO
... Applicability: none
... Post-Conditions: none
... Post-Conditions: The VNF Package content is successfully uploaded and available in the NFVO
Send POST Request to upload VNF Package Content from URI
Check HTTP Response Status Code Is 202
Check HTTP Response Body is Empty
Check Postcondition VNF Package Content via URI is uploaded and available in the NFVO
Upload VNF Package Content from URI with conflict due to onboarding state
[Documentation] Test ID: 5.3.5.5.2
......
......@@ -240,6 +240,33 @@ Check Postcondition VNF Package Resource Exists
Check HTTP Response Status Code Is 200
Check HTTP Response Body Json Schema Is vnfPkgInfo
Check Postcondition VNF Package Resource onboardingState is
[Arguments] ${status}
Log Checking VNF Package Resource attributes
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${response['body']['id']}
${response}= Output response
Should Be Equal As Strings ${response['body']['onboardingState']} ${status}
Check Postcondition VNF Package Resource operationalState is
[Arguments] ${status}
Log Checking VNF Package Resource attributes
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${response['body']['id']}
${response}= Output response
Should Be Equal As Strings ${response['body']['operationalState']} ${status}
Check Postcondition VNF Package Resource usageState is
[Arguments] ${status}
Log Checking VNF Package Resource attributes
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${response['body']['id']}
${response}= Output response
Should Be Equal As Strings ${response['body']['usageState']} ${status}
Send PUT Request for all VNF Packages
Log Trying to perform a PUT (method should not be implemented)
Set Headers {"Accept": "${ACCEPT_JSON}"}
......@@ -352,7 +379,7 @@ Check Postcondition VNF Package Exists
Log Checking that vnf pacakge still exists
GET Individual VNF Package
Send DELETE Request for Individual VNF Package used for instantiated VNF instances
Send DELETE Request for Individual VNF Package in usage state IN USE
Log Trying to perform a DELETE nsdInfo in ENABLED operational state
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
......@@ -533,14 +560,50 @@ Send PUT Request to upload VNF Package Content
${response}= Create Dictionary status=${response.status_code}
Set Suite Variable ${response} ${response}
Check VNF Package Resource onboardingState is
[Arguments] ${status}
Log Checking VNF Package Resource attributes
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${newVnfPackageId}
${output}= Output response
Should Be Equal As Strings ${output['body']['onboardingState']} ${status}
Set Suite Variable ${response} ${output}
Check VNF Package Resource via URI onboardingState is
[Arguments] ${status}
Log Checking VNF Package Resource attributes
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgViaUriId}
${output}= Output response
Should Be Equal As Strings ${output['body']['onboardingState']} ${status}
Set Suite Variable ${response} ${output}
Check Postcondition VNF Package Content is uploaded and available in the NFVO
Log Trying to get a VNF Package Content
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Log Wait for status ONBOARDED
Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Check VNF Package Resource onboardingState is ONBOARDED
Log Check operational and usage state
Should Be Equal As Strings ${response['body']['operationalState']} ENABLED
Should Be Equal As Strings ${response['body']['usageState']} NOT_IN_USE
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${newVnfPackageId}/package_content
Integer response status 200
Check Postcondition VNF Package Content via URI is uploaded and available in the NFVO
Log Trying to get a VNF Package Content
Set Headers {"Accept": "${ACCEPT_ZIP}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Log Wait for status ONBOARDED
Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Check VNF Package Resource via URI onboardingState is ONBOARDED
Log Check operational and usage state
Should Be Equal As Strings ${response['body']['operationalState']} ENABLED
Should Be Equal As Strings ${response['body']['usageState']} NOT_IN_USE
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${newVnfPackageId}/package_content
Integer response status 200
Send PUT Request to upload VNF Package Content with conflict due to onboarding state
Log Trying to perform a PUT. This method upload the content of a NSD
Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_ZIP}", "Content-Type": "application/zip", "${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} verify=False
......@@ -1089,7 +1152,7 @@ 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_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/exclude_all_mano_artifacts
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/?exclude_all_mano_artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -1097,7 +1160,15 @@ 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_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/exclude_all_non_mano_artifacts
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/?exclude_all_non_mano_artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
Get Artifact in VNF Package with include_external_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_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/?include_external_artifacts
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -1106,7 +1177,7 @@ Get Artifact in VNF Package with select_non_mano_artifact_sets parameter
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_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/select_non_mano_artifact_sets=${non_mano_artifact_sets}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/?select_non_mano_artifact_sets=${non_mano_artifact_sets}
${output}= Output response
Set Suite Variable ${response} ${output}
......@@ -1114,7 +1185,7 @@ 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_HEADER}":"${AUTHORIZATION_TOKEN}"}
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/include_signatures
REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/?include_signatures
${output}= Output response
Set Suite Variable ${response} ${output}
......
......@@ -155,9 +155,12 @@ Create new VNF Package Resource
Send Post Request to create new VNF Package Resource
Check HTTP Response Status Code Is 201
Check HTTP Response Body Json Schema Is vnfPkgInfo
Check HTTP Response Body vnfPkgInfo content against VNF Descriptor
Check HTTP Response Header Contains Location
Check Postcondition VNF Package Resource Exists
Check HTTP Response Body vnfPkgInfo content against VNF Descriptor
Check Postcondition VNF Package Resource onboardingState is CREATED
Check Postcondition VNF Package Resource operationalState is DISABLED
Check Postcondition VNF Package Resource usageState is NOT_IN_USE
PUT all VNF Packages - Method not implemented
[Documentation] Test ID: 5.3.5.1.12
......
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