diff --git a/.jenkins.sh b/.jenkins.sh new file mode 100644 index 0000000000000000000000000000000000000000..3bad4e68f952186871fbe544cc7ac1c9422b8668 --- /dev/null +++ b/.jenkins.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright ETSI 2018 +# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt + +#set -vx +#set -e + +cd "$(dirname "$0")" + +run_dir="$(pwd)" + +bash ./scripts/build-container.sh +bash ./scripts/run-container.sh "${run_dir}" + +ret=$? +echo "Final validation result: $ret" +exit $ret diff --git a/README.md b/README.md index f844f21d7df7918f1175f21fffc67d8957385330..bab2d8a74b2a5013ccc9e8ec79d6805a863971b8 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ # NFV API Conformance Test Specification (NFV-TST 010) This repository hosts the NFV API Conformance test specification for -the APIs defined in ETSI NFV GS [SOL002](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.06.01_60/gs_NFV-SOL002v020601p.pdf), [SOL003](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.06.01_60/gs_NFV-SOL003v020601p.pdf), [SOL005](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/005/02.06.01_60/gs_NFV-SOL005v020601p.pdf), in their versions v2.6.1. - -More information and download is available at [DGS/NFV-TST010ed261](https://portal.etsi.org/webapp/WorkProgram/Report_WorkItem.asp?WKI_ID=58428). +the APIs defined in ETSI NFV GS [SOL002](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.07.01_60/gs_NFV-SOL002v020701p.pdf), +[SOL003](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.07.01_60/gs_NFV-SOL003v020701p.pdf), +[SOL005](https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/005/02.07.01_60/gs_NFV-SOL005v020701p.pdf), in their versions +v2.7.1. +More information and download is available at [DGS/NFV-TST010ed271](https://portal.etsi.org/webapp/WorkProgram/Report_WorkItem.asp?WKI_ID=58931). ## Overview @@ -20,3 +22,5 @@ Please report errors, bugs or other issues [here](https://forge.etsi.org/rep/nfv ETSI Forge uses Gitlab to manage submissions to the repository. For more information on setting up your environment and contributing, you may refer to the [ETSI Forge wiki](https://forge.etsi.org/wiki/index.php/Main_Page). + + diff --git a/SOL002/README.md b/SOL002/README.md index 365fbf0559bca5f80e215ec2bf615b3a84b0b017..114399fcbfdc858b34d53b5eb56d29194c7f1bd5 100644 --- a/SOL002/README.md +++ b/SOL002/README.md @@ -2,7 +2,7 @@ This folder includes the NFV API conformance test descriptions for NFV SOL002 APIs. -The reference spec version is v2.6.1: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.06.01_60/gs_NFV-SOL002v020601p.pdf +The reference spec version is v2.7.1: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/02.07.01_60/gs_NFV-SOL002v020701p.pdf ## License diff --git a/SOL002/VNFConfiguration-API/ApiVersion.robot b/SOL002/VNFConfiguration-API/ApiVersion.robot index 68b95d747190c12e49349ba997af04cb79f5eba0..f3afab525eff5282c93cb9a14b23b2d2ca1284f6 100644 --- a/SOL002/VNFConfiguration-API/ApiVersion.robot +++ b/SOL002/VNFConfiguration-API/ApiVersion.robot @@ -1,211 +1,211 @@ -*** Settings *** -Resource environment/variables.txt -Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false -Library DependencyLibrary -Library JSONLibrary -Library JSONSchemaLibrary schemas/ - -*** Test Cases *** -POST API Version - Method not implemented - [Documentation] Test ID: 6.3.1.2.1 - ... Test title: POST API version - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version - [Documentation] Test ID: 6.3.1.2.2 - ... Test title: GET API Version - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version - Method not implemented - [Documentation] Test ID: 6.3.1.2.3 - ... Test title: PUT API Version - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version - Method not implemented - [Documentation] Test ID: 6.3.1.2.4 - ... Test title: PATCH API Version - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version - Method not implemented - [Documentation] Test ID: 6.3.1.2.5 - ... Test title: DELETE API Version - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -POST API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 6.3.1.2.6 - ... Test title: POST API version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version with apiMajorVerion - [Documentation] Test ID: 6.3.1.2.7 - ... Test title: GET API Version with apiMajorVerion - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 6.3.1.2.8 - ... Test title: PUT API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 6.3.1.2.9 - ... Test title: PATCH API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 6.3.1.2.10 - ... Test title: DELETE API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -*** Keywords *** -POST API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response['body']} +*** Settings *** +Resource environment/variables.txt +Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 6.3.1.2.1 + ... Test title: POST API version - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 6.3.1.2.2 + ... Test title: GET API Version + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version - Method not implemented + [Documentation] Test ID: 6.3.1.2.3 + ... Test title: PUT API Version - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 6.3.1.2.4 + ... Test title: PATCH API Version - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 6.3.1.2.5 + ... Test title: DELETE API Version - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +POST API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 6.3.1.2.6 + ... Test title: POST API version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 6.3.1.2.7 + ... Test title: GET API Version with apiMajorVerion + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 6.3.1.2.8 + ... Test title: PUT API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 6.3.1.2.9 + ... Test title: PATCH API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 6.3.1.2.10 + ... Test title: DELETE API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL002/VNFConfiguration-API/Configuration.robot b/SOL002/VNFConfiguration-API/Configuration.robot index 813e17ace0dc929957ea7a21eaf620fe6a7c80a7..69239787a7062d15e3e1d1251ce7debd5d3aef7a 100644 --- a/SOL002/VNFConfiguration-API/Configuration.robot +++ b/SOL002/VNFConfiguration-API/Configuration.robot @@ -12,7 +12,7 @@ Set new VNF Configuration ... Test title: Set a new VNF Configuration ... Test objective: The objective is to test the creation of a new VNF configuration and perform a JSON schema validation of the returned configuration data structure ... Pre-conditions: A VNF instance is instantiated - ... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation of HTTP Etag opaque identifiers ... Post-Conditions: The configuration is successfully set in the VNF and it matches the issued configuration @@ -28,7 +28,7 @@ Get information about a VNF configuration ... Test title: Get information about a VNF configuration ... Test objective: The objective is to test the retrieval of an existing VNF instance configuration and perform a JSON schema validation of the collected configuration data structure ... Pre-conditions: A VNF instance is instantiated. The VNF instance is already configured. - ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -42,7 +42,7 @@ Get information about a VNF configuration with HTTP Etag ... Test title: Get information about a VNF configuration with HTTP Etag ... Test objective: The objective is to test the retrieval of an existing VNF instance configuration, check the generation by the VNF of an HTTP Etag opaque identifier, and perform a JSON schema validation of the collected configuration data structure ... Pre-conditions: A VNF instance is instantiated. The VNF instance is already configured - ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation of HTTP Etag opaque identifiers ... Post-Conditions: none @@ -57,7 +57,7 @@ Set new VNF Configuration - HTTP Etag precondition unsuccessful ... Test title: Set a new VNF Configuration - HTTP Etag precondition unsuccessful ... Test objective: The objective is to test the unsuccess in setting a duplication of VNF configuration identified by an already used HTTP Etag identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. The VNF instance is already configured (Test ID 6.3.1.1.1) with a given HTTP Etag identifier. - ... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation of HTTP Etag opaque identifiers ... Post-Conditions: The VNF configuration is not modified by the unsuccessful operation and it matches the configuration issued in Test ID 6.3.1.1.1 @@ -70,8 +70,8 @@ POST VNF Configuration - Method not implemented [Documentation] Test ID: 6.3.1.1.5 ... Test title: POST VNF Configuration - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new VNF configuration - ... Pre-conditions: A VNF instance is instantiated. The VNF instance is alrseady configured - ... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -82,8 +82,8 @@ PUT VNF Configuration - Method not implemented [Documentation] Test ID: 6.3.1.1.6 ... Test title: PUT VNF Configuration - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify an existing VNF configuration - ... Pre-conditions: A VNF instance is instantiated. The VNF instance is already configured - ... Reference: Clause 9.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 9.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -94,23 +94,22 @@ DELETE VNF Configuration - Method not implemented [Documentation] Test ID: 6.3.1.1.7 ... Test title: Delete VNF Configuration - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete an existing VNF configuration - ... Pre-conditions: A VNF instance is instantiated. The VNF instance is already configured - ... Reference: Clause 9.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 9.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: The VNF configuration is not deleted by the unsuccessful operation + ... Post-Conditions: none Send DELETE Request for VNF Configuration Check HTTP Response Status Code Is 405 - Check Postcondition VNF Configuration Exists *** Keywords *** Get VNF configuration Log Query VNF The GET method queries information about a configuration. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/configuration + Get ${apiRoot}/${apiName}/${apiMajorVersion}/configuration ${output}= Output response Set Suite Variable ${response} ${output} @@ -118,9 +117,9 @@ Send VNF configuration log Trying to perform a PATCH. This method modifies the configuration Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/vnfConfigModifications.json - Patch ${apiRoot}/${apiName}/${apiVersion}/configuration ${body} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/configuration ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -145,10 +144,6 @@ Check HTTP Response Body Json Schema Is Check Postcondition VNF Configuration Unmodified (Implicit) Log Check Implicit Postcondition Check Postcondition VNF Is Configured - -Check Postcondition VNF Configuration Exists - Log Check Postcondition VNF exists - Check Postcondition VNF Is Configured Check Postcondition VNF Is Configured Log Check Postcondition for VNF Configuration @@ -163,32 +158,32 @@ Send Duplicated VNF configuration Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Set Headers {"If-Match": "${etag}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/vnfConfigModifications.json - Patch ${apiRoot}/${apiName}/${apiVersion}/configuration ${body} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/configuration ${body} ${output}= Output response Set Suite Variable ${response} ${output} Send POST Request for VNF Configuration log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/configuration + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/configuration ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for VNF Configuration log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/configuration + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/configuration ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for VNF Configuration log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/configuration + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/configuration ${output}= Output response Set Suite Variable ${response} ${output} \ No newline at end of file diff --git a/SOL002/VNFConfiguration-API/environment/variables.txt b/SOL002/VNFConfiguration-API/environment/variables.txt index 40bbd93438498a510b8a180e2164be1dae6d6f3a..0d4c026b13c6740baa803bd634649f7ba47cda53 100644 --- a/SOL002/VNFConfiguration-API/environment/variables.txt +++ b/SOL002/VNFConfiguration-API/environment/variables.txt @@ -10,13 +10,14 @@ ${EM-VNF_SCHEMA} https ${ACCEPT} application/json ${AUTH_USAGE} 1 -${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${CONTENT_TYPE} application/json ${apiRoot} / ${apiName} vnfconfig -${apiVersion} v1 +${apiMajorVersion} v1 ${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX diff --git a/SOL002/VNFFaultManagement-API/Alarms.robot b/SOL002/VNFFaultManagement-API/Alarms.robot index c7ef62b0fd07b36ea5bc9195c42540e79cb51fca..f8827ba03e9c035fd6e9648a34e4128fbccd8b18 100644 --- a/SOL002/VNFFaultManagement-API/Alarms.robot +++ b/SOL002/VNFFaultManagement-API/Alarms.robot @@ -12,10 +12,10 @@ POST Alarms - Method not implemented [Documentation] Test ID: 6.3.4.1.1 ... Test title: POST Alarms - Method not implemented ... Test objective: The objective is to test that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: + ... Applicability: none ... Post-Conditions: none POST Alarms Task Check HTTP Response Status Code Is 405 @@ -24,11 +24,11 @@ GET information about multiple alarms [Documentation] Test ID: 6.3.4.1.2 ... Test title: GET information about multiple alarms ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Alarms Task Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is alarms @@ -36,12 +36,12 @@ GET information about multiple alarms GET information about multiple alarms with attribute-based filter [Documentation] Test ID: 6.3.4.1.3 ... Test title: GET information about multiple alarms with attribute-based filter - ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Test objective: The objective is to retrieve information about the alarm list with attribute-based filter + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Alarms Task with filter Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is alarms @@ -50,11 +50,11 @@ GET information about multiple alarms with invalid attribute-based filter [Documentation] Test ID: 6.3.4.1.4 ... Test title: GET information about multiple alarms with invalid attribute-based filter ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Alarms Task with invalid filter Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails @@ -63,11 +63,11 @@ GET information about multiple alarms with "all_fields" attribute selector [Documentation] Test ID: 6.3.4.1.5 ... Test title: GET information about multiple alarms with "all_fields" attribute selector ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Alarms Task with all_fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is alarms @@ -76,25 +76,24 @@ GET information about multiple alarms with exclude_default attribute selector [Documentation] Test ID: 6.3.4.1.6 ... Test title: GET information about multiple alarms with "exclude_default" attribute selector ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Alarms Task with exclude_default attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is alarms - GET information about multiple alarms with fields attribute selector [Documentation] Test ID: 6.3.4.1.7 ... Test title: GET information about multiple alarms with fields attribute selector ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Alarms Task with fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is alarms @@ -103,10 +102,10 @@ GET information about multiple alarms with "exclude_fields" attribute selector [Documentation] Test ID: 6.3.4.1.8 ... Test title: GET information about multiple alarms with "exclude_fields" attribute selector ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: + ... Applicability: none ... Post-Conditions: none GET Alarms Task with exclude_fields attribute selector Check HTTP Response Status Code Is 200 @@ -116,10 +115,10 @@ PUT Alarms - Method not implemented [Documentation] Test ID: 6.3.4.1.9 ... Test title: PUT Alarms - Method not implemented ... Test objective: The objective is to test that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: + ... Applicability: none ... Post-Conditions: none PUT Alarms Task Check HTTP Response Status Code Is 405 @@ -128,10 +127,10 @@ PATCH Alarms - Method not implemented [Documentation] Test ID: 6.3.4.1.10 ... Test title: PATCH Alarms - Method not implemented ... Test objective: The objective is to test that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: + ... Applicability: none ... Post-Conditions: none PATCH Alarms Task Check HTTP Response Status Code Is 405 @@ -140,11 +139,11 @@ DELETE Alarms - Method not implemented [Documentation] Test ID: 6.3.4.1.11 ... Test title: DELETE Alarms - Method not implemented ... Test objective: The objective is to test that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.6 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: the alarm is not deleted + ... Applicability: none + ... Post-Conditions: none DELETE Alarms Task Check HTTP Response Status Code Is 405 @@ -152,24 +151,24 @@ GET information about multiple alarms to get Paged Response [Documentation] Test ID: 6.3.4.1.12 ... Test title: GET information about multiple alarms to get Paged Response ... Test objective: The objective is to retrieve information about the alarms to get paged response - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Alarms Task Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link GET information about multiple alarms for Bad Request Response too big [Documentation] Test ID: 6.3.4.1.13 ... Test title: GET information about multiple alarms for Bad Request Response too big ... Test objective: The objective is to test that GET method fail retrieving status information about Alarms when Response is too big, and perform the JSON schema validation of the failed operation HTTP response - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Alarms Task with invalid filter Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails @@ -178,11 +177,11 @@ GET information about alarms with attribute-based filter "id" [Documentation] Test ID: 6.3.4.1.14 ... Test title: GET information about alarms with attribute-based filter "id" ... Test objective: The objective is to retrieve information about the alarm list with alarm filter "id" - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Alarms Task with filter "id" Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is alarm @@ -192,11 +191,11 @@ GET information about multiple alarms with attribute-based filter "vnfcInstanceI [Documentation] Test ID: 6.3.4.1.15 ... Test title: GET information about multiple alarms with attribute-based filter "vnfcInstanceIds" ... Test objective: The objective is to retrieve information about the alarm list with attribute filter "vnfcInstanceIds" - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Alarms Task with filter "vnfcInstanceIds" Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is alarms @@ -206,11 +205,11 @@ GET information about multiple alarms with attribute-based filter "rootCauseFaul [Documentation] Test ID: 6.3.4.1.16 ... Test title: GET information about multiple alarms with attribute-based filter "rootCauseFaultyResource.faultyResourceType" ... Test objective: The objective is to retrieve information about the alarm list with attribute filter "rootCauseFaultyResource.faultyResourceType" - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Alarms Task with filter "rootCauseFaultyResource_faultyResourceType" Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is alarms @@ -220,11 +219,11 @@ GET information about multiple alarms with attribute-based filter "eventType" [Documentation] Test ID: 6.3.4.1.17 ... Test title: GET information about multiple alarms with attribute-based filter "eventType" ... Test objective: The objective is to retrieve information about the alarm list with attribute filter "eventType" - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Alarms Task with filter "eventType" Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is alarms @@ -234,11 +233,11 @@ GET information about multiple alarms with attribute-based filter "perceivedSeve [Documentation] Test ID: 6.3.4.1.18 ... Test title: GET information about multiple alarms with attribute-based filter "perceivedSeverity" ... Test objective: The objective is to retrieve information about the alarm list with attribute filter "perceivedSeverity" - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Alarms Task with filter "perceivedSeverity" Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is alarms @@ -248,11 +247,11 @@ GET information about multiple alarms with attribute-based filter "probableCause [Documentation] Test ID: 6.3.4.1.19 ... Test title: GET information about multiple alarms with attribute-based filter "probableCause" ... Test objective: The objective is to retrieve information about the alarm list with attribute filter "probableCause" - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Alarms Task with filter "probableCause" Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is alarms @@ -262,81 +261,81 @@ GET information about multiple alarms with attribute-based filter "probableCause POST Alarms Task log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/alarms + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Alarms Task log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/alarms + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Alarms Task log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/alarms + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Alarms Task log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/alarms + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Alarms Task Log Query VNF The GET method queries information about multiple alarms. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/alarms + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Alarms Task with filter Log Query VNF The GET method queries information about multiple alarms with filters. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?${alarm_filter}=${managedObjectId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${alarm_filter}=${managedObjectId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Alarms Task with invalid filter Log Query VNF The GET method queries information about multiple alarms with filters. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?${invalid_alarm_filter}=${managedObjectId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${invalid_alarm_filter}=${managedObjectId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Alarms Task with all_fields attribute selector Log Query VNF The GET method queries information about multiple alarms, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/alarms?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET Alarms Task with exclude_default attribute selector Log Query VNF The GET method queries information about multiple alarms, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/alarms?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET Alarms Task with fields attribute selector Log Query VNF The GET method queries information about multiple alarms, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/alarms?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} GET Alarms Task with exclude_fields attribute selector Log Query VNF The GET method queries information about multiple alarms, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/alarms?exclude_fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -358,16 +357,16 @@ Check HTTP Response Body Json Schema Is Validate Json ${schema} ${response['body']} Log Json Schema Validation OK -Check LINK in Header +Check HTTP Response Header Contain Link ${linkURL}= Get Value From Json ${response['headers']} $..Link Should Not Be Empty ${linkURL} GET Alarms Task with filter "id" Log Query VNF The GET method queries information about multiple alarms with filters "id". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?id=${alarmId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?id=${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -377,9 +376,9 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms Task with filter "vnfcInstanceIds" Log Query VNF The GET method queries information about multiple alarms with filters "vnfcInstanceIds". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?vnfcInstanceIds=${vnfcInstanceIds} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?vnfcInstanceIds=${vnfcInstanceIds} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -391,9 +390,9 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms Task with filter "rootCauseFaultyResource_faultyResourceType" Log Query VNF The GET method queries information about multiple alarms with filters "rootCauseFaultyResource.faultyResourceType". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?rootCauseFaultyResource.faultyResourceType=${faultyResourceType} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?rootCauseFaultyResource.faultyResourceType=${faultyResourceType} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -405,9 +404,9 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms Task with filter "eventType" Log Query VNF The GET method queries information about multiple alarms with filters "eventType". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?eventType=${eventType} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?eventType=${eventType} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -419,23 +418,23 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms Task with filter "perceivedSeverity" Log Query VNF The GET method queries information about multiple alarms with filters "perceivedSeverity". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?perceivedSeverity=${perceivedSeverity} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?perceivedSeverity=${perceivedSeverity} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "perceivedSeverity" :FOR ${item} IN @{response['body']} - Should Be Equal As Strings ${item['perceivedSeverity']} ${perceivedSeverity} + Should Be Equal As Strings ${item['perceivedSeverity']} ${PerceivedSeverity} END GET Alarms Task with filter "probableCause" Log Query VNF The GET method queries information about multiple alarms with filters "probableCause". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?probableCause=${probableCause} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?probableCause=${probableCause} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL002/VNFFaultManagement-API/ApiVersion.robot b/SOL002/VNFFaultManagement-API/ApiVersion.robot index f8e2fea9dce4a74feeaf83f98d6370a13e9d23be..72ae2f9b37f1b0d922923e47dcbc82b2f1edfe4d 100644 --- a/SOL002/VNFFaultManagement-API/ApiVersion.robot +++ b/SOL002/VNFFaultManagement-API/ApiVersion.robot @@ -1,213 +1,213 @@ -*** Settings *** - -Resource environment/variables.txt - -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Library DependencyLibrary -Library JSONLibrary -Library JSONSchemaLibrary schemas/ - -*** Test Cases *** -POST API Version - Method not implemented - [Documentation] Test ID: 6.3.4.7.1 - ... Test title: POST API version - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version - [Documentation] Test ID: 6.3.4.7.2 - ... Test title: GET API Version - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version - Method not implemented - [Documentation] Test ID: 6.3.4.7.3 - ... Test title: PUT API Version - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version - Method not implemented - [Documentation] Test ID: 6.3.4.7.4 - ... Test title: PATCH API Version - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version - Method not implemented - [Documentation] Test ID: 6.3.4.7.5 - ... Test title: DELETE API Version - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -POST API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 6.3.4.7.6 - ... Test title: POST API version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version with apiMajorVerion - [Documentation] Test ID: 6.3.4.7.7 - ... Test title: GET API Version with apiMajorVerion - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 6.3.4.7.8 - ... Test title: PUT API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 6.3.4.7.9 - ... Test title: PATCH API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 6.3.4.7.10 - ... Test title: DELETE API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -*** Keywords *** -POST API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response['body']} +*** Settings *** + +Resource environment/variables.txt + +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 6.3.4.7.1 + ... Test title: POST API version - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 6.3.4.7.2 + ... Test title: GET API Version + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version - Method not implemented + [Documentation] Test ID: 6.3.4.7.3 + ... Test title: PUT API Version - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 6.3.4.7.4 + ... Test title: PATCH API Version - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 6.3.4.7.5 + ... Test title: DELETE API Version - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +POST API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 6.3.4.7.6 + ... Test title: POST API version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 6.3.4.7.7 + ... Test title: GET API Version with apiMajorVerion + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 6.3.4.7.8 + ... Test title: PUT API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 6.3.4.7.9 + ... Test title: PATCH API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 6.3.4.7.10 + ... Test title: DELETE API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot b/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot index 89822d2b591bcc9ef4f551a219ce5a027a354d34..c06950a4803f6a188a87a74790465e453db19784 100644 --- a/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot +++ b/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot @@ -10,10 +10,10 @@ Escalate the perceived severity ... Test title: Escalate the perceived severity ... Test objective: To enable the consumer to escalate the perceived severity of an alarm that is represented by an individual alarm resource. ... Pre-conditions: The resource representing the individual alarm has been created - ... Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Post escalate severity Check HTTP Response Status Code Is 204 @@ -21,11 +21,11 @@ GET Escalate the perceived severity - Method not implemented [Documentation] Test ID: 6.3.4.3.2 ... Test title: GET Escalate the perceived severity - Method not implemented ... Test objective: The objective is to test that the GET HTTP method not implemented for escalate perceived severity - ... Pre-conditions: - ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get escalate severity Check HTTP Response Status Code Is 405 @@ -33,11 +33,11 @@ PUT Escalate the perceived severity - Method not implemented [Documentation] Test ID: 6.3.4.3.3 ... Test title: PUT Escalate the perceived severity - Method not implemented ... Test objective: The objective is to test that the PUT HTTP method not implemented for escalate perceived severity - ... Pre-conditions: - ... Reference: Clause 7.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Put escalate severity Check HTTP Response Status Code Is 405 @@ -45,24 +45,23 @@ PATCH Escalate the perceived severity - Method not implemented [Documentation] Test ID: 6.3.4.3.4 ... Test title: PATCH Escalate the perceived severity - Method not implemented ... Test objective: The objective is to test that the PATCH HTTP method not implemented for escalate perceived severity - ... Pre-conditions: - ... Reference: Clause 7.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none PATCH escalate severity Check HTTP Response Status Code Is 405 - DELETE Escalate the perceived severity - Method not implemented [Documentation] Test ID: 6.3.4.3.5 ... Test title: DELETE Escalate the perceived severity - Method not implemented ... Test objective: The objective is to test that the DELETE HTTP method not implemented for escalate perceived severity - ... Pre-conditions: - ... Reference: Clause 7.4.4.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.4.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Delete escalate severity Check HTTP Response Status Code Is 405 @@ -70,39 +69,39 @@ DELETE Escalate the perceived severity - Method not implemented Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} Integer response status 200 POST escalate severity Log escalate the perceived severity of an alarm with the VNFM Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}/escalate ${PerceivedSeverity} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}/escalate ${PerceivedSeverity} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET escalate severity log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}/escalate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}/escalate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT escalate severity log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}/escalate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}/escalate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH escalate severity log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}/escalate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}/escalate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE escalate severity log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId}/escalate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}/escalate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL002/VNFFaultManagement-API/IndividualAlarm.robot b/SOL002/VNFFaultManagement-API/IndividualAlarm.robot index d6c9454f31165718f179d2f5ba83652fc1753307..1d9d1e7ab81a38091963ffa481ae4744b2925a20 100644 --- a/SOL002/VNFFaultManagement-API/IndividualAlarm.robot +++ b/SOL002/VNFFaultManagement-API/IndividualAlarm.robot @@ -1,5 +1,4 @@ *** Settings *** -# Suite setup Expect spec SOL003-VNFLifecycleManagement-API.yaml Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library OperatingSystem @@ -7,61 +6,55 @@ Library JSONLibrary Library JSONSchemaLibrary schemas/ Library DependencyLibrary - *** Variables ** ${original_etag} 1234 - *** Test Cases *** POST Alarm - Method not implemented [Documentation] Test ID: 6.3.4.2.1 ... Test title: POST Alarm - Method not implemented ... Test objective: The objective is to test that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 7.4.3.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.3.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: + ... Applicability: none ... Post-Conditions: none POST Alarm Task Check HTTP Response Status Code Is 405 - GET information about an individual alarm [Documentation] Test ID: 6.3.4.2.2 ... Test title: GET information about an individual alarm ... Test objective: The objective is to read an individual alarm. ... Pre-conditions: The related alarm exists - ... Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Alarm Task Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is alarm - - PUT Individual Alarm - Method not implemented [Documentation] Test ID: 6.3.4.2.3 ... Test title: PUT Individual Alarm - Method not implemented ... Test objective: The objective is to test that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 7.4.3.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.3.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: + ... Applicability: none ... Post-Conditions: none PUT Alarm Task Check HTTP Response Status Code Is 405 - PATCH Individual Alarm [Documentation] Test ID: 6.3.4.2.4 ... Test title: PATCH Individual Alarm ... Test objective: The objective is to Modify an individual alarm resource ... Pre-conditions: The related alarm exists - ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: + ... Applicability: none ... Post-Conditions: none PATCH Alarm Task Check HTTP Response Status Code Is 200 @@ -72,54 +65,68 @@ PATCH Individual Alarm - Precondition failed ... Test title: PATCH Individual Alarm - Precondition failed ... Test objective: The objective is to attempt to Modify an individual alarm resource, where the precondition was not met ... Pre-conditions: The related alarm exists - ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: + ... Applicability: none ... Post-Conditions: The alarm resource is not modified PATCH Alarm Task with wrong precondition Check HTTP Response Status Code Is 412 Check HTTP Response Body Json Schema Is ProblemDetails + Check Postcondition VNF individual alarm Unmodified (Implicit) PATCH Individual Alarm - Conflict [Documentation] Test ID: 6.3.4.2.6 ... Test title: PATCH Individual Alarm - Conflict ... Test objective: The objective is to Modify an individual alarm resource ... Pre-conditions: The related alarm exists - ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: + ... Applicability: none ... Post-Conditions: The alarm resource is not modified PATCH Alarm Task Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails + Check Postcondition VNF individual alarm Unmodified (Implicit) - DELETE Individual Alarm - Method not implemented [Documentation] Test ID: 6.3.4.2.7 ... Test title: DELETE Individual Alarm - Method not implemented ... Test objective: The objective is to test that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 7.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: alarm not deleted + ... Applicability: none + ... Post-Conditions: none DELETE Alarm Task Check HTTP Response Status Code Is 405 + +GET information about an individual alarm - Not Found + [Documentation] Test ID: 6.3.4.2.8 + ... Test title: GET information about an individual alarm - Not Found + ... Test objective: The objective is to test that GET method fail retrieving status information about individaual Alarms when alarm is not present. + ... Pre-conditions: The related alarm doesnot exists + ... Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET Alarm Task + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails *** Keywords *** POST Alarm Task log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Alarm Task log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/alarmModifications.json - Put ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} ${body} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Alarm Task @@ -127,33 +134,36 @@ PATCH Alarm Task Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} Set Headers {"If-Match": "${original_etag[0]}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/alarmModifications.json - Patch ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} ${body} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Alarm Task with wrong precondition log Trying to perform a PATCH. This method modifies an individual alarm resource Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/alarmModifications.json - Patch ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} ${body} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} + ${origOutput}= Output response + Set Suite Variable ${origResponse} ${origOutput} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Alarm Task log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Alarm Task Log Query VNF The GET method queries information about individual alarm. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${etag} Output response headers ETag Set Suite Variable &{original_etag} ${etag} ${outputResponse}= Output response @@ -161,17 +171,17 @@ GET Alarm Task GET Alarm Task with filter Log Query VNF The GET method queries information about individual alarm with filters. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?${alarm_filter}=${managedObjectId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${alarm_filter}=${managedObjectId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Alarm Task with invalid filter Log Query VNF The GET method queries information about individual alarm with filters. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?${invalid_alarm_filter}=${managedObjectId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${invalid_alarm_filter}=${managedObjectId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Check HTTP Response Status Code Is @@ -185,3 +195,9 @@ Check HTTP Response Body Json Schema Is ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK + +Check Postcondition VNF individual alarm Unmodified (Implicit) + Log Check Postcondition subscription is not modified + GET Alarm Task + Should Be Equal As Strings ${origResponse['body']['callbackUri']} ${response['body']['callbackUri']} + diff --git a/SOL002/VNFFaultManagement-API/IndividualSubscription.robot b/SOL002/VNFFaultManagement-API/IndividualSubscription.robot index db5d06baf720809bc3df8c8a145cc21f3a3ea72c..39c594b6fb961117f4ab0b610c728949df0e23d9 100644 --- a/SOL002/VNFFaultManagement-API/IndividualSubscription.robot +++ b/SOL002/VNFFaultManagement-API/IndividualSubscription.robot @@ -12,11 +12,11 @@ POST Individual Subscription - Method not implemented [Documentation] Test ID: 6.3.4.5.1 ... Test title: POST Individual Subscription - Method not implemented ... Test objective: The objective is to test that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Post Create individual subscription Check HTTP Response Status Code Is 405 @@ -25,10 +25,10 @@ GET Information about an individual subscription ... Test title: GET Information about an individual subscription ... Test objective: The objective is to read an individual subscription for VNF alarms subscribed by the client ... Pre-conditions: The subscription with the given id exists - ... Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get individual subscription Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is FmSubscription @@ -37,94 +37,106 @@ PUT an individual subscription - Method not implemented [Documentation] Test ID: 6.3.4.5.3 ... Test title: PUT an individual subscription - Method not implemented ... Test objective: The objective is to test that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 7.4.6.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.6.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Put individual subscription Check HTTP Response Status Code Is 405 - - + PATCH an individual subscription - Method not implemented [Documentation] Test ID: 6.3.4.5.4 ... Test title: PATCH an individual subscription - Method not implemented ... Test objective: The objective is to test that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 7.4.6.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.6.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Patch individual subscription Check HTTP Response Status Code Is 405 - DELETE an individual subscription [Documentation] Test ID: 6.3.4.5.5 ... Test title: DELETE an individual subscription - ... Test objective: The objective is to test that the deletion of a subscription - ... Pre-conditions: an existing subscription - ... Reference: Clause 7.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Test objective: The objective is to test that the deletion of a individual subscription resource. + ... Pre-conditions: one or more subscription already exsist + ... Reference: Clause 7.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: + ... Applicability: none ... Post-Conditions: the subscription is deleted Delete individual subscription Check HTTP Response Status Code Is 204 + Check Postcondition resource is deleted + +GET Information about an individual subscription - Not Found + [Documentation] Test ID: 6.3.4.5.6 + ... Test title: GET Information about an individual subscription - Not Found + ... Test objective: The objective is to test that GET method fail retrieving individual subscription for VNF alarms subscribed by the client because it is not present. + ... Pre-conditions: The subscription with the given id donot exists + ... Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get individual subscription + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails *** Keywords *** Check resource existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 Post Create individual subscription log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get individual subscription log Trying to get information about an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get individual subscription - filter Log Get the list of active individual subscription using a filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get individual subscription - invalid filter Log Get the list of active individual subscription using an invalid filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter_invalid} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter_invalid} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT individual subscription log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH individual subscription log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE individual subscription log Try to delete an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -139,3 +151,8 @@ Check HTTP Response Body Json Schema Is ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK + +Check Postcondition resource is deleted + Get individual subscription + Check HTTP Response Status Code Is 404 + \ No newline at end of file diff --git a/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot b/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot index 0b8e28edac324e2e9662679b0cb1f79d065eafd0..f03722d4e9366c8ad9a6b808ae91ea71845d74d5 100644 --- a/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot +++ b/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot @@ -1,150 +1,93 @@ *** Settings *** -Resource environment/variables.txt - -Library MockServerLibrary -Library Process +Library String Library OperatingSystem -Library Collections - -Suite Setup Create Sessions -Suite Teardown Terminate All Processes kill=true +Resource environment/variables.txt +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri *** Test Cases *** VNF Fault Alarm Notification - [Documentation] Test ID: 6.3.4.6.1 + [Documentation] Test ID: 6.3.4.8.1 ... Test title: VNF Fault Alarm Notification - ... Test objective: The objective is to test the dispatch of VNF Fault Alarm Notification when a virtualised resource within an VNF instance fails, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Test objective: The objective is to test that VNF Fault Alarm Notification is delivered with success to the notification consumer ... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm notifications is available in the VNFM. - ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM + ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none - Trigger the fault of a virtualised resource in the VNF instance (external action) - Check Alarm Notification Http POST Request Body Json Schema Is alarmNotification - Check Alarm Notification Http POST Request Body notificationType attribute Is alarmNotification - + Post Alarm Notification + Check HTTP Response Status Code Is 204 + VNF Fault Alarm Cleared Notification - [Documentation] Test ID: 6.3.4.6.2 + [Documentation] Test ID: 6.3.4.8.2 ... Test title: VNF Fault Alarm Cleared Notification - ... Test objective: The objective is to test the dispatch of VNF Fault Alarm Cleared Notification when a faulty virtualised resource within an VNF instance is cleared, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. - ... Pre-conditions: A VNF instance is instantiated, a virtualised resource is in faulty state, and a subscription for fault alarm cleared notifications is available in the VNFM. - ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM + ... Test objective: The objective is to test that VNF Fault Alarm Cleared Notification is delivered with success to the notification consumer + ... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm cleared notifications is available in the VNFM. + ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none - Trigger the clear of a faulty virtualised resource in the VNF instance (external action) - Check Alarm cleared Notification Http POST Request Body Json Schema Is alarmClearedNotification - Check Alarm cleared Notification Http POST Request Body notificationType attribute Is alarmClearedNotification - -VNF Fault Alarm List Rebuilt Notification - [Documentation] Test ID: 6.3.4.6.3 - ... Test title: VNF Fault Alarm List Rebuilt Notification - ... Test objective: The objective is to test the dispatch of VNF Fault Alarm List Rebuilt Notification when the VNFM decides to rebuild the list of its VNF alarms, e.g. due to a corruption in the alarm storage, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. - ... Pre-conditions: A VNF instance is instantiated, one or more virtualised resource are in faulty state, and a subscription for fault alarm list rebuilt notifications is available in the VNFM. - ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM + Post Alarm Cleared Notification + Check HTTP Response Status Code Is 204 + +VNF Fault Alarm List Rebuilt Notification + [Documentation] Test ID: 6.3.4.8.3 + ... Test title: VNF Fault List Rebuilt Alarm List Rebuilt Notification + ... Test objective: The objective is to test that VNF Fault Alarm List Rebuilt Notification is delivered with success to the notification consumer + ... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm list rebuilt notifications is available in the VNFM. + ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none - Trigger the VNF fault alarm list rebuild in the NFVO (external action) - Check Alarm list rebuilt Notification Http POST Request Body Json Schema Is alarmListRebuiltNotification - Check Alarm list rebuilt Notification Http POST Request Body notificationType attribute Is alarmListRebuiltNotification - + Post Alarm List Rebuilt Notification + Check HTTP Response Status Code Is 204 *** Keywords *** -Trigger the fault of a virtualised resource in the VNF instance (external action) - #do nothing - Log do nothing - -Trigger the clear of a faulty virtualised resource in the VNF instance (external action) - #do nothing - Log do nothing - -Trigger the VNF fault alarm list rebuild in the NFVO (external action) - #do nothing - Log do nothing - -Check Alarm List Rebuilt Notification Http POST Request Body Json Schema Is - [Arguments] ${element} - ${schema}= Get File schemas/${element}.schema.json - Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} - -Check Alarm List Rebuilt Notification Http POST Request Body notificationType attribute Is - [Arguments] ${type} - Configure Notification Alarm List Rebuilt Handler ${callback_endpoint_fwd} ${type} - Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} - Clear Requests ${callback_endpoint} - Clear Requests ${callback_endpoint_fwd} - -Check Alarm Notification Http POST Request Body Json Schema Is - [Arguments] ${element} - ${schema}= Get File schemas/${element}.schema.json - Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} - -Check Alarm Notification Http POST Request Body notificationType attribute Is - [Arguments] ${type} - Configure Notification Alarm Handler ${callback_endpoint_fwd} ${type} - Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} - Clear Requests ${callback_endpoint} - Clear Requests ${callback_endpoint_fwd} - -Check Alarm cleared Notification Http POST Request Body Json Schema Is - [Arguments] ${element} - ${schema}= Get File schemas/${element}.schema.json - Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} - - -Check Alarm cleared Notification Http POST Request Body notificationType attribute Is - [Arguments] ${type} - Configure Notification Alarm Cleareance Handler ${callback_endpoint_fwd} ${type} - Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} - Clear Requests ${callback_endpoint} - Clear Requests ${callback_endpoint_fwd} - - -Check Alarm Clerance Notification Http POST Request Body changeType attribute Is - [Arguments] ${type} - #do nothing - Log do nothing - - -Configure Notification Alarm List Rebuilt Handler - [Arguments] ${endpoint} ${type} - ${json}= evaluate {} - set to dictionary ${json} notificationType ${type} - ${BODY}= evaluate json.dumps(${json}) json - Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${notification_request} ${notification_response} - -Configure Notification Alarm Handler - [Arguments] ${endpoint} ${type} - ${json}= evaluate {} - set to dictionary ${json} notificationType ${type} - ${BODY}= evaluate json.dumps(${json}) json - Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${notification_request} ${notification_response} - -Configure Notification Alarm Cleareance Handler - [Arguments] ${endpoint} ${type} - ${json}= evaluate {} - set to dictionary ${json} notificationType ${type} - ${BODY}= evaluate json.dumps(${json}) json - Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${notification_request} ${notification_response} - -Configure Notification Forward - [Arguments] ${schema} ${endpoint} ${endpoint_fwd} - Log Creating mock Http POST forward to handle ${schema} - &{notification_tmp}= Create Mock Request Matcher POST ${endpoint} body_type="JSON_SCHEMA" body=${schema} - &{notification_fwd}= Create Mock Http Forward ${endpoint_fwd} - Create Mock Expectation With Http Forward ${notification_tmp} ${notification_fwd} +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body FmSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri -Create Sessions - Start Process java -jar ../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance - Wait For Process handle=mockInstance timeout=5s on_timeout=continue - Create Mock Session ${callback_uri}:${callback_port} #The API producer is set to NFVO according to SOL002-7.3.4 +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post Alarm Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/AlarmNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Alarm Cleared Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/AlarmClearedNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} alarmId=${alarmId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Alarm List Rebuilt Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/AlarmListRebuiltNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL002/VNFFaultManagement-API/Notifications.robot b/SOL002/VNFFaultManagement-API/Notifications.robot new file mode 100644 index 0000000000000000000000000000000000000000..6a6830d26be4e797844544667663b38ca37ed01b --- /dev/null +++ b/SOL002/VNFFaultManagement-API/Notifications.robot @@ -0,0 +1,156 @@ +*** Settings *** +Resource environment/variables.txt + +Library MockServerLibrary +Library Process +Library OperatingSystem +Library Collections + +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true + +*** Test Cases *** +VNF Fault Alarm Notification + [Documentation] Test ID: 6.3.4.6.1 + ... Test title: VNF Fault Alarm Notification + ... Test objective: The objective is to test the dispatch of VNF Fault Alarm Notification when a virtualised resource within an VNF instance fails, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm notifications is available in the VNFM. + ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Trigger the fault of a virtualised resource in the VNF instance (external action) + Check Alarm Notification Http POST Request Body Json Schema Is alarmNotification + Check Alarm Notification Http POST Request Body notificationType attribute Is alarmNotification + +VNF Fault Alarm Cleared Notification + [Documentation] Test ID: 6.3.4.6.2 + ... Test title: VNF Fault Alarm Cleared Notification + ... Test objective: The objective is to test the dispatch of VNF Fault Alarm Cleared Notification when a faulty virtualised resource within an VNF instance is cleared, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A VNF instance is instantiated, a virtualised resource is in faulty state, and a subscription for fault alarm cleared notifications is available in the VNFM. + ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Trigger the clear of a faulty virtualised resource in the VNF instance (external action) + Check Alarm cleared Notification Http POST Request Body Json Schema Is alarmClearedNotification + Check Alarm cleared Notification Http POST Request Body notificationType attribute Is alarmClearedNotification + +VNF Fault Alarm List Rebuilt Notification + [Documentation] Test ID: 6.3.4.6.3 + ... Test title: VNF Fault Alarm List Rebuilt Notification + ... Test objective: The objective is to test the dispatch of VNF Fault Alarm List Rebuilt Notification when the VNFM decides to rebuild the list of its VNF alarms, e.g. due to a corruption in the alarm storage, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A VNF instance is instantiated, one or more virtualised resource are in faulty state, and a subscription for fault alarm list rebuilt notifications is available in the VNFM. + ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Trigger the VNF fault alarm list rebuild in the NFVO (external action) + Check Alarm list rebuilt Notification Http POST Request Body Json Schema Is alarmListRebuiltNotification + Check Alarm list rebuilt Notification Http POST Request Body notificationType attribute Is alarmListRebuiltNotification + + +*** Keywords *** +Trigger the fault of a virtualised resource in the VNF instance (external action) + #do nothing + Log do nothing + +Trigger the clear of a faulty virtualised resource in the VNF instance (external action) + #do nothing + Log do nothing + +Trigger the VNF fault alarm list rebuild in the NFVO (external action) + #do nothing + Log do nothing + +Check Alarm List Rebuilt Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + +Check Alarm List Rebuilt Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification Alarm List Rebuilt Handler ${callback_endpoint_fwd} ${type} + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Check Alarm Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + +Check Alarm Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification Alarm Handler ${callback_endpoint_fwd} ${type} + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Check Alarm cleared Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + + +Check Alarm cleared Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification Alarm Cleareance Handler ${callback_endpoint_fwd} ${type} + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + + +Check Alarm Clerance Notification Http POST Request Body changeType attribute Is + [Arguments] ${type} + #do nothing + Log do nothing + + +Configure Notification Alarm List Rebuilt Handler + [Arguments] ${endpoint} ${type} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Configure Notification Alarm Handler + [Arguments] ${endpoint} ${type} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Configure Notification Alarm Cleareance Handler + [Arguments] ${endpoint} ${type} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Configure Notification Forward + [Arguments] ${schema} ${endpoint} ${endpoint_fwd} + Log Creating mock Http POST forward to handle ${schema} + &{notification_tmp}= Create Mock Request Matcher POST ${endpoint} body_type="JSON_SCHEMA" body=${schema} + &{notification_fwd}= Create Mock Http Forward ${endpoint_fwd} + Create Mock Expectation With Http Forward ${notification_tmp} ${notification_fwd} + +Create Sessions + Start Process java -jar ../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar -serverPort ${callback_port} alias=mockInstance + Wait For Process handle=mockInstance timeout=5s on_timeout=continue + Create Mock Session ${callback_uri}:${callback_port} #The API producer is set to NFVO according to SOL002-7.3.4 diff --git a/SOL002/VNFFaultManagement-API/Subscriptions.robot b/SOL002/VNFFaultManagement-API/Subscriptions.robot index 1977027d5e4e68508e4af21a279a518602ace4a7..094065deb3528d5f88beed6e4a482e5219e4679f 100644 --- a/SOL002/VNFFaultManagement-API/Subscriptions.robot +++ b/SOL002/VNFFaultManagement-API/Subscriptions.robot @@ -4,6 +4,11 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=fal Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Library String +Library Process +Library MockServerLibrary +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true *** Test Cases *** Create a new subscription @@ -11,49 +16,48 @@ Create a new subscription ... Test title: Create a new subscription ... Test objective: The objective is to create a new subscription. ... Pre-conditions: no subscription with the same filter and callbackUri exists - ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: + ... Applicability: none ... Post-Conditions: Resource created successfully Post Create subscription Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is FmSubscription - Check resource existence + Check HTTP Response Header Contain Link + Check Postcondition resource exists -Create a new Subscription - DUPLICATION +Create a duplicated Subscription [Documentation] Test ID: 6.3.4.4.2 - ... Test title: Create a new Subscription - DUPLICATION + ... Test title: Create a duplicated Subscription ... Test objective: The objective is to create a duplicate subscription. ... Pre-conditions: subscription with the same filter and callbackUri exists - ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: the VNFM does not allow creation of a subscription resource if another subscription resource with the same filter and callbackUri already exists - ... Post-Conditions: duplicated subscription is created - Post Create subscription - DUPLICATION - Check HTTP Response Status Code Is 201 - Check HTTP Response Body Json Schema Is FmSubscription - -Create a new Subscription - NO-DUPLICATION - [Documentation] Test ID: 6.3.4.4.3 - ... Test title: Create a new Subscription - NO-DUPLICATION - ... Test objective: The objective is to create a subscription in case of not allowed DUPLICATION. - ... Pre-conditions: subscription with the same filter and callbackUri exists - ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: the VNFM does not allow creation of a duplicate subscription resource - ... Post-Conditions: duplicated subscription is not created - Post Create subscription - DUPLICATION - Check HTTP Response Status Code Is 303 + ... Applicability: + ... Post-Conditions: duplicated subscription is created if the IUT allows duplications, otherwise the duplicated subscription is not created + Post Create subscription + Check Response for duplicated subscription + +Void + [Documentation] Test ID: 6.3.4.4.3 + ... Test title: Void + ... Test objective: Void + ... Pre-conditions: Void + ... Reference: Void + ... Config ID: Void + ... Applicability: Void + ... Post-Conditions: Void + Void GET Subscriptions [Documentation] Test ID: 6.3.4.4.4 ... Test title: GET Subscriptions ... Test objective: The objective is to retrieve the list of active subscriptions - ... Pre-conditions: - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: subscription is not deleted + ... Applicability: none + ... Post-Conditions: none Get subscriptions Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is FmSubscriptions @@ -62,11 +66,11 @@ GET Subscription - Filter [Documentation] Test ID: 6.3.4.4.5 ... Test title: GET Subscription - Filter ... Test objective: The objective is to retrieve the list of active subscriptions with filter - ... Pre-conditions: - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get subscriptions - filter Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is FmSubscriptions @@ -75,11 +79,11 @@ GET subscriptions - Bad Request Invalid attribute-based filtering parameters [Documentation] Test ID: 6.3.4.4.6 ... Test title: GET subscriptions - Bad Request Invalid attribute-based filtering parameters ... Test objective: The objective is to retrieve the list of active subscriptions with Invalid attribute-based filtering parameters - ... Pre-conditions: - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get subscriptions - invalid filter Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails @@ -88,11 +92,11 @@ GET subscriptions with "all_fields" attribute selector [Documentation] Test ID: 6.3.4.4.7 ... Test title: GET subscriptions with "all_fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector - ... Pre-conditions: - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get subscriptions with all_fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is FmSubscriptions @@ -101,11 +105,11 @@ GET subscriptions with "exclude_default" attribute selector [Documentation] Test ID: 6.3.4.4.8 ... Test title: GET subscriptions with "exclude_default" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector - ... Pre-conditions: - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get subscriptions with exclude_default attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is FmSubscriptions @@ -114,11 +118,11 @@ GET subscriptions with "fields" attribute selector [Documentation] Test ID: 6.3.4.4.9 ... Test title: GET subscriptions with "fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector - ... Pre-conditions: - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get subscriptions with fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is FmSubscriptions @@ -127,26 +131,24 @@ GET subscriptions with "exclude_fields" attribute selector [Documentation] Test ID: 6.3.4.4.10 ... Test title: GET subscriptions with "exclude_fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector - ... Pre-conditions: - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get subscriptions with exclude_fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is FmSubscriptions - - PUT subscriptions - Method not implemented [Documentation] Test ID: 6.3.4.4.11 ... Test title: PUT subscriptions - Method not implemented ... Test objective: The objective is to test that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 7.4.5.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.5.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none PUT subscriptions Check HTTP Response Status Code Is 405 @@ -154,11 +156,11 @@ PATCH subscriptions - Method not implemented [Documentation] Test ID: 6.3.4.4.12 ... Test title: PUT subscriptions - Method not implemented ... Test objective: The objective is to test that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 7.4.5.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.5.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none PATCH subscriptions Check HTTP Response Status Code Is 405 @@ -166,11 +168,11 @@ DELETE subscriptions - Method not implemented [Documentation] Test ID: 6.3.4.4.13 ... Test title: DELETE subscriptions - Method not implemented ... Test objective: The objective is to test that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 7.4.5.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.5.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: subscription not deleted + ... Applicability: none + ... Post-Conditions: none DELETE subscriptions Check HTTP Response Status Code Is 405 @@ -178,24 +180,24 @@ GET Subscriptions to get Paged Response [Documentation] Test ID: 6.3.4.4.14 ... Test title: GET Subscriptions to get Paged Response ... Test objective: The objective is to retrieve the list of active subscriptions to get paged response - ... Pre-conditions: - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: subscription is not deleted + ... Applicability: none + ... Post-Conditions: none Get subscriptions Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link GET subscriptions - Bad Request Response too Big [Documentation] Test ID: 6.3.4.4.15 ... Test title: GET subscriptions - Bad Request Response too Big ... Test objective: The objective is to test that GET method fail retrieving list of active subscription because Response is too big, and perform the JSON schema validation of the failed operation HTTP response - ... Pre-conditions: - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get subscriptions - invalid filter Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails @@ -204,26 +206,25 @@ GET Subscription with attribute-based filter "id" [Documentation] Test ID: 6.3.4.4.16 ... Test title: GET Subscription with attribute-based filter "id" ... Test objective: The objective is to retrieve the list of active subscriptions with filter "id" - ... Pre-conditions: - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get subscriptions with filter "id" Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is FmSubscription Check PostCondition HTTP Response Body Subscription Matches the requested attribute-based filter "id" - Get subscriptions with filter "filter.notificationTypes" [Documentation] Test ID: 6.3.4.4.17 ... Test title: GET Subscription with attribute-based filter "filter.notificationTypes" ... Test objective: The objective is to retrieve the list of active subscriptions with filter "filter.notificationTypes" - ... Pre-conditions: - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get subscriptions with filter "filter_notificationTypes" Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is FmSubscriptions @@ -233,11 +234,11 @@ Get subscriptions with filter "filter.faultyResourceTypes" [Documentation] Test ID: 6.3.4.4.18 ... Test title: GET Subscription with attribute-based filter "filter.faultyResourceTypes" ... Test objective: The objective is to retrieve the list of active subscriptions with filter "filter.faultyResourceTypes" - ... Pre-conditions: - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get subscriptions with filter "filter_faultyResourceTypes" Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is FmSubscriptions @@ -247,11 +248,11 @@ Get subscriptions with filter "filter.perceivedSeverities" [Documentation] Test ID: 6.3.4.4.19 ... Test title: GET Subscription with attribute-based filter "filter.perceivedSeverities" ... Test objective: The objective is to retrieve the list of active subscriptions with filter "filter.perceivedSeverities" - ... Pre-conditions: - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get subscriptions with filter "filter_perceivedSeverities" Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is FmSubscriptions @@ -261,11 +262,11 @@ Get subscriptions with filter "filter.eventTypes" [Documentation] Test ID: 6.3.4.4.20 ... Test title: GET Subscription with attribute-based filter "filter.eventTypes" ... Test objective: The objective is to retrieve the list of active subscriptions with filter "filter.eventTypes" - ... Pre-conditions: - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get subscriptions with filter "filter_eventTypes" Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is FmSubscriptions @@ -275,116 +276,144 @@ Get subscriptions with filter "filter.probableCauses" [Documentation] Test ID: 6.3.4.4.21 ... Test title: GET Subscription with attribute-based filter "filter.probableCauses" ... Test objective: The objective is to retrieve the list of active subscriptions with filter "filter.probableCauses" - ... Pre-conditions: - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get subscriptions with filter "filter_probableCauses" Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is FmSubscriptions Check PostCondition HTTP Response Body Subscriptions Matches the requested attribute-based filter "filter_probableCauses" +POST Create a new Subscription - Unprocessable Entity + [Documentation] Test ID: 6.3.4.4.22 + ... Test title: POST Create a new Subscription - Unprocessable Entity + ... Test objective: The objective is to test that content type of the payload body is supported and the payload body of a request contains syntactically correct data but the data cannot be processed. + ... re-conditions: none + ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Post Create subscription + Check HTTP Response Status Code Is 422 + Check HTTP Response Body Json Schema Is ProblemDetails + *** Keywords *** +Create Sessions + Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance + Wait For Process handle=mockInstance timeout=5s on_timeout=continue + Create Mock Session ${callback_uri}:${callback_port} + Post Create subscription - Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/fmSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} -Post Create subscription - DUPLICATION - Log Trying to create a subscription with an already created content - Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0 NVFO is not permitting duplication. Skipping the test - Set Headers {"Accept": "${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/fmSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} -Post Create subscription - NO-DUPLICATION - Log Trying to create a subscription with an already created content - Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 VNFM permits duplication. Skipping the test - Set Headers {"Accept": "${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/fmSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/fmSubscriptionRequest.json + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + +# Post Create subscription - DUPLICATION + # Log Trying to create a subscription with an already created content + # Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0 NVFO is not permitting duplication. Skipping the test + # Set Headers {"Accept": "${ACCEPT}"} + # Set Headers {"Content-Type": "${CONTENT_TYPE}"} + # Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + # ${template}= Get File jsons/fmSubscriptionRequest.json + # ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} + # Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + # ${outputResponse}= Output response + # Set Global Variable ${response} ${outputResponse} +# Post Create subscription - NO-DUPLICATION + # Log Trying to create a subscription with an already created content + # Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 VNFM permits duplication. Skipping the test + # Set Headers {"Accept": "${ACCEPT}"} + # Set Headers {"Content-Type": "${CONTENT_TYPE}"} + # Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + # ${template}= Get File jsons/fmSubscriptionRequest.json + # ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} + # Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + # ${outputResponse}= Output response + # Set Global Variable ${response} ${outputResponse} Get subscriptions Log Get the list of active subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get subscriptions - filter Log Get the list of active subscriptions using a filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get subscriptions - invalid filter Log Get the list of active subscriptions using an invalid filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter_invalid} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter_invalid} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get subscriptions with all_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_default attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?exclude_fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} PUT subscriptions log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH subscriptions log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE subscriptions log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -400,15 +429,15 @@ Check HTTP Response Body Json Schema Is Validate Json ${schema} ${response['body']} Log Json Schema Validation OK -Check LINK in Header +Check HTTP Response Header Contain Link ${linkURL}= Get Value From Json ${response['headers']} $..Link Should Not Be Empty ${linkURL} Get subscriptions with filter "id" Log Get the list of active subscriptions using a filter "id" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?id=${subscription_id} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?id=${subscription_id} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -418,8 +447,8 @@ Check PostCondition HTTP Response Body Subscription Matches the requested attrib Get subscriptions with filter "filter_notificationTypes" Log Get the list of active subscriptions using a filter "filter.notificationTypes" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?filter.notificationTypes=${notification_type} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.notificationTypes=${notification_type} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -431,8 +460,8 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_faultyResourceTypes" Log Get the list of active subscriptions using a filter "filter.faultyResourceTypes" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?filter.faultyResourceTypes=${faultyResourceType} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.faultyResourceTypes=${faultyResourceType} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -444,8 +473,8 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_perceivedSeverities" Log Get the list of active subscriptions using a filter "filter.perceivedSeverities" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?filter.perceivedSeverities=${perceivedSeverity} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.perceivedSeverities=${perceivedSeverity} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -457,8 +486,8 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_eventTypes" Log Get the list of active subscriptions using a filter "filter.eventTypes" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?filter.eventTypes=${eventType} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.eventTypes=${eventType} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -470,8 +499,8 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_probableCauses" Log Get the list of active subscriptions using a filter "filter.probableCauses" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?filter.probableCauses=${probableCause} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.probableCauses=${probableCause} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -480,9 +509,20 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Should Be Equal As Strings ${item['filter']['probableCauses']} ${probableCause} END -Check resource existence +Check Postcondition resource exists Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 +Check Postcondition Duplicate Subscription exsist + Should Not Be Equal As Strings ${response['body']['callbackUri']} ${subscriptionId} + +Check Response for duplicated subscription + Run Keyword If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 Check HTTP Response Status Code Is 201 + Run Keyword If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 Check HTTP Response Body Json Schema Is FmSubscription + Run Keyword If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0 Check HTTP Response Status Code Is 303 + +Void + log do nothing + diff --git a/SOL002/VNFFaultManagement-API/environment/variables.txt b/SOL002/VNFFaultManagement-API/environment/variables.txt index 1264a6aa915fde606f59bfb72f96a0d13a5db0f5..8a8be2d2bc72c2cfe456533438869d9f1b30f23d 100644 --- a/SOL002/VNFFaultManagement-API/environment/variables.txt +++ b/SOL002/VNFFaultManagement-API/environment/variables.txt @@ -2,7 +2,8 @@ ${VNFM_HOST} localhost # Hostname of the VNFM ${VNFM_PORT} 8080 # Listening port of the VNFM ${VNFM_SCHEMA} https -${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${ACCEPT} application/json ${ACCEPT_JSON} application/json ${AUTH_USAGE} 1 @@ -11,9 +12,11 @@ ${managedObjectId} 007c111c-38a1-42c0-a666-7475ecb1567c ${invalid_alarm_filter} badFilter ${apiRoot} / ${apiName} vnffm -${apiVersion} v1 +${apiMajorVersion} v1 ${CONTENT_TYPE} application/json +${origResponse}= httpresponse + ${VNFM_ALLOWS_DUPLICATE_SUBS} 0 ${alarmId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d @@ -52,7 +55,8 @@ ${response}= httpresponse ${vnfcInstanceIds} [] ${faultyResourceType} COMPUTE ${eventType} COMMUNICATIONS_ALARM -${perceivedSeverity} CRITICAL ${probableCause} -${notification_type} AlarmNotification \ No newline at end of file +${notification_type} AlarmNotification + +${callbackResp} localhost \ No newline at end of file diff --git a/SOL002/VNFFaultManagement-API/jsons/AlarmClearedNotification.json b/SOL002/VNFFaultManagement-API/jsons/AlarmClearedNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..f8a50fb3b45af0e487e475184ee1f78048dd8bf7 --- /dev/null +++ b/SOL002/VNFFaultManagement-API/jsons/AlarmClearedNotification.json @@ -0,0 +1,12 @@ +{{ + "id":"", + "notificationType":"AlarmClearedNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "alarmId":"{alarmId}", + "alarmCleareTime":"", + "_links":{{ + "subscription":"", + "alarm":"" + }} +}} diff --git a/SOL002/VNFFaultManagement-API/jsons/AlarmListRebuiltNotification.json b/SOL002/VNFFaultManagement-API/jsons/AlarmListRebuiltNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..2c0202371460b7cba1a159ee6b2c2e80cdf38983 --- /dev/null +++ b/SOL002/VNFFaultManagement-API/jsons/AlarmListRebuiltNotification.json @@ -0,0 +1,10 @@ +{{ + "id":"", + "notificationType":"AlarmListRebuiltNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "_links":{{ + "subscription":"", + "alarm":"" + }} +}} diff --git a/SOL002/VNFFaultManagement-API/jsons/AlarmNotification.json b/SOL002/VNFFaultManagement-API/jsons/AlarmNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..2a8e86425bac0e428e5eabff99767ed67665121d --- /dev/null +++ b/SOL002/VNFFaultManagement-API/jsons/AlarmNotification.json @@ -0,0 +1,13 @@ +{{ + "id":"", + "notificationType":"AlarmNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "alarm":{{ + "id":"", + "managedObjectId":"" + }}, + "_links":{{ + "subscription":"" + }} +}} diff --git a/SOL002/VNFFaultManagement-API/jsons/fmSubscriptionRequest.json b/SOL002/VNFFaultManagement-API/jsons/fmSubscriptionRequest.json index e44916f8dd95ffe1fd61888add4ebf78653c43f1..1411fe3b4eae8fc55e9b0b38e34282076a96aea8 100644 --- a/SOL002/VNFFaultManagement-API/jsons/fmSubscriptionRequest.json +++ b/SOL002/VNFFaultManagement-API/jsons/fmSubscriptionRequest.json @@ -1,10 +1,10 @@ -{ - "filter": { - "vnfInstanceSubscriptionFilter": { +{{ + "filter": {{ + "vnfInstanceSubscriptionFilter": {{ "vnfdIds": [ "6fc3539c-e602-4afa-8e13-962fb5a7d81f" ] - } - }, - "callbackUri": "http://127.0.0.1/subscribe" -} \ No newline at end of file + }} + }}, + "callbackUri": "{callback_uri}{callback_endpoint}" +}} \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/ApiVersion.robot b/SOL002/VNFIndicator-API/ApiVersion.robot index fce69405cbb0b1fd92083ae17045bd52a7b612e1..6ba83e5f0ead4ded2c6391c8fe2575217990b102 100644 --- a/SOL002/VNFIndicator-API/ApiVersion.robot +++ b/SOL002/VNFIndicator-API/ApiVersion.robot @@ -1,213 +1,213 @@ -*** Settings *** - -Resource environment/variables.txt - -Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false -Library DependencyLibrary -Library JSONLibrary -Library JSONSchemaLibrary schemas/ - -*** Test Cases *** -POST API Version - Method not implemented - [Documentation] Test ID: 6.3.2.7.1 - ... Test title: POST API version - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version - [Documentation] Test ID: 6.3.2.7.2 - ... Test title: GET API Version - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version - Method not implemented - [Documentation] Test ID: 6.3.2.7.3 - ... Test title: PUT API Version - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version - Method not implemented - [Documentation] Test ID: 6.3.2.7.4 - ... Test title: PATCH API Version - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version - Method not implemented - [Documentation] Test ID: 6.3.2.7.5 - ... Test title: DELETE API Version - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -POST API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 6.3.2.7.6 - ... Test title: POST API version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version with apiMajorVerion - [Documentation] Test ID: 6.3.2.7.7 - ... Test title: GET API Version with apiMajorVerion - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 6.3.2.7.8 - ... Test title: PUT API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 6.3.2.7.9 - ... Test title: PATCH API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 6.3.2.7.10 - ... Test title: DELETE API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -*** Keywords *** -POST API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response['body']} +*** Settings *** + +Resource environment/variables.txt + +Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 6.3.2.7.1 + ... Test title: POST API version - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 6.3.2.7.2 + ... Test title: GET API Version + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version - Method not implemented + [Documentation] Test ID: 6.3.2.7.3 + ... Test title: PUT API Version - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 6.3.2.7.4 + ... Test title: PATCH API Version - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 6.3.2.7.5 + ... Test title: DELETE API Version - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +POST API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 6.3.2.7.6 + ... Test title: POST API version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 6.3.2.7.7 + ... Test title: GET API Version with apiMajorVerion + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 6.3.2.7.8 + ... Test title: PUT API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 6.3.2.7.9 + ... Test title: PATCH API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 6.3.2.7.10 + ... Test title: DELETE API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/IndividualSubscription.robot b/SOL002/VNFIndicator-API/IndividualSubscription.robot index 16de0847ec14eb829f19f6739d85df8782aeb71f..1e6d3f3116ab2920e40c56b7d3558c7e91bd66db 100644 --- a/SOL002/VNFIndicator-API/IndividualSubscription.robot +++ b/SOL002/VNFIndicator-API/IndividualSubscription.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/individualSubscription.txt Library OperatingSystem Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false @@ -11,7 +10,7 @@ GET Individual VNF Indicator Subscription ... Test title: Get individual subscription to VNF performance indicators ... Test objective: The objective is to test the retrieval of individual VNF performance indicator subscription and perform a JSON schema validation of the returned subscription data structure ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF. - ... Reference: Clause 8.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators ... Post-Conditions: none @@ -24,7 +23,7 @@ GET Individual VNF Indicator Subscription with invalid resource identifier ... Test title: Get individual subscription to VNF performance indicators ... Test objective: The objective is to test that the retrieval of individual VNF performance indicator subscription fails when using an invalid resource identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF. - ... Reference: Clause 8.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators ... Post-Conditions: none @@ -37,7 +36,7 @@ DELETE Individual VNF Indicator Subscription ... Test title: Delete individual subscription to VNF performance indicators ... Test objective: The objective is to test the deletion of an individual VNF performance indicator subscription. ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF. - ... Reference: clause 8.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: clause 8.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators ... Post-Conditions: The subscription to VNF performance indicators is deleted @@ -50,7 +49,7 @@ DELETE Individual VNF Indicator Subscription with invalid resource identifier ... Test title: Delete individual subscription to VNF performance indicators ... Test objective: The objective is to test that the deletion of an individual VNF performance indicator subscription fails when using an invalid resource identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF. - ... Reference: clause 8.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: clause 8.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators ... Post-Conditions: none @@ -62,99 +61,96 @@ PUT Individual VNF Indicator Subscription - Method not implemented [Documentation] Test ID: 6.3.2.5.5 ... Test title: PUT individual VNF indicator subscription - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify an individual VNF performance indicator subscription - ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF. - ... Reference: Clause 8.4.6.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.6.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. - ... Post-Conditions: The individual VNF indicator subscription is not modified by the operation + ... Post-Conditions: none Send Put Request for Individual VNF Indicator Subscription Check HTTP Response Status Code Is 405 - Check Postcondition VNF individual subscription Unmodified (Implicit) PATCH Individual VNF Indicator Subscription - Method not implemented [Documentation] Test ID: 6.3.2.5.6 ... Test title: PUT individual VNF indicator subscription - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update an individual VNF performance indicator subscription - ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF. - ... Reference: Clause 8.4.6.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.6.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. - ... Post-Conditions: The individual VNF indicator subscription is not modified by the operation + ... Post-Conditions: none Send Patch Request for Individual VNF Indicator Subscription Check HTTP Response Status Code Is 405 - Check Postcondition VNF individual subscription Unmodified (Implicit) POST Individual VNF Indicator Subscription - Method not implemented [Documentation] Test ID: 6.3.2.5.7 ... Test title: PUT individual VNF indicator subscription - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify an individual VNF performance indicator subscription - ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF. - ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. - ... Post-Conditions: The individual VNF indicator subscription is not created by the operation + ... Post-Conditions: none Send Post Request for Individual VNF Indicator Subscription Check HTTP Response Status Code Is 405 - Check Postcondition VNF individual subscription is not created *** Keywords *** Get Individual VNF Indicator Subscription Log Trying to get a given subscription identified by subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} GET Individual VNF Indicator Subscription with invalid resource identifier Log Trying to perform a request on a subscriptionID which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete Request for Individual VNF Indicator Subscription Log Trying to perform a DELETE on a subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete Request for Individual VNF Indicator Subscription with invalid resource identifier Log Trying to perform a DELETE on a subscriptionId which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post Request for Individual VNF Indicator Subscription Log Trying to create a new subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put Request for Individual VNF Indicator Subscription Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Patch Request for Individual VNF Indicator Subscription Log Trying to create a new subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -181,14 +177,3 @@ Check Postcondition Individual VNF Indicator Subscription is Deleted Log Check Postcondition subscription is deleted GET Individual VNF Indicator Subscription Check HTTP Response Status Code Is 404 - -Check Postcondition VNF individual subscription Unmodified (Implicit) - Log Check Postcondition subscription is not modified - GET Individual VNF Indicator Subscription - Log Check Response matches original subscription - Should Be Equal As Strings ${origResponse['body']['callbackUri']} ${response['body']['callbackUri']} - -Check Postcondition VNF individual subscription is not created - Log Check Postcondition subscription is not created - GET Individual VNF Indicator Subscription with invalid resource identifier - Check HTTP Response Status Code Is 404 diff --git a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot index f4cecd7135da72dae4981d4ce3ecaaf85b086885..206a72b1c5afb8e2e718b82424493016b5a652fc 100644 --- a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot +++ b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/individualVnfIndicator.txt Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false *** Test Cases *** @@ -10,7 +9,7 @@ Get Individual Indicator for VNF Instance ... Test title: Get individual performance indicator for a VNF instance ... Test objective: The objective is to test the retrieval of a performance indicator for a given VNF instance and perform a JSON schema validation of the returned indicator data structure ... Pre-conditions: A VNF instance is instantiated. At least one measure of performance indicator is available for the given VNF instance. - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators ... Post-Conditions: none @@ -25,7 +24,7 @@ Get Individual Indicator for VNF Instance with invalid indicator identifier ... Test title: Get individual performance indicator for a VNF instance with invalid indicator identifier ... Test objective: The objective is to test that the retrieval of a performance indicator for a given VNF instance fails when using an invalid resource identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. At least one measure of performance indicator is available for the given VNF instance. - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none @@ -37,8 +36,8 @@ POST Individual VNF Indicator - Method not implemented [Documentation] Test ID: 6.3.2.3.3 ... Test title: POST individual performance indicator for VNF instance - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new performance indicator for a VNF instance - ... Pre-conditions: A VNF instance is instantiated. - ... Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none @@ -49,8 +48,8 @@ PUT Individual VNF Indicator - Method not implemented [Documentation] Test ID: 6.3.2.3.4 ... Test title: PUT individual performance indicator for VNF instance - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify an existing performance indicator for a VNF instance - ... Pre-conditions: A VNF instance is instantiated. At least one measure of performance indicator is available for the given VNF instance. - ... Reference: Clause 8.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none @@ -61,8 +60,8 @@ PATCH Individual VNF Indicator - Method not implemented [Documentation] Test ID: 6.3.2.3.5 ... Test title: PATCH individual performance indicator for VNF instance - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update an existing performance indicator for a VNF instance - ... Pre-conditions: A VNF instance is instantiated. At least one measure of performance indicator is available for the given VNF instance. - ... Reference: Clause 8.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none @@ -73,21 +72,20 @@ DELETE Individual VNF Indicator - Method not implemented [Documentation] Test ID: 6.3.2.3.6 ... Test title: DELETE individual performance indicator indicators for VNF instance - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete an existing performance indicator for a VNF instance - ... Pre-conditions: A VNF instance is instantiated. At least one measure of performance indicator is available for the given VNF instance. - ... Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. - ... Post-Conditions: The individual performance indicator for the VNF instance is not deleted by the unsuccessful operation + ... Post-Conditions: none Send DELETE Request for individual indicator in VNF instance Check HTTP Response Status Code Is 405 - Check Postcondition Indicator for VNF instance Exist Get Individual Performance Indicator [Documentation] Test ID: 6.3.2.3.7 ... Test title: Get Individual Performance Indicator ... Test objective: The objective is to test the retrieval of a performance indicator and perform a JSON schema validation of the returned indicator data structure ... Pre-conditions: At least one measure of performance indicator is available.. - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators ... Post-Conditions: none @@ -101,7 +99,7 @@ Get Individual Performance Indicator with invalid indicator identifier ... Test title: Get Individual Performance Indicator with invalid indicator identifier ... Test objective: The objective is to test that the retrieval of a performance indicator fails when using an invalid resource identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response. ... Pre-conditions: At least one measure of performance indicator is available. - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none @@ -113,8 +111,8 @@ POST Individual Performance Indicator - Method not implemented [Documentation] Test ID: 6.3.2.3.9 ... Test title: POST Individual Performance Indicator - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new performance indicator. - ... Pre-conditions: - ... Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none @@ -125,8 +123,8 @@ PUT Individual Performance Indicator - Method not implemented [Documentation] Test ID: 6.3.2.3.10 ... Test title: PUT Individual Performance Indicator - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify an existing performance indicator. - ... Pre-conditions: At least one measure of performance indicator is available. - ... Reference: Clause 8.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none @@ -137,8 +135,8 @@ PATCH Individual Performance Indicator - Method not implemented [Documentation] Test ID: 6.3.2.3.11 ... Test title: PATCH Individual Performance Indicator - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update an existing performance indicator. - ... Pre-conditions: At least one measure of performance indicator is available. - ... Reference: Clause 8.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none @@ -149,61 +147,60 @@ DELETE Individual Performance Indicator - Method not implemented [Documentation] Test ID: 6.3.2.3.12 ... Test title: DELETE Individual Performance Indicator - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete an existing performance indicator. - ... Pre-conditions: At least one measure of performance indicator is available. - ... Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. - ... Post-Conditions: + ... Post-Conditions: none Send DELETE Request for individual indicator Check HTTP Response Status Code Is 405 - Check PostCondition Individual Indicator exist *** Keywords *** Get Individual Indicator for a VNF instance Log This resource represents a VNF indicator related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} Get Individual Indicator for a VNF instance with invalid indicator identifier Log Trying to perform a negative get, using wrong identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${erroneousIndicatorId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${erroneousIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} Send POST Request for individual indicator in VNF instance Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for individual indicator in VNF instance Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for individual indicator in VNF instance Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for individual indicator in VNF instance Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -234,63 +231,50 @@ Check HTTP Response Body Includes Requested VNF Instance ID Log Check Response includes propoer VNF instance and Indicator identifiers Should Be Equal As Strings ${response['body']['vnfInstanceId']} ${vnfInstanceId} -Check Postcondition Indicator for VNF instance Exist - Log Check Response includes VNF Indicator - Get Individual Indicator for a VNF instance - Should Be Equal As Strings ${response['body']['vnfInstanceId']} ${vnfInstanceId} - Should Be Equal As Strings ${response['body']['id']} ${indicatorId} - Get Individual Indicator Log This resource represents a VNF indicator related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${indicatorId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} Get Individual Indicator with invalid indicator identifier Log Trying to perform a negative get, using wrong identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${erroneousIndicatorId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${erroneousIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} Send POST Request for individual indicator 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}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for individual indicator 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}/indicators/${indicatorId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for individual indicator 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}/indicators/${indicatorId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for individual indicator 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}/indicators/${indicatorId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${indicatorId} ${output}= Output response - Set Suite Variable ${response} ${output} - -Check PostCondition Individual Indicator exist - Log This resource represents a VNF indicator related to a VNF instance. - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} - Integer response status 200 \ No newline at end of file + Set Suite Variable ${response} ${output} \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/NotificationEndpoint.robot b/SOL002/VNFIndicator-API/NotificationEndpoint.robot new file mode 100644 index 0000000000000000000000000000000000000000..98f6a11cd5f3006ffb91124f7708a51cd7f396b9 --- /dev/null +++ b/SOL002/VNFIndicator-API/NotificationEndpoint.robot @@ -0,0 +1,46 @@ +*** Settings *** +Library String +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt # Generic Parameters +Library OperatingSystem +Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +VNF Indicator Value Change Notification + [Documentation] Test ID: 6.3.2.8.1 + ... Test title: VNF Indicator Value Change Notification + ... Test objective: The objective is to test that the POST request triggers VNF Indicator Value Change Notification . + ... Pre-conditions: A VNF is instantiated, and a subscription for indicator value change notifications is available in the VNF. + ... Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Value Change Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body VnfIndicatorSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post Value Change Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/ValueChangeNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} indicatorId=${indicatorId} vnfInstanceId=${vnfInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/Subscriptions.robot b/SOL002/VNFIndicator-API/Subscriptions.robot index fd458fbb6c015e00fe4d96b3a0736c26ffa964d0..a1c846577967d6f03e22ee52e8122104fc58b03d 100644 --- a/SOL002/VNFIndicator-API/Subscriptions.robot +++ b/SOL002/VNFIndicator-API/Subscriptions.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/subscriptions.txt Library OperatingSystem Library JSONLibrary Library Process @@ -17,7 +16,7 @@ GET VNF Indicators Subscriptions ... Test title: GET VNF Indicators Subscriptions ... Test objective: The objective is to test the retrieval of all VNF indicators subscriptions and perform a JSON schema validation of the returned subscriptions data structure ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF. - ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of indicators ... Post-Conditions: none @@ -30,7 +29,7 @@ GET VNF Indicators Subscriptions with attribute-based filter ... Test title: GET VNF Indicators Subscriptions with attribute-based filter ... Test objective: The objective is to test the retrieval of all VNF indicators subscriptions using attribute-based filter and perform a JSON schema and content validation of the returned subscriptions data structure ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF. - ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of indicators ... Post-Conditions: none @@ -44,7 +43,7 @@ GET VNF Indicators Subscriptions with invalid attribute-based filter ... Test title: GET VNF Indicators Subscriptions with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of all VNF indicators subscriptions fails when using invalid attribute-based filter. The test also checks the JSON schema of the unsuccessful operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF. - ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of indicators ... Post-Conditions: none @@ -57,19 +56,20 @@ GET VNF Indicators Subscriptions with invalid resource endpoint ... Test title: GET VNF Indicators Subscriptions with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of all VNF indicators subscriptions fails when using invalid resource endpoint. ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF. - ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of indicators. ... Post-Conditions: none Get VNF Indicators Subscriptions with invalid resource endpoint Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails Create new VNF indicator subscription [Documentation] Test ID: 6.3.2.4.5 ... Test title: Create new VNF indicator subscription ... Test objective: The objective is to test the creation of a new VNF indicator subscription perform a JSON schema and content validation of the returned subscriptions data structure ... Pre-conditions: A VNF instance is instantiated. - ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of indicators. ... Post-Conditions: The VNF indicator subscription is successfully set and it matches the issued subscription @@ -83,8 +83,8 @@ PUT VNF Indicator Subscriptions - Method not implemented [Documentation] Test ID: 6.3.2.4.6 ... Test title: PUT VNF Indicator Subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify VNF indicator subscriptions - ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF. - ... Reference: Clause 8.4.5.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.5.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of indicators. ... Post-Conditions: none @@ -95,8 +95,8 @@ PATCH VNF Indicator Subscriptions - Method not implemented [Documentation] Test ID: 6.3.2.4.7 ... Test title: PATCH VNF Indicator Subscriptions - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update VNF indicator subscriptions - ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF. - ... Reference: Clause 8.4.5.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.5.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of indicators. ... Post-Conditions: none @@ -107,8 +107,8 @@ DELETE VNF Indicator Subscriptions - Method not implemented [Documentation] Test ID: 6.3.2.4.8 ... Test title: DELETE VNF Indicator Subscriptions - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete VNF indicator subscriptions - ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF. - ... Reference: Clause 8.4.5.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.5.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of indicators. ... Post-Conditions: none @@ -120,57 +120,97 @@ GET VNF Indicators Subscriptions to get Paged Response ... Test title: GET VNF Indicators Subscriptions to get Paged Response ... Test objective: The objective is to test the retrieval of all VNF indicators subscriptions to get Paged Response. ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF. - ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of indicators ... Post-Conditions: none Get VNF Indicators Subscriptions Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link GET VNF Indicators Subscriptions - Bad Request Response too Big [Documentation] Test ID: 6.3.2.4.10 ... Test title: GET VNF Indicators Subscriptions - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of all VNF indicators subscriptions fails because response is too big. The test also checks the JSON schema of the unsuccessful operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNF. - ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of indicators ... Post-Conditions: none Get VNF Indicators Subscriptions Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails + Check HTTP Response Body Json Schema Is ProblemDetails + +POST Create a new Subscription - Unprocessable Entity + [Documentation] Test ID: 6.3.2.4.11 + ... Test title: POST Create a new Subscription - Unprocessable Entity + ... Test objective: The objective is to test that content type of the payload body is supported and the payload body of a request contains syntactically correct data but the data cannot be processed. + ... Pre-conditions: none + ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + Send Post Request for VNF Indicator Subscription with unprocessable entity + Check HTTP Response Status Code Is 422 + Check HTTP Response Body Json Schema Is ProblemDetails + +Create new VNF indicator Subscription - DUPLICATION + [Documentation] Test ID: 6.3.2.4.12 + ... Test title: POST Create a new subscription - DUPLICATION + ... Test objective: The POST method creates a new subscription even if an existing subscription to same content exist + ... Pre-conditions: none + ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VE + ... Applicability: SUT should support duplication of subscription creation + ... Post-Conditions: In response header Location shall not be null + Post Create subscription - DUPLICATION + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is VnfIndicatorSubscription + Check Operation Occurrence Id +Create new VNF indicator Subscription - NO-DUPLICATION + [Documentation] Test ID: 6.3.2.4.13 + ... Test title: POST Create a new subscription - NO-DUPLICATION + ... Test objective: The POST method creates a new subscription even if an existing subscription to same content exist + ... Pre-conditions: none + ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VE + ... Applicability: SUT should not support duplication of subscription creation + ... Post-Conditions: In response header Location shall not be null + Post Create subscription - NO-DUPLICATION + Check HTTP Response Status Code Is 303 + Check Operation Occurrence Id + *** Keywords *** Get VNF Indicators Subscriptions Log Trying to get the list of subscriptions Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} Get VNF Indicators Subscriptions with filter Log Trying to get the list of subscriptions using filters Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${POS_FILTER} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${POS_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} Get VNF Indicators Subscriptions with invalid filter Log Trying to get the list of subscriptions using filters with wrong attribute name Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${NEG_FILTER} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${NEG_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} Get VNF Indicators Subscriptions with invalid resource endpoint - Log Trying to perform a request on a Uri which doesn't exist + Log Trying to perform a request on a Uri which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscription + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscription ${output}= Output response Set Suite Variable ${response} ${output} @@ -178,35 +218,53 @@ Send Post Request for VNF Indicator Subscription Log Trying to create a new 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 ${VNFM_CHECKS_NOTIF_ENDPOINT} == 1 - ... Check Notification Endpoint + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint + +Send Post Request for VNF Indicator Subscription with unprocessable entity + Log Trying to create a new subscription + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=localhost #not reachable endpoint + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} Send Put Request for VNF Indicator Subscriptions Log Trying to create a new subscription ${body}= Get File jsons/subscriptions.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} Send Patch Request for VNF Indicator Subscriptions Log Trying to create a new subscription ${body}= Get File jsons/subscriptions.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} Send Delete Request for VNF Indicator Subscriptions Log Trying to create a new subscription ${body}= Get File jsons/subscriptions.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -239,19 +297,18 @@ Check Postcondition VNF Indicator Subscription Is Set Log Check Postcondition subscription exist Log Trying to get the subscription Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${response['body']['id']} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 200 Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes VNF Indicators according to filter - @{words} = Split String ${POS_FILTER} ,${SEPERATOR} + @{words} = Split String ${POS_FILTER} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['callbackUri']} @{words}[1] -Create Sessions - Pass Execution If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 0 MockServer not necessary to run +Create Sessions Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri}:${callback_port} @@ -263,6 +320,50 @@ Check Notification Endpoint Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} -Check LINK in Header +Check HTTP Response Header Contain Link ${linkURL}= Get Value From Json ${response['headers']} $..Link - Should Not Be Empty ${linkURL} \ No newline at end of file + Should Not Be Empty ${linkURL} + +Post Create subscription - DUPLICATION + Log Trying to create a subscription with an already created content + Pass Execution If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 0 VNFM is not permitting duplication. Skipping the test + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body}= Get File jsons/subscriptions.json + ${body}= Format String ${body} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint + +Post Create subscription - NO-DUPLICATION + Log Trying to create a subscription with an already created content + Pass Execution If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 1 VNFM permits duplication. Skipping the test + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body}= Get File jsons/subscriptions.json + ${body}= Format String ${body} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint + +Check Operation Occurrence Id + ${vnfLcmOpOccId}= Get Value From Json ${response['headers']} $..Location + Should Not Be Empty ${vnfLcmOpOccId} diff --git a/SOL002/VNFIndicator-API/VNFIndicators.robot b/SOL002/VNFIndicator-API/VNFIndicators.robot index bc6dbd9c9c56621a23963fa2646f9618e752a435..ad6536a22033ad2badb4c8169f6fa156ac53ecef 100644 --- a/SOL002/VNFIndicator-API/VNFIndicators.robot +++ b/SOL002/VNFIndicator-API/VNFIndicators.robot @@ -4,7 +4,6 @@ Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library String -Resource environment/vnfIndicators.txt Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false *** Test Cases *** @@ -13,7 +12,7 @@ Get all VNF Indicators ... Test title: Get all VNF Indicators ... Test objective: The objective is to test the retrieval of all the available VNF indicators and perform a JSON schema validation of the collected indicators data structure ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF performance indicators are available in the VNF. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none @@ -26,7 +25,7 @@ Get VNF Indicators with attribute-based filter ... Test title: Get VNF Indicators with attribute-based filter ... Test objective: The objective is to test the retrieval of VNF indicators using attribute-based filter, perform a JSON schema validation of the collected indicators data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF performance indicators are available in the VNF. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none @@ -40,7 +39,7 @@ Get VNF Indicators with invalid attribute-based filter ... Test title: Get VNF Indicators with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of VNF indicators fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF performance indicators are available in the VNF. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none @@ -53,55 +52,59 @@ Get all VNF Indicators with malformed authorization token ... Test title: GET all VNF Indicators with malformed authrization token. ... Test objective: The objective is to test that the retrieval of VNF indicators fails when using malformed authorization token ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF performance indicators are available in the VNF. - ... Reference: Clause 4.5.3.3, 8.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 4.5.3.3, 8.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. The VNF requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none Get all VNF indicators with malformed authorization token Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails Get all VNF Indicators without authorization token [Documentation] Test ID: 6.3.2.1.5 ... Test title: GET all VNF Indicators without authorization token ... Test objective: The objective is to test that the retrieval of VNF indicators fails when omitting the authorization token ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF performance indicators are available in the VNF. - ... Reference: Clause 4.5.3.3, 8.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 4.5.3.3, 8.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. The VNF requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none Get all VNF indicators without authorization token Check HTTP Response Status Code Is 401 + Check HTTP Response Body Json Schema Is ProblemDetails GET all VNF Indicators with expired or revoked authorization token [Documentation] Test ID: 6.3.2.1.6 ... Test title: GET all VNF Indicators with expired or revoked authorization token ... Test objective: The objective is to test that the retrieval of VNF indicators fails when using expired or revoked authorization token ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF performance indicators are available in the VNF. - ... Reference: Clause 4.5.3.3, 8.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 4.5.3.3, 8.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. The VNF requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none Get all VNF indicators with expired or revoked authorization token Check HTTP Response Status Code Is 401 + Check HTTP Response Body Json Schema Is ProblemDetails Get all VNF Indicators with invalid resource endpoint [Documentation] Test ID: 6.3.2.1.7 ... Test title: GET all VNF Indicators with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of VNF indicators fails when using invalid resource endpoint ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF performance indicators are available in the VNF. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none Get all VNF indicators with invalid resource endpoint Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails POST all VNF Indicators - Method not implemented [Documentation] Test ID: 6.3.2.1.8 ... Test title: POST all VNF Indicators - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create new VNF indicators - ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF performance indicators are available in the VNF - ... Reference: Clause 8.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none @@ -112,8 +115,8 @@ PUT all VNF Indicators - Method not implemented [Documentation] Test ID: 6.3.2.1.9 ... Test title: PUT all VNF Indicators - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify VNF indicators - ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF performance indicators are available in the VNF - ... Reference: Clause 8.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none @@ -124,8 +127,8 @@ PATCH all VNF Indicators - Method not implemented [Documentation] Test ID: 6.3.2.1.10 ... Test title: PATCH all VNF Indicators - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update VNF indicators - ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF performance indicators are available in the VNF - ... Reference: Clause 8.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none @@ -136,34 +139,33 @@ DELETE all VNF Indicators - Method not implemented [Documentation] Test ID: 6.3.2.1.11 ... Test title: DELETE all VNF Indicators - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete VNF indicators - ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF performance indicators are available in the VNF - ... Reference: Clause 8.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none Send DELETE Request for all VNF indicators Check HTTP Response Status Code Is 405 - Check Postcondition VNF Indicators Exist Get VNF Indicators to get Paged Response [Documentation] Test ID: 6.3.2.1.12 ... Test title: Get VNF Indicators to get Paged Response ... Test objective: The objective is to test the retrieval of all the available VNF indicators with Paged Response. ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF performance indicators are available in the VNF. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none Get all VNF indicators Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link Get VNF Indicators - Bad Request Response too Big [Documentation] Test ID: 6.3.2.1.13 ... Test title: Get VNF Indicators - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of VNF indicators fails when response is too big, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF performance indicators are available in the VNF. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none @@ -175,27 +177,27 @@ Get VNF Indicators - Bad Request Response too Big Get all VNF indicators Log The GET method queries multiple VNF indicators Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} Get VNF indicators with filter Log The GET method queries multiple VNF indicators using Attribute-based filtering parameters Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators?${POS_FIELDS} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators?${POS_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} Get VNF indicators with invalid filter Log The GET method queries multiple VNF indicators using invalid Attribute-based filtering parameters Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators?${NEG_FIELDS} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators?${NEG_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} @@ -203,9 +205,9 @@ Get all VNF indicators with malformed authorization token Pass Execution If ${AUTH_USAGE} == 0 Skipping test as EM/VNF is not supporting authentication Log The GET method queries multiple VNF indicators using invalid token Set Headers {"Accept": "${ACCEPT_JSON}"} - Set Headers {"Authorization": "${BAD_AUTHORIZATION}"} + Set Headers {"${AUTHORIZATION_HEADER}": "${BAD_AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -213,9 +215,9 @@ Get all VNF indicators with expired or revoked authorization token Pass Execution If ${AUTH_USAGE} == 0 Skipping test as EM/VNF is not supporting authentication Log The GET method queries multiple VNF indicators using invalid token Set Headers {"Accept": "${ACCEPT_JSON}"} - Set Headers {"Authorization": "${NEG_AUTHORIZATION}"} + Set Headers {"${AUTHORIZATION_HEADER}": "${NEG_AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -224,48 +226,48 @@ Get all VNF indicators without authorization token Log The GET method queries multiple VNF indicators omitting token Set Headers {"Accept": "${ACCEPT_JSON}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} Get all VNF indicators with invalid resource endpoint Log The GET method queries multiple VNF indicators omitting token Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicator + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicator ${output}= Output response Set Suite Variable ${response} ${output} Send POST Request for all VNF indicators log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/indicators + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for all VNF indicators 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}"} - Post ${apiRoot}/${apiName}/${apiVersion}/indicators + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for all VNF indicators 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}"} - Post ${apiRoot}/${apiName}/${apiVersion}/indicators + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for all VNF indicators 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}"} - Post ${apiRoot}/${apiName}/${apiVersion}/indicators + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -288,19 +290,14 @@ Check HTTP Response Body Json Schema Is ${jsonSchema}= Catenate SEPARATOR= ${schema} .schema.json Validate Json ${jsonSchema} ${response['body']} Log Json Schema Validation OK - -Check Postcondition VNF Indicators Exist - Log Check Postcondition indicators exist - Get all VNF indicators - Check HTTP Response Status Code Is 200 Check HTTP Response Body vnfIndicators Matches the requested attribute-based filter Log Check Response includes VNF Indicators according to filter - @{attr} = Split String ${POS_FILTER} ,${VAR_SEPERATOR} - @{var_name} = Split String @{attr}[0] ,${SEPERATOR} - @{var_id} = Split String @{attr}[1] ,${SEPERATOR} + @{attr} = Split String ${POS_FILTER} ${VAR_SEPARATOR} + @{var_name} = Split String @{attr}[0] ${SEPARATOR} + @{var_id} = Split String @{attr}[1] ${SEPARATOR} Should Be True "${response['body'][0]['name']}"=="@{var_name}[1]" and "${response['body'][0]['vnfInstanceId']}"=="@{var_id}[1]" -Check LINK in Header +Check HTTP Response Header Contain Link ${linkURL}= Get Value From Json ${response['headers']} $..Link Should Not Be Empty ${linkURL} diff --git a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot index 11f83e45bbbcf2a68de2f9040650f1df20b52ce3..cee2b50d972ca28799f6bfe68f03793fa00cdf01 100644 --- a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot +++ b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot @@ -2,7 +2,6 @@ Documentation This resource represents VNF indicators related to a VNF instance. The client can use this resource to query multiple VNF indicators that are related to a particular VNF instance. Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/vnfIndicatorinVnfInstance.txt Library JSONLibrary Library String Library REST ${EM-VNF_SCHEMA}://${EM-VNF_HOST}:${EM-VNF_PORT} ssl_verify=false @@ -13,7 +12,7 @@ Get Indicators for VNF Instance ... Test title: Get all performance indicators for a VNF instance ... Test objective: The objective is to test the retrieval of all performance indicators for a given VNF instance and perform a JSON schema validation of the returned indicators data structure ... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance. - ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators ... Post-Conditions: none @@ -27,7 +26,7 @@ GET Indicators for VNF Instance with attribute-based filter ... Test title: Get all performance indicators for a VNF instance with attribute-based filter ... Test objective: The objective is to test the retrieval of all performance indicators for a given VNF instance using attribute-based filter and perform a JSON schema validation of the returned indicators data structure ... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance. - ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators ... Post-Conditions: none @@ -41,7 +40,7 @@ Get Indicators for VNF Instance with invalid attribute-based filter ... Test title: Get all performance indicators for a VNF instance with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of all performance indicators for a given VNF instance fails using invalid attribute-based filter. The test also checks the JSON schema of the unsuccessful operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance. - ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none @@ -54,7 +53,7 @@ Get Indicators for VNF Instance with invalid resource identifier ... Test title: Get all performance indicators for a VNF instance with invalid resource identifier ... Test objective: The objective is to test that the retrieval of all performance indicators for a given VNF instance fails when using invalid resource identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance. - ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none @@ -66,8 +65,8 @@ POST Indicators for VNF instance - Method not implemented [Documentation] Test ID: 6.3.2.2.5 ... Test title: POST performance indicators for VNF instance - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create new performance indicators for a VNF instance - ... Pre-conditions: A VNF instance is instantiated. - ... Reference: Clause 8.4.3.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.3.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none @@ -78,8 +77,8 @@ PUT Indicators for VNF instance - Method not implemented [Documentation] Test ID: 6.3.2.2.6 ... Test title: PUT performance indicators for VNF instance - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify existing performance indicators for a VNF instance - ... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance. - ... Reference: Clause 8.4.3.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.3.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none @@ -90,8 +89,8 @@ PATCH Indicators for VNF instance - Method not implemented [Documentation] Test ID: 6.3.2.2.7 ... Test title: PATCH performance indicators for VNF instance - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update existing performance indicators for a VNF instance - ... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance. - ... Reference: Clause 8.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none @@ -102,34 +101,33 @@ DELETE Indicators for VNF instance - Method not implemented [Documentation] Test ID: 6.3.2.2.8 ... Test title: DELETE performance indicators for VNF instance - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete performance indicators for a VNF instance - ... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance. - ... Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. - ... Post-Conditions: The indicators for the VNF instance are not deleted by the unsuccessful operation + ... Post-Conditions: none Send DELETE Request for indicators in VNF instance Check HTTP Response Status Code Is 405 - Check Postcondition Indicators for VNF instance Exist Get Indicators for VNF Instance to get Paged Response [Documentation] Test ID: 6.3.2.2.9 ... Test title: Get Indicators for VNF Instance to get Paged Response ... Test objective: The objective is to test the retrieval of all performance indicators for a given VNF instance to get paged response. ... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance. - ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators ... Post-Conditions: none Get all indicators for a VNF instance Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link Get Indicators for VNF Instance - Bad Request Response too Big [Documentation] Test ID: 6.3.2.2.10 ... Test title: Get Indicators for VNF Instance - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of all performance indicators for a given VNF instance fails when response is too big. The test also checks the JSON schema of the unsuccessful operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. One or more measures of performance indicators are available for the given VNF instance. - ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: The VNF supports the generation and maintenance of performance indicators. ... Post-Conditions: none @@ -141,64 +139,64 @@ Get Indicators for VNF Instance - Bad Request Response too Big Get all indicators for a VNF instance Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} Get all indicators for a VNF instance with filter Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}?${POS_FIELDS} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}?${POS_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} Get all indicators for a VNF instance with invalid filter Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}?${NEG_FIELDS} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}?${NEG_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} Get all indicators for a VNF instance with invalid resource identifier Log Trying to perform a negative get, using wrong identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${erroneousVnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${erroneousVnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} Send POST Request for indicators in VNF instance 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}/indicators/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for indicators in VNF instance Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for indicators in VNF instance Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for indicators in VNF instance Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -227,16 +225,9 @@ Check HTTP Response Body Includes Requested VNF Instance ID Check HTTP Response Body Matches Attribute-Based Filter Log Check Response includes VNF Indicators according to filter - @{words} = Split String ${POS_FIELDS} ,${SEPERATOR} + @{words} = Split String ${POS_FIELDS} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['name']} @{words}[1] - -Check Postcondition Indicators for VNF instance Exist - Log Check Postcondition Indicators for VNF instance Exist - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} - Should Be Equal ${response['status']} 200 -Check LINK in Header +Check HTTP Response Header Contain Link ${linkURL}= Get Value From Json ${response['headers']} $..Link Should Not Be Empty ${linkURL} \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/environment/individualSubscription.txt b/SOL002/VNFIndicator-API/environment/individualSubscription.txt deleted file mode 100644 index 1ae7592905ba5abf23204085eab6c19e0a894210..0000000000000000000000000000000000000000 --- a/SOL002/VNFIndicator-API/environment/individualSubscription.txt +++ /dev/null @@ -1,5 +0,0 @@ -*** Variables *** -${subscriptionId} f3ae6df7-07e1-47c9-8924-9ebe10343586 -${erroneousSubscriptionId} 442e3ee5-0499-4849-9b31-eb91ce1638f1 # Not existing ID on the subscriptions -${response}= httpresponse -${origResponse}= httpresponse \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/environment/individualVnfIndicator.txt b/SOL002/VNFIndicator-API/environment/individualVnfIndicator.txt deleted file mode 100644 index 5e90a5d7060ef53b76b6310d23bf633c3397024d..0000000000000000000000000000000000000000 --- a/SOL002/VNFIndicator-API/environment/individualVnfIndicator.txt +++ /dev/null @@ -1,6 +0,0 @@ -*** Variables *** -${vnfInstanceId} 80b0deba-c398-445b-bef0-ac0fe733e3d0 -${indicatorId} 34e70855-a9d3-4fef-aece-76a3cd266ec8 -${notAllowedIndicatorId} notAllowedId -${erroneousIndicatorId} erroneousIndicatorId -${response}= httpresponse diff --git a/SOL002/VNFIndicator-API/environment/subscriptions.txt b/SOL002/VNFIndicator-API/environment/subscriptions.txt deleted file mode 100644 index ec4b63ac0b029a4352bd6e32d35b625436fed83b..0000000000000000000000000000000000000000 --- a/SOL002/VNFIndicator-API/environment/subscriptions.txt +++ /dev/null @@ -1,10 +0,0 @@ -*** Variables *** -${vnfInstanceId} 80b0deba-c398-445b-bef0-ac0fe733e3d0 -${indicatorId} 34e70855-a9d3-4fef-aece-76a3cd266ec8 -${erroneousIndicatorId} erroneousIndicatorId -${POS_FILTER} callbackUri=http://127.0.0.1/subscribe -${NEG_FILTER} callback=http://127.0.0.1/subscribe -${response}= httpresponse -${total_polling_time} 2 min -${polling_interval} 10 sec -${SEPERATOR} = \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/environment/variables.txt b/SOL002/VNFIndicator-API/environment/variables.txt index 58dff1e612c0bc623913e0dee9f69dea4b414152..82627dcabffb29d1422ce2d0a7ce3b6481362f9b 100644 --- a/SOL002/VNFIndicator-API/environment/variables.txt +++ b/SOL002/VNFIndicator-API/environment/variables.txt @@ -2,9 +2,10 @@ ${PRODUCER_HOST} localhost ${PRODUCER_PORT} 8081 ${PRODUCER_SCHEMA} https -${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 -${NEG_AUTHORIZATION} Bearer negativetoken -${BAD_AUTHORIZATION} Bear sometoken +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${NEG_AUTHORIZATION_TOKEN} Bearer negativetoken +${BAD_AUTHORIZATION_TOKEN} Bear sometoken ${CONTENT_TYPE_JSON} application/json ${EM-VNF_HOST} localhost ${EM-VNF_PORT} 8002 @@ -12,7 +13,7 @@ ${EM-VNF_SCHEMA} https ${ACCEPT_JSON} application/json ${AUTH_USAGE} 1 ${apiRoot} / -${apiVersion} v1 +${apiMajorVersion} v1 ${apiName} vnfind @@ -24,4 +25,30 @@ ${callback_port} 9091 ${callback_endpoint} /endpoint ${callback_endpoint_error} /endpoint_404 -${response} some_response_object \ No newline at end of file +${response} some_response_object + + +${subscriptionId} f3ae6df7-07e1-47c9-8924-9ebe10343586 +${erroneousSubscriptionId} 442e3ee5-0499-4849-9b31-eb91ce1638f1 # Not existing ID on the subscriptions +${origResponse}= httpresponse + +${vnfInstanceId} 80b0deba-c398-445b-bef0-ac0fe733e3d0 +${indicatorId} 34e70855-a9d3-4fef-aece-76a3cd266ec8 +${notAllowedIndicatorId} notAllowedId +${erroneousIndicatorId} erroneousIndicatorId + +${POS_FILTER} callbackUri=http://127.0.0.1/subscribe +${NEG_FILTER} callback=http://127.0.0.1/subscribe +${total_polling_time} 2 min +${polling_interval} 10 sec +${SEPARATOR} = + +${erroneousVnfInstanceId} erroneousVnfInstanceId +${POS_FIELDS} name=vnfIndicator +${NEG_FIELDS} wrongName=any_value + + +${vnfIndicators} = +${VAR_SEPARATOR} & + +${callbackResp} localhost \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt b/SOL002/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt deleted file mode 100644 index 8651dee3da6c2b3a4eabfa69879dee2659db881e..0000000000000000000000000000000000000000 --- a/SOL002/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt +++ /dev/null @@ -1,7 +0,0 @@ -*** Variables *** -${vnfInstanceId} 80b0deba-c398-445b-bef0-ac0fe733e3d0 -${erroneousVnfInstanceId} erroneousVnfInstanceId -${POS_FIELDS} name=vnfIndicator -${NEG_FIELDS} wrongName=any_value -${response}= httpresponse -${SEPERATOR} = \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/environment/vnfIndicators.txt b/SOL002/VNFIndicator-API/environment/vnfIndicators.txt deleted file mode 100644 index 8476590796160e3da8b0d6c7e3548b5d74381854..0000000000000000000000000000000000000000 --- a/SOL002/VNFIndicator-API/environment/vnfIndicators.txt +++ /dev/null @@ -1,8 +0,0 @@ -*** Variables *** -${POS_FIELDS} name=vnfIndicator&vnfInstanceId=80b0deba-c398-445b-bef0-ac0fe733e3d0 -${NEG_FIELDS} wrongName=wrongValue -${response} some_response_object -${vnfIndicators} = -${SEPERATOR} = -${VAR_SEPERATOR} & -${POS_FILTER} = \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/jsons/ValueChangeNotification.json b/SOL002/VNFIndicator-API/jsons/ValueChangeNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..ee1f63ee35932bf0e78188855548d07fdaafb591 --- /dev/null +++ b/SOL002/VNFIndicator-API/jsons/ValueChangeNotification.json @@ -0,0 +1,12 @@ +{{ + "id":"", + "notificationType":"VnfIndicatorValueChangeNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "vnfIndicatorId":"{indicatorId}", + "vnfInstanceId":"{vnfInstanceId}" + "_links":{{ + "subscription":"", + "vnfInstance":"" + }} +}} diff --git a/SOL002/VNFIndicator-API/jsons/subscriptions.json b/SOL002/VNFIndicator-API/jsons/subscriptions.json index ccf9f514c76e5227820801292eabe56b520dbb17..8274dac3fe638d186202a1254409cd031f9d0b04 100644 --- a/SOL002/VNFIndicator-API/jsons/subscriptions.json +++ b/SOL002/VNFIndicator-API/jsons/subscriptions.json @@ -1,3 +1,3 @@ -{ - "callbackUri": "http://127.0.0.1/subscribe" -} \ No newline at end of file +{{ + "callbackUri": "{callback_uri}{callback_endpoint}" +}} \ No newline at end of file diff --git a/SOL002/VNFIndicatorNotification-API/VnfIndicatorNotification.robot b/SOL002/VNFIndicatorNotification-API/Notifications.robot similarity index 89% rename from SOL002/VNFIndicatorNotification-API/VnfIndicatorNotification.robot rename to SOL002/VNFIndicatorNotification-API/Notifications.robot index 27087d2385841acb84a6af7729789f134783e5c5..65ba44ae91a650d714b798886ff382f0332957a6 100644 --- a/SOL002/VNFIndicatorNotification-API/VnfIndicatorNotification.robot +++ b/SOL002/VNFIndicatorNotification-API/Notifications.robot @@ -16,7 +16,7 @@ VNF Indicator Value Change Notification ... Test title: VNF Indicator Value Change Notification ... Test objective: The objective is to test the dispatch of VNF Indicator Value Change Notification when new indicator values are available in the VNF, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A VNF is instantiated, and a subscription for indicator value change notifications is available in the VNF. - ... Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.4.1 + ... Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNF ... Applicability: none ... Post-Conditions: none @@ -49,8 +49,10 @@ Configure Notification Indicator Value Change Handler set to dictionary ${json} notificationType ${type} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL002/VNFLifecycleManagement-API/ApiVersion.robot b/SOL002/VNFLifecycleManagement-API/ApiVersion.robot index d3ea1bbe468ab1303db576b41da03500df000237..d226849140febdf1018ab918bd12d1269009f59d 100644 --- a/SOL002/VNFLifecycleManagement-API/ApiVersion.robot +++ b/SOL002/VNFLifecycleManagement-API/ApiVersion.robot @@ -1,211 +1,211 @@ -*** Settings *** -Resource environment/variables.txt -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Library DependencyLibrary -Library JSONLibrary -Library JSONSchemaLibrary schemas/ - -*** Test Cases *** -POST API Version - Method not implemented - [Documentation] Test ID: 6.3.5.20.1 - ... Test title: POST API version - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version - [Documentation] Test ID: 6.3.5.20.2 - ... Test title: GET API Version - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version - Method not implemented - [Documentation] Test ID: 6.3.5.20.3 - ... Test title: PUT API Version - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version - Method not implemented - [Documentation] Test ID: 6.3.5.20.4 - ... Test title: PATCH API Version - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version - Method not implemented - [Documentation] Test ID: 6.3.5.20.5 - ... Test title: DELETE API Version - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -POST API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 6.3.5.20.6 - ... Test title: POST API version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version with apiMajorVerion - [Documentation] Test ID: 6.3.5.20.7 - ... Test title: GET API Version with apiMajorVerion - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 6.3.5.20.8 - ... Test title: PUT API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 6.3.5.20.9 - ... Test title: PATCH API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 6.3.5.20.10 - ... Test title: DELETE API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -*** Keywords *** -POST API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response['body']} +*** Settings *** +Resource environment/variables.txt +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 6.3.5.20.1 + ... Test title: POST API version - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 6.3.5.20.2 + ... Test title: GET API Version + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version - Method not implemented + [Documentation] Test ID: 6.3.5.20.3 + ... Test title: PUT API Version - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 6.3.5.20.4 + ... Test title: PATCH API Version - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 6.3.5.20.5 + ... Test title: DELETE API Version - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +POST API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 6.3.5.20.6 + ... Test title: POST API version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 6.3.5.20.7 + ... Test title: GET API Version with apiMajorVerion + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 6.3.5.20.8 + ... Test title: PUT API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 6.3.5.20.9 + ... Test title: PATCH API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 6.3.5.20.10 + ... Test title: DELETE API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/CancelOperationTask.robot b/SOL002/VNFLifecycleManagement-API/CancelOperationTask.robot index 2709d940cdae634bf5196d4f1ea7fffaf2f58906..db8a558e65726a28a69ef69a23f6e2619a246bae 100644 --- a/SOL002/VNFLifecycleManagement-API/CancelOperationTask.robot +++ b/SOL002/VNFLifecycleManagement-API/CancelOperationTask.robot @@ -14,10 +14,10 @@ Post Cancel operation task ... Test title: POST Cancel operation task ... Test objective: The POST method initiates cancelling an ongoing VNF lifecycle operation while it is being executed or rolled back, i.e. the "VNF LCM operation occurrence" is either in "PROCESSING" or "ROLLING_BACK" state. ... Pre-conditions: the "VNF LCM operation occurrence" is either in "PROCESSING" or "ROLLING_BACK" state. - ... Reference: Clause 5.4.17.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.17.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: none + ... Post-Conditions: the resource is in FAILED_TEMP state POST Cancel operation task Check HTTP Response Status Code Is 202 Check operation resource state is FAILED_TEMP @@ -27,7 +27,7 @@ Post Cancel operation task Conflict ... Test title: POST Cancel operation task Conflict ... Test objective: The POST method is NOT cancelling an ongoing VNF lifecycle operation due to the fact that the VNF instance resource is not in STARTING, PROCESSING or ROLLING_BACK state ... Pre-conditions: operation is not in STARTING, PROCESSING or ROLLING_BACK state - ... Reference: Clause 5.4.17.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.17.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -41,19 +41,20 @@ Post Cancel operation task Not Found ... Test title: POST Cancel operation task ... Test objective: The objective is to test that POST method cannot cancel a VNF lifecycle operation because the resource is not found ... Pre-conditions: - ... Reference: Clause 5.4.17.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.17.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none POST Cancel operation task Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails GET Cancel operation task - Method not implemented [Documentation] Test ID: 6.3.5.16.4 ... Test title: GET Cancel operation task - Method not implemented ... Test objective: The objective is to test that GET method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.17.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.17.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -65,7 +66,7 @@ PUT Cancel operation task - Method not implemented ... Test title: PUT Cancel operation task - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.17.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.17.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -77,7 +78,7 @@ PATCH Cancel operation task - Method not implemented ... Test title: PATCH Cancel operation task - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.17.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.17.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -89,7 +90,7 @@ DELETE Cancel operation task - Method not implemented ... Test title: DELETE Cancel operation task - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.17.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.17.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -99,22 +100,6 @@ DELETE Cancel operation task - Method not implemented *** Keywords *** Check resource existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - Integer response status 200 - -Launch another error handling action - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry - Integer response status 202 - -Check Fail not supported - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - # how to check if Fail is not supported? - - -Check resource FAILED_TEMP - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - String response body operationState FAILED_TEMP \ No newline at end of file + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot b/SOL002/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot index 7e73154a70d1f239db07ff86af81870237c4f43c..f46fda1db1db44bb44ebb1b64c73cedef105974b 100644 --- a/SOL002/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot +++ b/SOL002/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot @@ -11,9 +11,9 @@ Suite Setup Check resource existence POST Change external VNF connectivity [Documentation] Test ID: 6.3.5.10.1 ... Test title: POST Change external VNF connectivity - ... Test objective: The objective is to test that POST method trigger a change in VNF external connectivity + ... Test objective: The objective is to test that POST method triggers a change in VNF external connectivity ... Pre-conditions: none - ... Reference: Clause 5.4.11.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.11.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: in response header Location shall not be null @@ -26,7 +26,7 @@ GET Change external VNF connectivity - Method not implemented ... Test title: GET Change external VNF connectivity - Method not implemented ... Test objective: The objective is to test that GET method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.11.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.11.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -38,7 +38,7 @@ PUT Change external VNF connectivity - Method not implemented ... Test title: PUT Change external VNF connectivity - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.11.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.11.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -50,7 +50,7 @@ PATCH Change external VNF connectivity - Method not implemented ... Test title: PATCH Change external VNF connectivity - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.11.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.11.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -62,25 +62,30 @@ DELETE Change external VNF connectivity - Method not implemented ... Test title: DELETE Change external VNF connectivity - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.11.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.11.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none DELETE Change External VNF Connectivity Check HTTP Response Status Code Is 405 + +POST Change external VNF connectivity Conflict + [Documentation] Test ID: 6.3.5.10.6 + ... Test title: POST Change external VNF connectivity Conflict + ... Test objective: The objective is to test that the operation cannot be executed currently, due to a conflict with the state of the VNF instance resource or that a required child attribute of the "extensions" attribue has not been set. + ... Pre-conditions: none + ... Reference: Clause 5.4.11.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + POST Change External VNF Connectivity + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails *** Keywords *** Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Integer response status 200 - -Launch another LCM operation - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} - Integer response status 202 \ No newline at end of file + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} + Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot b/SOL002/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot index a63561402b692069b5585b69279521171e458a55..37a3a53360d9c91a341fba60a5d50e1824cc6366 100644 --- a/SOL002/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot +++ b/SOL002/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot @@ -13,7 +13,7 @@ POST Change deployment flavour of a vnfInstance ... Test title: POST Change deployment flavour of a vnfInstance ... Test objective: The objective is to test that POST method trigger a change in VNF deployment flavour ... Pre-conditions: none - ... Reference: Clause 5.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: in response header Location shall not be null @@ -24,9 +24,9 @@ POST Change deployment flavour of a vnfInstance POST Change deployment flavour of a vnfInstance Conflict (Not-Instantiated) [Documentation] Test ID: 6.3.5.6.2 ... Test title: POST Change deployment flavour of a vnfInstance Conflict (Not-Instantiated) - ... Test objective: The objective is to test that POST method cannot trigger a change in VNF deployment flavour because of a conflict with the state of the VNF instance resource. + ... Test objective: The objective is to test that POST method cannot trigger a change in VNF deployment flavour because of a conflict with the state of the VNF instance resource or that a required child attribute of the "extensions" attribue has not been set. ... Pre-conditions: VNF instance resource is not in NOT-INSTANTIATED state - ... Reference: Clause 5.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -34,27 +34,25 @@ POST Change deployment flavour of a vnfInstance Conflict (Not-Instantiated) Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - POST Change deployment flavour of a vnfInstance Not Found [Documentation] Test ID: 6.3.5.6.3 ... Test title: POST Change deployment flavour of a vnfInstance Not Found ... Test objective: The objective is to test that POST method cannot trigger a change in VNF deployment flavour because the VNF instance resource is not found. ... Pre-conditions: VNF instance resource is not in NOT-INSTANTIATED state - ... Reference: Clause 5.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none POST Change VNF deployment flavour Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails - - + GET Change deployment flavour VNFInstance - Method not implemented [Documentation] Test ID: 6.3.5.6.4 ... Test title: GET Change deployment flavour VNFInstance - Method not implemented ... Test objective: The objective is to test that GET method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.7.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.7.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -66,7 +64,7 @@ PUT Change deployment flavour VNFInstance - Method not implemented ... Test title: PUT Change deployment flavour VNFInstance - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.7.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.7.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -78,7 +76,7 @@ PATCH Change deployment flavour VNFInstance - Method not implemented ... Test title: PATCH Change deployment flavour VNFInstance - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.7.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.7.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -90,7 +88,7 @@ DELETE Change deployment flavour VNFInstance - Method not implemented ... Test title: DELETE Change deployment flavour VNFInstance - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.7.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.7.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -101,29 +99,6 @@ DELETE Change deployment flavour VNFInstance - Method not implemented Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Integer response status 200 - -Check resource not instantiated - [Arguments] ${instanceId} - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${instanceId} - String response body instantiationState NOT_INSTANTIATED - -Check change flavour not supported - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - # how to check if change floavour is not supported? "flavourId" doesn't exist? - -Launch another LCM operation - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} - Integer response status 202 \ No newline at end of file + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} + Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/FailOperationTask.robot b/SOL002/VNFLifecycleManagement-API/FailOperationTask.robot index bbd7011d87e9822bd0639991f5b1aff3efde03fa..cd45637c6df1c0917e6128d2a0dc138c1c4f1457 100644 --- a/SOL002/VNFLifecycleManagement-API/FailOperationTask.robot +++ b/SOL002/VNFLifecycleManagement-API/FailOperationTask.robot @@ -10,24 +10,23 @@ Library JSONSchemaLibrary schemas/ POST Fail operation task [Documentation] Test ID: 6.3.5.15.1 ... Test title: POST Fail operation task - ... Test objective: The objective is to test that POST method mark as "finally failed" a VNF lifecycle operation if that operation has experienced a temporary failure + ... Test objective: The objective is to test that POST method mark as "finally failed" a VNF lifecycle operation if that operation has experienced a failure ... Pre-conditions: the "VNF LCM operation occurrence" resource is in "FAILED_TEMP" state. - ... Reference: Clause 5.4.16.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.16.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none Post Fail operation - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check Operation Occurrence Id Check operation resource state is FINALLY_FAILED POST Fail operation task Conflict (Not-FAILED_TEMP) - # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state [Documentation] Test ID: 6.3.5.15.2 ... Test title: POST Fail operation task Conflict (Not-FAILED_TEMP) - ... Test objective: The objective is to test that POST method cannot mark as "finally failed" a VNF lifecycle operation if that operation has experienced a temporary failure + ... Test objective: The objective is to test that POST method cannot mark as "finally failed" due to confilct with the state of LCM Operation Occurrence ... Pre-conditions: the "VNF LCM operation occurrence" resource is not in "FAILED_TEMP" state. - ... Reference: Clause 5.4.16.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.16.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -36,27 +35,27 @@ POST Fail operation task Conflict (Not-FAILED_TEMP) Check HTTP Response Body Json Schema Is ProblemDetails POST Fail operation task Not Found - # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent [Documentation] Test ID: 6.3.5.15.3 ... Test title: POST Fail operation task Not Found ... Test objective: The objective is to test that POST method cannot mark as "finally failed" a VNF lifecycle operation because the operation is not supported - ... Pre-conditions: - ... Reference: Clause 5.4.16.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.16.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none Post Fail operation Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails GET Fail operation task - Method not implemented [Documentation] Test ID: 6.3.5.15.4 ... Test title: GET Fail operation task- Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.16.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.16.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none Get Fail operation Check HTTP Response Status Code Is 405 @@ -65,10 +64,10 @@ PUT Fail operation task - Method not implemented ... Test title: PUT Fail operation task- Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.16.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.16.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none Put Fail operation Check HTTP Response Status Code Is 405 @@ -77,10 +76,10 @@ PATCH Fail operation task - Method not implemented ... Test title: PATCH Fail operation task - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.16.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.16.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none Patch Fail operation Check HTTP Response Status Code Is 405 @@ -89,31 +88,9 @@ DELETE Fail operation task - Method not implemented ... Test title: DELETE Fail operation task- Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.16.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.16.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: VNF instance not deleted + ... Post-Conditions: none Delete Fail operation - Check HTTP Response Status Code Is 405 - -*** Keywords *** -Check resource existence - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - Integer response status 200 - -Launch another error handling action - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry - Integer response status 202 - -Check Fail not supported - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - # how to check if Fail is not supported? - -Check resource FAILED_TEMP - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - String response body operationState FAILED_TEMP \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/HealVNFTask.robot b/SOL002/VNFLifecycleManagement-API/HealVNFTask.robot index b05b9eeea0ad87cf55df878b40529c18ef5b77ec..63508cafe9791fbd9fd5b393e2004371dbd78c1e 100644 --- a/SOL002/VNFLifecycleManagement-API/HealVNFTask.robot +++ b/SOL002/VNFLifecycleManagement-API/HealVNFTask.robot @@ -13,24 +13,23 @@ POST Heal a vnfInstance ... Test title: POST Heal a vnfInstance ... Test objective: The objective is to test that POST method heal a VNF instance ... Pre-conditions: none - ... Reference: Clause 5.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none POST Heal VNF Check HTTP Response Status Code Is 202 Check Operation Occurrence Id POST Heal a vnfInstance Conflict (Not-Instantiated) - # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state [Documentation] Test ID: 6.3.5.8.2 ... Test title: POST Heal a vnfInstance (Not-Instantiated) - ... Test objective: The objective is to test that the operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. + ... Test objective: The objective is to test that the operation cannot be executed currently, due to a conflict with the state of the VNF instance resource or that a required child attribute of the "extensions" attribue has not been set. ... Pre-conditions: the VNF instance resource is in NOT-INSTANTIATED state - ... Reference: Clause 5.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none POST Heal VNF Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails @@ -41,10 +40,10 @@ POST Heal a vnfInstance Not Found ... Test title: POST Heal a vnfInstance Not Found ... Test objective: The objective is to test that the operation cannot be executed because the VNF instance resource is not found. ... Pre-conditions: the VNF instance resource is not existing - ... Reference: Clause 5.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none POST Heal VNF Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails @@ -54,10 +53,10 @@ GET Heal VNFInstance - Method not implemented ... Test title: GET Heal a vnfInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.9.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.9.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none GET Heal VNF Check HTTP Response Status Code Is 405 @@ -66,10 +65,10 @@ PUT Heal VNFInstance - Method not implemented ... Test title: PUT Heal a vnfInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.9.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.9.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none PUT Heal VNF Check HTTP Response Status Code Is 405 @@ -78,10 +77,10 @@ PATCH Heal VNFInstance - Method not implemented ... Test title: PATCH Heal a vnfInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.9.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.9.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none PATCH Heal VNF Check HTTP Response Status Code Is 405 @@ -90,10 +89,10 @@ DELETE Heal VNFInstance - Method not implemented ... Test title: DELETE Heal a vnfInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.9.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.9.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none DELETE Heal VNF Check HTTP Response Status Code Is 405 @@ -101,29 +100,6 @@ DELETE Heal VNFInstance - Method not implemented Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Integer response status 200 - -Check resource not instantiated - [Arguments] ${instanceId} - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${instanceId} - String response body instantiationState NOT_INSTANTIATED - -Check heal not supported - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - # how to check if heal is not supported? "flavourId" doesn't exist? - -Launch another LCM operation - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} - Integer response status 202 \ No newline at end of file + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} + Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/IndividualSubscription.robot b/SOL002/VNFLifecycleManagement-API/IndividualSubscription.robot index 887c31e3de37ba13e3f7bbf3c64c53aef2891bd2..ba1bf1f81b48723fa1595e836d58c18cd054b569 100644 --- a/SOL002/VNFLifecycleManagement-API/IndividualSubscription.robot +++ b/SOL002/VNFLifecycleManagement-API/IndividualSubscription.robot @@ -11,7 +11,7 @@ POST Individual Subscription - Method not implemented ... Test title: POST Individual Subscription - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.19.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.19.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -23,20 +23,20 @@ GET Individual Subscription ... Test title: GET Individual Subscription ... Test objective: The objective is to test the Get individual subscription ... Pre-conditions: none - ... Reference: Clause 5.4.19.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.19.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none Get Individual Subscription Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is Subscription + Check HTTP Response Body Json Schema Is subscription PUT an individual subscription - Method not implemented [Documentation] Test ID: 6.3.5.18.3 ... Test title: PUT Individual Subscription - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.19.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.19.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -48,7 +48,7 @@ PATCH an individual subscription - Method not implemented ... Test title: PATCH Individual Subscription - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.19.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.19.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -57,20 +57,12 @@ PATCH an individual subscription - Method not implemented DELETE an individual subscription [Documentation] Test ID: 6.3.5.18.5 - ... Test title: DELETE Individual Subscription - Method not implemented - ... Test objective: The objective is to test that the method is not implemented + ... Test title: DELETE Individual Subscription + ... Test objective: The objective is to test that the DELETE method removes an individual subscription ... Pre-conditions: none - ... Reference: Clause 5.4.19.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.19.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none Delete Individual subscription - Check HTTP Response Status Code Is 405 - -*** Keywords *** -Check resource existence - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Integer response status 200 \ No newline at end of file + Check HTTP Response Status Code Is 204 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot b/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot index b4c84b814bb37029c6c049103912aea2e4a5d8b5..65aba97b4bad10cd2f363ae8a17f0d6f88e20854 100644 --- a/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot +++ b/SOL002/VNFLifecycleManagement-API/IndividualVNFInstance.robot @@ -18,10 +18,10 @@ POST Individual VNFInstance - Method not implemented ... Test title: POST Individual VNFInstance - Method not implemented ... Test objective: The objective is to test that POST method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.3.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.3.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none POST individual vnfInstance Check HTTP Response Status Code Is 405 @@ -30,22 +30,23 @@ GET Information about an individual VNF Instance ... Test title: GET Information about an individual VNF Instance ... Test objective: The objective is to create a new VNF instance resource ... Pre-conditions: none - ... Reference: Clause 5.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET individual vnfInstance Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is vnfInstance + Check HTTP Response Body vnfInstance content against VNF Descriptor PUT Individual VNFInstance - Method not implemented [Documentation] Test ID: 6.3.5.2.3 ... Test title: PUT Individual VNFInstance - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.3.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.3.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: + ... Applicability: none ... Post-Conditions: VNF instance not modified PUT individual vnfInstance Check HTTP Response Status Code Is 405 @@ -55,9 +56,9 @@ PATCH Individual VNFInstance ... Test title: PATCH Individual VNFInstance ... Test objective: This method modifies an individual VNF instance resource ... Pre-conditions: none - ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: + ... Applicability: none ... Post-Conditions: VNF instance modified PATCH individual vnfInstance Check HTTP Response Status Code Is 202 @@ -66,12 +67,12 @@ PATCH Individual VNFInstance PATCH Individual VNFInstance Precondition failed [Documentation] Test ID: 6.3.5.2.5 ... Test title: PATCH Individual VNFInstance Precondition failed - ... Test objective: The objective is to create a new VNF instance resource - ... Pre-conditions: A precondition given in an HTTP request header is not fulfilled. Typically, this is due to an ETag mismatch, indicating that the resource was modified by another entity - ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Test objective: The objective is to that the modification of individual VNFInstance fails because precondition given in an HTTP request header is not fulfilled. Typically, this is due to an ETag mismatch, indicating that the resource was modified by another entity. + ... Pre-conditions: none + ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: VNF instance not modified + ... Applicability: none + ... Post-Conditions: none PATCH individual vnfInstance Check HTTP Response Status Code Is 412 Check HTTP Response Body Json Schema Is ProblemDetails @@ -81,10 +82,10 @@ PATCH Individual VNFInstance Conflict ... Test title: PATCH Individual VNFInstance Conflict ... Test objective: The objective is to verify that modification operation cannot be executed currently, due to a conflict with the state of the VNF instance resource because another LCM Operation is ongoing. ... Pre-conditions: none - ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: VNF instance not modified + ... Applicability: none + ... Post-Conditions: none PATCH individual vnfInstance Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails @@ -94,9 +95,9 @@ DELETE Individual VNFInstance ... Test title: DELETE Individual VNFInstance ... Test objective: The objective is to delete a VNF instance ... Pre-conditions: none - ... Reference: Clause 5.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: + ... Applicability: none ... Post-Conditions: VNF instance deleted DELETE individual vnfInstance Check HTTP Response Status Code Is 204 @@ -106,33 +107,10 @@ DELETE Individual VNFInstance Conflict ... Test title: DELETE Individual VNFInstance Conflict ... Test objective: The objective is to verify that The operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. ... Pre-conditions: VNF instance resource is in INSTANTIATED state - ... Reference: Clause 5.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none DELETE individual vnfInstance Check HTTP Response Status Code Is 409 - Check HTTP Response Body Json Schema Is ProblemDetails - -*** Keywords *** -Check resource existence - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Integer response status 200 - -Check resource instantiated - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - String response body instantiationState INSTANTIATED - -Launch another LCM operation - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfToLevelRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${body} - Integer response status 202 + Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot b/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot index 6d7ab224dbee89dee18c33178a6cdfe335c421e4..a6165996edc21a17e34491f7ffbe34548544dc95 100644 --- a/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot +++ b/SOL002/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot @@ -5,63 +5,65 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify= Library JSONLibrary Library JSONSchemaLibrary schemas/ *** Test Cases *** -Post Individual VNF LCM OP occurrences - Method not implemented +Post Individual VNF LCM OP occurrence - Method not implemented [Documentation] Test ID: 6.3.5.12.1 - ... Test title: Post Individual VNF LCM OP occurrences - Method not implemented + ... Test title: Post Individual VNF LCM OP occurrence - Method not implemented ... Test objective: The objective is to test that POST method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.13.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.13.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none - Post Individual VNF LCM OP occurrences + Post Individual VNF LCM OP occurrence Check HTTP Response Status Code Is 405 -Get status information about multiple VNF instances +Get Individual VNF LCM OP occurrence [Documentation] Test ID: 6.3.5.12.2 - ... Test title: Get status information about multiple VNF instances - ... Test objective: The objective is to test that this method retrieve status information about a VNF lifecycle management operation occurrence + ... Test title: Get Individual VNF LCM OP occurrence + ... Test objective: The objective is to test that this method retrieve a VNF lifecycle management operation occurrence and perform a JSON schema validation of the returned data structure ... Pre-conditions: none - ... Reference: Clause 5.4.13.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.13.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none - Get multiple VNF instances + Get Individual VNF LCM OP occurrence Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is VnfLcmOpOcc + Check HTTP Response Body Json Schema Is VnfLcmOpOcc + Check HTTP Response Body vnf LCM OpOCC content against VNF Descriptor -PUT status information about multiple VNF instances - Method not implemented +PUT Individual VNF LCM OP occurrence - Method not implemented [Documentation] Test ID: 6.3.5.12.3 - ... Test title: PUT status information about multiple VNF instances - Method not implemented + ... Test title: PUT Individual VNF LCM OP occurrence - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.13.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.13.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none - Put multiple VNF instances + Put Individual VNF LCM OP occurrence Check HTTP Response Status Code Is 405 -PATCH status information about multiple VNF instances - Method not implemented +PATCH Individual VNF LCM OP occurrence - Method not implemented [Documentation] Test ID: 6.3.5.12.4 - ... Test title: PATCH status information about multiple VNF instances - Method not implemented + ... Test title: PATCH Individual VNF LCM OP occurrence - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.13.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.13.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none - Patch multiple VNF instances + Patch Individual VNF LCM OP occurrence Check HTTP Response Status Code Is 405 -DELETE status information about multiple VNF instances - Method not implemented +DELETE Individual VNF LCM OP occurrence - Method not implemented [Documentation] Test ID: 6.3.5.12.5 - ... Test title: DELETE status information about multiple VNF instances - Method not implemented + ... Test title: DELETE Individual VNF LCM OP occurrence - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.13.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.13.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none - Delete multiple VNF instances + Delete Individual VNF LCM OP occurrence Check HTTP Response Status Code Is 405 + diff --git a/SOL002/VNFLifecycleManagement-API/InstantiateVNFTask.robot b/SOL002/VNFLifecycleManagement-API/InstantiateVNFTask.robot index d1b1078b7abf162cab678bcdc28fe69b81c3d9aa..2c43ee7a66345d7de3ddd05e276f42a2ba3a2406 100644 --- a/SOL002/VNFLifecycleManagement-API/InstantiateVNFTask.robot +++ b/SOL002/VNFLifecycleManagement-API/InstantiateVNFTask.robot @@ -15,10 +15,10 @@ POST Instantiate a vnfInstance ... Test title: POST Instantiate a vnfInstance ... Test objective: The objective is to instantiate a VNF instance ... Pre-conditions: none - ... Reference: Clause 5.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none POST instantiate individual vnfInstance Check HTTP Response Status Code Is 202 Check Operation Occurrence Id @@ -28,10 +28,10 @@ POST Instantiate a vnfInstance Conflict ... Test title: POST Instantiate a vnfInstance Conflict ... Test objective: The objective is to verify that the instantiation of the vnf cannot be executed currently, due to a conflict with the state of the VNF instance resource. ... Pre-conditions: VNF instance resource is in INSTANTIATED state - ... Reference: Clause 5.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none POST instantiate individual vnfInstance Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails @@ -40,11 +40,11 @@ GET Instantiate VNFInstance - Method not implemented [Documentation] Test ID: 6.3.5.3.3 ... Test title: GET Instantiate VNFInstance - Method not implemented ... Test objective: The objective is to test that GET method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET instantiate individual vnfInstance Check HTTP Response Status Code Is 405 @@ -52,11 +52,11 @@ PUT Instantiate VNFInstance - Method not implemented [Documentation] Test ID: 6.3.5.3.4 ... Test title: PUT Instantiate VNFInstance - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: VNF instance not modified + ... Applicability: none + ... Post-Conditions: none PUT instantiate individual vnfInstance Check HTTP Response Status Code Is 405 @@ -64,11 +64,11 @@ PATCH Instantiate VNFInstance - Method not implemented [Documentation] Test ID: 6.3.5.3.5 ... Test title: PATCH Instantiate VNFInstance - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: VNF instance not modified + ... Applicability: none + ... Post-Conditions: none PATCH instantiate individual vnfInstance Check HTTP Response Status Code Is 405 @@ -76,11 +76,11 @@ DELETE Instantiate VNFInstance - Method not implemented [Documentation] Test ID: 6.3.5.3.6 ... Test title: DELETE Instantiate VNFInstance - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.4.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.4.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: VNF instance not deleted + ... Applicability: none + ... Post-Conditions: none DELETE instantiate individual vnfInstance Check HTTP Response Status Code Is 405 @@ -88,13 +88,6 @@ DELETE Instantiate VNFInstance - Method not implemented Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Integer response status 200 - -Check resource instantiated - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - String response body instantiationState INSTANTIATED \ No newline at end of file + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} + Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/NotificationEndpoint.robot b/SOL002/VNFLifecycleManagement-API/NotificationEndpoint.robot index 9dcee284412fcca4439113e7bfc7789a780f3d6b..7befae053b54175f07e46d1533e19bdc12deeb7c 100644 --- a/SOL002/VNFLifecycleManagement-API/NotificationEndpoint.robot +++ b/SOL002/VNFLifecycleManagement-API/NotificationEndpoint.robot @@ -1,191 +1,89 @@ *** Settings *** -Suite Setup Create Sessions -Suite Teardown Terminate All Processes kill=true +Library String Resource environment/variables.txt -Library MockServerLibrary -Library Process +Resource VnfLcmOperationKeywords.robot +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library OperatingSystem -Library Collections +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Suite Setup Check resource existence and get CallbackUri *** Test Cases *** -VNF LCM Operation Occurrence Start Notification - [Documentation] Test ID: 6.3.5.19.1 +VNF LCM Operation Occurrence Notification + [Documentation] Test ID: 6.3.5.21.1 ... Test title: VNF LCM Operation Occurrence Start Notification - ... Test objective: The objective is to test the dispatch of VNF LCM Operation Occurrence Start Notification when a new VNF LCM operation is started in the VNFM, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Test objective: The objective is to test that VNF LCM Operation Occurrence Notification is delivered with success to the notification consumer ... Pre-conditions: A subscription for VNF LCM Operation Occurrence notifications is available in the VNFM. - ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM + ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none - Trigger a VNF LCM operation (external action) - Check VNF LCM Operation Occurrence Start Notification Http POST Request Body Json Schema Is VnfLcmOperationOccurrenceNotification - Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationType attribute Is VnfLcmOperationOccurrenceNotification - Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is START - -VNF LCM Operation Occurrence Result Notification - [Documentation] Test ID: 6.3.5.19.2 - ... Test title: VNF LCM Operation Occurrence Result Notification - ... Test objective: The objective is to test the dispatch of VNF LCM Operation Occurrence Result Notification when a VNF LCM operation is completed in the VNFM, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. - ... Pre-conditions: An VNF LCM operation is in progress, and a subscription for VNF LCM Operation Occurrence notifications is available in the VNFM. - ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Trigger the completion of an VNF LCM operation (external action) - Check VNF LCM Operation Occurrence Result Notification Http POST Request Body Json Schema Is VnfLcmOperationOccurrenceNotification - Check VNF LCM Operation Occurrence Result Notification Http POST Request Body notificationType attribute Is VnfLcmOperationOccurrenceNotification - Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is RESULT - + Post VNF LCM Operation Occurrence Notification + Check HTTP Response Status Code Is 204 + VNF Identifier Creation Notification - [Documentation] Test ID: 6.3.5.19.3 + [Documentation] Test ID: 6.3.5.21.2 ... Test title: VNF Identifier Creation Notification - ... Test objective: The objective is to test the dispatch of VNF Identifier Creation Notification when a new VNF instance resource is created in the VNFM, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. - ... Pre-conditions: A subscription for VNF identifier creation notifications is available in the VNFM. - ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM + ... Test objective: The objective is to test that VNF Identifier Creation Notification is delivered with success to the notification consumer + ... Pre-conditions: A subscription for VNF Identifier Creation Notification is available in the VNFM. + ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none - Trigger the creation of a VNF instance resource (external action) - Check VNF Identifier Creation Notification Http POST Request Body Json Schema Is VnfIdentifierCreationNotification - Check VNF Identifier Creation Notification Http POST Request Body notificationType attribute Is VnfIdentifierCreationNotification + Post VNF Identifier Creation Notification + Check HTTP Response Status Code Is 204 VNF Identifier Deletion Notification - [Documentation] Test ID: 6.3.5.19.4 + [Documentation] Test ID: 6.3.5.21.3 ... Test title: VNF Identifier Deletion Notification - ... Test objective: The objective is to test the dispatch of VNF Identifier Deletion Notification when a VNF instance resource is deleted in the VNFM, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. - ... Pre-conditions: A VNF instance resource is created, and a subscription for VNF identifier creation notifications is available in the VNFM. - ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM + ... Test objective: The objective is to test that VNF Identifier Deletion Notification is delivered with success to the notification consumer + ... Pre-conditions: A subscription for VNF Identifier Deletion Notification is available in the VNFM. + ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none - Trigger the deletion of a VNF instance resource (external action) - Check VNF Identifier Deletion Notification Http POST Request Body Json Schema Is VnfIdentifierDeletionNotification - Check VNF Identifier Deletion Notification Http POST Request Body notificationType attribute Is VnfIdentifierDeletionNotification - -*** Keywords *** -Trigger a VNF LCM operation (external action) - #do nothing - Log do nothing - -Trigger the completion of an VNF LCM operation (external action) - #do nothing - Log do nothing - -Trigger the creation of a VNF instance resource (external action) - #do nothing - Log do nothing - -Trigger the deletion of a VNF instance resource (external action) - #do nothing - Log do nothing - -Check VNF LCM Operation Occurrence Start Notification Http POST Request Body Json Schema Is - [Arguments] ${element} - ${schema}= Get File schemas/${element}.schema.json - Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} - -Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationType attribute Is - [Arguments] ${type} - Configure Notification VNF LCM Operation Occurrence Start Handler ${callback_endpoint_fwd} ${type} START - Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} - Clear Requests ${callback_endpoint} - Clear Requests ${callback_endpoint_fwd} - -Configure Notification VNF LCM Operation Occurrence Start Handler - [Arguments] ${endpoint} ${type} ${status} - ${json}= evaluate {} - set to dictionary ${json} notificationType ${type} changeType ${status} - ${BODY}= evaluate json.dumps(${json}) json - Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${notification_request} ${notification_response} - -Check VNF LCM Operation Occurrence Result Notification Http POST Request Body Json Schema Is - [Arguments] ${element} - ${schema}= Get File schemas/${element}.schema.json - Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + Post VNF Identifier Deletion Notification + Check HTTP Response Status Code Is 204 -Check VNF LCM Operation Occurrence Result Notification Http POST Request Body notificationType attribute Is - [Arguments] ${type} - Configure Notification VNF LCM Operation Occurrence Result Handler ${callback_endpoint_fwd} ${type} RESULT - Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} - Clear Requests ${callback_endpoint} - Clear Requests ${callback_endpoint_fwd} - -Configure Notification VNF LCM Operation Occurrence Result Handler - [Arguments] ${endpoint} ${type} ${status} - ${json}= evaluate {} - set to dictionary ${json} notificationType ${type} changeType ${status} - ${BODY}= evaluate json.dumps(${json}) json - Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${notification_request} ${notification_response} - -Check VNF Identifier Creation Notification Http POST Request Body Json Schema Is - [Arguments] ${element} - ${schema}= Get File schemas/${element}.schema.json - Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} - -Check VNF Identifier Creation Notification Http POST Request Body notificationType attribute Is - [Arguments] ${type} - Configure Notification VNF Identifier Creation Handler ${callback_endpoint_fwd} ${type} - Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} - Clear Requests ${callback_endpoint} - Clear Requests ${callback_endpoint_fwd} - -Configure Notification VNF Identifier Creation Handler - [Arguments] ${endpoint} ${type} - ${json}= evaluate {} - set to dictionary ${json} notificationType ${type} - ${BODY}= evaluate json.dumps(${json}) json - Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${notification_request} ${notification_response} - -Check VNF Identifier Deletion Notification Http POST Request Body Json Schema Is - [Arguments] ${element} - ${schema}= Get File schemas/${element}.schema.json - Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} - -Check VNF Identifier Deletion Notification Http POST Request Body notificationType attribute Is - [Arguments] ${type} - Configure Notification VNF Identifier Deletion Handler ${callback_endpoint_fwd} ${type} - Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} - Clear Requests ${callback_endpoint} - Clear Requests ${callback_endpoint_fwd} - -Configure Notification VNF Identifier Deletion Handler - [Arguments] ${endpoint} ${type} - ${json}= evaluate {} - set to dictionary ${json} notificationType ${type} - ${BODY}= evaluate json.dumps(${json}) json - Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${notification_request} ${notification_response} - -Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is - [Arguments] ${type} - #do nothing - Log do nothing +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body Subscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri -Check VNF LCM Operation Occurrence Result Notification Http POST Request Body notificationStatus attribute Is - [Arguments] ${type} - #do nothing - Log do nothing - -Configure Notification Forward - [Arguments] ${schema} ${endpoint} ${endpoint_fwd} - Log Creating mock Http POST forward to handle ${schema} - &{notification_tmp}= Create Mock Request Matcher POST ${endpoint} body_type="JSON_SCHEMA" body=${schema} - &{notification_fwd}= Create Mock Http Forward ${endpoint_fwd} - Create Mock Expectation With Http Forward ${notification_tmp} ${notification_fwd} - -Create Sessions - Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance - Wait For Process handle=mockInstance timeout=5s on_timeout=continue - Create Mock Session ${callback_uri}:${callback_port} - +Post VNF LCM Operation Occurrence Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/VnfLcmOperationOccurrenceNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post VNF Identifier Creation Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/VnfIdentifierCreationNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfInstanceId=${vnfInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post VNF Identifier Deletion Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/VnfIdentifierDeletionNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfInstanceId=${vnfInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/Notifications.robot b/SOL002/VNFLifecycleManagement-API/Notifications.robot new file mode 100644 index 0000000000000000000000000000000000000000..17a3b3b61aa962471cb3d6f8a01d76075c9bc6a0 --- /dev/null +++ b/SOL002/VNFLifecycleManagement-API/Notifications.robot @@ -0,0 +1,199 @@ +*** Settings *** +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true +Resource environment/variables.txt +Library MockServerLibrary +Library Process +Library OperatingSystem +Library Collections + +*** Test Cases *** +VNF LCM Operation Occurrence Start Notification + [Documentation] Test ID: 6.3.5.19.1 + ... Test title: VNF LCM Operation Occurrence Start Notification + ... Test objective: The objective is to test the dispatch of VNF LCM Operation Occurrence Start Notification when a new VNF LCM operation is started in the VNFM, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A subscription for VNF LCM Operation Occurrence notifications is available in the VNFM. + ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Trigger a VNF LCM operation (external action) + Check VNF LCM Operation Occurrence Start Notification Http POST Request Body Json Schema Is VnfLcmOperationOccurrenceNotification + Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationType attribute Is VnfLcmOperationOccurrenceNotification + Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is START + +VNF LCM Operation Occurrence Result Notification + [Documentation] Test ID: 6.3.5.19.2 + ... Test title: VNF LCM Operation Occurrence Result Notification + ... Test objective: The objective is to test the dispatch of VNF LCM Operation Occurrence Result Notification when a VNF LCM operation is completed in the VNFM, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: An VNF LCM operation is in progress, and a subscription for VNF LCM Operation Occurrence notifications is available in the VNFM. + ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Trigger the completion of an VNF LCM operation (external action) + Check VNF LCM Operation Occurrence Result Notification Http POST Request Body Json Schema Is VnfLcmOperationOccurrenceNotification + Check VNF LCM Operation Occurrence Result Notification Http POST Request Body notificationType attribute Is VnfLcmOperationOccurrenceNotification + Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is RESULT + +VNF Identifier Creation Notification + [Documentation] Test ID: 6.3.5.19.3 + ... Test title: VNF Identifier Creation Notification + ... Test objective: The objective is to test the dispatch of VNF Identifier Creation Notification when a new VNF instance resource is created in the VNFM, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A subscription for VNF identifier creation notifications is available in the VNFM. + ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Trigger the creation of a VNF instance resource (external action) + Check VNF Identifier Creation Notification Http POST Request Body Json Schema Is VnfIdentifierCreationNotification + Check VNF Identifier Creation Notification Http POST Request Body notificationType attribute Is VnfIdentifierCreationNotification + +VNF Identifier Deletion Notification + [Documentation] Test ID: 6.3.5.19.4 + ... Test title: VNF Identifier Deletion Notification + ... Test objective: The objective is to test the dispatch of VNF Identifier Deletion Notification when a VNF instance resource is deleted in the VNFM, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A VNF instance resource is created, and a subscription for VNF identifier creation notifications is available in the VNFM. + ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Trigger the deletion of a VNF instance resource (external action) + Check VNF Identifier Deletion Notification Http POST Request Body Json Schema Is VnfIdentifierDeletionNotification + Check VNF Identifier Deletion Notification Http POST Request Body notificationType attribute Is VnfIdentifierDeletionNotification + +*** Keywords *** +Trigger a VNF LCM operation (external action) + #do nothing + Log do nothing + +Trigger the completion of an VNF LCM operation (external action) + #do nothing + Log do nothing + +Trigger the creation of a VNF instance resource (external action) + #do nothing + Log do nothing + +Trigger the deletion of a VNF instance resource (external action) + #do nothing + Log do nothing + +Check VNF LCM Operation Occurrence Start Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + +Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification VNF LCM Operation Occurrence Start Handler ${callback_endpoint_fwd} ${type} START + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Configure Notification VNF LCM Operation Occurrence Start Handler + [Arguments] ${endpoint} ${type} ${status} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} changeType ${status} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Check VNF LCM Operation Occurrence Result Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + +Check VNF LCM Operation Occurrence Result Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification VNF LCM Operation Occurrence Result Handler ${callback_endpoint_fwd} ${type} RESULT + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Configure Notification VNF LCM Operation Occurrence Result Handler + [Arguments] ${endpoint} ${type} ${status} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} changeType ${status} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Check VNF Identifier Creation Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + +Check VNF Identifier Creation Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification VNF Identifier Creation Handler ${callback_endpoint_fwd} ${type} + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Configure Notification VNF Identifier Creation Handler + [Arguments] ${endpoint} ${type} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Check VNF Identifier Deletion Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + +Check VNF Identifier Deletion Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification VNF Identifier Deletion Handler ${callback_endpoint_fwd} ${type} + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Configure Notification VNF Identifier Deletion Handler + [Arguments] ${endpoint} ${type} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is + [Arguments] ${type} + #do nothing + Log do nothing + +Check VNF LCM Operation Occurrence Result Notification Http POST Request Body notificationStatus attribute Is + [Arguments] ${type} + #do nothing + Log do nothing + +Configure Notification Forward + [Arguments] ${schema} ${endpoint} ${endpoint_fwd} + Log Creating mock Http POST forward to handle ${schema} + &{notification_tmp}= Create Mock Request Matcher POST ${endpoint} body_type="JSON_SCHEMA" body=${schema} + &{notification_fwd}= Create Mock Http Forward ${endpoint_fwd} + Create Mock Expectation With Http Forward ${notification_tmp} ${notification_fwd} + +Create Sessions + Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance + Wait For Process handle=mockInstance timeout=5s on_timeout=continue + Create Mock Session ${callback_uri}:${callback_port} + diff --git a/SOL002/VNFLifecycleManagement-API/OperateVNFTask.robot b/SOL002/VNFLifecycleManagement-API/OperateVNFTask.robot index 4e4c12817e002b74be2d22aad547c7c255a480e6..ccaea1ae51ff42f648bece7cbeead9b343fafb41 100644 --- a/SOL002/VNFLifecycleManagement-API/OperateVNFTask.robot +++ b/SOL002/VNFLifecycleManagement-API/OperateVNFTask.robot @@ -13,10 +13,10 @@ POST Operate a vnfInstance ... Test title: POST Operate a vnfInstance ... Test objective: The objective is to test that POST method operate a VNF instance ... Pre-conditions: none - ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none POST Operate VNF Check HTTP Response Status Code Is 202 Check Operation Occurrence Id @@ -24,28 +24,27 @@ POST Operate a vnfInstance POST Operate a vnfInstance Conflict (Not-Instantiated) [Documentation] Test ID: 6.3.5.9.2 ... Test title: POST Operate a vnfInstance Conflict (Not-Instantiated) - ... Test objective: The objective is to test that the operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. - ... Pre-conditions: the VNF instance resource is in NOT-INSTANTIATED state - ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Test objective: The objective is to test that the operation cannot be executed currently, due to a conflict with the state of the VNF instance resource or that a required child attribute of the "extensions" attribue has not been set. + ... Pre-conditions: the VNF instance resource is in NOT_INSTANTIATED state + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none POST Operate VNF Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - POST Operate a vnfInstance Not Found [Documentation] Test ID: 6.3.5.9.3 ... Test title: POST Operate a vnfInstance Not Found ... Test objective: The objective is to test that the operation cannot be executed currently, because the resource is not existing ... Pre-conditions: the VNF instance resource is in not existing - ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none POST Operate VNF - Check HTTP Response Status Code Is 409 + Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails GET Operate VNFInstance - Method not implemented @@ -53,10 +52,10 @@ GET Operate VNFInstance - Method not implemented ... Test title: GET Operate VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.10.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.10.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none GET Operate VNF Check HTTP Response Status Code Is 405 @@ -65,10 +64,10 @@ PUT Operate VNFInstance - Method not implemented ... Test title: PUT Operate VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.10.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.10.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none PUT Operate VNF Check HTTP Response Status Code Is 405 @@ -77,10 +76,10 @@ PATCH Operate VNFInstance - Method not implemented ... Test title: PATCH Operate VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.10.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.10.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none PATCH Operate VNF Check HTTP Response Status Code Is 405 @@ -89,10 +88,10 @@ DELETE Operate VNFInstance - Method not implemented ... Test title: DELETE Operate VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.10.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.10.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none DELETE Operate VNF Check HTTP Response Status Code Is 405 @@ -100,29 +99,6 @@ DELETE Operate VNFInstance - Method not implemented Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Integer response status 200 - -Check resource not instantiated - [Arguments] ${instanceId} - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${instanceId} - String response body instantiationState NOT_INSTANTIATED - -Check operate not supported - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - # how to check if operate is not supported? "flavourId" doesn't exist? - -Launch another LCM operation - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} - Integer response status 202 \ No newline at end of file + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} + Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/RetryOperationTask.robot b/SOL002/VNFLifecycleManagement-API/RetryOperationTask.robot index 3b85e59434fe59ee2ede4619d96d3fe1d3e52f8f..6387120809acfbc1524c1b549ed765c51ed2aeb7 100644 --- a/SOL002/VNFLifecycleManagement-API/RetryOperationTask.robot +++ b/SOL002/VNFLifecycleManagement-API/RetryOperationTask.robot @@ -14,7 +14,7 @@ POST Retry operation task ... Test title: POST Retry operation task ... Test objective: The objective is to test that POST method The POST method initiates retrying a VNF lifecycle operation if that operation has experienced a temporary failure ... Pre-conditions: the "VNF LCM operation occurrence" resource is in "FAILED_TEMP" state. - ... Reference: Clause 5.4.14.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.14.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -23,12 +23,11 @@ POST Retry operation task Check Operation Occurrence Id POST Retry operation task Conflict (Not-FAILED_TEMP) - # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state [Documentation] Test ID: 6.3.5.13.2 ... Test title: POST Retry operation task Conflict (Not-FAILED_TEMP) ... Test objective: The objective is to test that the retry operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. (i.e. the VNF instance resource is not in FAILED_TEMP state) ... Pre-conditions: the "VNF LCM operation occurrence" resource is not in "FAILED_TEMP" state. - ... Reference: Clause 5.4.14.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.14.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -36,29 +35,28 @@ POST Retry operation task Conflict (Not-FAILED_TEMP) Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - POST Retry operation task Not Found - # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent [Documentation] Test ID: 6.3.5.13.3 ... Test title: POST Retry operation task Not Found ... Test objective: The objective is to test that the retry operation cannot be executed because the operation is not supported ... Pre-conditions: - ... Reference: Clause 5.4.14.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.14.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none Post Retry operation Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails GET Retry operation task - Method not implemented [Documentation] Test ID: 6.3.5.13.4 ... Test title: GET Retry operation task- Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.9.14.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.14.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none Get Retry operation Check HTTP Response Status Code Is 405 @@ -67,10 +65,10 @@ PUT Retry operation task - Method not implemented ... Test title: PUT Retry operation task- Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.9.14.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.14.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none Put Retry operation Check HTTP Response Status Code Is 405 @@ -79,10 +77,10 @@ PATCH Retry operation task - Method not implemented ... Test title: PATCH Retry operation task- Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.9.14.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.14.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none Patch Retry operation Check HTTP Response Status Code Is 405 @@ -91,30 +89,15 @@ DELETE Retry operation task - Method not implemented ... Test title: DELETE Retry operation task- Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.9.14.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.14.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none Delete Retry operation Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - Integer response status 200 - -Launch another error handling action - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback - Integer response status 202 - -Check retry not supported - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - # how to check if retry is not supported? - -Check resource FAILED_TEMP - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - String response body operationState FAILED_TEMP \ No newline at end of file + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/RollbackOperationTask.robot b/SOL002/VNFLifecycleManagement-API/RollbackOperationTask.robot index 50e8a469ceed5026ddd21877f6545a3673638df4..382bd0069e3c9742ce97f3550afb5655a52f29b5 100644 --- a/SOL002/VNFLifecycleManagement-API/RollbackOperationTask.robot +++ b/SOL002/VNFLifecycleManagement-API/RollbackOperationTask.robot @@ -12,9 +12,9 @@ Suite Setup Check resource existence POST Rollback operation task [Documentation] Test ID: 6.3.5.14.1 ... Test title: POST Rollback operation task - ... Test objective: The objective is to test that POST method The POST method initiates rollback a VNF lifecycle operation if that operation has experienced a temporary failure + ... Test objective: The objective is to test that POST method initiates rollback a VNF lifecycle operation if that operation has experienced a temporary failure ... Pre-conditions: the "VNF LCM operation occurrence" resource is in "FAILED_TEMP" state. - ... Reference: Clause 5.4.15.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.15.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -23,12 +23,11 @@ POST Rollback operation task Check Operation Occurrence Id POST Rollback operation task Conflict (Not-FAILED_TEMP) - # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state [Documentation] Test ID: 6.3.5.14.2 ... Test title: POST Rollback operation task Conflict (Not-FAILED_TEMP) ... Test objective: The objective is to test that POST method The POST method initiates rollback a VNF lifecycle operation if that operation has experienced a temporary failure ... Pre-conditions: the "VNF LCM operation occurrence" resource is not in "FAILED_TEMP" state. - ... Reference: Clause 5.4.15.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.15.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -36,29 +35,28 @@ POST Rollback operation task Conflict (Not-FAILED_TEMP) Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - POST Rollback operation task Not Found - # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent [Documentation] Test ID: 6.3.5.14.3 ... Test title: POST Rollback operation task Not Found ... Test objective: The objective is to test that the retry operation cannot be executed because the operation is not supported - ... Pre-conditions: - ... Reference: Clause 5.4.15.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.15.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none Post Rollback operation Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails GET Rollback operation task - Method not implemented [Documentation] Test ID: 6.3.5.14.4 ... Test title: GET Rollback operation task - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.15.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.15.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none Get Rollback operation Check HTTP Response Status Code Is 405 @@ -67,10 +65,10 @@ PUT Rollback operation task - Method not implemented ... Test title: PUT Rollback operation task - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.15.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.15.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none Put Rollback operation Check HTTP Response Status Code Is 405 @@ -79,10 +77,10 @@ PATCH Rollback operation task - Method not implemented ... Test title: PATCH Rollback operation task - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.15.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.15.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none Patch Rollback operation Check HTTP Response Status Code Is 405 @@ -91,31 +89,16 @@ DELETE Rollback operation task - Method not implemented ... Test title: DELETE Rollback operation task - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.15.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.15.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none Delete Rollback operation Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - Integer response status 200 - -Launch another error handling action - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry - Integer response status 202 - -Check Rollback not supported - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - # how to check if Rollback is not supported? - -Check resource FAILED_TEMP - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - String response body operationState FAILED_TEMP \ No newline at end of file + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/ScaleVNFTask.robot b/SOL002/VNFLifecycleManagement-API/ScaleVNFTask.robot index b5fac239a12513a55f0eb2be063dea9d414ee0dc..9e2a107026236690443abf4224e4af008f3a710e 100644 --- a/SOL002/VNFLifecycleManagement-API/ScaleVNFTask.robot +++ b/SOL002/VNFLifecycleManagement-API/ScaleVNFTask.robot @@ -13,11 +13,11 @@ POST Scale a vnfInstance ... Test title: POST Scale a vnfInstance ... Test objective: The objective is to scale a VNF instance ... Pre-conditions: none - ... Reference: Clause 5.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: - POST Scale vnfInstance + ... Applicability: none + ... Post-Conditions: none + POST Scale vnfInstance 0 Check HTTP Response Status Code Is 202 Check Operation Occurrence Id @@ -26,25 +26,24 @@ POST Scale a vnfInstance Conflict (Not-Instantiated) ... Test title: POST Scale a vnfInstance Conflict (Not-Instantiated) ... Test objective: The objective is to verify that the operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. ... Pre-conditions: VNF instance resource is in NOT-INSTANTIATED state - ... Reference: Clause 5.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: - POST Scale vnfInstance + ... Applicability: none + ... Post-Conditions: none + POST Scale vnfInstance 1 Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - POST Scale a vnfInstance Not Found [Documentation] Test ID: 6.3.5.4.3 ... Test title: POST Scale a vnfInstance Not Found ... Test objective: The objective is to verify that the operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. - ... Pre-conditions: - ... Reference: Clause 5.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: - POST Scale vnfInstance + ... Applicability: none + ... Post-Conditions: none + POST Scale vnfInstance 2 Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails @@ -52,11 +51,11 @@ GET Scale VNFInstance - Method not implemented [Documentation] Test ID: 6.3.5.4.4 ... Test title: GET Scale VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Scale vnfInstance Check HTTP Response Status Code Is 405 @@ -64,11 +63,11 @@ PUT Scale VNFInstance - Method not implemented [Documentation] Test ID: 6.3.5.4.5 ... Test title: PUT Scale VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.5.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.5.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none PUT Scale vnfInstance Check HTTP Response Status Code Is 405 @@ -76,11 +75,11 @@ PATCH Scale VNFInstance - Method not implemented [Documentation] Test ID: 6.3.5.4.6 ... Test title: PATCH Scale VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.5.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.5.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none PATCH Scale vnfInstance Check HTTP Response Status Code Is 405 @@ -88,11 +87,11 @@ DELETE Scale VNFInstance - Method not implemented [Documentation] Test ID: 6.3.5.4.7 ... Test title: DELETE Scale VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.5.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.5.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none DELETE Scale vnfInstance Check HTTP Response Status Code Is 405 @@ -100,29 +99,6 @@ DELETE Scale VNFInstance - Method not implemented Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Integer response status 200 - -Check resource not instantiated - [Arguments] ${instanceId} - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${instanceId} - String response body instantiationState NOT_INSTANTIATED - -Check scale not supported - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Missing response body instantiatedVnfInfo scaleStatus - -Launch another LCM operation - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfToLevelRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${body} - Integer response status 202 \ No newline at end of file + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} + Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot b/SOL002/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot index 2964f98273bb414d094c727a38a27efdfa67d358..1afc0bd1a4c72879c1ec01708cc4a994072e03cd 100644 --- a/SOL002/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot +++ b/SOL002/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot @@ -12,52 +12,49 @@ POST Scale a vnfInstance to level ... Test title: POST Scale a vnfInstance to level ... Test objective: The objective is to scale a VNF instance to a target level. ... Pre-conditions: none - ... Reference: Clause 5.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none POST Scale vnfInstance to level Check HTTP Response Status Code Is 202 Check Operation Occurrence Id POST Scale a vnfInstance to level Conflict (Not-Instantiated) - # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state [Documentation] Test ID: 6.3.5.5.2 ... Test title: POST Scale a vnfInstance to level Conflict (Not-Instantiated) - ... Test objective: The objective is to verify that the operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. + ... Test objective: The objective is to verify that the operation cannot be executed currently, due to a conflict with the state of the VNF instance resource or that a required child attribute of the "extensions" attribue has not been set. ... Pre-conditions: VNF instance resource is in NOT-INSTANTIATED state - ... Reference: Clause 5.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none POST Scale vnfInstance to level Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - POST Scale a vnfInstance Not Found [Documentation] Test ID: 6.3.5.5.3 ... Test title: POST Scale a vnfInstance Not Found ... Test objective: The objective is to verify that the VNF Scale operation fails when the VNF instance resource is not present ... Pre-conditions: VNF instance resource is in NOT-INSTANTIATED state - ... Reference: Clause 5.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none POST Scale vnfInstance to level Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails - - + GET Scale to level VNFInstance - Method not implemented [Documentation] Test ID: 6.3.5.5.4 ... Test title: GET Scale to level VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Scale vnfInstance to level Check HTTP Response Status Code Is 405 @@ -65,11 +62,11 @@ PUT Scale to level VNFInstance - Method not implemented [Documentation] Test ID: 6.3.5.5.5 ... Test title: PUT Scale to level VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.6.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.6.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none PUT Scale vnfInstance to level Check HTTP Response Status Code Is 405 @@ -77,11 +74,11 @@ PATCH Scale to level VNFInstance - Method not implemented [Documentation] Test ID: 6.3.5.5.6 ... Test title: PATCH Scale to level VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.6.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.6.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none PATCH Scale vnfInstance to level Check HTTP Response Status Code Is 405 @@ -89,11 +86,11 @@ DELETE Scale to level VNFInstance - Method not implemented [Documentation] Test ID: 6.3.5.5.7 ... Test title: DELETE Scale to level VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none DELETE Scale vnfInstance to level Check HTTP Response Status Code Is 405 @@ -101,29 +98,6 @@ DELETE Scale to level VNFInstance - Method not implemented Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Integer response status 200 - -Check resource not instantiated - [Arguments] ${instanceId} - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${instanceId} - String response body instantiationState NOT_INSTANTIATED - - Check scale to level not supported - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Missing response body instantiatedVnfInfo scaleStatus - -Launch another LCM operation - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} - Integer response status 202 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} + Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/Subscriptions.robot b/SOL002/VNFLifecycleManagement-API/Subscriptions.robot index 14c92a2ce8fe7893604ee22d590f28b1cefc16b3..65bff9a7cdc2dc9506e2d8a8228971c42839618a 100644 --- a/SOL002/VNFLifecycleManagement-API/Subscriptions.robot +++ b/SOL002/VNFLifecycleManagement-API/Subscriptions.robot @@ -5,6 +5,9 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=fal Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Library Process +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true *** Test Cases *** POST Create a new subscription @@ -12,33 +15,33 @@ POST Create a new subscription ... Test title: POST Create a new subscription ... Test objective: The POST method creates a new subscription ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.18.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: in response header Location shall not be null Post Create subscription Check HTTP Response Status Code Is 201 - Check HTTP Response Body Json Schema Is Subscription + Check HTTP Response Body Json Schema Is subscription POST Create a new Subscription - DUPLICATION [Documentation] Test ID: 6.3.5.17.2 ... Test title: POST Create a new subscription - DUPLICATION ... Test objective: The POST method creates a new subscription even if an existing subscription to same content exist ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.18.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: SUT should support duplication of subscription creation ... Post-Conditions: in response header Location shall not be null Post Create subscription - DUPLICATION Check HTTP Response Status Code Is 201 - Check HTTP Response Body Json Schema Is Subscription + Check HTTP Response Body Json Schema Is subscription POST Create a new Subscription - NO-DUPLICATION [Documentation] Test ID: 6.3.5.17.3 ... Test title: POST Create a new subscription - NO-DUPLICATION ... Test objective: The POST method creates a new subscription even if an existing subscription to same content exist ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.18.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: SUT should not support duplication of subscription creation ... Post-Conditions: in response header Location shall not be null @@ -51,7 +54,7 @@ GET Subscriptions ... Test title: GET Subscriptions ... Test objective: The objective is Get the list of active subscriptions ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -64,7 +67,7 @@ GET Subscription - Filter ... Test title: GET Subscriptions - Filter ... Test objective: The objective is Get the list of active subscriptions using a "filter" ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -77,19 +80,20 @@ GET subscriptions - Bad Request Invalid attribute-based filtering parameters ... Test title: GET subscriptions - Bad Request Invalid attribute-based filtering parameters ... Test objective: The objective is Get the list of active subscriptions using a filter ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none Get subscriptions - invalid filter Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails + GET subscriptions with all_fields attribute selector [Documentation] Test ID: 6.3.5.17.7 ... Test title: GET subscriptions with all_fields attribute selector ... Test objective: The objective is Get the list of active subscriptions ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -102,7 +106,7 @@ GET subscriptions with exclude_default attribute selector ... Test title: GET subscriptions with exclude_default attribute selector ... Test objective: The objective is Get the list of active subscriptions ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -115,7 +119,7 @@ GET subscriptions with fields attribute selector ... Test title: GET subscriptions with fields attribute selector ... Test objective: The objective is Get the list of active subscriptions ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -128,7 +132,7 @@ GET subscriptions with exclude_fields attribute selector ... Test title: GET subscriptions with exclude_fields attribute selector ... Test objective: The objective is Get the list of active subscriptions ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -141,7 +145,7 @@ PUT subscriptions - Method not implemented ... Test title: PUT subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.18.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -153,7 +157,7 @@ PATCH subscriptions - Method not implemented ... Test title: PATCH subscriptions - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.18.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -165,11 +169,49 @@ DELETE subscriptions - Method not implemented ... Test title: DELETE subscriptions - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.18.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: check that resources are not deleted DELETE subscriptions Check HTTP Response Status Code Is 405 Check Subscription resource exist - \ No newline at end of file + +POST Create a new Subscription - Unprocessable Entity + [Documentation] Test ID: 6.3.5.17.14 + ... Test title: POST Create a new Subscription - Unprocessable Entity + ... Test objective: The objective is to test that content type of the payload body is supported and the payload body of a request contains syntactically correct data but the data cannot be processed. + ... re-conditions: none + ... Reference: Clause 5.4.18.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + Post Create subscription + Check HTTP Response Status Code Is 422 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET information about multiple subscriptions to get Paged Response + [Documentation] Test ID: 6.3.5.17.15 + ... Test title: GET information about multiple subscriptions to get Paged Response + ... Test objective: The objective is to retrieve information about the subscriptions to get paged response + ... Pre-conditions: + ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VE + ... Applicability: + ... Post-Conditions: + Get subscriptions + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Contain Link + +GET information about multiple subscriptions for Bad Request Response too big + [Documentation] Test ID: 6.3.5.17.16 + ... Test title: GET information about multiple subscriptions for Bad Request Response too big + ... Test objective: The objective is to test that GET method fail retrieving status information about subscriptions when Response is too big, and perform the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: + ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VE + ... Applicability: + ... Post-Conditions: + Get subscriptions + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/TerminateVNFTask.robot b/SOL002/VNFLifecycleManagement-API/TerminateVNFTask.robot index 96c9eb0e5d276408fbae612fba9f23f335faf48c..56ef35f640b77464911e92a46e8f895caa404c37 100644 --- a/SOL002/VNFLifecycleManagement-API/TerminateVNFTask.robot +++ b/SOL002/VNFLifecycleManagement-API/TerminateVNFTask.robot @@ -13,10 +13,10 @@ POST Terminate a vnfInstance ... Test title: POST Terminate a vnfInstance ... Test objective: The objective is to test that POST method terminate a VNF instance ... Pre-conditions: none - ... Reference: Clause 5.4.8.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.8.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none POST Terminate VNF Check HTTP Response Status Code Is 202 Check Operation Occurrence Id @@ -24,23 +24,22 @@ POST Terminate a vnfInstance POST Terminate a vnfInstance Conflict (Not-Instantiated) [Documentation] Test ID: 6.3.5.7.2 ... Test title: POST Terminate a vnfInstance Conflict (Not-Instantiated) - ... Test objective: The objective is to test that the operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. - ... Pre-conditions: VNF instance resource is in NOT-INSTANTIATED state - ... Reference: Clause 5.4.8.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Test objective: The objective is to test that the operation cannot be executed currently, due to a conflict with the state of the VNF instance resource or that a required child attribute of the "extensions" attribue has not been set. + ... Pre-conditions: VNF instance resource is in NOT_INSTANTIATED state + ... Reference: Clause 5.4.8.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none POST Terminate VNF - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - - + GET Terminate VNFInstance - Method not implemented [Documentation] Test ID: 6.3.5.7.3 ... Test title: GET Terminate VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.8.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.8.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -52,7 +51,7 @@ PUT Terminate VNFInstance - Method not implemented ... Test title: PUT Terminate VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.8.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.8.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -64,7 +63,7 @@ PATCH Terminate VNFInstance - Method not implemented ... Test title: PATCH Terminate VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.8.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.8.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -76,7 +75,7 @@ DELETE Terminate VNFInstance - Method not implemented ... Test title: DELETE Terminate VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.8.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.8.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -87,29 +86,6 @@ DELETE Terminate VNFInstance - Method not implemented Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Integer response status 200 - -Check resource not instantiated - [Arguments] ${instanceId} - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${instanceId} - String response body instantiationState NOT_INSTANTIATED - -Check change flavour not supported - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - # how to check if change floavour is not supported? "flavourId" doesn't exist? - -Launch another LCM operation - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} - Integer response status 202 \ No newline at end of file + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} + Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/VNFInstances.robot b/SOL002/VNFLifecycleManagement-API/VNFInstances.robot index 4307c4fee3ecac39df3bcb17c522c2c507aab1d4..c2d5451b48b9f482086f4a7f3cb89deb1bf2253d 100644 --- a/SOL002/VNFLifecycleManagement-API/VNFInstances.robot +++ b/SOL002/VNFLifecycleManagement-API/VNFInstances.robot @@ -11,38 +11,39 @@ POST Create a new vnfInstance [Documentation] Test ID: 6.3.5.1.1 ... Test title: POST Create a new vnfInstance ... Test objective: The objective is to create a new VNF instance resource - ... Pre-conditions: - ... Reference: Clause 5.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: + ... Applicability: none ... Post-Conditions: VNF instance created POST Create a new vnfInstance Check HTTP Response Status Code Is 201 Check HTTP Response Body Json Schema Is vnfInstance + Check HTTP Response Body vnfInstance content against VNF Descriptor GET information about multiple VNF instances [Documentation] Test ID: 6.3.5.1.2 ... Test title: GET information about multiple VNF instances ... Test objective: The objective is to get information about multiples VNF instances - ... Pre-conditions: - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET multiple vnfInstances Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is vnfInstances + Check HTTP Response Body vnfInstances content against VNF Descriptor - GET information about multiple VNF instances Bad Request Invalid attribute-based filtering parameters [Documentation] Test ID: 6.3.5.1.3 ... Test title: GET information about multiple VNF instances Bad Request Invalid attribute-based filtering parameters ... Test objective: The objective is to get information about multiples VNF instances with Invalid attribute-based filtering parameters - ... Pre-conditions: - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET multiple vnfInstances with bad attribute Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails @@ -51,11 +52,11 @@ GET information about multiple VNF instances Bad Request Invalid attribute selec [Documentation] Test ID: 6.3.5.1.4 ... Test title: GET information about multiple VNF instances Bad Request Invalid attribute selector ... Test objective: The objective is to get information about multiples VNF instances with Invalid attribute-based filtering parameters - ... Pre-conditions: - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET multiple vnfInstances with bad filter Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails @@ -64,11 +65,11 @@ GET information about multiple VNF instances with "all_fields" attribute selecto [Documentation] Test ID: 6.3.5.1.5 ... Test title: GET information about multiple VNF instances with "all_fields" attribute selector ... Test objective: The objective is to query information about multiple VNF instances - ... Pre-conditions: - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET multiple vnfInstances with all_fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is vnfInstances @@ -77,11 +78,11 @@ GET information about multiple VNF instances with "exclude_default" attribute se [Documentation] Test ID: 6.3.5.1.6 ... Test title: GET information about multiple VNF instances with "exclude_default" attribute selector ... Test objective: The objective is to query information about multiple VNF instances - ... Pre-conditions: - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET multiple vnfInstances with exclude_default attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is vnfInstances @@ -90,11 +91,11 @@ GET information about multiple VNF instances with "fields" attribute selector [Documentation] Test ID: 6.3.5.1.7 ... Test title: GET information about multiple VNF instances with "fields" attribute selector ... Test objective: The objective is to query information about multiple VNF instances - ... Pre-conditions: - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET multiple vnfInstances with fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is vnfInstances @@ -103,11 +104,11 @@ GET information about multiple VNF instances with "exclude_fields" attribute sel [Documentation] Test ID: 6.3.5.1.8 ... Test title: GET information about multiple VNF instances with "exclude_fields" attribute selector ... Test objective: The objective is to query information about multiple VNF instances - ... Pre-conditions: - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET multiple vnfInstances with exclude_fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is vnfInstances @@ -116,11 +117,11 @@ PUT VNFInstances - Method not implemented [Documentation] Test ID: 6.3.5.1.9 ... Test title: PUT VNFInstances - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none PUT multiple vnfInstances Check HTTP Response Status Code Is 405 @@ -128,11 +129,11 @@ PATCH VNFInstances - Method not implemented [Documentation] Test ID: 6.3.5.1.10 ... Test title: PATCH VNFInstances - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none PATCH multiple vnfInstances Check HTTP Response Status Code Is 405 @@ -140,10 +141,23 @@ DELETE VNFInstances - Method not implemented [Documentation] Test ID: 6.3.5.1.11 ... Test title: DELETE VNFInstances - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE - ... Applicability: + ... Applicability: none ... Post-Conditions: VNF instance not deleted DELETE multiple vnfInstances - Check HTTP Response Status Code Is 405 \ No newline at end of file + Check HTTP Response Status Code Is 405 + +GET information about multiple VNF instances with "exclude_default" and "fields" attribute selector + [Documentation] Test ID: 6.3.5.1.12 + ... Test title: GET information about multiple VNF instances with "exclude_default" and "fields" attribute selector + ... Test objective: The objective is to query information about multiple VNF instances + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + GET multiple vnfInstances with exclude_default and fields attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is vnfInstances \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot index 6daa361da77b6ba5a3bda2e5559571a071bf80c3..fc8f22215cdb0770f197c697294b649476386b6d 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationKeywords.robot @@ -9,15 +9,23 @@ Library BuiltIn Library JSONLibrary Library Collections Library JSONSchemaLibrary schemas/ +Library String +Library Process +#Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml +#Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml *** Keywords *** - +Create Sessions + Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance + Wait For Process handle=mockInstance timeout=5s on_timeout=continue + Create Mock Session ${callback_uri}:${callback_port} + Get Vnf Instance [Arguments] ${vnfInstanceId} Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${body}= Output response body [Return] ${body} @@ -32,7 +40,7 @@ Check Operation Occurrence Id Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK @@ -50,8 +58,8 @@ Check VNF Instance [Arguments] ${vnfId} Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${response}= Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${response}= Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfId} Check VNF Status [Arguments] ${current} ${expected} @@ -59,13 +67,13 @@ Check VNF Status Log VNF Status in the correct status Check operation resource state is FAILED_TEMP - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body instantiationState FAILED_TEMP Check operation resource state is FINALLY_FAILED - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body instantiationState FINALLY_FAILED Check HTTP Response Header Contains @@ -74,12 +82,14 @@ Check HTTP Response Header Contains Log Header is present POST Create a new vnfInstance - Log Create VNF instance by POST to ${apiRoot}/${apiName}/${apiVersion}/vnf_instances + Log Create VNF instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/createVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances ${body} + Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File + ${template} = Get File jsons/createVnfRequest.json + ${body}= Format String ${template} vnfdId=${Descriptor_ID} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -87,8 +97,8 @@ GET multiple vnfInstances Log Query VNF The GET method queries information about multiple VNF instances. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances + Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -96,8 +106,8 @@ GET multiple vnfInstances with bad attribute Log Query VNF The GET method queries information about multiple VNF instances. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Set Headers {"Authorization":"${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_instances?attribute_not_exist=some_value + Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?attribute_not_exist=some_value ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -105,58 +115,65 @@ GET multiple vnfInstances with bad filter Log Query VNF The GET method queries information about multiple VNF instances. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_instances?fields=wrong_field + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?fields=wrong_field ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET multiple vnfInstances with all_fields attribute selector Log Query status information about multiple VNF instances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_instances?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET multiple vnfInstances with exclude_default attribute selector Log Query status information about multiple VNF instances using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_instances?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET multiple vnfInstances with fields attribute selector Log Query status information about multiple VNF instances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_instances?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?fields=${fields} ${output}= Output response - Set Suite Variable ${response} ${output} + Set Suite Variable ${response} ${output} +GET multiple vnfInstances with exclude_default and fields attribute selector + Log Query status information about multiple VNF instances, using fields + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?fields=${fields}&exclude_default + ${output}= Output response + Set Suite Variable ${response} ${output} GET multiple vnfInstances with exclude_fields attribute selector Log Query status information about multiple VNF instances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_instances?exclude_fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} PUT multiple vnfInstances log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH multiple vnfInstances Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfLcmOpOccId} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE multiple vnfInstances Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -164,8 +181,8 @@ POST individual vnfInstance log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -173,8 +190,8 @@ GET individual vnfInstance log Trying to get information about an individual VNF instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -182,8 +199,8 @@ PUT individual vnfInstance log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -192,15 +209,17 @@ PATCH individual vnfInstance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} Set Headers {"If-Match": "${original_etag}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + #Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to VNF Instance ${body}= Get File jsons/patchBodyRequest.json - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} ${body} + #${body}= Format String ${template} vnfdId=${descriptor_id} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE individual vnfInstance log Trying to delete an individual VNF instance - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -208,83 +227,107 @@ POST instantiate individual vnfInstance Log Trying to Instantiate a vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/instantiateVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/instantiateVnfRequest.json + ${body}= Format String ${template} flavourId=${flavourId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET instantiate individual vnfInstance log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT instantiate individual vnfInstance log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH instantiate individual vnfInstance log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE instantiate individual vnfInstance log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} -POST Scale vnfInstance + +POST Scale vnfInstance + [Arguments] ${vnf_state} + [Documentation] ${vnf_state} differentiate the VNF ID to be used in the different POST requests + ... ${vnf_state} == 0 -> VNF in instantiated state + ... ${vnf_state} == 1 -> VNF in not_instantiated state + ... ${vnf_state} == 2 -> VNF ID not stored + ... Log Trying to Instantiate a vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} - ${outputResponse}= Output response + Run Keyword If ${vnf_state} == 0 Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${instantiatedVnfInstanceId}/scale ${body} + Run Keyword If ${vnf_state} == 1 Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notInstantiatedVnfInstanceId}/scale ${body} + Run Keyword If ${vnf_state} == 2 Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${NOT_EXISTANT_VNF_INSTANCE_ID}/scale ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${body} + ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + + +# POST Scale vnfInstance + # Log Trying to Instantiate a vnf Instance + # Set Headers {"Accept":"${ACCEPT}"} + # Set Headers {"Content-Type": "${CONTENT_TYPE}"} + # Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + # ${template}= Get File jsons/scaleVnfRequest.json + # ${body}= Format String ${template} scaleVnfRequesttype=${scaleVnfRequesttype} scaleVnfRequestAspect=${scaleVnfRequestAspect} + # Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${body} + # ${outputResponse}= Output response + # Set Global Variable ${response} ${outputResponse} GET Scale vnfInstance Log Trying to get a scale a vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Scale vnfInstance Log Trying to modify a scale vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfRequest.json - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Scale vnfInstance Log Trying to modify a scale vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfRequest.json - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Scale vnfInstance Log Trying to modify a scale vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfRequest.json - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -292,36 +335,37 @@ POST Scale vnfInstance to level Log Trying to scale a vnf Instance to level Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfToLevelRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/scaleVnfToLevelRequest.json + ${body}= Format String ${template} newFlavourId=${newFlavourId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Scale vnfInstance to level log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Scale vnfInstance to level log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Scale vnfInstance to level log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Scale vnfInstance to level log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -329,36 +373,37 @@ POST Change VNF deployment flavour Log Trying to change the deployment flavour of a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/changeVnfFlavourRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/changeVnfFlavourRequest.json + ${body}= Format String ${template} newFlavourId=${newFlavourId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Change VNF deployment flavour log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Change VNF deployment flavour log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Change VNF deployment flavour Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Change VNF deployment flavour Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -366,37 +411,38 @@ POST Terminate VNF Log Trying to terminate a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/terminateVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/terminateVnfRequest.json + ${body}= Format String ${template} terminationType=${terminationType} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Terminate VNF log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Terminate VNF log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Terminate VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Terminate VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -404,37 +450,38 @@ POST Heal VNF Log Trying to heal a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/healVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/healVnfRequest.json + ${body}= Format String ${template} healingCause=${healingCause} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Heal VNF log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Heal VNF log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Heal VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Heal VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -442,37 +489,37 @@ POST Change External VNF Connectivity Log Trying to change the external connectivity of a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/changeExtVnfConnectivityRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Change External VNF Connectivity log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Change External VNF Connectivity log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Change External VNF Connectivity Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Change External VNF Connectivity Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -480,385 +527,443 @@ POST Operate VNF Log Trying to operate a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/operateVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/operateVnfRequest.json + ${body}= Format String ${template} changeStateTo=${changeStateTo} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Operate VNF log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Operate VNF log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Operate VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Operate VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Post VNF LCM OP occurrences log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET VNF LCM OP occurrences Log Query status information about multiple VNF lifecycle management operation occurrences. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET VNF LCM OP occurrences invalid attribute Log Query status information about multiple VNF lifecycle management operation occurrences. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs?attribute_not_exist=some_value + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?attribute_not_exist=some_value ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET VNF LCM OP occurrences invalid filter Log Query status information about multiple VNF lifecycle management operation occurrences. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs?fields=wrong_field + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?fields=wrong_field ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT VNF LCM OP occurrences log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH VNF LCM OP occurrences log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE VNF LCM OP occurrences log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} +Post Individual VNF LCM OP occurrence + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Get Individual VNF LCM OP occurrence + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} -Post Individual VNF LCM OP occurrences + +Put Individual VNF LCM OP occurrence log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} +Patch Individual VNF LCM OP occurrence + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Delete Individual VNF LCM OP occurrence + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Post Retry operation Log Retry a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get Retry operation Log Trying to perform a GET. This method should not be implemented. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Put Retry operation log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Patch Retry operation log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Delete Retry operation log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Post Rollback operation Log Rollback a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get Rollback operation Log Trying to perform a GET. This method should not be implemented. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Put Rollback operation log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Patch Rollback operation log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Delete Rollback operation log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Post Fail operation - Log mark as Failed a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Log mark as Failed a VNF lifecycle operation if that operation has experienced a failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get Fail operation Log Trying to perform a GET. This method should not be implemented. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Put Fail operation log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Patch Fail operation log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Delete Fail operation log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST Cancel operation task Log Cancel an ongoing VNF lifecycle operation - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Cancel a VNF lifecycle operation - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${CancelMode} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${CancelMode} Log Validate Status code ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Cancel operation task log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Cancel operation task log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Cancel operation task Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Cancel operation task Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Post Create subscription - Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/lccnSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/lccnSubscriptionRequest.json + ${body}= Format String ${template} vnfdIds=${vnfdIds} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} + + Post Create subscription - DUPLICATION Log Trying to create a subscription with an already created content Pass Execution If ${VNFM_DUPLICATION} == 0 VNFM is not permitting duplication. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/lccnSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/lccnSubscriptionRequest.json + ${body}= Format String ${template} vnfdIds=${vnfdIds} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} + Post Create subscription - NO-DUPLICATION Log Trying to create a subscription with an already created content Pass Execution If ${VNFM_DUPLICATION} == 1 VNFM permits duplication. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/lccnSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/lccnSubscriptionRequest.json + ${body}= Format String ${template} vnfdIds=${vnfdIds} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} + Get subscriptions Log Get the list of active subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get subscriptions - filter Log Get the list of active subscriptions using a filter Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get subscriptions - invalid filter Log Get the list of active subscriptions using an invalid filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter_invalid} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter_invalid} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get subscriptions with all_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_default attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?exclude_fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} PUT subscriptions log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH subscriptions log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE subscriptions log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Post Create Individual subscription log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get Individual subscription log Trying to get information about an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Put Individual subscription log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Patch Individual subscription log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Delete Individual subscription log Try to delete an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Put Notification subscription @@ -923,43 +1028,234 @@ GET test endpoint Sleep ${sleep_interval} Verify Mock Expectation ${req} Clear Requests ${callback_endpoint} -Check LINK in Header - ${linkURL}= Get Value From Json ${response['headers']} $..Link - Should Not Be Empty ${linkURL} - + Check Subscription resource exist Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 Get VNF LCM Operation occurrences with all_fields attribute selector Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs?all_fields + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?all_fields ${output}= Output response Set Suite Variable ${response} ${output} Get VNF LCM Operation occurrences with exclude_default attribute selector Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get VNF LCM Operation occurrences with fields attribute selector Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?fields=${fields} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get VNF LCM Operation occurrences with exclude_default and fields attribute selector + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?fields=${fields}&exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get VNF LCM Operation occurrences with exclude_fields attribute selector Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs?exclude_fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} - \ No newline at end of file + +Check HTTP Response Header Contain Link + ${linkURL}= Get Value From Json ${response['headers']} $..Link + Should Not Be Empty ${linkURL} + +Check HTTP Response Body vnfInstances content against VNF Descriptor + #{check_multiple_instances} flag, set to 1 to check multiple instances against descriptors + Run Keyword If ${check_multiple_instances} == 1 Check Multiple VNF Instances Content + +Check Multiple VNF Instances Content + #${number_of_instances}= Get Length ${response['body']} + #FOR ${i} IN RANGE ${number_of_instances} + ${response['body']}= Get Variable Value ${response['body'][0]} #Gets the first instance at index 0 + Check Individual VNF Instance Content + #END + +Check HTTP Response Body vnfInstance content against VNF Descriptor + #${check_descriptors} flag, 1 to check descriptors + Run Keyword If ${check_descriptors} == 1 Check Individual VNF Instance Content + +Check Individual VNF Instance Content + PARSE the Descriptor File + Match the VNF Instance Response Attributes with Descriptors + +PARSE the Descriptor File + Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file + +Fetch Information from SOL001 descriptor file + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml + @{VDU_labels}= Create List + @{VNF_labels}= Create List + @{VirtualLink_labels}= Create List + @{CP_labels}= Create List + @{Storage_labels}= Create List + FOR ${key} IN @{topology_template.node_templates.keys()} + ${key_type}= Get Variable Value ${topology_template.node_templates.${key}.type} + ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VDU_compute} + ${VNF_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VNF} + ${Link_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_virtual_link} + ${VDUcp_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VDU_cp} + ${Storage_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_storage} + Run Keyword If ${VDU_check} Append To List ${VDU_labels} ${key} + Run Keyword If ${VNF_check} Append To List ${VNF_labels} ${key} + Run Keyword If ${VNF_check} Get VNF Attributes from SOL001 ${key} + Run Keyword If ${Link_check} Append To List ${VirtualLink_labels} ${key} + Run Keyword If ${VDUcp_check} Append To List ${CP_labels} ${key} + Run Keyword If ${Storage_check} Append To List ${Storage_labels} ${key} + END + Set Global Variable @{VDU_IDs} @{VDU_labels} + Set Global Variable @{VNF_IDs} @{VNF_labels} + Set Global Variable @{VirtualLink_IDs} @{VirtualLink_labels} + Set Global Variable @{CP_IDs} @{CP_labels} + Set Global Variable @{Storage_IDs} @{Storage_labels} + +Get VNF Attributes from SOL001 + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml + [Arguments] ${VNF_label} + ${descriptor_id}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.descriptor_id} + ${provider}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.provider} + ${product_name}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.product_name} + ${software_version}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.software_version} + ${descriptor_version}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.descriptor_version} + ${flavour_id}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.flavour_id} + + Set Global Variable ${Descriptor_ID} ${descriptor_id} + Set Global Variable ${Provider} ${provider} + Set Global Variable ${Product_Name} ${product_name} + Set Global Variable ${Software_Version} ${software_version} + Set Global Variable ${Descriptor_Version} ${descriptor_version} + Set Global Variable ${Flavour_ID} ${flavour_id} + +Fetch Information from SOL006 descriptor file + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id} + ${provider}= Get Variable Value ${nfv.vnfd[0].provider} + ${product_name}= Get Variable Value ${nfv.vnfd[0]['product-name']} + ${software_version}= Get Variable Value ${nfv.vnfd[0]['software-version']} + ${descriptor_version}= Get Variable Value ${nfv.vnfd[0].version} + ${VDUcount}= Get Length ${nfv.vnfd[0].vdu} + ${extCP_count}= Get Length ${nfv.vnfd[0]['ext-cpd']} + ${virtualLink_count}= Get length ${nfv.vnfd[0]['int-virtual-link-desc']} + ${instantiation_levels}= Get Length ${nfv.vnfd[0].df['instantiation-level']} + FOR ${key} IN @{nfv.vnfd[0].keys()} + ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} vdu + Run Keyword If ${VDU_check} Get VDU IDs ${VDUcount} + ${extCP_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} ext-cpd + Run Keyword If ${extCP_check} Get External CP IDs ${extCP_count} + ${virtualLink_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} int-virtual-link-desc + Run Keyword If ${virtualLink_check} Get Virtual Link IDs ${virtualLink_count} + ${DF_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} df + Run Keyword If ${DF_check} Get Instantiation Levels ${instantiation_levels} + END + Set Global Variable ${Descriptor_ID} ${descriptor_id} + Set Global Variable ${Provider} ${provider} + Set Global Variable ${Product_Name} ${product_name} + Set Global Variable ${Software_Version} ${software_version} + Set Global Variable ${Descriptor_Version} ${descriptor_version} + +Get VDU IDs + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{VDU_labels}= Create List + ${Storage_labels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${VDU_labels} ${nfv.vnfd[0].vdu[${i}]['id']} + Append To List ${Storage_labels} ${nfv.vnfd[0].vdu[${i}]['virtual-storage-desc']} + Get Internal CPs for each VDU ${i} + END + Set Global Variable ${VDU_IDs} ${VDU_labels} + Set Global Variable ${Storage_IDs} ${Storage_labels} + +Get Internal CPs for each VDU + [Arguments] ${vdu} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${count}= Get Length ${nfv.vnfd[0].vdu[${vdu}]['int-cpd']} + ${internal_CPs}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${internal_CPs} ${nfv.vnfd[0].vdu[${vdu}]['int-cpd'][${i}]['id']} + END + Set Global Variable ${internalCP_IDs} ${internal_CPs} + +Get External CP IDs + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{external_CPs}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${external_CPs} ${nfv.vnfd[0]['ext-cpd'][${i}]['id']} + END + Set Global Variable ${externalCP_IDs} ${external_CPs} + +Get Virtual Link IDs + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${VirtualLink_labels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${VirtualLink_labels} ${nfv.vnfd[0]['int-virtual-link-desc'][${i}]['id']} + END + Set Global Variable ${VirtualLink_IDs} ${VirtualLink_labels} + +Get Instantiation Levels + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{Instantiation_Levels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${Instantiation_Levels} ${nfv.vnfd[0].df['instantiation-level'][${i}]['id']} + END + Set Global Variable ${InstantiationLevel_IDs} ${Instantiation_Levels} + +Match the VNF Instance Response Attributes with Descriptors + #Checking Response attributes with VNF Descriptors + Should Be Equal As Strings ${response['body']['vnfdId']} ${Descriptor_ID} + Should Be Equal As Strings ${response['body']['vnfProvider']} ${Provider} + Should Be Equal As Strings ${response['body']['vnfProductName']} ${Product_Name} + Should Be Equal As Strings ${response['body']['vnfSoftwareVersion']} ${Software_Version} + Should Be Equal As Strings ${response['body']['vnfdVersion']} ${Descriptor_Version} + Should Be Equal As Strings ${response['body']['instantiatedVnfInfo']['flavourId']} ${Flavour_ID} + List Should Contain Value ${VDU_IDs} ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo'][0]['vduId']} + Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${externalCP_IDs} ${response['body']['instantiatedVnfInfo']['extCpInfo'][0]['cpdId']} + Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${internalCP_IDs} ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo'][0]['vnfcCpInfo'][0]['cpdId']} + Run Keyword If '${descriptorType}'=='SOL001' List Should Contain Value @{CP_IDs} ${response['body']['instantiatedVnfInfo']['extCpInfo'][0]['cpdId']} + Run Keyword If '${descriptorType}'=='SOL001' List Should Contain Value @{CP_IDs} ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo'][0]['vnfcCpInfo'][0]['cpdId']} + List Should Contain value ${Storage_IDs} ${response['body']['instantiatedVnfInfo']['virtualStorageResourceInfo'][0]['virtualStorageDescId']} + List Should Contain Value ${VirtualLink_IDs} ${response['body']['instantiatedVnfInfo']['extManagedVirtualLinkInfo'][0]['vnfVirtualLinkDescId']} + +Check HTTP Response Body vnf LCM OpOCCs content against VNF Descriptor + #{check_multiple_instances} flag, set to 1 to check multiple instances against descriptors + Run Keyword If ${check_multiple_instances} == 1 Check Multiple VNF LCM OpOCCs Content + +Check Multiple VNF LCM OpOCCs Content + #${number_of_instances}= Get Length ${response['body']} + #FOR ${i} IN RANGE ${number_of_instances} + ${response['body']}= Get Variable Value ${response['body'][0]} #Gets the first instance at index 0 + Check Individual VNF LCM Operation Occurence Content + #END + +Check HTTP Response Body vnf LCM OpOCC content against VNF Descriptor + Run Keyword If ${check_descriptors} == 1 Check Individual VNF LCM Operation Occurence Content + +Check Individual VNF LCM Operation Occurence Content + PARSE the Descriptor File + Match the VNF LCM Operation Occurence Response Attributes with Descriptors + +Match the VNF LCM Operation Occurence Response Attributes with Descriptors + Should Be Equal As Strings ${response['body']['changedInfo']['vnfdId']} ${Descriptor_ID} + Should Be Equal As Strings ${response['body']['changedInfo']['vnfdVersion']} ${Descriptor_Version} + List Should Contain Value ${VDU_IDs} ${response['body']['resourceChanges']['affectedVnfcs'][0]['vduId']} + List Should Contain value ${Storage_IDs} ${response['body']['resourceChanges']['affectedVirtualStorages'][0]['virtualStorageDescId']} + List Should Contain Value ${VirtualLink_IDs} ${response['body']['resourceChanges']['affectedVirtualLinks'][0]['vnfVirtualLinkDescId']} diff --git a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot index 441bb3cf3059a5b720b65a6e4ae4d7212400caef..785ae77a4aa0bf6df074b645e49ea11e086777d6 100644 --- a/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot +++ b/SOL002/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot @@ -13,7 +13,7 @@ POST VNF LCM operation occurrences - Method not implemented ... Test title: POST VNF LCM operation occurrences - Method not implemented ... Test objective: The objective is to test that POST method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.12.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -25,20 +25,21 @@ GET status information about multiple VNF LCM operation occurrences ... Test title: GET status information about multiple VNF LCM operation occurrences ... Test objective: The objective is to test that GET method retrieve Query status information about multiple VNF lifecycle management operation occurrences. ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none GET VNF LCM OP occurrences - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs - + Check HTTP Response Body vnf LCM OpOCCs content against VNF Descriptor + GET status information about multiple VNF LCM operation occurrences Bad Request Invalid attribute-based filtering parameters [Documentation] Test ID: 6.3.5.11.3 ... Test title: GET status information about multiple VNF LCM operation occurrences Bad Request Invalid attribute-based filtering parameters ... Test objective: The objective is to test that GET method fail retrieving status information about multiple VNF lifecycle management operation occurrences because attribute is invalid. ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -51,7 +52,7 @@ GET status information about multiple VNF LCM Operation occurrences Bad Request ... Test title: GET status information about multiple VNF LCM Operation occurrences Bad Request Invalid attribute selector ... Test objective: The objective is to test that GET method fail retrieving status information about multiple VNF lifecycle management operation occurrences because attribute is invalid. ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -59,56 +60,56 @@ GET status information about multiple VNF LCM Operation occurrences Bad Request Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails -GET status information about multiple VNF LCM Operation OCC with "all_fields" +GET status information about multiple VNF LCM Operation occurrences with "all_fields" [Documentation] Test ID: 6.3.5.11.5 ... Test title: GET status information about multiple VNF LCM Operation OCC with "all_fields" ... Test objective: The objective is to test that GET method retrieve Query status information about multiple VNF lifecycle management operation occurrences. ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none Get VNF LCM Operation occurrences with all_fields attribute selector - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs -GET status information about multiple VNF LCM Operation OCC with "exlude_default" +GET status information about multiple VNF LCM Operation occurrences with "exlude_default" [Documentation] Test ID: 6.3.5.11.6 ... Test title: GET status information about multiple VNF LCM Operation OCC with "exclude_default" ... Test objective: The objective is to test that GET method retrieve Query status information about multiple VNF lifecycle management operation occurrences. ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none Get VNF LCM Operation occurrences with exclude_default attribute selector - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs -GET status information about multiple VNF LCM Operation OCC with "fields" +GET status information about multiple VNF LCM Operation occurrences with "fields" [Documentation] Test ID: 6.3.5.11.7 ... Test title: GET status information about multiple VNF LCM Operation OCC with "fields" ... Test objective: The objective is to test that GET method retrieve Query status information about multiple VNF lifecycle management operation occurrences. ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none Get VNF LCM Operation occurrences with fields attribute selector - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs -GET status information about multiple VNF LCM Operation OCC with "exclude_fields" +GET status information about multiple VNF LCM Operation occurrences with "exclude_fields" [Documentation] Test ID: 6.3.5.11.8 ... Test title: GET status information about multiple VNF LCM Operation OCC with "exclude_fields" ... Test objective: The objective is to test that GET method retrieve Query status information about multiple VNF lifecycle management operation occurrences. ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none Get VNF LCM Operation occurrences with exclude_fields attribute selector - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs PUT status information about multiple VNF LCM operation occurrences - Method not implemented @@ -116,7 +117,7 @@ PUT status information about multiple VNF LCM operation occurrences - Method not ... Test title: PUT status information about multiple VNF LCM operation occurrences - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.12.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -128,7 +129,7 @@ PATCH status information about multiple VNF LCM operation occurrences - Method n ... Test title: PATCH status information about multiple VNF LCM operation occurrences - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.12.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -140,7 +141,7 @@ DELETE status information about multiple VNF LCM operation occurrences - Method ... Test title: DELETE status information about multiple VNF LCM operation occurrences - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.12.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -152,23 +153,36 @@ GET status information about multiple VNF LCM operation occurances to get Paged ... Test title: GET status information about multiple VNF LCM operation occurances to get Paged Response ... Test objective: The objective is to test that GET method retrieve Query status information about multiple VNF lifecycle management operation occurrences to get paged response. ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none GET VNF LCM OP occurrences Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link GET status information about multiple VNF LCM Operation occurrences Bad Request Response too big [Documentation] Test ID: 6.3.5.11.13 ... Test title: GET status information about multiple VNF LCM Operation occurrences Bad Request Response too big ... Test objective: The objective is to test that GET method fail retrieving status information about multiple VNF lifecycle management operation occurrences because Response is too big. ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none GET VNF LCM OP occurrences Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file + Check HTTP Response Body Json Schema Is ProblemDetails + +GET status information about multiple VNF LCM Operation occurrences with "exlude_default" and "fields" + [Documentation] Test ID: 6.3.5.11.14 + ... Test title: GET status information about multiple VNF LCM Operation OCC with "exclude_default" and "fields" + ... Test objective: The objective is to test that GET method retrieve Query status information about multiple VNF lifecycle management operation occurrences. + ... Pre-conditions: none + ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VE + ... Applicability: none + ... Post-Conditions: none + Get VNF LCM Operation occurrences with exclude_default and fields attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is VnfLcmOpOccs \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7f25ee9101439e128289be886c0674e5faae0fb8 --- /dev/null +++ b/SOL002/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -0,0 +1,167 @@ +tosca_definitions_version: tosca_simple_yaml_1_2 +description: "TST010 reference VNF-B" + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v2.7.1/etsi_nfv_sol001_vnfd_types.yaml + +metadata: + descriptor_id: "VNF-B" + vendor: "ETSI TST WG" + version: "2.0" + +node_types: + tst010.vnf.simple: + derived_from: tosca.nodes.nfv.VNF + properties: + descriptor_id: + type: string + default: VNF-B + descriptor_version: + type: string + default: '1.0' + provider: + type: string + default: ETSI TST WG + product_name: + type: string + default: VNF-B + software_version: + type: string + default: '1.0' + product_info_name: + type: string + default: VNF-B + product_info_description: + type: string + default: TST010 reference VNF-B + flavour_id: + type: string + default: VNF-B_flavor + flavour_description: + type: string + default: "VNF-B flavor" + vnfm_info: + type: list + entry_schema: + type: string + default: [ 'etsivnfm:v2.3.1' ] + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + description: Invoked upon receipt of a Scale VNF request + terminate: + description: Invoked upon receipt Terminate VNF request + operate: + description: Invoked upon receipt of an Operate VNF request + requirements: + - virtual_link_right: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_left: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_management: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 0] + +topology_template: + substitution_mappings: + node_type: "tst010.vnf.simple" + requirements: + virtual_link_right: + [right, virtual_link_right] + virtual_link_management: + [management, virtual_link_management] + virtual_link_left: + [left, virtual_link_left] + node_templates: + right: + type: "tosca.nodes.nfv.VduCp" + properties: + layer_protocols: [ ipv4 ] + order: 1 + requirements: + - virtual_binding: VDU-B + vdu-b-1-vsd: + management: + type: "tosca.nodes.nfv.VduCp" + properties: + layer_protocols: [ ipv4 ] + order: 0 + requirements: + - virtual_binding: VDU-B + vdu-b-1-vsd: + left: + type: "tosca.nodes.nfv.VduCp" + properties: + layer_protocols: [ ipv4 ] + order: 2 + requirements: + - virtual_binding: VDU-B + vdu-b-1-vsd: + type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" + properties: + virtual_block_storage_data: + size_of_storage: 20 GB + rdma_enabled: false + sw_image_data: + name: "vdu-b-1 image" + version: "1.1" + checksum: + algorithm: "sha-224" + hash: "somehashfortst010" + container_format: "bare" + disk_format: qcow2 + min_disk: '1' + min_ram: '2' + size: '1' + VDU-B: + type: "tosca.nodes.nfv.Vdu.Compute" + properties: + name: "vdu-b-1-vcd" + description: "Description of VDU-B-1" + vdu_profile: + min_number_of_instances: 1 + max_number_of_instances: 2 + capabilities: + virtual_compute: + properties: + virtual_memory: + virtual_mem_size: 4096 MB + numa_enabled: false + virtual_cpu: + num_virtual_cpu: 2 + requirements: + - virtual_storage: vdu-b-1-vsd + + vnf-b-1_VNF: + type: "tst010.vnf.simple" + properties: + descriptor_id: "VNF-B" + descriptor_version: "2.0" + provider: "ETSI TST WG" + product_name: "VDU_VNF-B" + software_version: "2.0" + product_info_name: "VDU_VNF-B" + product_info_description: "TST010 reference VNF-A" + flavour_id: "VNF-B_flavor" + flavour_description: "VNF-B flavor" + vnfm_info: + - etsivnfm:v2.3.1 + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + implementation: scale-example.yaml + terminate: + implementation: terminate-example.yaml + operate: + implementation: operate-example.yaml diff --git a/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/VNFD/vnfd_SOL006.yaml b/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/VNFD/vnfd_SOL006.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d902779a2d42d34a9f93513512d8a485dc1d838b --- /dev/null +++ b/SOL002/VNFLifecycleManagement-API/descriptors/SOL006/VNFD/vnfd_SOL006.yaml @@ -0,0 +1,137 @@ +nfv: + vnfd: + - id: VNF-B-2vdu + provider: ETSI TST WG + product-name: TST010 reference VNF-B with 2 VDUs + software-version: '2.2' + version: '2.2' + vnfm-info: ETSI VNFM + vdu: + - id: vdu-b-1 + name: VNF-B VDU 1 + int-cpd: + - id: left + layer-protocol: ethernet + - id: management + layer-protocol: ethernet + - id: internal + layer-protocol: ethernet + int-virtual-link-desc: internal-vl + virtual-compute-desc: vdu-b-1-vcd + virtual-storage-desc: vdu-b-1-vsd + sw-image-desc: vdu-b-1-image + - id: vdu-b-2 + name: VNF-B VDU 2 + int-cpd: + - id: right + layer-protocol: ethernet + - id: management + layer-protocol: ethernet + - id: internal + layer-protocol: ethernet + int-virtual-link-desc: internal-vl + virtual-compute-desc: vdu-b-2-vcd + virtual-storage-desc: vdu-b-2-vsd + sw-image-desc: vdu-b-2-image + virtual-compute-desc: + id: vdu-b-1-vcd + virtual-memory: + size: '4.0' + virtual-cpu: + num-virtual-cpu: '2' + virtual-storage-desc: + id: vdu-b-1-vsd + type-of-storage: root-storage + size-of-storage: '0' + sw-image-desc: + id: vdu-b-1-image + name: VNF-B image + version: '1.1' + checksum: + algorithm: sha-224 + hash: somehashfortst010 + container-format: bare + disk-format: qcow2 + min-disk: '1' + min-ram: '2.0' + size: '1' + image: 'http://someurl.com/VNF-B.qcow2' + virtual-compute-desc: + id: vdu-b-2-vcd + virtual-memory: + size: '6.0' + virtual-cpu: + num-virtual-cpu: '2' + virtual-storage-desc: + id: vdu-b-2-vsd + type-of-storage: root-storage + size-of-storage: '0' + sw-image-desc: + id: vdu-b-2-image + name: VNF-B-2 image + version: '1.1' + checksum: + algorithm: sha-224 + hash: somehashfortst010 + container-format: bare + disk-format: qcow2 + min-disk: '1' + min-ram: '2.0' + size: '1' + image: 'http://someurl.com/VNF-B-2.qcow2' + int-virtual-link-desc: + - id: internal-vl + flavour: + id: internal-vl-flavour + qos: + latency: '1' + packet-delay-variation: '1' + packet-loss-ratio: '0.05' + connectivity-type: + layer-protocol: ethernet + ext-cpd: + - id: ext-b-left + int-cpd: + vdu-id: vdu-b-1 + cpd: left + layer-protocol: ethernet + - id: management + int-cpd: + vdu-id: vdu-b-1 + cpd: management + layer-protocol: ethernet + - id: ext-b-right + int-cpd: + vdu-id: vdu-b-2 + cpd: right + layer-protocol: ethernet + df: + id: normal + vdu-profile: + - id: vdu-b-1 + min-number-of-instances: '1' + max-number-of-instances: '2' + - id: vdu-b-2 + min-number-of-instances: '1' + max-number-of-instances: '4' + instantiation-level: + - id: double + vdu-level: + - vdu-id: vdu-b-1 + number-of-instances: '2' + - vdu-id: vdu-b-2 + number-of-instances: '2' + - id: single + vdu-level: + - vdu-id: vdu-b-1 + number-of-instances: '1' + - vdu-id: vdu-b-2 + number-of-instances: '1' + default-instantiation-level: single + lcm-operations-configuration: + scale-vnf-to-level-op-config: + arbitrary-target-levels-supported: 'true' + terminate-vnf-op-config: + min-graceful-termination: '1' + operate-vnf-op-config: + min-graceful-stop-timeout: '1' \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/environment/variables.txt b/SOL002/VNFLifecycleManagement-API/environment/variables.txt index af716e9c41b6901ab91a74617d4335608c927e7d..835a6f17aacc8e4424716c7113a49be98ddb4242 100644 --- a/SOL002/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL002/VNFLifecycleManagement-API/environment/variables.txt @@ -5,14 +5,15 @@ ${NFVO_HOST} localhost # Hostname of the NFVO ${NFVO_PORT} 8081 # Listening port of the NFVO ${VNFM_SCHEMA} https ${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${CONTENT_TYPE} application/json ${CONTENT_TYPE_PATCH} application/merge-patch+json ${ACCEPT} application/json ${ACCEPT_JSON} application/json ${apiRoot} / ${apiName} vnflcm -${apiVersion} v1 +${apiMajorVersion} v1 ${AUTH_USAGE} 1 ${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX ${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f @@ -38,7 +39,8 @@ ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${VnfLcmOperationOccurrenceNotification} {} ${VnfIdentifierCreationNotification} {} ${VnfIdentifierDeletionNotification} {} - +${notInstantiatedVnfInstanceId} NOT_INSTANTIATED_VNF_INSTANCE_ID +${NOT_EXISTANT_VNF_INSTANCE_ID} NOT_EXISTANT_VNF_INSTANCE_ID ${SYNC_MODE} 0 ${callback_uri} http://localhost @@ -59,4 +61,48 @@ ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies. ${fields} -${original_etag} some_etag \ No newline at end of file +${original_etag} some_etag + +${vnfdId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${flavourId} vnf flavour + +${scaleVnfRequesttype} SCALE_OUT +${scaleVnfRequestAspect} Aspect + +${newFlavourId} 5a7d81f-e602-4afa-8e13-962fb5a7d81f + +${terminationType} GRACEFUL + +${healingCause} healingCause + +${changeStateTo} STOPPED + +${vnfdIds} 6fc3539c-e602-4afa-8e13-962fb5a7d81f + +${callbackResp} localhost + +${check_descriptors} 1 +${descriptorType} SOL006 +${check_multiple_instances} 0 + +${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute +${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder +${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink +${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp +${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage + +@{VDU_IDs} +@{VNF_IDs} +@{virtualLink_IDs} +@{CP_IDs} +@{Storage_IDs} +@{internalCP_IDs} +@{externalCP_IDs} +@{InstantiationLevel_IDs} + +${Descriptor_ID} +${Provider} +${Product_Name} +${Software_Version} +${Descriptor_Version} +${Flavour_ID} diff --git a/SOL002/VNFLifecycleManagement-API/jsons/VnfIdentifierCreationNotification.json b/SOL002/VNFLifecycleManagement-API/jsons/VnfIdentifierCreationNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..678278c5d82a9b9b63ade939904d8ed905942963 --- /dev/null +++ b/SOL002/VNFLifecycleManagement-API/jsons/VnfIdentifierCreationNotification.json @@ -0,0 +1,8 @@ +{{ + "id":"", + "notificationType":"VnfIdentifierCreationNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "vnfInstanceId":"{vnfInstanceId}", + "_links":"" +}} \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/jsons/VnfIdentifierDeletionNotification.json b/SOL002/VNFLifecycleManagement-API/jsons/VnfIdentifierDeletionNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..287c30299d1c5d13821c30bd89b746b90095ce77 --- /dev/null +++ b/SOL002/VNFLifecycleManagement-API/jsons/VnfIdentifierDeletionNotification.json @@ -0,0 +1,8 @@ +{{ + "id":"", + "notificationType":"VnfIdentifierDeletionNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "vnfInstanceId":"{vnfInstanceId}", + "_links":"" +}} \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/jsons/VnfLcmOperationOccurrenceNotification.json b/SOL002/VNFLifecycleManagement-API/jsons/VnfLcmOperationOccurrenceNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..21d4b97d6765a03d1f4bbcd8b2af0efd8840bc7e --- /dev/null +++ b/SOL002/VNFLifecycleManagement-API/jsons/VnfLcmOperationOccurrenceNotification.json @@ -0,0 +1,13 @@ +{{ + "id":"", + "notificationType":"VnfLcmOperationOccurrenceNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "notificationStatus":"STRAT", + "operationState":"PROCESSING", + "vnfInstanceId":"{vnfInstanceId}", + "operation":"SCALE", + "isAutomaticInvocation":"false", + "vnfLcmOpOccId":"{vnfLcmOpOccId}", + "_links":"" +}} \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/jsons/changeVnfFlavourRequest.json b/SOL002/VNFLifecycleManagement-API/jsons/changeVnfFlavourRequest.json index 5b52927e97d1566e4aeec39de314a263ec3a0560..50d5eb5db52d57e0a3cf8184cf315baea933745c 100644 --- a/SOL002/VNFLifecycleManagement-API/jsons/changeVnfFlavourRequest.json +++ b/SOL002/VNFLifecycleManagement-API/jsons/changeVnfFlavourRequest.json @@ -1,3 +1,3 @@ -{ - "newFlavourId": "myFlavour_new" -} \ No newline at end of file +{{ + "newFlavourId": "{newFlavourId}" +}} \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/jsons/createVnfRequest.json b/SOL002/VNFLifecycleManagement-API/jsons/createVnfRequest.json index 290151ae0de5286745c29b9a12df050a9b3ce9f9..5b1a730e38caedfd0066b52b6ef83b06d5f72ea0 100644 --- a/SOL002/VNFLifecycleManagement-API/jsons/createVnfRequest.json +++ b/SOL002/VNFLifecycleManagement-API/jsons/createVnfRequest.json @@ -1,6 +1,5 @@ -{ - "vnfdId": "6fc3539c-e602-4afa-8e13-962fb5a7d81f", +{{ "vnfInstanceName": "string", "vnfInstanceDescription": "string", - "metadata":{} -} \ No newline at end of file + "vnfdId": "{vnfdId}" +}} diff --git a/SOL002/VNFLifecycleManagement-API/jsons/healVnfRequest.json b/SOL002/VNFLifecycleManagement-API/jsons/healVnfRequest.json index 8981fa94238e3e44ee17147f70898a8e9d831a40..8e57871a51c434ade9f39d427eddb45ca2ab2ae7 100644 --- a/SOL002/VNFLifecycleManagement-API/jsons/healVnfRequest.json +++ b/SOL002/VNFLifecycleManagement-API/jsons/healVnfRequest.json @@ -1,4 +1,4 @@ -{ - "cause": "a specific cause", +{{ + "cause": "{healingCause}", "additionalParams": {} -} \ No newline at end of file +}} \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/jsons/instantiateVnfRequest.json b/SOL002/VNFLifecycleManagement-API/jsons/instantiateVnfRequest.json index bb96e19ddce87e266b427158183da85a62c43861..c8a0ed85c2509d2e3f266d6eefead5abe181577d 100644 --- a/SOL002/VNFLifecycleManagement-API/jsons/instantiateVnfRequest.json +++ b/SOL002/VNFLifecycleManagement-API/jsons/instantiateVnfRequest.json @@ -1,6 +1,5 @@ -{ - "flavourId": "myFlavour", - "instantiationLevelId": "string", +{{ + "flavourId": "{flavourId}", "extVirtualLinks": [ { "id": "string", @@ -75,4 +74,4 @@ "localizationLanguage": "English", "extensions": {}, "additionalParams": {} -} \ No newline at end of file +}} \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/jsons/lccnSubscriptionRequest.json b/SOL002/VNFLifecycleManagement-API/jsons/lccnSubscriptionRequest.json index e44916f8dd95ffe1fd61888add4ebf78653c43f1..b28685555bf526fb1b84c4885a78689a3a336895 100644 --- a/SOL002/VNFLifecycleManagement-API/jsons/lccnSubscriptionRequest.json +++ b/SOL002/VNFLifecycleManagement-API/jsons/lccnSubscriptionRequest.json @@ -1,10 +1,10 @@ -{ - "filter": { - "vnfInstanceSubscriptionFilter": { +{{ + "filter": {{ + "vnfInstanceSubscriptionFilter": {{ "vnfdIds": [ - "6fc3539c-e602-4afa-8e13-962fb5a7d81f" + "{vnfdIds}" ] - } - }, - "callbackUri": "http://127.0.0.1/subscribe" -} \ No newline at end of file + }} + }}, + "callbackUri": "{callback_uri}{callback_endpoint}" +}} \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/jsons/operateVnfRequest.json b/SOL002/VNFLifecycleManagement-API/jsons/operateVnfRequest.json index 2ead53e198a7a32420eb866a8b0b732bf3a8ee12..c32dd2c4ec5f4cf0fc2b85fd399b844e14b8dd66 100644 --- a/SOL002/VNFLifecycleManagement-API/jsons/operateVnfRequest.json +++ b/SOL002/VNFLifecycleManagement-API/jsons/operateVnfRequest.json @@ -1,5 +1,5 @@ -{ - "changeStateTo": "STOPPED", +{{ + "changeStateTo": "{changeStateTo}", "stopType": "FORCEFUL", "additionalParams": {} -} \ No newline at end of file +}} \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/jsons/patchBodyRequest.json b/SOL002/VNFLifecycleManagement-API/jsons/patchBodyRequest.json index 0c8845c218393245163304406c1ef2556b4472fd..7741920212df3063ed297dba4fd1e008928f1ffd 100644 --- a/SOL002/VNFLifecycleManagement-API/jsons/patchBodyRequest.json +++ b/SOL002/VNFLifecycleManagement-API/jsons/patchBodyRequest.json @@ -1,4 +1,5 @@ { "vnfInstanceName": "vnf new name", - "vnfInstanceDescription": "new description" + "vnfInstanceDescription": "new description", + "vnfdId": "" } \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/jsons/scaleVnfRequest.json b/SOL002/VNFLifecycleManagement-API/jsons/scaleVnfRequest.json index 09dc7dffb4a74b17a8773924ada8afe4f5dc5104..58964bb5697888d6ab452db04c738dc37d7d11d9 100644 --- a/SOL002/VNFLifecycleManagement-API/jsons/scaleVnfRequest.json +++ b/SOL002/VNFLifecycleManagement-API/jsons/scaleVnfRequest.json @@ -1,4 +1,4 @@ -{ - "type": "SCALE_OUT", - "aspectId": "myAspect" -} \ No newline at end of file +{{ + "type": "{scaleVnfRequesttype}", + "aspectId": "{scaleVnfRequestAspect}" +}} \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/jsons/scaleVnfToLevelRequest.json b/SOL002/VNFLifecycleManagement-API/jsons/scaleVnfToLevelRequest.json index 1c39a7bb51571dfc2af274795d0bc9d932eccafd..448dc4c275e80759dc2a3bb6b39821765f3f9a18 100644 --- a/SOL002/VNFLifecycleManagement-API/jsons/scaleVnfToLevelRequest.json +++ b/SOL002/VNFLifecycleManagement-API/jsons/scaleVnfToLevelRequest.json @@ -1,3 +1,3 @@ -{ - "instantiationLevelId": "myNextLevel" -} \ No newline at end of file +{{ + "newFlavourId" : "{newFlavourId}" +}} \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/jsons/terminateVnfRequest.json b/SOL002/VNFLifecycleManagement-API/jsons/terminateVnfRequest.json index 0a4f9592d9062dc9c8bf10d81858cddc71cb78aa..b317c4de963ec357ae338259a876e4d730efe6ae 100644 --- a/SOL002/VNFLifecycleManagement-API/jsons/terminateVnfRequest.json +++ b/SOL002/VNFLifecycleManagement-API/jsons/terminateVnfRequest.json @@ -1,4 +1,4 @@ -{ - "terminationType": "GRACEFUL", +{{ + "terminationType": "{terminationType}", "additionalParams": {} -} \ No newline at end of file +}} \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/schemas/VnfIdentifierCreationNotification.schema.json b/SOL002/VNFLifecycleManagement-API/schemas/VnfIdentifierCreationNotification.schema.json index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..ad05e0209c32e97f97667d15c8adfb850c2d8b62 100644 --- a/SOL002/VNFLifecycleManagement-API/schemas/VnfIdentifierCreationNotification.schema.json +++ b/SOL002/VNFLifecycleManagement-API/schemas/VnfIdentifierCreationNotification.schema.json @@ -0,0 +1,87 @@ +{ + "description": "This type represents a VNF identifier creation notification, which informs the receiver of the creation of a new \"Individual VNF instance\" resource and the associated VNF instance identifier. This notification shall be triggered by the VNFM when it has created an \"Individual VNF instance\" resource and the associated VNF instance identifier.\n", + "type": "object", + "required": [ + "id", + "notificationType", + "subscriptionId", + "timeStamp", + "vnfInstanceId", + "_links" + ], + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "notificationType": { + "description": "Discriminator for the different notification types. Shall be set to \"VnfIdentifierCreationNotification\" for this notification type.\n", + "type": "string", + "enum": [ + "VnfIdentifierCreationNotification" + ] + }, + "subscriptionId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "timeStamp": { + "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n", + "type": "string", + "format": "date-time" + }, + "vnfInstanceId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "_links": { + "description": "This type represents the links to resources that a notification can contain.\n", + "type": "object", + "required": [ + "vnfInstance", + "subscription" + ], + "properties": { + "vnfInstance": { + "description": "This type represents a link to a resource in a notification, using an absolute or relative URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + }, + "subscription": { + "description": "This type represents a link to a resource in a notification, using an absolute or relative URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + }, + "vnfLcmOpOcc": { + "description": "This type represents a link to a resource in a notification, using an absolute or relative URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/schemas/VnfIdentifierDeletionNotification.schema.json b/SOL002/VNFLifecycleManagement-API/schemas/VnfIdentifierDeletionNotification.schema.json index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..253ccce96b2de34faba43dd5093c2a3ab9e561ef 100644 --- a/SOL002/VNFLifecycleManagement-API/schemas/VnfIdentifierDeletionNotification.schema.json +++ b/SOL002/VNFLifecycleManagement-API/schemas/VnfIdentifierDeletionNotification.schema.json @@ -0,0 +1,87 @@ +{ + "description": "This type represents a VNF identifier deletion notification, which informs the receiver of the deletion of a new \"Individual VNF instance\" resource and the associated VNF instance identifier. This notification shall be triggered by the VNFM when it has deleted an \"Individual VNF instance\" resource and the associated VNF instance identifier.\n", + "type": "object", + "required": [ + "id", + "notificationType", + "subscriptionId", + "timeStamp", + "vnfInstanceId", + "_links" + ], + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "notificationType": { + "description": "Discriminator for the different notification types. Shall be set to \"VnfIdentifierDeletionNotification\" for this notification type.\n", + "type": "string", + "enum": [ + "VnfIdentifierDeletionNotification" + ] + }, + "subscriptionId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "timeStamp": { + "description": "Date-time stamp. Representation: String formatted according to IETF RFC 3339.\n", + "type": "string", + "format": "date-time" + }, + "vnfInstanceId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "_links": { + "description": "This type represents the links to resources that a notification can contain.\n", + "type": "object", + "required": [ + "vnfInstance", + "subscription" + ], + "properties": { + "vnfInstance": { + "description": "This type represents a link to a resource in a notification, using an absolute or relative URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + }, + "subscription": { + "description": "This type represents a link to a resource in a notification, using an absolute or relative URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + }, + "vnfLcmOpOcc": { + "description": "This type represents a link to a resource in a notification, using an absolute or relative URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + } + } + } + } + } \ No newline at end of file diff --git a/SOL002/VNFLifecycleManagement-API/schemas/vnfLcmOpOcc.schema.json b/SOL002/VNFLifecycleManagement-API/schemas/VnfLcmOpOcc.schema.json similarity index 100% rename from SOL002/VNFLifecycleManagement-API/schemas/vnfLcmOpOcc.schema.json rename to SOL002/VNFLifecycleManagement-API/schemas/VnfLcmOpOcc.schema.json diff --git a/SOL002/VNFLifecycleManagement-API/schemas/vnfLcmOpOccs.schema.json b/SOL002/VNFLifecycleManagement-API/schemas/VnfLcmOpOccs.schema.json similarity index 100% rename from SOL002/VNFLifecycleManagement-API/schemas/vnfLcmOpOccs.schema.json rename to SOL002/VNFLifecycleManagement-API/schemas/VnfLcmOpOccs.schema.json diff --git a/SOL002/VNFPerformanceManagement-API/ApiVersion.robot b/SOL002/VNFPerformanceManagement-API/ApiVersion.robot index 4e36c2637427c993a44ac7e267eb48993e95fbb6..7a7e7008654bc461d6c2fbc6dafc76a9c1bcbcea 100644 --- a/SOL002/VNFPerformanceManagement-API/ApiVersion.robot +++ b/SOL002/VNFPerformanceManagement-API/ApiVersion.robot @@ -1,211 +1,211 @@ -*** Settings *** -Resource environment/variables.txt -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Library DependencyLibrary -Library JSONLibrary -Library JSONSchemaLibrary schemas/ - -*** Test Cases *** -POST API Version - Method not implemented - [Documentation] Test ID: 6.3.2.7.1 - ... Test title: POST API version - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version - [Documentation] Test ID: 6.3.2.7.2 - ... Test title: GET API Version - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version - Method not implemented - [Documentation] Test ID: 6.3.2.7.3 - ... Test title: PUT API Version - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version - Method not implemented - [Documentation] Test ID: 6.3.2.7.4 - ... Test title: PATCH API Version - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version - Method not implemented - [Documentation] Test ID: 6.3.2.7.5 - ... Test title: DELETE API Version - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -POST API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 6.3.2.7.6 - ... Test title: POST API version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version with apiMajorVerion - [Documentation] Test ID: 6.3.2.7.7 - ... Test title: GET API Version with apiMajorVerion - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 6.3.2.7.8 - ... Test title: PUT API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 6.3.2.7.9 - ... Test title: PATCH API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 6.3.2.7.10 - ... Test title: DELETE API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -*** Keywords *** -POST API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal ${response['status']} ${expected_status} - Log Status code validated - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response['body']} +*** Settings *** +Resource environment/variables.txt +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 6.3.3.9.1 + ... Test title: POST API version - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 6.3.3.9.2 + ... Test title: GET API Version + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version - Method not implemented + [Documentation] Test ID: 6.3.3.9.3 + ... Test title: PUT API Version - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 6.3.3.9.4 + ... Test title: PATCH API Version - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 6.3.3.9.5 + ... Test title: DELETE API Version - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +POST API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 6.3.3.9.6 + ... Test title: POST API version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 6.3.3.9.7 + ... Test title: GET API Version with apiMajorVerion + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 6.3.3.9.8 + ... Test title: PUT API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 6.3.3.9.9 + ... Test title: PATCH API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 6.3.3.9.10 + ... Test title: DELETE API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot b/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot index 5c49a39fe0399ae99d1e969b69cd34f2ac770b72..ca839fbe23f2cd01ff4e23f316d2372c1ba5cf6e 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot @@ -1,9 +1,10 @@ *** Settings *** -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt # Generic Parameters -Library JSONLibrary -Resource environment/IndividualPmJob.txt -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt # Generic Parameters +Library JSONLibrary +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Library OperatingSystem +Library DependencyLibrary *** Test Cases *** GET individual VNF Performance Job @@ -11,7 +12,7 @@ GET individual VNF Performance Job ... Test title: Get individual VNF Performance Job ... Test objective: The objective is to test the retrieval of an individual VNF performance monitoring job and perform a JSON schema and content validation of the collected job data structure ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -25,7 +26,7 @@ GET individual VNF Performance Job with invalid resource identifier ... Test title: Get individual VNF Performance Job with invalid resource identifier ... Test objective: The objective is to test that the retrieval of an individual VNF performance monitoring job fails when using an invalid resource identifier, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -38,7 +39,7 @@ DELETE Individual VNF Performance Job ... Test title: Delete Individual VNF Performance Job ... Test objective: The objective is to test the deletion of an individual VNF performance monitoring job ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Job is no more available in the VNFM @@ -51,7 +52,7 @@ DELETE Individual VNF Performance Job with invalid resource identifier ... Test title: Delete individual VNF Performance Job with invalid resource identifier ... Test objective: The objective is to test that the deletion of an individual VNF performance monitoring job fails when using an invalid resource identifier, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -63,110 +64,114 @@ POST Individual VNF Performance Job - Method not implemented [Documentation] Test ID: 6.3.3.2.5 ... Test title: POST Individual VNF Performance Job - method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new VNF Performance Monitoring Job - ... Pre-conditions: A VNF instance is instantiated - ... Reference: Clause 6.4.3.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 6.4.3.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The VNF Performance Job is not created on the VNFM + ... Post-Conditions: none Send Post request for individual VNF Performance Job Check HTTP Response Status Code Is 405 - Check Postcondition VNF Performance Job is not Created PUT Individual VNF Performance Job - Method not implemented [Documentation] Test ID: 6.3.3.2.6 ... Test title: PUT Individual VNF Performance Job - method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing VNF Performance Monitoring Job - ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 6.4.3.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The VNF Performance Job is not modified by the operation + ... Post-Conditions: none Send Put request for individual VNF Performance Job Check HTTP Response Status Code Is 405 - Check Postcondition VNF Performance Job is Unmodified (Implicit) -PATCH Individual VNF Performance Job - Method not implemented +PATCH Individual VNF Performance Job [Documentation] Test ID: 6.3.3.2.7 - ... Test title: PATCH Individual VNF Performance Job - method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing new VNF Performance Monitoring Job + ... Test title: PATCH Individual VNF Performance Job + ... Test objective: The objective is to test that PATCH method allows to modify an exsisting individual PM job resource. ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The VNF Performance Job is not modified by the operation + ... Post-Conditions: none Send Patch request for individual VNF Performance Job - Check HTTP Response Status Code Is 405 - Check Postcondition VNF Performance Job is Unmodified (Implicit) + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PMJobModifications +PATCH Individual VNF Performance Job - Precondition failed + [Documentation] Test ID: 6.3.3.2.8 + ... Test title: PATCH Individual VNF Performance Job - Precondition failed + ... Test objective: The objective is to attempt to Modify an individual alarm resource, where the precondition was not met + ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. + ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: The VNF Performance Job is not modified by the operation + Send Patch request for individual VNF Performance Job + Check HTTP Response Status Code Is 412 + Check HTTP Response Body Json Schema Is ProblemDetails + Check Postcondition VNF Performance Job is Unmodified (Implicit) + *** Keywords *** GET individual VNF Performance Job Log Trying to get a Pm Job present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${output}= Output response Set Suite Variable ${response} ${output} GET individual VNF Performance Job with invalid resource identifier Log Trying to perform a negative get, using erroneous PM Job identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${erroneousPmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${erroneousPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Job Log Trying to delete an existing PM Job Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Job with invalid resource identifier Log Trying to perform a negative delete, using erroneous PM Job identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${erroneousPmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${erroneousPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual VNF Performance Job 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}/pm_jobs/${newPmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${newPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for individual VNF Performance Job 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}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PUT ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${output}= Output response Set Suite Variable ${response} ${output} Send Patch request for individual VNF Performance Job - 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}/pm_jobs/${pmJobId} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body}= Get File jsons/PMJobModification.json + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} -Check Postcondition VNF Performance Job is not Created - Log Trying to get a new Pm Job - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${newPmJobId} - ${output}= Output response - Set Suite Variable ${response} ${output} - Check HTTP Response Status Code Is 404 - Check Postcondition VNF Performance Job is Unmodified (Implicit) Log Check Postcondition VNF PM job is not modified GET individual VNF Performance Job diff --git a/SOL002/VNFPerformanceManagement-API/IndividualReport.robot b/SOL002/VNFPerformanceManagement-API/IndividualReport.robot index 9a8f99a2c674618c29cfee19770d6bbec6e72c9c..38845b3bd2dc7f3e5f49c983e4de2d19a022107c 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualReport.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualReport.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/reports.txt Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -11,7 +10,7 @@ Get Individual Performance Report ... Test title: Get Individual Performance Report ... Test objective: The objective is to test the retrieval of an individual VNF performance report associated to a monitoring job and perform a JSON schema validation of the collected report data structure ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM. - ... Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -24,113 +23,110 @@ Get Individual Performance Report with invalid resource endpoint ... Test title: Get Individual Performance Report with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of an individual VNF performance report associated to a monitoring job fails when using an invalid resource endpoint ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM. - ... Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Get Individual Performance Report with invalid resource endpoint Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails POST Individual Performance Report - Method not implemented [Documentation] Test ID: 6.3.3.3.3 ... Test title: POST Individual Performance Report - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new VNF performance report within a monitoring job - ... Pre-conditions: A VNF instance is instantiated. - ... Reference: Clause 6.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 6.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The VNF performance report is not created on the VNFM + ... Post-Conditions: none Send Post request for Individual Performance Report Check HTTP Response Status Code Is 405 - Check Postcondition VNF Individual Performance Report is not Created PUT Individual Performance Report - Method not implemented [Documentation] Test ID: 6.3.3.3.4 ... Test title: PUT Individual Performance Report - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing VNF performance report within a monitoring job - ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM. - ... Reference: Clause 6.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 6.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The VNF performance report is not modified by the operation + ... Post-Conditions: none Send Put request for Individual Performance Report Check HTTP Response Status Code Is 405 - Check Postcondition VNF Individual Performance Report is Unmodified (Implicit) PATCH Individual Performance Report - Method not implemented [Documentation] Test ID: 6.3.3.3.5 ... Test title: PATCH Individual Performance Report - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing VNF performance report within a monitoring job - ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM. - ... Reference: Clause 6.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 6.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The VNF performance report is not modified by the operation + ... Post-Conditions: none Send Patch request for Individual Performance Report Check HTTP Response Status Code Is 405 - Check Postcondition VNF Individual Performance Report is Unmodified (Implicit) DELETE Individual Performance Report - Method not implemented [Documentation] Test ID: 6.3.3.3.6 ... Test title: DELETE Individual Performance Report - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete an existing VNF performance report within a monitoring job - ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM. - ... Reference: Clause 6.4.4.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 6.4.4.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The VNF performance report is not deleted by the operation + ... Post-Conditions: none Send Delete request for Individual Performance Report Check HTTP Response Status Code Is 405 - Check Postcondition VNF Individual Performance Report Exists *** Keywords *** Get Individual Performance Report Log Trying to get a performance report present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} Get Individual Performance Report with invalid resource endpoint Log Trying to get a performance report with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${erroneousReportId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${erroneousReportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for Individual Performance Report Log Trying to create new performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${newReportId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${newReportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for Individual Performance Report Log Trying to update performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PUT ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Patch request for Individual Performance Report Log Trying to update performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for Individual Performance Report Log Trying to delete performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -141,18 +137,10 @@ Check Postcondition VNF Individual Performance Report Exists Check Postcondition VNF Individual Performance Report is not Created Log Trying to get a new report Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${newReportId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${newReportId} ${output}= Output response Set Suite Variable ${response} ${output} - Check HTTP Response Status Code Is 404 - -Check Postcondition VNF Individual Performance Report is Unmodified (Implicit) - Log Check Postcondition VNF PM job is not modified - Get Individual Performance Report - Log Check Response matches original VNF report - ${report}= evaluate json.loads('''${response['body']}''') json - Should Be Equal ${origResponse['body']['entries'][0]['objectInstanceId']} ${report['entries'][0]['objectInstanceId']} Check HTTP Response Status Code Is [Arguments] ${expected_status} diff --git a/SOL002/VNFPerformanceManagement-API/IndividualSubscription.robot b/SOL002/VNFPerformanceManagement-API/IndividualSubscription.robot deleted file mode 100644 index 39acdca29ea3f3c9803b19fa9e65e96589e80167..0000000000000000000000000000000000000000 --- a/SOL002/VNFPerformanceManagement-API/IndividualSubscription.robot +++ /dev/null @@ -1,99 +0,0 @@ -*** Settings *** -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt # Generic Parameters -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Library OperatingSystem -Library JSONLibrary -Resource environment/individualSubscription.txt -Resource VNFPerformanceManagementKeywords.robot - -*** Test Cases *** -GET Individual VNF Performance Subscription - [Documentation] Test ID: 6.3.3.7.1 - ... Test title: GET Individual VNF Performance Subscription - ... Test objective: The objective is to test the retrieval of individual VNF performance subscription and perform a JSON schema and content validation of the returned subscription data structure - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.8.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Get Individual VNF Performance Subscription - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is PmSubscription - Check HTTP Response Body Subscription Identifier matches the requested Subscription - -GET Individual VNF Performance Subscription with invalid resource identifier - [Documentation] Test ID: 6.3.3.7.2 - ... Test title: GET Individual VNF Performance Subscription with invalid resource identifier - ... Test objective: The objective is to test that the retrieval of an individual VNF performance subscription fails when using an invalid resource identifier - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.8.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET individual VNF Performance Subscription with invalid resource identifier - Check HTTP Response Status Code Is 404 - -DELETE Individual VNF Performance Subscription - [Documentation] Test ID: 6.3.3.7.3 - ... Test title: DELETE Individual VNF Performance Subscription - ... Test objective: The objective is to test the deletion of an individual VNF performance subscription - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.8.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: The VNF Performance Subscription is not available anymore in the VNFM - Send Delete request for individual VNF Performance Subscription - Check HTTP Response Status Code Is 204 - Check Postcondition VNF Performance Subscription is Deleted - -DELETE Individual VNF Performance Subscription with invalid resource identifier - [Documentation] Test ID: 6.3.3.7.4 - ... Test title: DELETE Individual VNF Performance Subscription with invalid resource identifier - ... Test objective: The objective is to test that the deletion of an individual VNF performance subscription fails when using an invalid resource identifier - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.8.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Send Delete request for individual VNF Performance Subscription with invalid resource identifier - Check HTTP Response Status Code Is 404 - -POST Individual VNF Performance Subscription - Method not implemented - [Documentation] Test ID: 6.3.3.7.5 - ... Test title: POST Individual VNF Performance Subscription - Method not implemented - ... Test objective: The objective is to test that POST method is not allowed to create a new VNF Performance Subscription - ... Pre-conditions: A VNF instance is instantiated - ... Reference: Clause 6.4.8.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: The VNF Performance Subscription is not created on the VNFM - Send Post request for individual VNF Performance Subscription - Check HTTP Response Status Code Is 405 - Check Postcondition VNF Performance Subscription is not Created - -PUT Individual VNF Performance Subscription - Method not implemented - [Documentation] Test ID: 6.3.3.7.6 - ... Test title: PUT Individual VNF Performance Subscription - Method not implemented - ... Test objective: The objective is to test that PUT method is not allowed to update an existing VNF Performance subscription - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.8.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: The VNF Performance subscription is not modified by the operation - Send Put request for individual VNF Performance Threshold - Check HTTP Response Status Code Is 405 - Check Postcondition VNF Performance Subscription is Unmodified (Implicit) - -PATCH Individual VNF Performance Subscription - Method not implemented - [Documentation] Test ID: 6.3.3.7.7 - ... Test title: PATCH Individual VNF Performance Subscription - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing VNF Performance subscription - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.8.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: The VNF Performance subscription is not modified by the operation - Send Patch request for individual VNF Performance Threshold - Check HTTP Response Status Code Is 405 - Check Postcondition VNF Performance Subscription is Unmodified (Implicit) \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot b/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot index 1a68cdce9f44f0d19583cfa4b1e962ce4316dbbc..cab48da3d3caf3ed0d297de33f4be5777c10983e 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot @@ -4,7 +4,6 @@ Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library OperatingSystem -Resource environment/individualThresholds.txt *** Test Cases *** GET Individual Threshold @@ -12,7 +11,7 @@ GET Individual Threshold ... Test title: GET Individual Threshold ... Test objective: The objective is to test the retrieval of an individual VNF performance threshold and perform a JSON schema and content validation of the collected threshold data structure ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -26,19 +25,20 @@ GET Individual Threshold with invalid resource identifier ... Test title: GET Individual Threshold with invalid resource identifier ... Test objective: The objective is to test that the retrieval of an individual VNF performance threshold fails when using an invalid resource identifier ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none GET individual VNF Performance Threshold with invalid resource identifier Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails DELETE Individual Threshold [Documentation] Test ID: 6.3.3.5.3 ... Test title: DELETE Individual Threshold ... Test objective: The objective is to test the deletion of an individual VNF performance threshold ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Threshold is not available anymore in the VNFM @@ -51,109 +51,122 @@ DELETE Individual Threshold with invalid resource identifier ... Test title: DELETE Individual Threshold with invalid resource identifier ... Test objective: The objective is to test the deletion of an individual VNF performance threshold ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Send Delete request for individual VNF Performance Threshold with invalid resource identifier Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails POST Individual Threshold - Method not implemented [Documentation] Test ID: 6.3.3.5.5 ... Test title: POST Individual Threshold - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new VNF Performance Threshold - ... Pre-conditions: A VNF instance is instantiated - ... Reference: Clause 6.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 6.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Threshold is not created on the VNFM Send Post request for individual VNF Performance Threshold Check HTTP Response Status Code Is 405 - Check Postcondition VNF Performance Threshold is not Created PUT Individual Threshold - Method not implemented [Documentation] Test ID: 6.3.3.5.6 ... Test title: PUT Individual Threshold - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing VNF Performance threshold - ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.6.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 6.4.6.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The VNF Performance Threshold is not modified by the operation + ... Post-Conditions: none Send Put request for individual VNF Performance Threshold Check HTTP Response Status Code Is 405 - Check Postcondition VNF Performance Threshold is Unmodified (Implicit) -PATCH Individual Threshold - Method not implemented +PATCH Individual Threshold [Documentation] Test ID: 6.3.3.5.7 - ... Test title: PATCH Individual Threshold - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing VNF Performance threshold + ... Test title: PATCH Individual Threshold + ... Test objective: The objective is to test that PATCH method allows to modify an Individual threshold resource. ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Threshold is not modified by the operation Send Patch request for individual VNF Performance Threshold - Check HTTP Response Status Code Is 405 + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ThresholdModifications + +PATCH Individual Threshold - Precondition failed + [Documentation] Test ID: 6.3.3.5.8 + ... Test title: PATCH Individual Threshold - Preconition failed + ... Test objective: The objective is to attempt to modify an individual threshold resource, where the precondition was not met. + ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. + ... Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: The VNF Performance Job is not modified by the operation + Send Patch request for individual VNF Performance Threshold + Check HTTP Response Status Code Is 412 + Check HTTP Response Body Json Schema Is ProblemDetails Check Postcondition VNF Performance Threshold is Unmodified (Implicit) *** Keywords *** GET Individual VNF Performance Threshold Log Trying to get a Threhsold present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} GET individual VNF Performance Threshold with invalid resource identifier Log Trying to get a Threhsold with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${erroneousThresholdId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${erroneousThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Threshold Log Trying to delete a Threhsold in the VNFM - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Threshold with invalid resource identifier Log Trying to delete a Threhsold in the VNFM with invalid id - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds/${erroneousThresholdId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${erroneousThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual VNF Performance Threshold Log Trying to create new threshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/thresholds/${newThresholdId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${newThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for individual VNF Performance Threshold Log Trying to PUT threshold Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PUT ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Patch request for individual VNF Performance Threshold Log Trying to PUT threshold Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PATCH ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -164,15 +177,6 @@ Check Postcondition VNF Performance Threshold is Unmodified (Implicit) ${threshold}= evaluate json.loads('''${response['body']}''') json Should Be Equal ${origresponse['body']['id']} ${threshold.id} Should Be Equal ${origresponse['body']['criteria']} ${threshold.criteria} - -Check Postcondition VNF Performance Threshold is not Created - Log Trying to get a new Threshold - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${newThresholdId} - ${output}= Output response - Set Suite Variable ${response} ${output} - Check HTTP Response Status Code Is 404 Check Postcondition VNF Performance Threshold is Deleted Log Check Postcondition Threshold is deleted diff --git a/SOL002/VNFPerformanceManagement-API/NotificationEndpoint.robot b/SOL002/VNFPerformanceManagement-API/NotificationEndpoint.robot new file mode 100644 index 0000000000000000000000000000000000000000..2d557051e46ab62efd224b801cdde84e1b202f47 --- /dev/null +++ b/SOL002/VNFPerformanceManagement-API/NotificationEndpoint.robot @@ -0,0 +1,71 @@ +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Library JSONLibrary +Library OperatingSystem +Library String +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +VNF Performance Information Availability Notification + [Documentation] Test ID: 6.3.3.10.1 + ... Test title: VNF Performance Information Availability Notification + ... Test objective: The objective is to test that VNF Performance Information Availability Notification is delivered with success to the notification consumer + ... Pre-conditions: A VNF performance job is created, and a subscription for information availability notifications is available in the VNFM. + ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post VNF Performance Information Availability Notification + Check HTTP Response Status Code Is 204 + +VNF Threshold Crossed Notification + [Documentation] Test ID: 6.3.3.10.2 + ... Test title: VNF Threshold Crossed Notification + ... Test objective: The objective is to test that VNF Threshold Crossed Notification is delivered with success to the notification consumer + ... Pre-conditions: A VNF performance job is created, and a subscription for Threshold Crossed Notification is available in the VNFM. + ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post VNF Threshold Crossed Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} + Integer response status 200 + Validate Json response body PmJob.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + ${status}= Convert To Integer ${expected_status} + Should Be Equal ${response['status']} ${status} + Log Status code validated + +Post VNF Performance Information Availability Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/PerformanceInformationAvaliableNotification.json + ${body}= Format String ${template} objectInstanceId=${objectInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post VNF Threshold Crossed Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/ThresholdCrossedNotification.json + ${body}= Format String ${template} thresholdId=${thresholdId} objectInstanceId=${objectInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} diff --git a/SOL002/VNFPerformanceManagement-API/PMJobs.robot b/SOL002/VNFPerformanceManagement-API/PMJobs.robot index 577623b1567b0894a798f15b31b59d3d22c15841..4c976169a81beecb500c55e6bc6e740eb2ee56c3 100644 --- a/SOL002/VNFPerformanceManagement-API/PMJobs.robot +++ b/SOL002/VNFPerformanceManagement-API/PMJobs.robot @@ -4,7 +4,6 @@ Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library OperatingSystem Library String -Resource environment/pmJobs.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false *** Test Cases *** @@ -13,21 +12,20 @@ GET all VNF Performance Monitoring Jobs ... Test title: GET all VNF Performance Monitoring Jobs ... Test objective: The objective is to test the retrieval of all the available VNF performance monitoring jobs and perform a JSON schema and content validation of the collected jobs data structure ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none GET all VNF Performance Monitoring Jobs Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is PmJobs - Check HTTP Response Body Does Not Contain reports GET VNF Performance Monitoring Jobs with attribute-based filter [Documentation] Test ID: 6.3.3.1.2 ... Test title: GET all VNF Performance Monitoring Jobs with attribute-based filter ... Test objective: The objective is to test the retrieval of VNF performance monitoring jobs using attribute-based filter, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued attribute-based filter ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -41,7 +39,7 @@ GET all VNF Performance Monitoring Jobs with all_fields attribute selector ... Test title: GET all VNF Performance Monitoring Jobs with all_fields attribute selector ... Test objective: The objective is to test the retrieval of all VNF performance monitoring jobs all_fields attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued all_fileds selector ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 4.3.3.2.1, 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 4.3.3.2.1, 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -55,7 +53,7 @@ GET all VNF Performance Monitoring Jobs with exclude_default attribute selector ... Test title: GET all VNF Performance Monitoring Jobs with exclude_default attribute selector ... Test objective: The objective is to test the retrieval of all VNF performance monitoring jobs exclude_default attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued exclude_default selector ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 4.3.3.2.1, 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 4.3.3.2.1, 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -69,7 +67,7 @@ GET all VNF Performance Monitoring Jobs with fields attribute selector ... Test title: GET all VNF Performance Monitoring Jobs with fields attribute selector ... Test objective: The objective is to test the retrieval of all VNF performance monitoring jobs fields attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued fields selector ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 4.3.3.2.1, 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 4.3.3.2.1, 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNFM supports the use of exclude_fields attribute selector ... Post-Conditions: none @@ -83,7 +81,7 @@ GET all VNF Performance Monitoring Jobs with exclude_fields attribute selector ... Test title: GET all VNF Performance Monitoring Jobs with exclude_fields attribute selector ... Test objective: The objective is to test the retrieval of all VNF performance monitoring jobs exclude_fields attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued exclude_fields selector ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 4.3.3.2.1, 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 4.3.3.2.1, 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNFM supports the use of exclude_fields attribute selector ... Post-Conditions: none @@ -97,7 +95,7 @@ GET VNF Performance Monitoring Jobs with invalid attribute-based filter ... Test title: GET VNF Performance Monitoring Jobs with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of VNF performance monitoring jobs fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -110,7 +108,7 @@ GET VNF Performance Monitoring Jobs with invalid resource endpoint ... Test title: GET VNF Performance Monitoring Jobs with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of VNF performance monitoring jobs fails when using invalid resource endpoint, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -123,7 +121,7 @@ Create new VNF Performance Monitoring Job ... Test title: Create a new VNF Performance Monitoring Job ... Test objective: The objective is to test the creation of a new VNF performance monitoring job and perform the JSON schema validation of the returned job data structure ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Job is successfully created on the VNFM @@ -136,20 +134,20 @@ PUT all VNF Performance Monitoring Jobs - Method not implemented [Documentation] Test ID: 6.3.3.1.10 ... Test title: PUT all VNF Performance Monitoring Jobs - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify VNF Performance Monitoring Jobs - ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none Send PUT Request for all VNF Performance Monitoring Jobs Check HTTP Response Status Code Is 405 -PATCH all VNF Performance Monitoring Jobs - (Method not implemented) +PATCH all VNF Performance Monitoring Jobs - Method not implemented [Documentation] Test ID: 6.3.3.1.11 ... Test title: PATCH all VNF Performance Monitoring Jobs - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update VNF Performance Monitoring Jobs - ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -160,34 +158,33 @@ DELETE all VNF Performance Monitoring Jobs - Method not implemented [Documentation] Test ID: 6.3.3.1.12 ... Test title: DELETE all VNF Performance Monitoring Jobs - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to update VNF Performance Monitoring Jobs - ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none Send PATCH Request for all VNF Performance Monitoring Jobs Check HTTP Response Status Code Is 405 - Check Postcondition VNF Performance Monitoring Jobs Exist GET VNF Performance Monitoring Jobs to get Paged Response [Documentation] Test ID: 6.3.3.1.13 ... Test title: GET VNF Performance Monitoring Jobs to get Paged Response ... Test objective: The objective is to test the retrieval of VNF performance monitoring jobs to get Paged response. ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none GET all VNF Performance Monitoring Jobs Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link GET VNF Performance Monitoring Jobs for Bad Request Response too big [Documentation] Test ID: 6.3.3.1.14 ... Test title: GET VNF Performance Monitoring Jobs for Bad Request Response too big ... Test objective: The objective is to test that GET method fail retrieving status information about VNF Performance Monitoring when Response is too big, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -195,37 +192,48 @@ GET VNF Performance Monitoring Jobs for Bad Request Response too big Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails - +GET all VNF Performance Monitoring Jobs with exclude_default and fields attribute selector + [Documentation] Test ID: 6.3.3.1.15 + ... Test title: GET all VNF Performance Monitoring Jobs with exclude_default and fields attribute selector + ... Test objective: The objective is to test the retrieval of all VNF performance monitoring jobs with exclude_default and fields attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued exclude_default selector + ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. + ... Reference: Clause 4.3.3.2.1, 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET VNF Performance Monitoring Jobs with exclude_default and fields attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJobs *** Keywords *** GET all VNF Performance Monitoring Jobs Log Trying to get all PM Jobs present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} GET VNF Performance Monitoring Jobs with attribute-based filter Log Trying to get all PM Jobs present in the VNFM, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?${POS_FILTER} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?${POS_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} GET VNF Performance Monitoring Jobs with all_fields attribute selector Log Trying to get all PM Jobs present in the VNFM, using 'all_fields' filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?all_fields + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?all_fields ${output}= Output response Set Suite Variable ${response} ${output} GET VNF Performance Monitoring Jobs with exclude_default attribute selector Log Trying to get all VNF Packages present in the VNFM, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -233,8 +241,16 @@ GET VNF Performance Monitoring Jobs with fields attribute selector Log Trying to get all VNF Packages present in the VNFM, using filter params Pass Execution If ${FIELD_USAGE} == 0 Skipping test as VNFM is not supporting 'fields' Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?fields=${fields} + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET VNF Performance Monitoring Jobs with exclude_default and fields attribute selector + Log Trying to get all VNF Packages present in the VNFM, using filter params + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?fields=${fields}&exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -242,24 +258,24 @@ GET VNF Performance Monitoring Jobs with exclude_fields attribute selector Log Trying to get all VNF Packages present in the VNFM, using filter params Pass Execution If ${FIELD_USAGE} == 0 Skipping test as VNFM is not supporting 'fields' Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} GET VNF Performance Monitoring Jobs with invalid attribute-based filter Log Trying to get all PM Jobs present in the VNFM, using an erroneous filter param Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?${NEG_FILTER} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?${NEG_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} GET VNF Performance Monitoring Jobs 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}/pm_job # wrong URI /pm_job instead of /pm_jobs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_job # wrong URI /pm_job instead of /pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} @@ -267,45 +283,42 @@ Send Post Request Create new VNF Performance Monitoring Job Log Creating a new PM Job Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/CreatePmJobRequest.json - POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/CreatePmJobRequest.json + ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} callback_uri=${callback_uri}:${callback_port} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${body} ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for all VNF Performance Monitoring Jobs 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}/pm_jobs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for all VNF Performance Monitoring Jobs 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}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for all VNF Performance Monitoring Jobs 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}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} - -Check Postcondition VNF Performance Monitoring Jobs Exist - Log Checking that Pm Job still exists - GET all VNF Performance Monitoring Jobs Check Postcondition PmJob Exists Log Checking that Pm Job exists Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${response['body']['id']} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 200 @@ -352,14 +365,8 @@ Check HTTP Response Body Matches all_fields selector Check HTTP Response Body Matches filter Log Checking that attribute-based filter is matched - @{words} = Split String ${POS_FILTER} ,${SEPERATOR} + @{words} = Split String ${POS_FILTER} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['objectInstanceIds']} @{words}[1] - -Check HTTP Response Body Does Not Contain reports - Log Checking that field element is missing - ${reports}= Get Value From Json ${response['body']} $..reports - Should Be Empty ${reports} - Log Reports element is empty as expected Check HTTP Response Status Code Is [Arguments] ${expected_status} @@ -382,8 +389,6 @@ Check HTTP Response Body Json Schema Is Validate Json ${schema} ${response['body']} Log Json Schema Validation OK -Check LINK in Header +Check HTTP Response Header Contain Link ${linkURL}= Get Value From Json ${response['headers']} $..Link - Should Not Be Empty ${linkURL} - - + Should Not Be Empty ${linkURL} \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/Subscriptions.robot b/SOL002/VNFPerformanceManagement-API/Subscriptions.robot deleted file mode 100644 index 11c7f53ada2f498c652459316d006e39ffade5ca..0000000000000000000000000000000000000000 --- a/SOL002/VNFPerformanceManagement-API/Subscriptions.robot +++ /dev/null @@ -1,176 +0,0 @@ -*** Settings *** -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt # Generic Parameters -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Library OperatingSystem -Library JSONLibrary -Resource VNFPerformanceManagementKeywords.robot -Resource environment/subscriptions.txt -Library MockServerLibrary -Library Process -Suite Setup Create Sessions -Suite Teardown Terminate All Processes kill=true - -*** Test Cases *** -GET all VNF Performance Subscriptions - [Documentation] Test ID: 6.3.3.6.1 - ... Test title: GET all VNF Performance Subscriptions - ... Test objective: The objective is to test the retrieval of all VNF performance subscriptions and perform a JSON schema validation of the returned subscriptions data structure - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Get all VNF Performance Subscriptions - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is PmSubscriptions - -GET VNF Performance Subscriptions with attribute-based filter - [Documentation] Test ID: 6.3.3.6.2 - ... Test title: GET VNF Performance Subscriptions with attribute-based filter - ... Test objective: The objective is to test the retrieval of VNF performance subscriptions using attribute-based filter, perform a JSON schema validation of the collected indicators data structure, and verify that the retrieved information matches the issued attribute-based filters - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Get VNF Performance Subscriptions with attribute-based filters - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is PmSubscriptions - Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter - -GET VNF Performance Management Subscriptions with invalid attribute-based filter - [Documentation] Test ID: 6.3.3.6.3 - ... Test title: GET VNF Performance Management Subscriptions with invalid attribute-based filter - ... Test objective: The objective is to test that the retrieval of VNF performance subscriptions fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response. - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Get VNF Performance Subscriptions with invalid attribute-based filters - Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails - -GET VNF Performance Subscriptions with invalid resource endpoint - [Documentation] Test ID: 6.3.3.6.4 - ... Test title: GET VNF Performance Subscriptions with invalid resource endpoint - ... Test objective: The objective is to test that the retrieval of all VNF performance subscriptions fails when using invalid resource endpoint. - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Get VNF Performance Subscriptions with invalid resource endpoint - Check HTTP Response Status Code Is 404 - -Create new VNF Performance subscription - [Documentation] Test ID: 6.3.3.6.5 - ... Test title: Create new VNF Performance subscription - ... Test objective: The objective is to test the creation of a new VNF performance subscription and perform a JSON schema and content validation of the returned subscription data structure - ... Pre-conditions: A VNF instance is instantiated. - ... Reference: Clause 6.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: The VNF performance subscription is successfully set and it matches the issued 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 PmSubscription Attributes Values Match the Issued Subscription - Check Postcondition VNF Performance Subscription Is Set - - -Create duplicated VNF Performance subscription with VNFM not creating duplicated subscriptions - [Tags] no-duplicated-subs - [Documentation] Test ID: 6.3.3.6.6 - ... Test title: Create duplicated VNF Performance subscription with VNFM not creating duplicated subscriptions - ... Test objective: The objective is to test the attempt of a creation of a duplicated VNF performance subscription and check that no new subscription is created by the VNFM and a link to the original subscription is returned - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: The VNFM does not support the creation of duplicated subscriptions - ... Post-Conditions: The existing VNF performance subscription returned is available in the VNFM - Send Post Request for Duplicated VNF Performance Subscription - Check HTTP Response Status Code Is 303 - Check HTTP Response Body Is Empty - Check HTTP Response Header Contains Location - Check Postcondition Subscription Resource Returned in Location Header Is Available - -Create duplicated VNF Performance subscription with VNFM creating duplicated subscriptions - [Tags] duplicated-subs - [Documentation] Test ID: 6.3.3.6.7 - ... Test title: Create duplicated VNF Performance subscription with VNFM creating duplicated subscriptions - ... Test objective: The objective is to test the creation of a duplicated VNF performance subscription and perform a JSON schema and content validation of the returned duplicated subscription data structure - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: The VNFM supports the creation of duplicated subscriptions - ... Post-Conditions: The duplicated VNF performance subscription is successfully set and it matches the issued subscription - 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 PmSubscription Attributes Values Match the Issued Subscription - Check Postcondition VNF Performance Subscription Is Set - -PUT VNF Performance Subscriptions - Method not implemented - [Documentation] Test ID: 6.3.3.6.8 - ... Test title: PUT VNF Performance Subscriptions - Method not implemented - ... Test objective: The objective is to test that PUT method is not allowed to modify VNF performance subscriptions - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Send Put Request for VNF Performance Subscriptions - Check HTTP Response Status Code Is 405 - -PATCH VNF Performance Subscriptions - Method not implemented - [Documentation] Test ID: 6.3.3.6.9 - ... Test title: PATCH VNF Performance Subscriptions - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to update VNF performance subscriptions - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Send Patch Request for VNF Performance Subscriptions - Check HTTP Response Status Code Is 405 - -DELETE VNF Performance Subscriptions - Method not implemented - [Documentation] Test ID: 6.3.3.6.10 - ... Test title: DELETE VNF Performance Subscriptions - Method not implemented - ... Test objective: The objective is to test that DELETE method is not allowed to delete VNF performance subscriptions - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: The VNF performance subscriptions are not deleted by the failed operation - Send Delete Request for VNF Performance Subscriptions - Check HTTP Response Status Code Is 405 - Check Postcondition VNF Performance Subscriptions Exists - -GET VNF Performance Subscriptions to get Paged Response - [Documentation] Test ID: 6.3.3.6.11 - ... Test title: GET VNF Performance Subscriptions to get Paged Response - ... Test objective: The objective is to test the retrieval of all VNF performance subscriptions to get Paged Response - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Get all VNF Performance Subscriptions - Check HTTP Response Status Code Is 200 - Check LINK in Header - -GET VNF Performance Management Subscriptions for Bad Request Response too big - [Documentation] Test ID: 6.3.3.6.12 - ... Test title: GET VNF Performance Management Subscriptions for Bad Request Response too big - ... Test objective: The objective is to test that the retrieval of VNF performance subscriptions fails when response is too big, and perform the JSON schema validation of the failed operation HTTP response. - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Get VNF Performance Subscriptions with invalid attribute-based filters - Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL002/VNFPerformanceManagement-API/Thresholds.robot b/SOL002/VNFPerformanceManagement-API/Thresholds.robot index 50552ec4f6393fef8355c172c7bd8f2a1b627431..474f0200265b64689accbfeb1179c85e720d9b1c 100644 --- a/SOL002/VNFPerformanceManagement-API/Thresholds.robot +++ b/SOL002/VNFPerformanceManagement-API/Thresholds.robot @@ -4,7 +4,6 @@ Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library String Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Resource environment/thresholds.txt Library OperatingSystem *** Test Cases *** @@ -13,7 +12,7 @@ GET All Performance Thresholds ... Test title: GET All Performance Thresholds ... Test objective: The objective is to test the retrieval of all the available VNF performance thresholds and perform a JSON schema validation of the collected thresholds data structure ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -26,7 +25,7 @@ GET Performance Thresholds with attribute-based filter ... Test title: GET Performance Thresholds with attribute-based filter ... Test objective: The objective is to test the retrieval of all the available VNF performance thresholds when using attribute-based filters, perform a JSON schema validation of the collected thresholds data structure, and verify that the retrieved information matches the issued attribute-based filter ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -40,19 +39,20 @@ GET Performance Thresholds with invalid attribute-based filter ... Test title: GET Performance Thresholds with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of VNF performance thresholds fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none GET Performance Thresholds with invalid attribute-based filter Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails GET Performance Thresholds with invalid resource endpoint [Documentation] Test ID: 6.3.3.4.4 ... Test title: GET Performance Thresholds with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of VNF performance thresholds fails when using invalid resource endpoint, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -65,7 +65,7 @@ Create new Performance Threshold ... Test title: Create new Performance Threshold ... Test objective: The objective is to test the creation of a new VNF performance threshold and perform the JSON schema validation of the returned threshold data structure ... Pre-conditions: A VNF instance is instantiated. - ... Reference: Clause 6.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Threshold is successfully created on the VNFM @@ -79,8 +79,8 @@ PUT Performance Thresholds - Method not implemented [Documentation] Test ID: 6.3.3.4.6 ... Test title: PUT Performance Thresholds - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify VNF Performance Thresholds - ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNF. - ... Reference: Clause 6.4.5.3.3 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 6.4.5.3.3 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -91,8 +91,8 @@ PATCH Performance Thresholds - Method not implemented [Documentation] Test ID: 6.3.3.4.7 ... Test title: PATCH Performance Thresholds - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify VNF Performance Thresholds - ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.4 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 6.4.5.3.4 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -103,34 +103,33 @@ DELETE Performance Thresholds - Method not implemented [Documentation] Test ID: 6.3.3.4.8 ... Test title: DELETE Performance Thresholds - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to update VNF Performance Thresholds - ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.5 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 6.4.5.3.5 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The VNF performance thresholds are not deleted by the failed operation + ... Post-Conditions: none Send DELETE Request for all Performance Thresholds Check HTTP Response Status Code Is 405 - Check Postcondition Thresholds Exist GET Performance Thresholds with Paged Response [Documentation] Test ID: 6.3.3.4.9 ... Test title: GET Performance Thresholds with Paged Response ... Test objective: The objective is to test the retrieval of all the available VNF performance thresholds with Paged response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none GET all Performance Thresholds Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link GET Performance Thresholds for Bad Request Response too big [Documentation] Test ID: 6.3.3.4.10 ... Test title: GET Performance Thresholds for Bad Request Response too big ... Test objective: The objective is to test that the retrieval of VNF performance thresholds fails when response is too big, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -142,79 +141,76 @@ GET Performance Thresholds for Bad Request Response too big GET all Performance Thresholds Log Trying to get all thresholds present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} GET Performance Thresholds with attribute-based filter Log Trying to get thresholds present in the VNFM with filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_OK} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds?${FILTER_OK} ${output}= Output response Set Suite Variable ${response} ${output} GET Performance Thresholds with invalid attribute-based filter Log Trying to get thresholds present in the VNFM with invalid filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_KO} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds?${FILTER_KO} ${output}= Output response Set Suite Variable ${response} ${output} GET VNF Performance Thresholds with invalid resource endpoint Log Trying to get thresholds present in the VNFM with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/threshold + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/threshold ${output}= Output response Set Suite Variable ${response} ${output} Send Post Request Create new Performance Threshold Log Creating a new THreshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${request}= Get File jsons/CreateThresholdRequest.json - POST ${apiRoot}/${apiName}/${apiVersion}/thresholds ${request} + ${template}= Get File jsons/CreateThresholdRequest.json + ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} callback_uri=${callback_uri}:${callback_port} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${body} ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for all Performance Thresholds Log PUT THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/thresholds + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for all Performance Thresholds Log PUT THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/thresholds + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for all Performance Thresholds Log DELETE THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} - -Check Postcondition Thresholds Exist - Log Checking that Thresholds still exists - GET all Performance Thresholds Check Postcondition Threshold Exists Log Checking that Threshold exists Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${response['body']['id']} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 200 @@ -222,7 +218,7 @@ Check Postcondition Threshold Exists Check HTTP Response Body Thresholds match the requested attribute-based filter Log Checking that attribute-based filter is matched - @{words} = Split String ${FILTER_OK} ,${SEPERATOR} + @{words} = Split String ${FILTER_OK} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['objectInstanceId']} @{words}[1] Check HTTP Response Status Code Is @@ -242,7 +238,7 @@ Check HTTP Response Body Json Schema Is Validate Json ${schema} ${response['body']} Log Json Schema Validation OK -Check LINK in Header +Check HTTP Response Header Contain Link ${linkURL}= Get Value From Json ${response['headers']} $..Link Should Not Be Empty ${linkURL} diff --git a/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot b/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot index f131a7216dabe157583c6bce2608ce869e2626bd..a5e14818d05d7daa5e00898a6c7d2df4211ad173 100644 --- a/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot +++ b/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot @@ -1,7 +1,7 @@ *** Settings *** +Library String Resource environment/variables.txt -Resource environment/subscriptions.txt -Resource environment/individualSubscription.txt + Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library MockServerLibrary Library OperatingSystem @@ -12,6 +12,7 @@ Library JSONSchemaLibrary schemas/ Library Process *** Keywords *** + Get all VNF Performance Subscriptions [Documentation] The client can use this method to query the list of active subscriptions to Performance management notifications ... subscribed by the client. @@ -19,8 +20,8 @@ Get all VNF Performance Subscriptions ... request and response data structures, and response codes. Set headers {"Accept": "application/json"} Set headers {"Content-Type": "application/json"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} # Integer response status 200 @@ -38,8 +39,8 @@ Get all VNF Performance Subscriptions ... This method shall follow the provisions specified in the tables 6.4.7.3.2-1 and 6.4.7.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ok} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${filter_ok} ${output}= Output response Set Suite Variable ${response} ${output} # Integer response status 200 @@ -58,8 +59,8 @@ Get VNF Performance Subscriptions with invalid attribute-based filters ... This method shall follow the provisions specified in the tables 6.4.7.3.2-1 and 6.4.7.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ko} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${filter_ko} ${output}= Output response Set Suite Variable ${response} ${output} # Integer response status 400 @@ -77,8 +78,8 @@ Get VNF Performance Subscriptions with invalid resource endpoint ... This method shall follow the provisions specified in the tables 6.4.7.3.2-1 and 6.4.7.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscription + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscription ${output}= Output response Set Suite Variable ${response} ${output} # Integer response status 404 @@ -103,9 +104,9 @@ Send Post Request for VNF Performance Subscription ... the existing subscription resource with the same filter and callbackUri). Set headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body_request}= Get File jsons/subscriptions.json - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body_request} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body_request} ${output}= Output response Set Suite Variable ${response} ${output} Run Keyword If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 1 @@ -134,9 +135,9 @@ Send Post Request for Duplicated VNF Performance Subscription ... the existing subscription resource with the same filter and callbackUri). Set headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body_request}= Get File jsons/subscriptions.json - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body_request} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body_request} ${output}= Output response Set Suite Variable ${response} ${output} # Integer response status 303 @@ -155,8 +156,8 @@ Send Post Request for Duplicated VNF Performance Subscription Send Put Request for VNF Performance Subscriptions [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in Clause 4.3.5.4. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} # Integer response status 405 @@ -165,8 +166,8 @@ Send Put Request for VNF Performance Subscriptions Send Patch Request for VNF Performance Subscriptions [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in Clause 4.3.5.4. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} # Integer response status 405 @@ -175,8 +176,8 @@ Send Patch Request for VNF Performance Subscriptions Send Delete Request for VNF Performance Subscriptions [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in Clause 4.3.5.4. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} # Integer response status 405 @@ -184,53 +185,53 @@ Send Delete Request for VNF Performance Subscriptions Get Individual VNF Performance Subscription Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} GET individual VNF Performance Subscription with invalid resource identifier Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Subscription Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Subscription with invalid resource identifier Log Trying to delete a subscription in the VNFM with invalid id - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual VNF Performance Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${newSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for individual VNF Performance Threshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Patch request for individual VNF Performance Threshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -245,8 +246,8 @@ Check Postcondition VNF Performance Subscription is Unmodified (Implicit) Check Postcondition VNF Performance Subscription is not Created Log Trying to get a new subscription Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${newSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 404 @@ -294,7 +295,7 @@ Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subsc Check Postcondition VNF Performance Subscription Is Set Log Check Postcondition subscription exist Set Headers {"Accept": "${ACCEPT_JSON}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${response['body']['id']} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 200 diff --git a/SOL002/VNFPerformanceManagement-API/environment/IndividualPmJob.txt b/SOL002/VNFPerformanceManagement-API/environment/IndividualPmJob.txt deleted file mode 100644 index 3fc3b0a0d34511aefb0fbcee8253825cc63f638a..0000000000000000000000000000000000000000 --- a/SOL002/VNFPerformanceManagement-API/environment/IndividualPmJob.txt +++ /dev/null @@ -1,6 +0,0 @@ -*** Variables *** -${pmJobId} 29f4ff6a-be91-4ec8-856e-fcf1e2479e4e -${erroneousPmJobId} erroneousPmJobId -${newPmJobId} newPmJobId -${response}= httpresponse -${OrigResponse}= httpresponse diff --git a/SOL002/VNFPerformanceManagement-API/environment/individualSubscription.txt b/SOL002/VNFPerformanceManagement-API/environment/individualSubscription.txt deleted file mode 100644 index 921749ffd1726c7f1581a28b0b27bb85cf06c63e..0000000000000000000000000000000000000000 --- a/SOL002/VNFPerformanceManagement-API/environment/individualSubscription.txt +++ /dev/null @@ -1,6 +0,0 @@ -*** Variables *** -${subscriptionId} 17563e75-0e14-4bd7-94b4-6bbb869c79aa -${erroneousSubscriptionId} erroneousSubscriptionId -${newSubscriptionId} newSubsciptionId -${response} httpresponse -${origResponse} httpresponse \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/environment/individualThresholds.txt b/SOL002/VNFPerformanceManagement-API/environment/individualThresholds.txt deleted file mode 100644 index 1efba79c6e00a105cad4aadd6afad956a538aece..0000000000000000000000000000000000000000 --- a/SOL002/VNFPerformanceManagement-API/environment/individualThresholds.txt +++ /dev/null @@ -1,6 +0,0 @@ -*** Variables *** -${thresholdId} 1f50d68b-82e8-4deb-bd40-c934d4d1ac0a -${erroneousThresholdId} erroneousThresholdId -${newThresholdId} newThresholdId -${response}= httpresponse -${origResponse}= httpresponse \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/environment/pmJobs.txt b/SOL002/VNFPerformanceManagement-API/environment/pmJobs.txt deleted file mode 100644 index f1675679ea49b7e4deb60fa76129a081f6390f25..0000000000000000000000000000000000000000 --- a/SOL002/VNFPerformanceManagement-API/environment/pmJobs.txt +++ /dev/null @@ -1,6 +0,0 @@ -*** Variables *** -${POS_FILTER} objectInstanceIds=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a -${NEG_FILTER} criteriaPmJob=erroneousAttributeName -${fields} criteria,reports -${response}= httpresponse -${SEPERATOR} = \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/environment/reports.txt b/SOL002/VNFPerformanceManagement-API/environment/reports.txt deleted file mode 100644 index 6ac5f7c0b020825db1e44161c95118d9b08b5dbd..0000000000000000000000000000000000000000 --- a/SOL002/VNFPerformanceManagement-API/environment/reports.txt +++ /dev/null @@ -1,7 +0,0 @@ -*** Variables *** -${pmJobId} 1f50d68b-82e8-4deb-bd40-c934d4d1ac0a -${reportId} 0fb4c875-e07f-46ca-a9dd-13907667a568 -${erroneousReportId} erroneousReportId -${newReportId} newReportId -${response}= httpresponse -${OrigResponse}= httpresponse diff --git a/SOL002/VNFPerformanceManagement-API/environment/subscriptions.txt b/SOL002/VNFPerformanceManagement-API/environment/subscriptions.txt deleted file mode 100644 index c490457435c0921e84a9db9f27ceab2a016c3a82..0000000000000000000000000000000000000000 --- a/SOL002/VNFPerformanceManagement-API/environment/subscriptions.txt +++ /dev/null @@ -1,8 +0,0 @@ -*** Variables *** -${callbackUri_Sub} http://172.22.1.7:9091/vnfpm/subscriptions -${filter_ok} callbackUri=${callbackUri_Sub} -${filter_ko} erroneousFilter=erroneous -${total_polling_time} 2 min -${polling_interval} 10 sec -${response} httpresponse - diff --git a/SOL002/VNFPerformanceManagement-API/environment/thresholds.txt b/SOL002/VNFPerformanceManagement-API/environment/thresholds.txt deleted file mode 100644 index b044c053e51e52eb43e06a93fedc37982fc1632c..0000000000000000000000000000000000000000 --- a/SOL002/VNFPerformanceManagement-API/environment/thresholds.txt +++ /dev/null @@ -1,5 +0,0 @@ -*** Variables *** -${FILTER_OK} objectInstanceId=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a -${FILTER_KO} criterias=erroneousFilter -${response}= httpresponse -${SEPERATOR} = \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/environment/variables.txt b/SOL002/VNFPerformanceManagement-API/environment/variables.txt index 1b6fb6dbc341eed0b9e5665f7e3a669ecdb26735..c71b69f3269bf79c92c335386939e902d17d71dd 100644 --- a/SOL002/VNFPerformanceManagement-API/environment/variables.txt +++ b/SOL002/VNFPerformanceManagement-API/environment/variables.txt @@ -4,7 +4,7 @@ ${VNFM_PORT} 8080 # Listening port of the VNFM ${VNFM_SCHEMA} https ${apiRoot} / -${apiVersion} v1 +${apiMajorVersion} v2 ${apiName} vnfpm @@ -12,7 +12,8 @@ ${CONTENT_TYPE_JSON} application/json ${ACCEPT_JSON} application/json ${NEG_AUTHORIZATION} Bearer negativetoken ${FIELD_USAGE} 1 -${AUTHORIZATION} Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${AUTH_USAGE} 1 ${VNFM_DUPLICATION} 1 ${VNFM_CHECKS_NOTIF_ENDPOINT} 1 @@ -23,4 +24,46 @@ ${callback_endpoint_error} /endpoint_404 ${sleep_interval} 20s ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar -${response} http-response \ No newline at end of file +${response} http-response + +${objectInstanceIds} 1f50d68b-82e8-4deb-bd40-c934d4d1ac0a + +${subscribe} /subscribe + + + +${pmJobId} 29f4ff6a-be91-4ec8-856e-fcf1e2479e4e +${erroneousPmJobId} erroneousPmJobId +${newPmJobId} newPmJobId +${OrigResponse}= httpresponse + +${thresholdId} 1f50d68b-82e8-4deb-bd40-c934d4d1ac0a +${erroneousThresholdId} erroneousThresholdId +${newThresholdId} newThresholdId + +${POS_FILTER} objectInstanceIds=${objectInstanceIds} +${NEG_FILTER} criteriaPmJob=erroneousAttributeName +${fields} criteria,reports +${SEPARATOR} = + +${reportId} 0fb4c875-e07f-46ca-a9dd-13907667a568 +${erroneousReportId} erroneousReportId +${newReportId} newReportId + + +${FILTER_OK} objectInstanceId=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a +${FILTER_KO} criterias=erroneousFilter + +${subscriptionId} 17563e75-0e14-4bd7-94b4-6bbb869c79aa +${erroneousSubscriptionId} erroneousSubscriptionId +${newSubscriptionId} newSubsciptionId + +${callbackUri_Sub} http://172.22.1.7:9091/vnfpm/subscriptions +${filter_ok} callbackUri=${callbackUri_Sub} +${filter_ko} erroneousFilter=erroneous +${total_polling_time} 2 min +${polling_interval} 10 sec + +${callbackResp} localhost + +${objectInstanceId} \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/jsons/CreatePmJobRequest.json b/SOL002/VNFPerformanceManagement-API/jsons/CreatePmJobRequest.json index 6a21ba34fa05dab0a8d3011fe1130d7492998ab8..587c3fba7a90c832d6dc62fca2c2407108b02fcb 100644 --- a/SOL002/VNFPerformanceManagement-API/jsons/CreatePmJobRequest.json +++ b/SOL002/VNFPerformanceManagement-API/jsons/CreatePmJobRequest.json @@ -1,9 +1,10 @@ -{ - "objectInstanceIds" : ["1f50d68b-82e8-4deb-bd40-c934d4d1ac0a"], - "criteria" : { +{{ + "objectInstanceIds" : ["{objectInstanceIds}"], + "criteria" : {{ "performanceMetric": [], "performanceMetricGroup": [], "collectionPeriod": 10, "reportingPeriod": 30 - } -} \ No newline at end of file + }}, + "callbackuri": "{callback_uri}" +}} \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/jsons/CreateThresholdRequest.json b/SOL002/VNFPerformanceManagement-API/jsons/CreateThresholdRequest.json index 1e58c2bac513f36d37597e8f11bbe06d68b664cc..9f7640468d28840400225ce13e6c2525cb09dd48 100644 --- a/SOL002/VNFPerformanceManagement-API/jsons/CreateThresholdRequest.json +++ b/SOL002/VNFPerformanceManagement-API/jsons/CreateThresholdRequest.json @@ -1,12 +1,13 @@ -{ - "objectInstanceIds" : "1f50d68b-82e8-4deb-bd40-c934d4d1ac0a", - "criteria" : { +{{ + "objectInstanceIds" : "{objectInstanceIds}", + "criteria" : {{ "performanceMetric": "cpu_util", "thresholdType": "SIMPLE", - "simpleThresholdDetails": { + "simpleThresholdDetails": {{ "thresholdValue": 10, "hysteresis": 50 - } + }} - } -} \ No newline at end of file + }}, + "callbackuri": "{callback_uri}" +}} \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/jsons/PMJobModification.json b/SOL002/VNFPerformanceManagement-API/jsons/PMJobModification.json new file mode 100644 index 0000000000000000000000000000000000000000..3aeb5f91c199064546693cd63b88c434584c3d92 --- /dev/null +++ b/SOL002/VNFPerformanceManagement-API/jsons/PMJobModification.json @@ -0,0 +1,3 @@ +{ + "callbackUri":"127.0.0.1" +} \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/jsons/PerformanceInformationAvaliableNotification.json b/SOL002/VNFPerformanceManagement-API/jsons/PerformanceInformationAvaliableNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..5ac84f0a452c13051b8c18fbbd8942876ee6e315 --- /dev/null +++ b/SOL002/VNFPerformanceManagement-API/jsons/PerformanceInformationAvaliableNotification.json @@ -0,0 +1,12 @@ +{{ + "id":"", + "notificationType":"PerformanceInformationAvailableNotification", + "timeStamp":"", + "objectType":"", + "objectInstanceId":"{objectInstanceId}", + "_links":{{ + "objectInstance":"", + "pmJob":"", + "performanceReport":"" + }} +}} diff --git a/SOL002/VNFPerformanceManagement-API/jsons/ThresholdCrossedNotification.json b/SOL002/VNFPerformanceManagement-API/jsons/ThresholdCrossedNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..cb963a1011d257c4741ed9d2f84e136ad14ef9d4 --- /dev/null +++ b/SOL002/VNFPerformanceManagement-API/jsons/ThresholdCrossedNotification.json @@ -0,0 +1,15 @@ +{{ + "id":"", + "notificationType":"ThresholdCrossedNotification", + "timeStamp":"", + "thresholdId":"{thresholdId}", + "crossingDirection":"UP", + "objectType":"", + "objectInstanceId":"{objectInstanceId}", + "performanceMetric":"", + "performanceValue":"", + "_links":{{ + "objectInstance":"", + "threshold":"" + }} +}} diff --git a/SOL002/VNFPerformanceManagement-API/jsons/ThresholdModification.json b/SOL002/VNFPerformanceManagement-API/jsons/ThresholdModification.json new file mode 100644 index 0000000000000000000000000000000000000000..3aeb5f91c199064546693cd63b88c434584c3d92 --- /dev/null +++ b/SOL002/VNFPerformanceManagement-API/jsons/ThresholdModification.json @@ -0,0 +1,3 @@ +{ + "callbackUri":"127.0.0.1" +} \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/jsons/subscriptions.json b/SOL002/VNFPerformanceManagement-API/jsons/subscriptions.json deleted file mode 100644 index 3fcc4e59bcbcc09b0e5355a1557d439378f1520b..0000000000000000000000000000000000000000 --- a/SOL002/VNFPerformanceManagement-API/jsons/subscriptions.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "callbackUri": "http://127.0.0.1/subscribe", - "filter": { - "notificationTypes": ["ThresholdCrossedNotification"] - } -} \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/schemas/PMJobModifications.json b/SOL002/VNFPerformanceManagement-API/schemas/PMJobModifications.json new file mode 100644 index 0000000000000000000000000000000000000000..7a09620564f077ebb19981dd44bb3d3df07aa67c --- /dev/null +++ b/SOL002/VNFPerformanceManagement-API/schemas/PMJobModifications.json @@ -0,0 +1,62 @@ + { + "description": "This type represents modifications to a PM job. It shall comply with the provisions defined in table 6.5.2.12-1.\n", + "type": "object", + "properties": { + "callbackUri": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + }, + "authentication": { + "type": "object", + "required": [ + "authType" + ], + "properties": { + "authType": { + "description": "Defines the types of Authentication / Authorization which the API consumer is willing to accept when receiving a notification. Permitted values: * BASIC: In every HTTP request to the notification endpoint, use\n HTTP Basic authentication with the client credentials. \n* OAUTH2_CLIENT_CREDENTIALS: In every HTTP request to the\n notification endpoint, use an OAuth 2.0 Bearer token, obtained\n using the client credentials grant type.\n* TLS_CERT: Every HTTP request to the notification endpoint is sent\n over a mutually authenticated TLS session, i.e. not only the\n server is authenticated, but also the client is authenticated\n during the TLS tunnel setup.\n", + "type": "array", + "items": { + "type": "string", + "enum": [ + "BASIC", + "OAUTH2_CLIENT_CREDENTIALS", + "TLS_CERT" + ] + } + }, + "paramsBasic": { + "description": "Parameters for authentication/authorization using BASIC. Shall be present if authType is \"BASIC\" and the contained information has not been provisioned out of band. Shall be absent otherwise.\n", + "type": "object", + "properties": { + "userName": { + "description": "Username to be used in HTTP Basic authentication. Shall be present if it has not been provisioned out of band.\n", + "type": "string" + }, + "password": { + "description": "Password to be used in HTTP Basic authentication. Shall be present if it has not been provisioned out of band.\n", + "type": "string" + } + } + }, + "paramsOauth2ClientCredentials": { + "description": "Parameters for authentication/authorization using OAUTH2_CLIENT_CREDENTIALS. Shall be present if authType is \"OAUTH2_CLIENT_CREDENTIALS\" and the contained information has not been provisioned out of band. Shall be absent otherwise.\n", + "type": "object", + "properties": { + "clientId": { + "description": "Client identifier to be used in the access token request of the OAuth 2.0 client credentials grant type. Shall be present if it has not been provisioned out of band. The clientId and clientPassword passed in a subscription shall not be the same as the clientId and clientPassword that are used to obtain authorization for API requests. Client credentials may differ between subscriptions. The value of clientPassword should be generated by a random process.\n", + "type": "string" + }, + "clientPassword": { + "description": "Client password to be used in the access token request of the OAuth 2.0 client credentials grant type. Shall be present if it has not been provisioned out of band. The clientId and clientPassword passed in a subscription shall not be the same as the clientId and clientPassword that are used to obtain authorization for API requests. Client credentials may differ between subscriptions. The value of clientPassword should be generated by a random process.\n", + "type": "string" + }, + "tokenEndpoint": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + } + } + } + } + } \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/schemas/PmSubscription.schema.json b/SOL002/VNFPerformanceManagement-API/schemas/PmSubscription.schema.json deleted file mode 100644 index c9ad051300e0cec9e32546538ee611baba45e53e..0000000000000000000000000000000000000000 --- a/SOL002/VNFPerformanceManagement-API/schemas/PmSubscription.schema.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "description": "This type represents a subscription.\n", - "type": "object", - "required": [ - "id", - "callbackUri", - "_links" - ], - "properties": { - "id": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - }, - "filter": { - "description": "This type represents a filter that can be used to subscribe for notifications related to performance management events.\n", - "type": "object", - "properties": { - "vnfInstanceSubscriptionFilter": { - "description": "This type represents subscription filter criteria to match VNF instances.\n", - "type": "object", - "properties": { - "vnfdIds": { - "description": "If present, match VNF instances that were created based on a VNFD identified by one of the vnfdId values listed in this attribute. The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to VNF instances that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", - "type": "array", - "items": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - } - }, - "vnfProductsFromProviders": { - "description": "If present, match VNF instances that belong to VNF products from certain providers. The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to VNF instances that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", - "type": "array", - "items": { - "type": "object", - "required": [ - "vnfProvider" - ], - "properties": { - "vnfProvider": { - "description": "Name of the VNF provider to match.\n", - "type": "string" - }, - "vnfProducts": { - "description": "If present, match VNF instances that belong to VNF products with certain product names, from one particular provider.\n", - "type": "array", - "items": { - "type": "object", - "required": [ - "vnfProductName" - ], - "properties": { - "vnfProductName": { - "description": "Name of the VNF product to match.\n", - "type": "string" - }, - "versions": { - "description": "If present, match VNF instances that belong to VNF products with certain versions and a certain product name, from one particular provider.\n", - "type": "array", - "items": { - "type": "object", - "required": [ - "vnfSoftwareVersion" - ], - "properties": { - "vnfSoftwareVersion": { - "description": "A version.\n", - "type": "string" - }, - "vnfdVersions": { - "description": "If present, match VNF instances that belong to VNF products with certain VNFD versions, a certain software version and a certain product name, from one particular provider.\n", - "type": "array", - "items": { - "description": "A version.\n", - "type": "string" - } - } - } - } - } - } - } - } - } - } - }, - "vnfInstanceIds": { - "description": "If present, match VNF instances with an instance identifier listed in this attribute. The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to particular VNF Instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", - "type": "array", - "items": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - } - }, - "vnfInstanceNames": { - "description": "If present, match VNF instances with a VNF Instance Name listed in this attribute. The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to particular VNF Instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "notificationTypes": { - "description": "Match particular notification types. Permitted values: * ThresholdCrossedNotification * PerformanceInformationAvailableNotification The permitted values of the \"notificationTypes\" attribute are spelled exactly as the names of the notification types to facilitate automated code generation systems.\n", - "type": "string", - "enum": [ - "ThresholdCrossedNotification", - "PerformanceInformationAvailableNotification" - ] - } - } - }, - "callbackUri": { - "description": "The URI of the endpoint to send the notification to.\n", - "type": "string", - "format": "url" - }, - "_links": { - "description": "Links to resources related to this resource.\n", - "type": "object", - "required": [ - "self" - ], - "properties": { - "self": { - "description": "This type represents a link to a resource.\n", - "type": "object", - "required": [ - "href" - ], - "properties": { - "href": { - "description": "URI of the referenced resource.\n", - "type": "string", - "format": "url" - } - } - } - } - } - } -} \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/schemas/PmSubscriptions.schema.json b/SOL002/VNFPerformanceManagement-API/schemas/PmSubscriptions.schema.json deleted file mode 100644 index fefb142da9f905120ff32246f73e6b88062978d5..0000000000000000000000000000000000000000 --- a/SOL002/VNFPerformanceManagement-API/schemas/PmSubscriptions.schema.json +++ /dev/null @@ -1 +0,0 @@ -{ "type": "array", "items": { "description": "This type represents a subscription.\n", "type": "object", "required": [ "id", "callbackUri", "_links" ], "properties": { "id": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" }, "filter": { "description": "This type represents a filter that can be used to subscribe for notifications related to performance management events.\n", "type": "object", "properties": { "vnfInstanceSubscriptionFilter": { "description": "This type represents subscription filter criteria to match VNF instances.\n", "type": "object", "properties": { "vnfdIds": { "description": "If present, match VNF instances that were created based on a VNFD identified by one of the vnfdId values listed in this attribute. The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to VNF instances that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", "type": "array", "items": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" } }, "vnfProductsFromProviders": { "description": "If present, match VNF instances that belong to VNF products from certain providers. The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to VNF instances that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", "type": "array", "items": { "type": "object", "required": [ "vnfProvider" ], "properties": { "vnfProvider": { "description": "Name of the VNF provider to match.\n", "type": "string" }, "vnfProducts": { "description": "If present, match VNF instances that belong to VNF products with certain product names, from one particular provider.\n", "type": "array", "items": { "type": "object", "required": [ "vnfProductName" ], "properties": { "vnfProductName": { "description": "Name of the VNF product to match.\n", "type": "string" }, "versions": { "description": "If present, match VNF instances that belong to VNF products with certain versions and a certain product name, from one particular provider.\n", "type": "array", "items": { "type": "object", "required": [ "vnfSoftwareVersion" ], "properties": { "vnfSoftwareVersion": { "description": "A version.\n", "type": "string" }, "vnfdVersions": { "description": "If present, match VNF instances that belong to VNF products with certain VNFD versions, a certain software version and a certain product name, from one particular provider.\n", "type": "array", "items": { "description": "A version.\n", "type": "string" } } } } } } } } } } }, "vnfInstanceIds": { "description": "If present, match VNF instances with an instance identifier listed in this attribute. The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to particular VNF Instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", "type": "array", "items": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" } }, "vnfInstanceNames": { "description": "If present, match VNF instances with a VNF Instance Name listed in this attribute. The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to particular VNF Instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", "type": "array", "items": { "type": "string" } } } }, "notificationTypes": { "description": "Match particular notification types. Permitted values: * ThresholdCrossedNotification * PerformanceInformationAvailableNotification The permitted values of the \"notificationTypes\" attribute are spelled exactly as the names of the notification types to facilitate automated code generation systems.\n", "type": "string", "enum": [ "ThresholdCrossedNotification", "PerformanceInformationAvailableNotification" ] } } }, "callbackUri": { "description": "The URI of the endpoint to send the notification to.\n", "type": "string", "format": "url" }, "_links": { "description": "Links to resources related to this resource.\n", "type": "object", "required": [ "self" ], "properties": { "self": { "description": "This type represents a link to a resource.\n", "type": "object", "required": [ "href" ], "properties": { "href": { "description": "URI of the referenced resource.\n", "type": "string", "format": "url" } } } } } } }} \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/schemas/ThresholdModifications.json b/SOL002/VNFPerformanceManagement-API/schemas/ThresholdModifications.json new file mode 100644 index 0000000000000000000000000000000000000000..995cee3517b75439118025ed7746ffd7027989e3 --- /dev/null +++ b/SOL002/VNFPerformanceManagement-API/schemas/ThresholdModifications.json @@ -0,0 +1,62 @@ + { + "description": "This type represents modifications to a threshold. It shall comply with the provisions defined in table 6.5.2.11-1.\n", + "type": "object", + "properties": { + "callbackUri": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + }, + "authentication": { + "type": "object", + "required": [ + "authType" + ], + "properties": { + "authType": { + "description": "Defines the types of Authentication / Authorization which the API consumer is willing to accept when receiving a notification. Permitted values: * BASIC: In every HTTP request to the notification endpoint, use\n HTTP Basic authentication with the client credentials. \n* OAUTH2_CLIENT_CREDENTIALS: In every HTTP request to the\n notification endpoint, use an OAuth 2.0 Bearer token, obtained\n using the client credentials grant type.\n* TLS_CERT: Every HTTP request to the notification endpoint is sent\n over a mutually authenticated TLS session, i.e. not only the\n server is authenticated, but also the client is authenticated\n during the TLS tunnel setup.\n", + "type": "array", + "items": { + "type": "string", + "enum": [ + "BASIC", + "OAUTH2_CLIENT_CREDENTIALS", + "TLS_CERT" + ] + } + }, + "paramsBasic": { + "description": "Parameters for authentication/authorization using BASIC. Shall be present if authType is \"BASIC\" and the contained information has not been provisioned out of band. Shall be absent otherwise.\n", + "type": "object", + "properties": { + "userName": { + "description": "Username to be used in HTTP Basic authentication. Shall be present if it has not been provisioned out of band.\n", + "type": "string" + }, + "password": { + "description": "Password to be used in HTTP Basic authentication. Shall be present if it has not been provisioned out of band.\n", + "type": "string" + } + } + }, + "paramsOauth2ClientCredentials": { + "description": "Parameters for authentication/authorization using OAUTH2_CLIENT_CREDENTIALS. Shall be present if authType is \"OAUTH2_CLIENT_CREDENTIALS\" and the contained information has not been provisioned out of band. Shall be absent otherwise.\n", + "type": "object", + "properties": { + "clientId": { + "description": "Client identifier to be used in the access token request of the OAuth 2.0 client credentials grant type. Shall be present if it has not been provisioned out of band. The clientId and clientPassword passed in a subscription shall not be the same as the clientId and clientPassword that are used to obtain authorization for API requests. Client credentials may differ between subscriptions. The value of clientPassword should be generated by a random process.\n", + "type": "string" + }, + "clientPassword": { + "description": "Client password to be used in the access token request of the OAuth 2.0 client credentials grant type. Shall be present if it has not been provisioned out of band. The clientId and clientPassword passed in a subscription shall not be the same as the clientId and clientPassword that are used to obtain authorization for API requests. Client credentials may differ between subscriptions. The value of clientPassword should be generated by a random process.\n", + "type": "string" + }, + "tokenEndpoint": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + } + } + } + } + } \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagementNotification-API/PerformanceManagementNotification.robot b/SOL002/VNFPerformanceManagementNotification-API/Notifications.robot similarity index 89% rename from SOL002/VNFPerformanceManagementNotification-API/PerformanceManagementNotification.robot rename to SOL002/VNFPerformanceManagementNotification-API/Notifications.robot index bc0e9702f21dbfde91c05a83e9a2f7592634b0a5..b8bffd4c69e5d96ad2d634c318fec76c270d1a40 100644 --- a/SOL002/VNFPerformanceManagementNotification-API/PerformanceManagementNotification.robot +++ b/SOL002/VNFPerformanceManagementNotification-API/Notifications.robot @@ -17,7 +17,7 @@ VNF Performance Information Availability Notification ... Test title: VNF Performance Information Availability Notification ... Test objective: The objective is to test the dispatch of VNF Performance Information Availability Notification when new VNF performance information is available in the NFVO, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A VNF performance job is created, and a subscription for information availability notifications is available in the VNFM. - ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -30,7 +30,7 @@ VNF Threshold Crossed Notification ... Test title: VNF Threshold Crossed Notification ... Test objective: The objective is to test the dispatch of VNF Threshold Crossed Notification when a previously set VNF performance metric threshold is crossed, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A VNF performance job is created, and a threshold subscription is available in the VNFM. - ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -86,8 +86,10 @@ Configure Notification Performance Information Available Handler set to dictionary ${json} notificationType ${type} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Threshold Crossed Handler @@ -96,8 +98,10 @@ Configure Notification Threshold Crossed Handler set to dictionary ${json} notificationType ${type} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL003/README.md b/SOL003/README.md index 286f229e65a88b0574b70f2aea22b55f34829e2a..32e5d14a61753e0630252a252b9cb3bd623e52b7 100644 --- a/SOL003/README.md +++ b/SOL003/README.md @@ -2,7 +2,7 @@ This folder includes the NFV API conformance test descriptions for NFV SOL003 APIs. -The reference spec version is v2.6.1: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.06.01_60/gs_NFV-SOL003v020601p.pdf +The reference spec version is v2.7.1: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.07.01_60/gs_NFV-SOL003v020701p.pdf ## License diff --git a/SOL003/VNFFaultManagement-API/Alarms.robot b/SOL003/VNFFaultManagement-API/Alarms.robot index 04c5c4bfaacc722085e74728f586e0fa2501b54f..c0dd85276f3405a8a3dd4111c2a7e15013c810d1 100644 --- a/SOL003/VNFFaultManagement-API/Alarms.robot +++ b/SOL003/VNFFaultManagement-API/Alarms.robot @@ -7,14 +7,13 @@ Library JSONLibrary Library JSONSchemaLibrary schemas/ Library OperatingSystem - *** Test Cases *** POST Alarms - Method not implemented [Documentation] Test ID: 7.3.5.1.1 ... Test title: POST Alarms - Method not implemented ... Test objective: The objective is to test that Post method is not allowed to create Fault management alarms on VNF ... Pre-conditions: none - ... Reference: Clause 7.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -26,7 +25,7 @@ Get information about multiple alarms ... Test title: Get information about multiple alarms ... Test objective: The objective is to retrieve information about the alarm list and perform a JSON schema and content validation of the returned alarms data structure ... Pre-conditions: none - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -39,7 +38,7 @@ Get information about multiple alarms with filter ... Test title: Get information about multiple alarms with filter ... Test objective: The objective is to retrieve information about the alarm list and perform a JSON schema and content validation of the returned alarms data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: none - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -52,7 +51,7 @@ Get information about multiple alarms Bad Request Invalid attribute-based filter ... Test title: Get information about multiple alarms Bad Request Invalid attribute-based filtering parameters ... Test objective: The objective is to try to retrieve information about the alarm list with invalid filters and perform a JSON schema and content validation of the returned problem details data structure ... Pre-conditions: none - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -64,60 +63,60 @@ GET information about multiple alarms with "all_fields" attribute selector [Documentation] Test ID: 7.3.5.1.5 ... Test title: GET information about multiple alarms with "all_fields" attribute selector ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Alarms Task with all_fields attribute selector Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is alarms + Check HTTP Response Body Json Schema Is Alarms GET information about multiple alarms with exclude_default attribute selector [Documentation] Test ID: 7.3.5.1.6 ... Test title: GET information about multiple alarms with "exclude_default" attribute selector ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Alarms Task with exclude_default attribute selector Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is alarms + Check HTTP Response Body Json Schema Is Alarms GET information about multiple alarms with fields attribute selector [Documentation] Test ID: 7.3.5.1.7 ... Test title: GET information about multiple alarms with fields attribute selector ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Alarms Task with fields attribute selector Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is alarms + Check HTTP Response Body Json Schema Is Alarms GET information about multiple alarms with "exclude_fields" attribute selector [Documentation] Test ID: 7.3.5.1.8 ... Test title: GET information about multiple alarms with "exclude_fields" attribute selector ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: + ... Applicability: none ... Post-Conditions: none GET Alarms Task with exclude_fields attribute selector Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is alarms + Check HTTP Response Body Json Schema Is Alarms PUT Alarms - Method not implemented [Documentation] Test ID: 7.3.5.1.9 ... Test title: PUT Alarms - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to for Fault management alarms on VNF ... Pre-conditions: none - ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -129,7 +128,7 @@ PATCH Alarms - Method not implemented ... Test title: PATCH Alarms - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to for Fault management alarms on VNF ... Pre-conditions: none - ... Reference: Clause 7.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -141,33 +140,32 @@ DELETE Alarms - Method not implemented ... Test title: POST Alarms - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed for Fault management alarms on VNF ... Pre-conditions: none - ... Reference: Clause 7.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none DELETE Fault management Alarms Check HTTP Response Status Code Is 405 - Check Postcondition VNF fault management alarms Exists Get information about multiple alarms as a Paged Response [Documentation] Test ID: 7.3.5.1.12 ... Test title: Get information about multiple alarms as a Paged Response ... Test objective: The objective is to retrieve information about the alarm list as a Paged Response ... Pre-conditions: none - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none GET Fault Management Alarms Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link Get information about multiple alarms - Bad Request Response too Big [Documentation] Test ID: 7.3.5.1.13 ... Test title: Get information about multiple alarms - Bad Request Response too Big ... Test objective: The objective is to try to retrieve information about the alarm list because response is too big and perform a JSON schema and content validation of the returned problem details data structure ... Pre-conditions: none - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none diff --git a/SOL003/VNFFaultManagement-API/ApiVersion.robot b/SOL003/VNFFaultManagement-API/ApiVersion.robot index a971df33362d5ca94900f904105348a933021b17..6c7d8bddf0c6c4c904cbd04666ad14493c62962e 100644 --- a/SOL003/VNFFaultManagement-API/ApiVersion.robot +++ b/SOL003/VNFFaultManagement-API/ApiVersion.robot @@ -1,213 +1,213 @@ -*** Settings *** - -Resource environment/variables.txt - -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Library DependencyLibrary -Library JSONLibrary -Library JSONSchemaLibrary schemas/ - -*** Test Cases *** -POST API Version - Method not implemented - [Documentation] Test ID: 7.3.5.6.1 - ... Test title: POST API version - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version - [Documentation] Test ID: 7.3.5.6.2 - ... Test title: GET API Version - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version - Method not implemented - [Documentation] Test ID: 7.3.5.6.3 - ... Test title: PUT API Version - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version - Method not implemented - [Documentation] Test ID: 7.3.5.6.4 - ... Test title: PATCH API Version - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version - Method not implemented - [Documentation] Test ID: 7.3.5.6.5 - ... Test title: DELETE API Version - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -POST API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.5.6.6 - ... Test title: POST API version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version with apiMajorVerion - [Documentation] Test ID: 7.3.5.6.7 - ... Test title: GET API Version with apiMajorVerion - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.5.6.8 - ... Test title: PUT API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.5.6.9 - ... Test title: PATCH API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.5.6.10 - ... Test title: DELETE API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -*** Keywords *** -POST API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response['body']} +*** Settings *** + +Resource environment/variables.txt + +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 7.3.5.6.1 + ... Test title: POST API version - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 7.3.5.6.2 + ... Test title: GET API Version + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version - Method not implemented + [Documentation] Test ID: 7.3.5.6.3 + ... Test title: PUT API Version - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 7.3.5.6.4 + ... Test title: PATCH API Version - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 7.3.5.6.5 + ... Test title: DELETE API Version - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +POST API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.5.6.6 + ... Test title: POST API version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 7.3.5.6.7 + ... Test title: GET API Version with apiMajorVerion + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.5.6.8 + ... Test title: PUT API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.5.6.9 + ... Test title: PATCH API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.5.6.10 + ... Test title: DELETE API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot b/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot index 4f18fe1739b52db57a21b8d9d6a8ba8d6571b338..6b9dcd2d7690b054fc346a37e701437811ac7d24 100644 --- a/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot +++ b/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot @@ -1,9 +1,11 @@ *** Settings *** -Resource environment/variables.txt +Library String +Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library JSONLibrary Library JSONSchemaLibrary schemas/ Library OperatingSystem +Library MockServerLibrary #Suite Teardown Terminate All Processes kill=true Library Process @@ -12,28 +14,28 @@ Library Process ${original_etag} 1234 *** Keywords *** +Create Sessions + Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance + Wait For Process handle=mockInstance timeout=5s on_timeout=continue + Create Mock Session ${callback_uri}:${callback_port} + Check created Subscription existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${response['body']['id']} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${response['body']['id']} Integer response status 200 Check Postcondition FaultManagement Subscription Is Set Log Check Postcondition subscription exist Set Headers {"Accept": "${ACCEPT_JSON}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${response['body']['id']} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 200 Check Operation Occurrence Id ${opOccId}= Get Value From Json ${response['headers']} $..Location Should Not Be Empty ${opOccId} -Check Postcondition VNF fault management alarms Exists - Log Checking that alarms exists - GET Fault Management Alarms - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is Alarms -Check Postcondition VNF fault management individual alarm Exists +Check Precondition VNF fault management individual alarm Exists Log Checking that individual alarm exists GET Fault Management Individual Alarm Check HTTP Response Status Code Is 200 @@ -41,14 +43,14 @@ Check Postcondition VNF fault management individual alarm Exists Check Individual Subscription existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 Check Individual Subscription deleted Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 404 Check HTTP Response Status Code Is @@ -64,7 +66,7 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK @@ -76,7 +78,7 @@ Check HTTP Response Header ContentType is Check Postcondition Subscription Resource Returned in Location Header Is Available Log Going to check postcondition - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${response['headers']['Location']} Integer response status 200 Log Received a 200 OK as expected @@ -89,114 +91,114 @@ Check Postcondition Subscription Resource Returned in Location Header Is Availab Send POST request for fault management Alarms log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/alarms + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Fault management Alarms log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/alarms + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse} = Output response Set Global Variable ${response} ${outputResponse} PUT Fault management Alarms log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/alarms + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Fault management Alarms log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/alarms + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Fault Management Alarms Log Query NFVO The GET method queries information about multiple alarms. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query - Get ${apiRoot}/${apiName}/${apiVersion}/alarms + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Fault Management Alarms With Filters Log Query NFVO The GET method queries information about multiple alarms with filters. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?${alarm_filter}=${nsInstanceId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${alarm_filter}=${nsInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Fault Management Alarms With Invalid Filters Log Query NFVO The GET method queries information about multiple alarms with filters. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?${invalid_alarm_filter}=${nsInstanceId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${invalid_alarm_filter}=${nsInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Alarms Task with all_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}/alarms?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET Alarms Task with exclude_default 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}/alarms?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET Alarms Task with fields attribute selector Log Trying to get all alarms 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}/alarms?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} GET Alarms Task 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}/alarms?exclude_fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} Send POST request for fault management Individual Alarm log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Fault Management Individual Alarm log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Fault Management Individual Alarm log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -204,9 +206,9 @@ GET Fault Management Individual Alarm Log Query VNF The GET method queries information about an alarm. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${etag} Output response headers ETag Set Suite Variable &{original_etag} ${etag} ${outputResponse}= Output response @@ -216,9 +218,9 @@ GET Fault Management Individual Alarm with invalid id Log Query NFVO The GET method queries information about an invalid alarm. Should return does not exist Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query - Get ${apiRoot}/${apiName}/${apiVersion}/alarms/${invalidAlarmId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${invalidAlarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -226,9 +228,9 @@ PATCH Fault Management Individual Alarm log Trying to perform a PATCH. This method modifies an individual alarm resource Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/alarmModifications.json - Patch ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} ${body} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -237,9 +239,9 @@ PATCH Fault Management Individual Alarm - precondition failed Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} Set Headers {"If-Match": "${original_etag[0]}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/alarmModifications.json - Patch ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} ${body} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -248,169 +250,189 @@ PATCH Fault Management Individual Alarm Conflict Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} Set Headers {"If-Match": "${Etag}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/alarmModifications.json - Patch ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} ${body} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} - - + POST Subscription - Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/fmSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/fmSubscriptionRequest.json + ${body}= Format String ${template} vnfdIds=${vnfdIds} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} Send POST Request for duplicated subscription - Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions Pass Execution If ${VNFM_DUPLICATION} == 0 NVFO is not permitting duplication. Skipping the test Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/fmSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/fmSubscriptionRequest.json + ${body}= Format String ${template} vnfdIds=${vnfdIds} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} Send POST Request for duplicated subscription not permitted - Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions Pass Execution If ${VNFM_DUPLICATION} == 1 NVFO is not permitting duplication. Skipping the test Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/fmSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/fmSubscriptionRequest.json + ${body}= Format String ${template} vnfdIds=${vnfdIds} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} GET Subscriptions Log Get the list of active subscriptions Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Subscriptions with filter Log Get the list of active subscriptions using a filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Subscriptions with Invalid filter Log Get the list of active subscriptions using an invalid filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter_invalid} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter_invalid} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get subscriptions with all_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_default attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?exclude_fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} PUT Subscriptions log Trying to perform a PUT Subscriptions. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Subscriptions log Trying to perform a PATCH Subscriptions. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Subscriptions log Trying to perform a DELETE Subscriptions. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST Individual Subscription log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Individual Subscription log Trying to get information about an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Individual Subscription log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Individual Subscription log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Individual Subscription log Trying to perform a DELETE. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} -Check LINK in Header +Check HTTP Response Header Contain Link ${linkURL}= Get Value From Json ${response['headers']} $..Link Should Not Be Empty ${linkURL} Get subscriptions with filter "id" Log Get the list of active subscriptions using a filter "id" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?id=${subscription_id} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?id=${subscription_id} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -420,8 +442,8 @@ Check PostCondition HTTP Response Body Subscription Matches the requested attrib Get subscriptions with filter "filter_notificationTypes" Log Get the list of active subscriptions using a filter "filter.notificationTypes" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?filter.notificationTypes=${notification_type} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.notificationTypes=${notification_type} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -433,8 +455,8 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_faultyResourceTypes" Log Get the list of active subscriptions using a filter "filter.faultyResourceTypes" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?filter.faultyResourceTypes=${faultyResourceType} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.faultyResourceTypes=${faultyResourceType} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -446,8 +468,8 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_perceivedSeverities" Log Get the list of active subscriptions using a filter "filter.perceivedSeverities" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?filter.perceivedSeverities=${perceivedSeverity} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.perceivedSeverities=${perceivedSeverity} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -459,8 +481,8 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_eventTypes" Log Get the list of active subscriptions using a filter "filter.eventTypes" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?filter.eventTypes=${eventType} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.eventTypes=${eventType} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -472,8 +494,8 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_probableCauses" Log Get the list of active subscriptions using a filter "filter.probableCauses" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?filter.probableCauses=${probableCause} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.probableCauses=${probableCause} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL003/VNFFaultManagement-API/IndividualAlarm.robot b/SOL003/VNFFaultManagement-API/IndividualAlarm.robot index 1f9ce5ebf21428bb771ff2e87200e324af79a390..a958e5e31bc7c91365f0e7bfcb40c8a8b0879622 100644 --- a/SOL003/VNFFaultManagement-API/IndividualAlarm.robot +++ b/SOL003/VNFFaultManagement-API/IndividualAlarm.robot @@ -1,5 +1,5 @@ *** Settings *** -# Suite setup Expect spec SOL003-VNFLifecycleManagement-API.yaml + Resource environment/variables.txt Resource FaultManagement-APIKeyword.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -8,15 +8,13 @@ Library JSONLibrary Library JSONSchemaLibrary schemas/ Library DependencyLibrary - - *** Test Cases *** POST Alarm - Method not implemented [Documentation] Test ID: 7.3.5.2.1 ... Test title: POST Alarm - Method not implemented ... Test objective: The objective is to test that Post method is not allowed to create Fault management individual alarm on VNF ... Pre-conditions: none - ... Reference: Clause 7.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -28,7 +26,7 @@ Get information about an fault management individual alarm ... Test title: Get information about an fault management individual alarm ... Test objective: The objective is to retrieve information about an individual alarm and perform a JSON schema and content validation of the returned alarm data structure ... Pre-conditions: The related alarm exists - ... Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -39,9 +37,9 @@ Get information about an fault management individual alarm PUT Alarm - Method not implemented [Documentation] Test ID: 7.3.5.2.3 ... Test title: PUT Alarm - Method not implemented - ... Test objective: he objective is to test that PUT method is not allowed to for Fault management individual alarm on VNF - ... Pre-conditions: The related alarm exists - ... Reference: Clause 7.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Test objective: The objective is to test that PUT method is not allowed to for Fault management individual alarm on VNF + ... Pre-conditions: none + ... Reference: Clause 7.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -53,11 +51,11 @@ PATCH Fault Management Individual Alarm ... Test title: PATCH Fault Management Individual Alarm ... Test objective: The objective is to Modify an individual alarm resource and perform a JSON schema and content validation of the returned alarm data structure ... Pre-conditions: The related alarm exists - ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Check Postcondition VNF fault management individual alarm Exists + Check Precondition VNF fault management individual alarm Exists PATCH Fault Management Individual Alarm Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is alarmModification @@ -67,11 +65,11 @@ Modify an individual alarm resource - Precondition failed ... Test title: Modify an individual alarm resource - Precondition failed ... Test objective: The objective is to test that an individual alarm resource cannot be modified if the alarm is already in the state that is requested to be set ... Pre-conditions: The related alarm exists - ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Check Postcondition VNF fault management individual alarm Exists + Check Precondition VNF fault management individual alarm Exists PATCH Fault Management Individual Alarm - precondition failed Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails @@ -81,12 +79,12 @@ Modify an individual alarm resource - Conflict ... Test title: Modify an individual alarm resource - Conflict ... Test objective: The objective is to test that an individual alarm resource cannot be modified if the resource was modified by another entity ... Pre-conditions: The related alarm exists - ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Depends On Test PATCH Fault Management Individual Alarm - Check Postcondition VNF fault management individual alarm Exists + Check Precondition VNF fault management individual alarm Exists PATCH Fault Management Individual Alarm Conflict Check HTTP Response Status Code Is 412 Check HTTP Response Body Json Schema Is ProblemDetails @@ -95,11 +93,23 @@ DELETE Alarm - Method not implemented [Documentation] Test ID: 7.3.5.2.7 ... Test title: DELETE Alarm - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to for Fault management individual alarm on VNF - ... Pre-conditions: nona - ... Reference: Clause 7.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The individual alarm still exists + ... Post-Conditions: none DELETE Fault Management Individual Alarm Check HTTP Response Status Code Is 405 - Check Postcondition VNF fault management individual alarm Exists \ No newline at end of file + +Get information about an fault management individual alarm - Not Found + [Documentation] Test ID: 7.3.5.2.8 + ... Test title: Get information about an fault management individual alarm - Not Found + ... Test objective: The objective is to test that retrieval of information about an individual alarm fails when individual alarm is not present + ... Pre-conditions: The related alarm does not exists + ... Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET Fault Management Individual Alarm + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file diff --git a/SOL003/VNFFaultManagement-API/IndividualSubscription.robot b/SOL003/VNFFaultManagement-API/IndividualSubscription.robot index 06cbdbfe75db63b8377d20ed17be3cf6fff21e93..f6923716773c4bd006728e9487f772cd475c35a1 100644 --- a/SOL003/VNFFaultManagement-API/IndividualSubscription.robot +++ b/SOL003/VNFFaultManagement-API/IndividualSubscription.robot @@ -11,10 +11,10 @@ Post Individual Subscription - Method not implemented ... Test title: Post Individual Subscription - Method not implemented ... Test objective: The objective is to test that POST method is not allowed for Fault management subscription on VNF ... Pre-conditions: none - ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: subscription is not created + ... Post-Conditions: none POST Individual Subscription Check HTTP Response Status Code Is 405 @@ -23,7 +23,7 @@ Get Information about an individual subscription ... Test title: Get Information about an individual subscription ... Test objective: The objective is to read an individual subscription for NFVO alarms subscribed by the client and perform a JSON schema and content validation of the returned fault management individual subscription data structure ... Pre-conditions: The subscription with the given id exists - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -36,7 +36,7 @@ PUT an individual subscription - Method not implemented ... Test title:PUT an individual subscription - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed for Fault management individual subscription on VNF ... Pre-conditions: none - ... Reference: Clause 7.4.5.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.5.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -48,7 +48,7 @@ PATCH an individual subscription - Method not implemented ... Test title:PATCH an individual subscription - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed for Fault management individual subscription on VNF ... Pre-conditions: none - ... Reference: Clause 7.4.5.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.5.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -60,10 +60,23 @@ DELETE an individual subscription ... Test title:DELETE an individual subscription ... Test objective: The objective is to test that DELETE method removes individual subscription on VNF ... Pre-conditions: The Subsbcription already exists - ... Reference: Clause 7.4.5.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.5.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: subscription is not deleted + ... Post-Conditions: subscription is deleted DELETE Individual Subscription Check HTTP Response Status Code Is 204 Check Individual Subscription deleted + +Get Information about an individual subscription - Not Found + [Documentation] Test ID: 7.3.5.4.6 + ... Test title: Get Information about an individual subscription - Not Found + ... Test objective: The objective is to test that the retrieval of an individual subscription for NFVO alarms subscribed by the client fails when subscription is not present + ... Pre-conditions: The subscription with the given id does not exists + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET Individual Subscription + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file diff --git a/SOL003/VNFFaultManagement-API/NotificationEndpoint.robot b/SOL003/VNFFaultManagement-API/NotificationEndpoint.robot new file mode 100644 index 0000000000000000000000000000000000000000..697648da396287a7b76b4ae2d2e30ed114ad127c --- /dev/null +++ b/SOL003/VNFFaultManagement-API/NotificationEndpoint.robot @@ -0,0 +1,94 @@ +*** Settings *** +Library String +Library OperatingSystem +Resource environment/variables.txt +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +VNF Fault Alarm Notification + [Documentation] Test ID: 7.3.5.7.1 + ... Test title: VNF Fault Alarm Notification + ... Test objective: The objective is to test that the POST request triggers VNF Fault Alarm Notification. + ... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm notifications is available in the VNFM. + ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Alarm Notification + Check HTTP Response Status Code Is 204 + +VNF Fault Alarm Cleared Notification + [Documentation] Test ID: 7.3.5.7.2 + ... Test title: VNF Fault Alarm Cleared Notification + ... Test objective: The objective is to test that the POST request triggers VNF Fault Alarm Cleared Notification. + ... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm cleared notifications is available in the VNFM. + ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Alarm Cleared Notification + Check HTTP Response Status Code Is 204 + +VNF Fault Alarm List Reulit Notification + [Documentation] Test ID: 7.3.5.7.3 + ... Test title: VNF Fault Alarm List Rebuilt Notification + ... Test objective: The objective is to test that the POST request triggers VNF Fault Alarm List Rebuilt Notification. + ... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm list rebuilt notifications is available in the VNFM. + ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Alarm List Rebuilt Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body FmSubscriptions.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Log Validate Status code + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post Alarm Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/AlarmNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Alarm Cleared Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/AlarmClearedNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} alarmId=${alarmId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Alarm List Rebuilt Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/AlarmListRebuiltNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL003/VNFFaultManagement-API/Subscriptions.robot b/SOL003/VNFFaultManagement-API/Subscriptions.robot index 4063c36f44a082b76d756c1697f10232b87f56b9..f41f45a648232cb744e525e62acdf4cb8697d506 100644 --- a/SOL003/VNFFaultManagement-API/Subscriptions.robot +++ b/SOL003/VNFFaultManagement-API/Subscriptions.robot @@ -6,6 +6,9 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=fal Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Library Process +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true *** Test Cases *** Create a new Fault Management alarm subscription @@ -13,7 +16,7 @@ Create a new Fault Management alarm subscription ... Test title: Create a new Fault Management alarm subscription ... Test objective: The objective is to create a new Fault management alarm subscriptions and perform a JSON schema and content validation of the returned fault management alarms subscription data structure ... Pre-conditions: No subscription with the same filter and callbackUri exists - ... Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: subscription is created @@ -23,13 +26,12 @@ Create a new Fault Management alarm subscription Check HTTP Response Body Json Schema Is FmSubscription Check created Subscription existence - Create a new alarm subscription - DUPLICATION [Documentation] Test ID: 7.3.5.3.2 ... Test title: Create a new alarm subscription - DUPLICATION ... Test objective: The objective is to create a new subscription with the VNF allowing duplication and perform a JSON schema and content validation of the returned fault management alarms subscription data structure. ... Pre-conditions: subscription with the same filter and callbackUri exists - ... Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: the NFVO allows creating a subscription resource if another subscription resource with the same filter and callbackUri already exists ... Post-Conditions: duplicated subscription is created @@ -44,7 +46,7 @@ Create a new alarm subscription - NO DUPLICATION ... Test title: Create a new alarm subscription - NO DUPLICATION ... Test objective: The objective is to create a new subscription with the VNF not allowing duplication and perform a JSON schema and content validation of the returned fault management alarms subscription data structure. ... Pre-conditions: subscription with the same filter and callbackUri exists - ... Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: the NFVO decides to not create a duplicate subscription resource ... Post-Conditions: duplicated subscription is not created @@ -58,7 +60,7 @@ Retrieve a list of alarm subscriptions ... Test title: Retrieve a list of alarm subscriptions ... Test objective: The objective is to retrieve the list of active subscriptions and perform a JSON schema and content validation of the returned fault management alarms subscription data structure. ... Pre-conditions: none - ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: noe @@ -71,7 +73,7 @@ Retrieve a list of alarm subscriptions with filter ... Test title: Retrieve a list of alarm subscriptions with filter ... Test objective: The objective is to retrieve the list of active subscriptions with filter and perform a JSON schema and content validation of the returned fault management alarms subscription data structure. ... Pre-conditions: none - ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -84,7 +86,7 @@ GET subscriptions - Bad Request Invalid attribute-based filtering parameters ... Test title: GET subscriptions - Bad Request Invalid attribute-based filtering parameters ... Test objective: The objective is to retrieve the list of active subscriptions with Invalid attribute-based filtering parameters and perform a JSON schema and content validation of the returned problem details data structure. ... Pre-conditions: none - ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -97,7 +99,7 @@ GET subscriptions with "all_fields" attribute selector ... Test title: GET subscriptions with "all_fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector ... Pre-conditions: - ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: @@ -110,7 +112,7 @@ GET subscriptions with "exclude_default" attribute selector ... Test title: GET subscriptions with "exclude_default" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector ... Pre-conditions: - ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: @@ -123,7 +125,7 @@ GET subscriptions with "fields" attribute selector ... Test title: GET subscriptions with "fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector ... Pre-conditions: - ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: @@ -136,7 +138,7 @@ GET subscriptions with "exclude_fields" attribute selector ... Test title: GET subscriptions with "exclude_fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector ... Pre-conditions: - ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: @@ -149,7 +151,7 @@ PUT subscriptions - Method not implemented ... Test title:PUT subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to for Fault management subscriptions on VNF ... Pre-conditions: none - ... RReference: Clause 7.4.4.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... RReference: Clause 7.4.4.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -161,7 +163,7 @@ PATCH subscriptions - Method not implemented ... Test title: PATCH subscriptions - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to for Fault management subscriptions on VNF ... Pre-conditions: none - ... Reference: Clause 7.4.4.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.4.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -173,7 +175,7 @@ DELETE subscriptions - Method not implemented ... Test title: DELETE subscriptions - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to for Fault management subscriptions on VNF ... Pre-conditions: none - ... Reference: Clause 7.4.4.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.4.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: subscription is not deleted @@ -185,20 +187,20 @@ Retrieve a list of alarm subscriptions as Paged Response ... Test title: Retrieve a list of alarm subscriptions as Paged Response ... Test objective: The objective is to retrieve the list of active subscriptions as Paged Response. ... Pre-conditions: none - ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: noe GET Subscriptions Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link GET subscriptions - Bad Request Response too Big [Documentation] Test ID: 7.3.5.3.15 ... Test title: GET subscriptions - Bad Request Response too Big ... Test objective: The objective is to retrieve the list of active subscriptions because response is too big and perform a JSON schema and content validation of the returned problem details data structure. ... Pre-conditions: none - ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -207,11 +209,11 @@ GET subscriptions - Bad Request Response too Big Check HTTP Response Body Json Schema Is ProblemDetails GET Subscription with attribute-based filter "id" - [Documentation] Test ID: 6.3.4.4.16 + [Documentation] Test ID: 7.3.5.3.16 ... Test title: GET Subscription with attribute-based filter "id" ... Test objective: The objective is to retrieve the list of active subscriptions with filter "id" ... Pre-conditions: - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: @@ -221,11 +223,11 @@ GET Subscription with attribute-based filter "id" Check PostCondition HTTP Response Body Subscription Matches the requested attribute-based filter "id" Get subscriptions with filter "filter.notificationTypes" - [Documentation] Test ID: 6.3.4.4.17 + [Documentation] Test ID: 7.3.5.3.17 ... Test title: GET Subscription with attribute-based filter "filter.notificationTypes" ... Test objective: The objective is to retrieve the list of active subscriptions with filter "filter.notificationTypes" ... Pre-conditions: - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: @@ -235,11 +237,11 @@ Get subscriptions with filter "filter.notificationTypes" Check PostCondition HTTP Response Body Subscriptions Matches the requested attribute-based filter "filter_notificationTypes" Get subscriptions with filter "filter.faultyResourceTypes" - [Documentation] Test ID: 6.3.4.4.18 + [Documentation] Test ID: 7.3.5.3.18 ... Test title: GET Subscription with attribute-based filter "filter.faultyResourceTypes" ... Test objective: The objective is to retrieve the list of active subscriptions with filter "filter.faultyResourceTypes" ... Pre-conditions: - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: @@ -249,11 +251,11 @@ Get subscriptions with filter "filter.faultyResourceTypes" Check PostCondition HTTP Response Body Subscriptions Matches the requested attribute-based filter "filter_faultyResourceTypes" Get subscriptions with filter "filter.perceivedSeverities" - [Documentation] Test ID: 6.3.4.4.19 + [Documentation] Test ID: 7.3.5.3.19 ... Test title: GET Subscription with attribute-based filter "filter.perceivedSeverities" ... Test objective: The objective is to retrieve the list of active subscriptions with filter "filter.perceivedSeverities" ... Pre-conditions: - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: @@ -263,11 +265,11 @@ Get subscriptions with filter "filter.perceivedSeverities" Check PostCondition HTTP Response Body Subscriptions Matches the requested attribute-based filter "filter_perceivedSeverities" Get subscriptions with filter "filter.eventTypes" - [Documentation] Test ID: 6.3.4.4.20 + [Documentation] Test ID: 7.3.5.3.20 ... Test title: GET Subscription with attribute-based filter "filter.eventTypes" ... Test objective: The objective is to retrieve the list of active subscriptions with filter "filter.eventTypes" ... Pre-conditions: - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: @@ -277,11 +279,11 @@ Get subscriptions with filter "filter.eventTypes" Check PostCondition HTTP Response Body Subscriptions Matches the requested attribute-based filter "filter_eventTypes" Get subscriptions with filter "filter.probableCauses" - [Documentation] Test ID: 6.3.4.4.21 + [Documentation] Test ID: 7.3.5.3.21 ... Test title: GET Subscription with attribute-based filter "filter.probableCauses" ... Test objective: The objective is to retrieve the list of active subscriptions with filter "filter.probableCauses" ... Pre-conditions: - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: @@ -289,3 +291,16 @@ Get subscriptions with filter "filter.probableCauses" Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is FmSubscriptions Check PostCondition HTTP Response Body Subscriptions Matches the requested attribute-based filter "filter_probableCauses" + +POST Create a new Subscription - Unprocessable Entity + [Documentation] Test ID: 7.3.5.3.22 + ... Test title: POST Create a new Subscription - Unprocessable Entity + ... Test objective: The objective is to test that content type of the payload body is supported and the payload body of a request contains syntactically correct data but the data cannot be processed. + ... re-conditions: none + ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Post Subscription + Check HTTP Response Status Code Is 422 + Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL003/VNFFaultManagement-API/environment/variables.txt b/SOL003/VNFFaultManagement-API/environment/variables.txt index e28a2d096dd0cbd341c7cb8c201819c251c71b8a..f8bfd19c33527b65c64c46af1a2cc6da4ca34ca3 100644 --- a/SOL003/VNFFaultManagement-API/environment/variables.txt +++ b/SOL003/VNFFaultManagement-API/environment/variables.txt @@ -2,7 +2,8 @@ ${VNFM_HOST} localhost # Hostname of the VNFM ${VNFM_PORT} 8080 # Listening port of the VNFM ${VNFM_SCHEMA} https -${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${CONTENT_TYPE} application/json ${ACCEPT} application/json ${ACCEPT_JSON} application/json @@ -26,7 +27,7 @@ ${NFVO_FIELDS} 1 ${apiRoot} / ${apiName} vnffm -${apiVersion} v1 +${apiMajorVersion} v1 ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f @@ -46,9 +47,17 @@ ${response} {} ${req_mock} {} ${resp_mock} {} -${alarm_filter} nsInstanceId ${nsInstanceId} 007c111c-38a1-42c0-a666-7475ecb1567c -${invalid_alarm_filter} badFilter ${invalidAlarmId} invalidIdAlarm -${fields} criteria,objectInstanceIds \ No newline at end of file +${fields} criteria,objectInstanceIds + +${callback_uri} http://127.0.0.1 +${callback_port} 9091 +${callback_endpoint} /subscribe + +${vnfdIds} 6fc3539c-e602-4afa-8e13-962fb5a7d81f + +${callbackResp} localhost + +${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar \ No newline at end of file diff --git a/SOL003/VNFFaultManagement-API/jsons/AlarmClearedNotification.json b/SOL003/VNFFaultManagement-API/jsons/AlarmClearedNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..f8a50fb3b45af0e487e475184ee1f78048dd8bf7 --- /dev/null +++ b/SOL003/VNFFaultManagement-API/jsons/AlarmClearedNotification.json @@ -0,0 +1,12 @@ +{{ + "id":"", + "notificationType":"AlarmClearedNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "alarmId":"{alarmId}", + "alarmCleareTime":"", + "_links":{{ + "subscription":"", + "alarm":"" + }} +}} diff --git a/SOL003/VNFFaultManagement-API/jsons/AlarmListRebuiltNotification.json b/SOL003/VNFFaultManagement-API/jsons/AlarmListRebuiltNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..8ba773077c360410a6350f383d0bf2704df9f133 --- /dev/null +++ b/SOL003/VNFFaultManagement-API/jsons/AlarmListRebuiltNotification.json @@ -0,0 +1,10 @@ +{{ + "id":"", + "notificationType":"AlarmListRebuiltNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "_links":{{ + "subscription":"", + "alarms":"" + }} +}} diff --git a/SOL003/VNFFaultManagement-API/jsons/AlarmNotification.json b/SOL003/VNFFaultManagement-API/jsons/AlarmNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..2a8e86425bac0e428e5eabff99767ed67665121d --- /dev/null +++ b/SOL003/VNFFaultManagement-API/jsons/AlarmNotification.json @@ -0,0 +1,13 @@ +{{ + "id":"", + "notificationType":"AlarmNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "alarm":{{ + "id":"", + "managedObjectId":"" + }}, + "_links":{{ + "subscription":"" + }} +}} diff --git a/SOL003/VNFFaultManagement-API/jsons/fmSubscriptionRequest.json b/SOL003/VNFFaultManagement-API/jsons/fmSubscriptionRequest.json index e44916f8dd95ffe1fd61888add4ebf78653c43f1..b28685555bf526fb1b84c4885a78689a3a336895 100644 --- a/SOL003/VNFFaultManagement-API/jsons/fmSubscriptionRequest.json +++ b/SOL003/VNFFaultManagement-API/jsons/fmSubscriptionRequest.json @@ -1,10 +1,10 @@ -{ - "filter": { - "vnfInstanceSubscriptionFilter": { +{{ + "filter": {{ + "vnfInstanceSubscriptionFilter": {{ "vnfdIds": [ - "6fc3539c-e602-4afa-8e13-962fb5a7d81f" + "{vnfdIds}" ] - } - }, - "callbackUri": "http://127.0.0.1/subscribe" -} \ No newline at end of file + }} + }}, + "callbackUri": "{callback_uri}{callback_endpoint}" +}} \ No newline at end of file diff --git a/SOL003/VNFFaultManagementNotification-API/NotificationEndpoint.robot b/SOL003/VNFFaultManagementNotification-API/Notifications.robot similarity index 89% rename from SOL003/VNFFaultManagementNotification-API/NotificationEndpoint.robot rename to SOL003/VNFFaultManagementNotification-API/Notifications.robot index 95a357d1e83e4eb2ad01bba3f58ba37174adfb74..ded07dadcaa6257a27531822276f3ad11239ac1b 100644 --- a/SOL003/VNFFaultManagementNotification-API/NotificationEndpoint.robot +++ b/SOL003/VNFFaultManagementNotification-API/Notifications.robot @@ -15,7 +15,7 @@ VNF Fault Alarm Notification ... Test title: VNF Fault Alarm Notification ... Test objective: The objective is to test the dispatch of VNF Fault Alarm Notification when a virtualised resource within an VNF instance fails, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A VNF instance is instantiated, and a subscription for fault alarm notifications is available in the VNFM. - ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -28,7 +28,7 @@ VNF Fault Alarm Cleared Notification ... Test title: VNF Fault Alarm Cleared Notification ... Test objective: The objective is to test the dispatch of VNF Fault Alarm Cleared Notification when a faulty virtualised resource within an VNF instance is cleared, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A VNF instance is instantiated, a virtualised resource is in faulty state, and a subscription for fault alarm cleared notifications is available in the VNFM. - ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -41,7 +41,7 @@ VNF Fault Alarm List Rebuilt Notification ... Test title: VNF Fault Alarm List Rebuilt Notification ... Test objective: The objective is to test the dispatch of VNF Fault Alarm List Rebuilt Notification when the VNFM decides to rebuild the list of its VNF alarms, e.g. due to a corruption in the alarm storage, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A VNF instance is instantiated, one or more virtualised resource are in faulty state, and a subscription for fault alarm list rebuilt notifications is available in the VNFM. - ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -113,8 +113,10 @@ Configure Notification Alarm List Rebuilt Handler set to dictionary ${json} notificationType ${type} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Alarm Handler @@ -123,8 +125,10 @@ Configure Notification Alarm Handler set to dictionary ${json} notificationType ${type} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Alarm Cleareance Handler @@ -133,8 +137,10 @@ Configure Notification Alarm Cleareance Handler set to dictionary ${json} notificationType ${type} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL003/VNFIndicator-API/ApiVersion.robot b/SOL003/VNFIndicator-API/ApiVersion.robot index 86dbd9074b64717e06eda6b045f23f607bc7af26..819592ceb239228e6114854ebc0b370c890343e5 100644 --- a/SOL003/VNFIndicator-API/ApiVersion.robot +++ b/SOL003/VNFIndicator-API/ApiVersion.robot @@ -1,213 +1,213 @@ -*** Settings *** - -Resource environment/variables.txt - -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Library DependencyLibrary -Library JSONLibrary -Library JSONSchemaLibrary schemas/ - -*** Test Cases *** -POST API Version - Method not implemented - [Documentation] Test ID: 7.3.6.7.1 - ... Test title: POST API version - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version - [Documentation] Test ID: 7.3.6.7.2 - ... Test title: GET API Version - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version - Method not implemented - [Documentation] Test ID: 7.3.6.7.3 - ... Test title: PUT API Version - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version - Method not implemented - [Documentation] Test ID: 7.3.6.7.4 - ... Test title: PATCH API Version - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version - Method not implemented - [Documentation] Test ID: 7.3.6.7.5 - ... Test title: DELETE API Version - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -POST API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.6.7.6 - ... Test title: POST API version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version with apiMajorVerion - [Documentation] Test ID: 7.3.6.7.7 - ... Test title: GET API Version with apiMajorVerion - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.6.7.8 - ... Test title: PUT API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.6.7.9 - ... Test title: PATCH API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.6.7.10 - ... Test title: DELETE API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -*** Keywords *** -POST API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response['body']} +*** Settings *** + +Resource environment/variables.txt + +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 7.3.6.7.1 + ... Test title: POST API version - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 7.3.6.7.2 + ... Test title: GET API Version + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version - Method not implemented + [Documentation] Test ID: 7.3.6.7.3 + ... Test title: PUT API Version - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 7.3.6.7.4 + ... Test title: PATCH API Version - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 7.3.6.7.5 + ... Test title: DELETE API Version - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +POST API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.6.7.6 + ... Test title: POST API version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 7.3.6.7.7 + ... Test title: GET API Version with apiMajorVerion + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.6.7.8 + ... Test title: PUT API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.6.7.9 + ... Test title: PATCH API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.6.7.10 + ... Test title: DELETE API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL003/VNFIndicator-API/IndividualSubscription.robot b/SOL003/VNFIndicator-API/IndividualSubscription.robot index 161a48b875e61282e852c7b57dc631ad809fc2f2..cf162f22b690c0890ca42572fd0ccb963b2e5554 100644 --- a/SOL003/VNFIndicator-API/IndividualSubscription.robot +++ b/SOL003/VNFIndicator-API/IndividualSubscription.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/individualSubscription.txt Resource VNFIndicatorsKeywords.robot Library OperatingSystem Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -12,7 +11,7 @@ GET Individual VNF Indicator Subscription ... Test title: GET Individual VNF Indicator Subscription ... Test objective: The objective is to test the retrieval of individual VNF indicator subscription and perform a JSON schema validation of the returned subscription data structure ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -25,19 +24,20 @@ GET Individual VNF Indicator Subscription with invalid resource identifier ... Test title: GET Individual VNF Indicator Subscription with invalid resource identifier ... Test objective: The objective is to test that the retrieval of individual VNF indicator subscription fails when using an invalid resource identifier. ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none GET Individual VNF Indicator Subscription with invalid resource identifier Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails DELETE Individual VNF Indicator Subscription [Documentation] Test ID: 7.3.6.5.3 ... Test title: DELETE Individual VNF Indicator Subscription ... Test objective: The objective is to test the deletion of an individual VNF indicator subscription. ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The subscription to VNF indicators is deleted @@ -50,7 +50,7 @@ DELETE Individual VNF Indicator Subscription with invalid resource identifier ... Test title: DELETE Individual VNF Indicator Subscription with invalid resource identifier ... Test objective: The objective is to test that the deletion of an individual VNF indicator subscription fails when using an invalid resource identifier. ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -62,36 +62,33 @@ PUT Individual VNF Indicator Subscription - Method not implemented ... Test title: PUT Individual VNF Indicator Subscription - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify an individual VNF indicator subscription ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.6.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.6.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The individual VNF indicator subscription is not modified by the operation Send Put Request for Individual VNF Indicator Subscription Check HTTP Response Status Code Is 405 - Check Postcondition VNF indicator subscription Unmodified (Implicit) PATCH Individual VNF Indicator Subscription - Method not implemented [Documentation] Test ID: 7.3.6.5.6 ... Test title: PATCH Individual VNF Indicator Subscription - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update an individual VNF indicator subscription ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.6.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.6.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The individual VNF indicator subscription is not modified by the operation + ... Post-Conditions: none Send Patch Request for Individual VNF Indicator Subscription Check HTTP Response Status Code Is 405 - Check Postcondition VNF indicator subscription Unmodified (Implicit) - + POST Individual VNF Indicator Subscription - Method not implemented [Documentation] Test ID: 7.3.6.5.7 ... Test title: POST Individual VNF Indicator Subscription - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new VNF indicator subscription ... Pre-conditions: A VNF instance is instantiated. - ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The individual VNF indicator subscription is not created by the operation + ... Post-Conditions: none Send Post Request for Individual VNF Indicator Subscription - Check HTTP Response Status Code Is 405 - Check Postcondition VNF indicator subscription is not created \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFIndicator-API/IndividualVNFindicator.robot b/SOL003/VNFIndicator-API/IndividualVNFindicator.robot index c88c89903220e6df5bab4e40cdeb5e977bc1e41b..916331fbb2c40abb2681bac7a31bb5e5fbce45ed 100644 --- a/SOL003/VNFIndicator-API/IndividualVNFindicator.robot +++ b/SOL003/VNFIndicator-API/IndividualVNFindicator.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/individualVnfIndicator.txt Resource VNFIndicatorsKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -11,7 +10,7 @@ Get Individual Indicator for VNF Instance ... Test title: Get Individual Indicator for VNF Instance ... Test objective: The objective is to test the retrieval of an indicator for a given VNF instance and perform a JSON schema validation of the returned indicator data structure ... Pre-conditions: A VNF instance is instantiated. At least one measure of VNF indicator is available in the VNFM. - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -26,19 +25,20 @@ Get Individual Indicator for VNF Instance with invalid indicator identifier ... Test title: Get Individual Indicator for VNF Instance with invalid indicator identifier ... Test objective: The objective is to test that the retrieval of an indicator for a given VNF instance fails when using an invalid resource identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. At least one measure of VNF indicator is available in the VNFM. - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Get Individual Indicator for a VNF instance with invalid indicator identifier Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails POST Individual VNF Indicator for VNF Instance - Method not implemented [Documentation] Test ID: 7.3.6.3.3 ... Test title: POST Individual VNF Indicator for VNF Instance - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new VNF indicator in the VNFM ... Pre-conditions: A VNF instance is instantiated. - ... Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -50,7 +50,7 @@ PUT Individual VNF Indicator for VNF Instance - Method not implemented ... Test title: PUT Individual VNF Indicator for VNF Instance - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify an existing indicator for a VNF instance ... Pre-conditions: A VNF instance is instantiated. At least one measure of VNF indicator is available in the VNFM - ... Reference: Clause 8.4.4.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.4.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -62,7 +62,7 @@ PATCH Individual VNF Indicator for VNF Instance - Method not implemented ... Test title: PATCH Individual VNF Indicator for VNF Instance - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update an existing indicator for a VNF instance ... Pre-conditions: A VNF instance is instantiated. At least one measure of VNF indicator is available for the given VNF instance. - ... Reference: Clause 8.4.4.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.4.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -74,10 +74,9 @@ DELETE Individual VNF Indicator for VNF Instance - Method not implemented ... Test title: DELETE Individual VNF Indicator for VNF Instance - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete an existing indicator for a VNF instance ... Pre-conditions: A VNF instance is instantiated. At least one measure of VNF indicator is available in the VNFM - ... Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The individual indicator for the VNF instance is not deleted by the unsuccessful operation + ... Post-Conditions: none Send DELETE Request for individual indicator in VNF instance - Check HTTP Response Status Code Is 405 - Check Postcondition Indicator for VNF instance Exist \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFIndicator-API/NotificationEndpoint.robot b/SOL003/VNFIndicator-API/NotificationEndpoint.robot new file mode 100644 index 0000000000000000000000000000000000000000..5e7e69d7ba90d8acd24f3a773f8b9ee347ee4f51 --- /dev/null +++ b/SOL003/VNFIndicator-API/NotificationEndpoint.robot @@ -0,0 +1,46 @@ +*** Settings *** +Library String +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Library OperatingSystem +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +VNF Indicator Value Change Notification + [Documentation] Test ID: 7.3.6.7.1 + ... Test title: VNF Indicator Value Change Notification + ... Test objective: The objective is to test that the POST request triggers VNF Indicator Value Change Notification. + ... Pre-conditions: A VNF is instantiated, and a subscription for indicator value change notifications is available in the VNFM. + ... Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post VNF Indicator Value Change Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body VnfIndicatorSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post VNF Indicator Value Change Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/VnfIndicatorValueChangeNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} indicatorId=${indicatorId} vnfInstanceId=${vnfInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} diff --git a/SOL003/VNFIndicator-API/VnfIndicatorNotification.robot b/SOL003/VNFIndicator-API/Notifications.robot similarity index 89% rename from SOL003/VNFIndicator-API/VnfIndicatorNotification.robot rename to SOL003/VNFIndicator-API/Notifications.robot index 057e7f1ef63ad63959c44b4f1d0ca742b63f2780..ee235b0b1b89a5c7f5c58c3cee4bcd1f10cce533 100644 --- a/SOL003/VNFIndicator-API/VnfIndicatorNotification.robot +++ b/SOL003/VNFIndicator-API/Notifications.robot @@ -16,7 +16,7 @@ VNF Indicator Value Change Notification ... Test title: VNF Indicator Value Change Notification ... Test objective: The objective is to test the dispatch of VNF Indicator Value Change Notification when new indicator values are available in the VNFM, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A VNF is instantiated, and a subscription for indicator value change notifications is available in the VNFM. - ... Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -49,8 +49,10 @@ Configure Notification Indicator Value Change Handler set to dictionary ${json} notificationType ${type} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL003/VNFIndicator-API/Subscriptions.robot b/SOL003/VNFIndicator-API/Subscriptions.robot index e9eeed23fc26de853eb9ce2b70bdfe013ef7527d..f20c0f888f0fff7252e091eb2cae394c769a3e9b 100644 --- a/SOL003/VNFIndicator-API/Subscriptions.robot +++ b/SOL003/VNFIndicator-API/Subscriptions.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/subscriptions.txt Resource VNFIndicatorsKeywords.robot Library OperatingSystem Library JSONLibrary @@ -17,7 +16,7 @@ GET All VNF Indicator Subscriptions ... Test title: GET All VNF Indicator Subscriptions ... Test objective: The objective is to test the retrieval of all VNF indicator subscriptions and perform a JSON schema validation of the returned subscriptions data structure ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -30,7 +29,7 @@ GET VNF Indicator Subscriptions with attribute-based filter ... Test title: GET VNF Indicator Subscriptions with attribute-based filter ... Test objective: The objective is to test the retrieval of VNF indicator subscriptions using attribute-based filter, perform a JSON schema validation of the collected indicators data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -44,7 +43,7 @@ GET VNF Indicator Subscriptions with invalid attribute-based filter ... Test title: GET VNF Indicator Subscriptions with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of VNF indicator subscriptions fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -57,7 +56,7 @@ GET VNF Indicator Subscriptions with invalid resource endpoint ... Test title: GET VNF Indicator Subscriptions with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of all VNF indicator subscriptions fails when using invalid resource endpoint. ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -69,7 +68,7 @@ Create new VNF indicator subscription ... Test title: Create new VNF indicator subscription ... Test objective: The objective is to test the creation of a new VNF indicator subscription and perform a JSON schema and content validation of the returned subscription data structure ... Pre-conditions: A VNF instance is instantiated. - ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF indicator subscription is successfully set and it matches the issued subscription @@ -85,7 +84,7 @@ Create duplicated VNF indicator subscription with VNFM not creating duplicated s ... Test title: Create duplicated VNF indicator subscription with VNFM not creating duplicated subscriptions ... Test objective: The objective is to test the attempt of a creation of a duplicated VNF indicator subscription and check that no new subscription is created by the VNFM and a link to the original subscription is returned ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNFM does not support the creation of duplicated subscriptions ... Post-Conditions: The existing VNF indicator subscription returned is available in the VNFM @@ -101,7 +100,7 @@ Create duplicated VNF indicator subscription with VNFM creating duplicated subsc ... Test title: Create duplicated VNF indicator subscription with VNFM creating duplicated subscriptions ... Test objective: The objective is to test the creation of a duplicated VNF indicator subscription and perform a JSON schema and content validation of the returned duplicated subscription data structure ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNFM supports the creation of duplicated subscriptions ... Post-Conditions: The duplicated VNF indicator subscription is successfully set and it matches the issued subscription @@ -116,7 +115,7 @@ PUT VNF Indicator Subscriptions - Method not implemented ... Test title: PUT VNF Indicator Subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify VNF indicator subscriptions ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -128,7 +127,7 @@ PATCH VNF Indicator Subscriptions - Method not implemented ... Test title: PATCH VNF Indicator Subscriptions - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update VNF indicator subscriptions ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -140,36 +139,48 @@ DELETE VNF Indicator Subscriptions - Method not implemented ... Test title: DELETE VNF Indicator Subscriptions - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete VNF indicators subscriptions ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The VNF indicator subscriptions are not deleted by the failed operation + ... Post-Conditions: none Send Delete Request for VNF Indicator Subscriptions Check HTTP Response Status Code Is 405 - Check Postcondition VNF Indicator Subscriptions Exists GET All VNF Indicator Subscriptions as Paged Response [Documentation] Test ID: 7.3.6.4.11 ... Test title: GET All VNF Indicator Subscriptions as Paged Response ... Test objective: The objective is to test the retrieval of all VNF indicator subscriptions as Paged Response. ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Get All VNF Indicators Subscriptions Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link GET VNF Indicator Subscriptions - Bad Request Response too Big [Documentation] Test ID: 7.3.6.4.12 ... Test title: GET VNF Indicator Subscriptions - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of VNF indicator subscriptions fails because reponse is too big, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Get All VNF Indicators Subscriptions Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails + +POST Create a new Subscription - Unprocessable Entity + [Documentation] Test ID: 7.3.6.4.13 + ... Test title: POST Create a new Subscription - Unprocessable Entity + ... Test objective: The objective is to test that content type of the payload body is supported and the payload body of a request contains syntactically correct data but the data cannot be processed. + ... re-conditions: none + ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Send Post Request for VNF Indicator Subscription + Check HTTP Response Status Code Is 422 + Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL003/VNFIndicator-API/VNFIndicators.robot b/SOL003/VNFIndicator-API/VNFIndicators.robot index b215736ac171690fc830a092170d4f2da5060b6d..66a032edf63ce621b3d01cab18e803cd219d3d8e 100644 --- a/SOL003/VNFIndicator-API/VNFIndicators.robot +++ b/SOL003/VNFIndicator-API/VNFIndicators.robot @@ -2,7 +2,6 @@ Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters Library JSONLibrary -Resource environment/vnfIndicators.txt Resource VNFIndicatorsKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -12,7 +11,7 @@ Get all VNF Indicators ... Test title: Get all VNF Indicators ... Test objective: The objective is to test the retrieval of all the available VNF indicators and perform a JSON schema validation of the collected indicators data structure ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -25,7 +24,7 @@ Get VNF Indicators with attribute-based filter ... Test title: Get VNF Indicators with attribute-based filter ... Test objective: The objective is to test the retrieval of VNF indicators using attribute-based filter, perform a JSON schema validation of the collected indicators data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -39,7 +38,7 @@ Get VNF Indicators with invalid attribute-based filter ... Test title: Get VNF Indicators with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of VNF indicators fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -52,7 +51,7 @@ Get all VNF Indicators with malformed authorization token ... Test title: Get all VNF Indicators with malformed authorization token ... Test objective: The objective is to test that the retrieval of VNF indicators fails when using malformed authorization token ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNFM requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none @@ -64,7 +63,7 @@ Get all VNF Indicators without authorization token ... Test title: Get all VNF Indicators without authorization token ... Test objective: The objective is to test that the retrieval of VNF indicators fails when omitting the authorization token ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNF requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none @@ -76,7 +75,7 @@ GET all VNF Indicators with expired or revoked authorization token ... Test title: GET all VNF Indicators with expired or revoked authorization token ... Test objective: The objective is to test that the retrieval of VNF indicators fails when using expired or revoked authorization token ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNF requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none @@ -88,7 +87,7 @@ Get all VNF Indicators with invalid resource endpoint ... Test title: Get all VNF Indicators with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of VNF indicators fails when using invalid resource endpoint ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -100,7 +99,7 @@ POST all VNF Indicators - Method not implemented ... Test title: POST all VNF Indicators - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create new VNF indicators ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM - ... Reference: Clause 8.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -112,7 +111,7 @@ PUT all VNF Indicators - Method not implemented ... Test title: PUT all VNF Indicators - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify VNF indicators ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM - ... Reference: Clause 8.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -124,7 +123,7 @@ PATCH all VNF Indicators - Method not implemented ... Test title: PATCH all VNF Indicators - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update VNF indicators ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNF - ... Reference: Clause 8.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -136,7 +135,7 @@ DELETE all VNF Indicators - Method not implemented ... Test title: DELETE all VNF Indicators - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete VNF indicators ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNF - ... Reference: Clause 8.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF indicators are not deleted by the unsuccessful operation @@ -149,20 +148,20 @@ Get all VNF Indicators as Paged Response ... Test title: Get all VNF Indicators as Paged Response ... Test objective: The objective is to test the retrieval of all the available VNF indicators as Paged Response. ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Get all VNF indicators Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link Get VNF Indicators - Bad Request Response too Big [Documentation] Test ID: 7.3.6.1.13 ... Test title: Get VNF Indicators - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of VNF indicators fails because reponse is too big, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none diff --git a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot index cb9e3925c6a08fcff632ef58a765a2ca91c659e3..7c6cbd5ecddad71a685acec70e11425c93ac9be7 100644 --- a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot +++ b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot @@ -1,10 +1,5 @@ *** Settings *** Resource environment/variables.txt -Resource environment/subscriptions.txt -Resource environment/vnfIndicators.txt -Resource environment/vnfIndicatorinVnfInstance.txt -Resource environment/individualVnfIndicator.txt -Resource environment/individualSubscription.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library MockServerLibrary Library OperatingSystem @@ -19,8 +14,8 @@ Library String Get All VNF Indicators Subscriptions Log Trying to get the list of subscriptions Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} # Integer response status 200 @@ -35,8 +30,8 @@ Get All VNF Indicators Subscriptions Get VNF Indicators Subscriptions with filter Log Trying to get the list of subscriptions using filters Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ok} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${filter_ok} ${output}= Output response Set Suite Variable ${response} ${output} # Integer response status 200 @@ -51,8 +46,8 @@ Get VNF Indicators Subscriptions with filter Get VNF Indicators Subscriptions with invalid filter Log Trying to get the list of subscriptions using filters with wrong attribute name Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ko} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${filter_ko} ${output}= Output response Set Suite Variable ${response} ${output} # Integer response status 400 @@ -68,8 +63,8 @@ Get VNF Indicators Subscriptions with invalid filter Get VNF Indicators Subscriptions with invalid resource endpoint Log Trying to perform a request on a Uri which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscription + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscription ${output}= Output response Set Suite Variable ${response} ${output} # Integer response status 404 @@ -86,7 +81,7 @@ Get VNF Indicators Subscriptions with invalid authentication token Log Trying to perform a negative get, using wrong authorization bearer Pass Execution If ${AUTH_USAGE} == 0 Skipping test as VNFM is not supporting authentication Set Headers {"Accept": "${ACCEPT_JSON}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} # Integer response status 401 @@ -103,21 +98,20 @@ Send Post Request for VNF Indicator Subscription Log Trying to create a new 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 ${VNFM_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 VnfIndicatorSubscription.schema.json ${result} - # Log Validation of VnfIndicatorSubscription OK + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_endpoint=${callback_endpoint} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint @@ -125,26 +119,27 @@ Send Post Request for Duplicated VNF indicator Subscription Log Trying to create a subscription with an already created content 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} - # 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 VnfIndicatorSubscription.schema.json ${result} - # Log Validation of VnfIndicatorSubscription OK + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_endpoint=${callback_endpoint} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint Send Put Request for VNF Indicator Subscriptions 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}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -152,8 +147,8 @@ Send Put Request for VNF Indicator Subscriptions Send Patch Request for VNF Indicator Subscriptions 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}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -161,8 +156,8 @@ Send Patch Request for VNF Indicator Subscriptions Send Delete Request for VNF Indicator Subscriptions 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}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -198,8 +193,8 @@ Check Postcondition VNF Indicator Subscription Is Set Log Check Postcondition subscription exist Log Trying to get the subscription Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - Run Keyword If Should Not Be Equal As Strings ${location} Location GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${response['body']['id']} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If Should Not Be Equal As Strings ${location} Location GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${response['body']['id']} Run Keyword If Should Be Equal As Strings ${location} Location GET ${response['headers']['Location']} ${output}= Output response Set Suite Variable ${response} ${output} @@ -228,9 +223,9 @@ Check HTTP Response Header Contains Get all VNF indicators Log The GET method queries multiple VNF indicators Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} Set Suite Variable ${vnfIndicators} ${response['body']} @@ -238,18 +233,18 @@ Get all VNF indicators Get VNF indicators with filter Log The GET method queries multiple VNF indicators using Attribute-based filtering parameters Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators?${POS_FIELDS} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators?${POS_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} Get VNF indicators with invalid filter Log The GET method queries multiple VNF indicators using invalid Attribute-based filtering parameters Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators?${NEG_FIELDS} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators?${NEG_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} @@ -257,9 +252,9 @@ Get all VNF indicators with malformed authorization token Pass Execution If ${AUTH_USAGE} == 0 Skipping test as EM/VNF is not supporting authentication Log The GET method queries multiple VNF indicators using invalid token Set Headers {"Accept": "${ACCEPT_JSON}"} - Set Headers {"Authorization": "${BAD_AUTHORIZATION}"} + Set Headers {"${AUTHORIZATION_HEADER}": "${BAD_AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -267,9 +262,9 @@ Get all VNF indicators with expired or revoked authorization token Pass Execution If ${AUTH_USAGE} == 0 Skipping test as EM/VNF is not supporting authentication Log The GET method queries multiple VNF indicators using invalid token Set Headers {"Accept": "${ACCEPT_JSON}"} - Set Headers {"Authorization": "${NEG_AUTHORIZATION}"} + Set Headers {"${AUTHORIZATION_HEADER}": "${NEG_AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -278,48 +273,48 @@ Get all VNF indicators without authorization token Log The GET method queries multiple VNF indicators omitting token Set Headers {"Accept": "${ACCEPT_JSON}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} Get all VNF indicators with invalid resource endpoint Log The GET method queries multiple VNF indicators omitting token Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} Send POST Request for all VNF indicators log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/indicators + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for all VNF indicators 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}"} - Post ${apiRoot}/${apiName}/${apiVersion}/indicators + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for all VNF indicators 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}"} - Post ${apiRoot}/${apiName}/${apiVersion}/indicators + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for all VNF indicators 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}"} - Post ${apiRoot}/${apiName}/${apiVersion}/indicators + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -330,72 +325,72 @@ Check Postcondition VNF Indicators Exist Check HTTP Response Body vnfIndicators Matches the requested attribute-based filter Log Check Response includes VNF Indicators according to filter - @{attr} = Split String ${POS_FIELDS} ,${VAR_SEPERATOR} - @{var_name} = Split String @{attr}[0] ,${SEPERATOR} - @{var_id} = Split String @{attr}[1] ,${SEPERATOR} + @{attr} = Split String ${POS_FIELDS} ${VAR_SEPARATOR} + @{var_name} = Split String @{attr}[0] ${SEPARATOR} + @{var_id} = Split String @{attr}[1] ${SEPARATOR} Should Be True "${response['body'][0]['name']}"=="@{var_name}[1]" and "${response['body'][0]['vnfInstanceId']}"=="@{var_id}[1]" Get all indicators for a VNF instance Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} Get all indicators for a VNF instance with filter Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}?${POS_FIELDS} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}?${POS_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} Get all indicators for a VNF instance with invalid filter Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}?${NEG_FIELDS} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}?${NEG_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} Get all indicators for a VNF instance with invalid resource identifier Log Trying to perform a negative get, using wrong identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${erroneousVnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${erroneousVnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} Send POST Request for indicators in VNF instance 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}/indicators/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for indicators in VNF instance Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for indicators in VNF instance Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for indicators in VNF instance Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -403,59 +398,51 @@ Check HTTP Response Body Includes Requested VNF Instances ID Log Check Response includes Indicators according to resource identifier Should Be Equal As Strings ${response['body'][0]['vnfInstanceId']} ${vnfInstanceId} -Check Postcondition Indicators for VNF instance Exist - Log Check Postcondition Indicators for VNF instance Exist - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} - Should Be Equal ${response['status']} 200 - - Get Individual Indicator for a VNF instance Log This resource represents a VNF indicator related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} Get Individual Indicator for a VNF instance with invalid indicator identifier Log Trying to perform a negative get, using wrong identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${erroneousIndicatorId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${erroneousIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} Send POST Request for individual indicator in VNF instance Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for individual indicator in VNF instance Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for individual indicator in VNF instance Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for individual indicator in VNF instance Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -471,69 +458,65 @@ Check Postcondition Indicator for VNF instance Exist Log Check Response includes VNF Indicator Get Individual Indicator for a VNF instance Should Be Equal ${response['body']['vnfInstanceId']} ${vnfInstanceId} - Should Be Equal ${response['body']['id']} ${indicatorId} - -Check Postcondition VNF Indicator Subscriptions Exists - Log Checking that subscriptions exists - Get all VNF Indicators Subscriptions + Should Be Equal ${response['body']['id']} ${indicatorId} GET Individual VNF Indicator Subscription Log Trying to get a given subscription identified by subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} GET Individual VNF Indicator Subscription with invalid resource identifier Log Trying to perform a request on a subscriptionID which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete Request for Individual VNF Indicator Subscription Log Trying to perform a DELETE on a subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete Request for Individual VNF Indicator Subscription with invalid resource identifier Log Trying to perform a DELETE on a subscriptionId which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post Request for Individual VNF Indicator Subscription Log Trying to create a new subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put Request for Individual VNF Indicator Subscription Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Patch Request for Individual VNF Indicator Subscription Log Trying to create a new subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -542,20 +525,7 @@ Check Postcondition Individual VNF Indicator Subscription is Deleted GET Individual VNF Indicator Subscription Check HTTP Response Status Code Is 404 -Check Postcondition VNF indicator subscription Unmodified (Implicit) - Log Check Postcondition subscription is not modified - GET Individual VNF Indicator Subscription - Log Check Response matches original subscription - ${subscription}= evaluate json.loads('''${response['body']}''') json - Should Be Equal ${origResponse['body']['callbackUri']} ${subscription.callbackUri} - -Check Postcondition VNF indicator subscription is not created - Log Check Postcondition subscription is not created - GET Individual VNF Indicator Subscription with invalid resource identifier - Check HTTP Response Status Code Is 404 - -Create Sessions - Pass Execution If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 0 MockServer not necessary to run +Create Sessions Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri}:${callback_port} @@ -568,6 +538,6 @@ Check Notification Endpoint Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} -Check LINK in Header +Check HTTP Response Header Contain Link ${linkURL}= Get Value From Json ${response['headers']} $..Link Should Not Be Empty ${linkURL} diff --git a/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot b/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot index a160eff47c297b5fe7ffdce2069991b4bc00915e..0c8b3fffbb838485b07b651453870de12ebce0a3 100644 --- a/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot +++ b/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/vnfIndicatorinVnfInstance.txt Resource VNFIndicatorsKeywords.robot Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -12,7 +11,7 @@ Get Indicators for VNF Instance ... Test title: Get Indicators for VNF Instance ... Test objective: The objective is to test the retrieval of all indicators for a given VNF instance and perform a JSON schema validation of the returned indicators data structure ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. - ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -26,7 +25,7 @@ GET Indicators for VNF Instance with attribute-based filter ... Test title: GET Indicators for VNF Instance with attribute-based filter ... Test objective: The objective is to test the retrieval of all indicators for a given VNF instance using attribute-based filter and perform a JSON schema validation of the returned indicators data structure ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. - ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -40,7 +39,7 @@ Get Indicators for VNF Instance with invalid attribute-based filter ... Test title: Get Indicators for VNF Instance with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of all indicators for a given VNF instance fails using invalid attribute-based filter. The test also checks the JSON schema of the unsuccessful operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. - ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -53,7 +52,7 @@ Get Indicators for VNF Instance with invalid resource identifier ... Test title: Get Indicators for VNF Instance with invalid resource identifier ... Test objective: The objective is to test that the retrieval of all indicators for a given VNF instance fails when using invalid resource identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. - ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -66,7 +65,7 @@ POST Indicators for VNF instance - Method not implemented ... Test title: POST Indicators for VNF instance - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create new indicators for a VNF instance ... Pre-conditions: A VNF instance is instantiated. - ... Reference: Clause 8.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -78,7 +77,7 @@ PUT Indicators for VNF instance - Method not implemented ... Test title: PUT Indicators for VNF instance - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify existing indicators for a VNF instance ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. - ... Reference: Clause 8.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -90,7 +89,7 @@ PATCH Indicators for VNF instance - Method not implemented ... Test title: PATCH Indicators for VNF instance - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update existing indicators for a VNF instance ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. - ... Reference: Clause 8.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -102,33 +101,32 @@ DELETE Indicators for VNF instance - Method not implemented ... Test title: DELETE Indicators for VNF instance - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete indicators for a VNF instance ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. - ... Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The indicators for the VNF instance are not deleted by the unsuccessful operation + ... Post-Conditions: none Send DELETE Request for indicators in VNF instance Check HTTP Response Status Code Is 405 - Check Postcondition Indicators for VNF instance Exist Get Indicators for VNF Instance as Paged Response [Documentation] Test ID: 7.3.6.2.9 ... Test title: Get Indicators for VNF Instance as Paged Response ... Test objective: The objective is to test the retrieval of all indicators for a given VNF instance as Paged Response. ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. - ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Get all indicators for a VNF instance Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link Get Indicators for VNF Instance - Bad Request Response too Big [Documentation] Test ID: 7.3.6.2.10 ... Test title: Get Indicators for VNF Instance - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of all indicators for a given VNF instance fails because response is too big. The test also checks the JSON schema of the unsuccessful operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. - ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none diff --git a/SOL003/VNFIndicator-API/environment/individualSubscription.txt b/SOL003/VNFIndicator-API/environment/individualSubscription.txt deleted file mode 100644 index a85388af9a9ca756b625f7cb0cc8fce61effa99f..0000000000000000000000000000000000000000 --- a/SOL003/VNFIndicator-API/environment/individualSubscription.txt +++ /dev/null @@ -1,7 +0,0 @@ -*** Variables *** -${subscriptionId} 17563e75-0e14-4bd7-94b4-6bbb869c79aa -${erroneousSubscriptionId} erroneousSubscriptionId -${newSubscriptionId} newSubsciptionId -${response} httpresponse -${origResponse} httpresponse - diff --git a/SOL003/VNFIndicator-API/environment/individualVnfIndicator.txt b/SOL003/VNFIndicator-API/environment/individualVnfIndicator.txt deleted file mode 100644 index 010a634eb130d8ee304a773f7aff14ad4d2db757..0000000000000000000000000000000000000000 --- a/SOL003/VNFIndicator-API/environment/individualVnfIndicator.txt +++ /dev/null @@ -1,7 +0,0 @@ -*** Variables *** -${vnfInstanceId} 80b0deba-c398-445b-bef0-ac0fe733e3d0 -${indicatorId} 34e70855-a9d3-4fef-aece-76a3cd266ec8 -${notAllowedIndicatorId} notAllowedId -${erroneousIndicatorId} erroneousIndicatorId -${response}= httpresponse - diff --git a/SOL003/VNFIndicator-API/environment/subscriptions.txt b/SOL003/VNFIndicator-API/environment/subscriptions.txt deleted file mode 100644 index 5dea0892b05257ee49b518ea27f85a10d391c8ab..0000000000000000000000000000000000000000 --- a/SOL003/VNFIndicator-API/environment/subscriptions.txt +++ /dev/null @@ -1,7 +0,0 @@ -*** Variables *** -${filter_ok} callbackUri=${callbackUri} -${filter_ko} erroneousFilter=erroneous -${callbackUri} http://172.22.1.7:9091/vnfind/subscriptions -${total_polling_time} 2 min -${polling_interval} 10 sec - diff --git a/SOL003/VNFIndicator-API/environment/variables.txt b/SOL003/VNFIndicator-API/environment/variables.txt index 5949e3c1705175a263265b4d48ded922513de472..86318fb44dfdd9ff67f49a644ff49b79b897c7b5 100644 --- a/SOL003/VNFIndicator-API/environment/variables.txt +++ b/SOL003/VNFIndicator-API/environment/variables.txt @@ -3,15 +3,16 @@ ${VNFM_HOST} localhost # Hostname of the VNFM ${VNFM_PORT} 8080 # Listening port of the VNFM ${VNFM_SCHEMA} https -${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 -${NEG_AUTHORIZATION} Bearer negativetoken -${BAD_AUTHORIZATION} Bear sometoken +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${NEG_AUTHORIZATION_TOKEN} Bearer negativetoken +${BAD_AUTHORIZATION_TOKEN} Bear sometoken ${ACCEPT_JSON} application/json ${AUTH_USAGE} 1 ${CONTENT_TYPE_JSON} application/json ${apiRoot} / -${apiVersion} v1 +${apiMajorVersion} v1 ${apiName} vnfind ${VNFM_CHECKS_NOTIF_ENDPOINT} 1 ## If true, during subscription, the FUT performs a get to the notification endpoint @@ -32,4 +33,31 @@ ${polling_interval} 10 sec ${notification_request} [] ${notification_response} [] -${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar \ No newline at end of file +${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + + +${subscriptionId} 17563e75-0e14-4bd7-94b4-6bbb869c79aa +${erroneousSubscriptionId} erroneousSubscriptionId +${newSubscriptionId} newSubsciptionId +${origResponse} httpresponse + + +${vnfInstanceId} 80b0deba-c398-445b-bef0-ac0fe733e3d0 +${indicatorId} 34e70855-a9d3-4fef-aece-76a3cd266ec8 +${notAllowedIndicatorId} notAllowedId +${erroneousIndicatorId} erroneousIndicatorId + + +${filter_ok} callbackUri=${callbackUri} +${filter_ko} erroneousFilter=erroneous + + +${erroneousVnfInstanceId} erroneousVnfInstanceId +${POS_FIELDS} name=vnfIndicator +${NEG_FIELDS} wrongName=any_value + + +${SEPARATOR} = +${VAR_SEPARATOR} & + +${callbackResp} localhost \ No newline at end of file diff --git a/SOL003/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt b/SOL003/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt deleted file mode 100644 index 13ef83d69d114ec300b29757e0d7e90b4a2cd2fe..0000000000000000000000000000000000000000 --- a/SOL003/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt +++ /dev/null @@ -1,5 +0,0 @@ -*** Variables *** -${vnfInstanceId} 80b0deba-c398-445b-bef0-ac0fe733e3d0 -${erroneousVnfInstanceId} erroneousVnfInstanceId -${POS_FIELDS} name=vnfIndicator -${NEG_FIELDS} wrongName=any_value diff --git a/SOL003/VNFIndicator-API/environment/vnfIndicators.txt b/SOL003/VNFIndicator-API/environment/vnfIndicators.txt deleted file mode 100644 index b4ca7ceaa9fcad5846b482cff770f9dd4ae190d4..0000000000000000000000000000000000000000 --- a/SOL003/VNFIndicator-API/environment/vnfIndicators.txt +++ /dev/null @@ -1,5 +0,0 @@ -*** Variables *** -${POS_FIELDS} name=vnfIndicator&vnfInstanceId=80b0deba-c398-445b-bef0-ac0fe733e3d0 -${NEG_FIELDS} wrongName=wrongValue -${SEPERATOR} = -${VAR_SEPERATOR} & \ No newline at end of file diff --git a/SOL003/VNFIndicator-API/jsons/VnfIndicatorValueChangeNotification.json b/SOL003/VNFIndicator-API/jsons/VnfIndicatorValueChangeNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..c6dd2a1cc7c0e58de90d86f563e5ba67c763d803 --- /dev/null +++ b/SOL003/VNFIndicator-API/jsons/VnfIndicatorValueChangeNotification.json @@ -0,0 +1,13 @@ +{{ + "id":"", + "notificationType":"VnfIndicatorValueChangeNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "vnfIndicatorId":"{indicatorId} ", + "value":"", + "vnfInstanceId":"{vnfInstanceId}", + "_links":{{ + "vnfInstance":"", + "subscription":"" + }} +}} diff --git a/SOL003/VNFIndicator-API/jsons/subscriptions.json b/SOL003/VNFIndicator-API/jsons/subscriptions.json index 3820370db565dfb805c7ffe1841d5992e917199a..42d0689a0f9d60aec42c28ef437bfefe5a526959 100644 --- a/SOL003/VNFIndicator-API/jsons/subscriptions.json +++ b/SOL003/VNFIndicator-API/jsons/subscriptions.json @@ -1,3 +1,3 @@ -{ - "callbackUri": "http://172.22.1.7:9091/vnfind/subscribes" -} \ No newline at end of file +{{ + "callbackUri": "{callback_uri}:{callback_port}{callback_endpoint}" +}} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/ApiVersion.robot b/SOL003/VNFLifecycleManagement-API/ApiVersion.robot index 3af9e2c16bf7223af40848a306dee20bdf6882af..5c35bdd70afa6a316390193df10d3bc03299410c 100644 --- a/SOL003/VNFLifecycleManagement-API/ApiVersion.robot +++ b/SOL003/VNFLifecycleManagement-API/ApiVersion.robot @@ -1,213 +1,212 @@ -*** Settings *** -Resource environment/configuration.txt -Resource environment/variables.txt -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Library DependencyLibrary -Library JSONLibrary -Library JSONSchemaLibrary schemas/ - -*** Test Cases *** -POST API Version - Method not implemented - [Documentation] Test ID: 7.3.1.35.1 - ... Test title: POST API version - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version - [Documentation] Test ID: 7.3.1.35.2 - ... Test title: GET API Version - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version - Method not implemented - [Documentation] Test ID: 7.3.1.35.3 - ... Test title: PUT API Version - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version - Method not implemented - [Documentation] Test ID: 7.3.1.35.4 - ... Test title: PATCH API Version - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version - Method not implemented - [Documentation] Test ID: 7.3.1.35.5 - ... Test title: DELETE API Version - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -POST API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.1.35.6 - ... Test title: POST API version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version with apiMajorVerion - [Documentation] Test ID: 7.3.1.35.7 - ... Test title: GET API Version with apiMajorVerion - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.1.35.8 - ... Test title: PUT API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.1.35.9 - ... Test title: PATCH API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.1.35.10 - ... Test title: DELETE API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -*** Keywords *** -POST API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response['body']} +*** Settings *** +Resource environment/variables.txt +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 7.3.1.35.1 + ... Test title: POST API version - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 7.3.1.35.2 + ... Test title: GET API Version + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version - Method not implemented + [Documentation] Test ID: 7.3.1.35.3 + ... Test title: PUT API Version - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 7.3.1.35.4 + ... Test title: PATCH API Version - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 7.3.1.35.5 + ... Test title: DELETE API Version - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +POST API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.1.35.6 + ... Test title: POST API version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 7.3.1.35.7 + ... Test title: GET API Version with apiMajorVerion + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.1.35.8 + ... Test title: PUT API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.1.35.9 + ... Test title: PATCH API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.1.35.10 + ... Test title: DELETE API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot b/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot index a716a2d1e13b4ccbeaea86ce99801b72d3430b4f..92461b333583732f62ff7d1136be9ccbc7345ec0 100644 --- a/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/CancelOperationTask.robot @@ -1,5 +1,4 @@ *** Settings *** -Resource environment/configuration.txt Resource environment/variables.txt Resource VnfLcmMntOperationKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -12,8 +11,8 @@ POST Cancel operation task [Documentation] Test ID: 7.3.1.16.1 ... Test title: POST Cancel operation task ... Test objective: The POST method initiates cancelling an ongoing VNF lifecycle operation while it is being executed or rolled back, i.e. the "VNF LCM operation occurrence" is either in "PROCESSING" or "ROLLING_BACK" state. - ... Pre-conditions: the "VNF LCM operation occurrence" is either in "PROCESSING" or "ROLLING_BACK" state. - ... Reference: Clause 5.4.17.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: The "VNF LCM operation occurrence" is either in "PROCESSING" or "ROLLING_BACK" state. + ... Reference: Clause 5.4.17.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: VNF instance status equal to FAILED_TEMP @@ -25,34 +24,34 @@ POST Cancel operation task Conflict [Documentation] Test ID: 7.3.1.16.2 ... Test title: POST Cancel operation task Conflict ... Test objective: The POST method is NOT cancelling an ongoing VNF lifecycle operation due to the fact that the VNF instance resource is not in STARTING, PROCESSING or ROLLING_BACK state - ... Pre-conditions: operation is not in STARTING, PROCESSING or ROLLING_BACK state - ... Reference: Clause 5.4.17.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: The "VNF LCM operation occurrence" is not in STARTING, PROCESSING or ROLLING_BACK state + ... Reference: Clause 5.4.17.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - POST Cancel operation task + POST Cancel operation task with conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails POST Cancel operation task Not Found - # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent [Documentation] Test ID: 7.3.1.16.3 ... Test title: POST Cancel operation task Not Found ... Test objective: The objective is to test that POST method cannot cancel a VNF lifecycle operation because the resource is not found - ... Pre-conditions: - ... Reference: Clause 5.4.17.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.17.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - POST Cancel operation task + POST Cancel operation task not existing Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails GET Cancel operation task - Method not implemented [Documentation] Test ID: 7.3.1.16.4 ... Test title: GET Cancel operation task - Method not implemented ... Test objective: The objective is to test that GET method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.17.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.17.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -64,7 +63,7 @@ PUT Cancel operation task - Method not implemented ... Test title: PUT Cancel operation task - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.17.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.17.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -76,7 +75,7 @@ PATCH Cancel operation task - Method not implemented ... Test title: PATCH Cancel operation task - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.17.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.17.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -88,31 +87,9 @@ DELETE Cancel operation task - Method not implemented ... Test title: DELETE Cancel operation task - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.17.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.17.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none DELETE Cancel operation task - Check HTTP Response Status Code Is 405 - -*** Keywords *** -Check resource existence - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - Integer response status 200 - -Launch another error handling action - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry - Integer response status 202 - -Check Fail not supported - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - # how to check if Fail is not supported? - -Check resource FAILED_TEMP - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - String response body operationState FAILED_TEMP \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/CancelOperationWorkflow.robot b/SOL003/VNFLifecycleManagement-API/CancelOperationWorkflow.robot index 05c970fa69cec1981971150eabeb20c7ca32a8a2..28738b8e5888e7e49f0daf2a50e50bd977419e5a 100644 --- a/SOL003/VNFLifecycleManagement-API/CancelOperationWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/CancelOperationWorkflow.robot @@ -1,7 +1,5 @@ *** Settings *** -Resource environment/configuration.txt Resource environment/variables.txt -Resource environment/scaleVariables.txt Resource VnfLcmMntOperationKeywords.robot Resource SubscriptionKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -20,7 +18,7 @@ Cancel a VNF LCM Operation - STARTING ... Test title: Cancel a VNF LCM Operation - STARTING ... Test objective: The objective is to test the workflow for Cancelling a VNF LCM Operation being in the STARTING state ... Pre-conditions: The VNF lifecycle management operation occurrence is in STARTING state. NFVO is subscribed to VNF LCM Operation Occurrence notifications (Test ID 5.4.20.1) - ... Reference: Clause 5.4.17 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.17 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: NFVO is able to receive notifications from VNFM ... Post-Conditions: The VNF lifecycle management operation occurrence is in ROLLED_BACK state @@ -36,7 +34,7 @@ Cancel a VNF LCM Operation - PROCESSING - ROLLING_BACK ... Test title: Cancel a VNF LCM Operation - PROCESSING - ROLLING_BACK ... Test objective: The objective is to test the workflow for Cancelling a VNF LCM Operation being either in the PROCESSIONG or ROLLING_BACK state ... Pre-conditions: The VNF lifecycle management operation occurrence is in PROCESSING or ROLLING_BACK state. NFVO is subscribed to VNF LCM Operation Occurrence notifications - ... Reference: Clause 5.3.10 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.3.10 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: NFVO is able to receive notifications from VNFM ... Post-Conditions: The VNF lifecycle management operation occurrence is in FAILED_TEMP state @@ -54,26 +52,20 @@ Initialize System Create Sessions Precondition Checks - STARTING - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body operationState STARTING -Precondition Checks - PROCESSING - ROLLING_BACK - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - String response body operationState PROCESSING - Check Postcondition VNF Cancel - STARTING - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body operationState ROLLED_BACK Check Postcondition VNF Cancel - PROCESSING - ROLLING_BACK - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body operationState FAILED_TEMP Check Operation Notification For Cancel [Arguments] ${status} - Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} - \ No newline at end of file + Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot b/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot index 8cabe1bbb6b8ce5574bea0ce084587ea89000976..32ee14b51452dba7fef49cb4cbaf184f3f009f62 100644 --- a/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot +++ b/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityTask.robot @@ -1,5 +1,4 @@ *** Settings *** -Resource environment/configuration.txt Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Resource VnfLcmMntOperationKeywords.robot @@ -13,7 +12,7 @@ POST Change external VNF connectivity ... Test title: POST Change external VNF connectivity ... Test objective: The objective is to test that POST method trigger a change in VNF external connectivity ... Pre-conditions: none - ... Reference: Clause 5.4.11.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.11.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: in response header Location shall not be null @@ -26,7 +25,7 @@ GET Change external VNF connectivity - Method not implemented ... Test title: GET Change external VNF connectivity - Method not implemented ... Test objective: The objective is to test that GET method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.11.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.11.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -38,7 +37,7 @@ PUT Change external VNF connectivity - Method not implemented ... Test title: PUT Change external VNF connectivity - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.11.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.11.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -50,7 +49,7 @@ PATCH Change external VNF connectivity - Method not implemented ... Test title: PATCH Change external VNF connectivity - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.11.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.11.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -62,25 +61,9 @@ DELETE Change external VNF connectivity - Method not implemented ... Test title: DELETE Change external VNF connectivity - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.11.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.11.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none DELETE Change External VNF Connectivity - Check HTTP Response Status Code Is 405 - -*** Keywords *** -Check resource existence - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Integer response status 200 - -Launch another LCM operation - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} - Integer response status 202 \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityWorkflow.robot b/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityWorkflow.robot index 5db4c928f05182e0226a572a7a5c1dfceaa57688..197063b642272026cc42d2d9496e9c5eb6eaae04 100644 --- a/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/ChangeExternalVNFConnectivityWorkflow.robot @@ -1,7 +1,5 @@ *** Settings *** -Resource environment/configuration.txt Resource environment/variables.txt -Resource environment/scaleVariables.txt Resource VnfLcmMntOperationKeywords.robot Resource SubscriptionKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -13,14 +11,13 @@ Library Process Suite Setup Initialize System Suite Teardown Terminate All Processes kill=true - *** Test Cases *** Change external connectivity of VNF Workflow [Documentation] Test ID: 7.3.1.20.1 ... Test title: Change external connectivity of VNF Workflow ... Test objective: The objective is to change the external connectivity of a VNF instance. ... Pre-conditions: VNF instance in INSTANTIATED state - ... Reference: Clause 5.4.11 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.11 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: NFVO is able to receive notifications from VNFM. The VNFD supports the external connectivity change ... Post-Conditions: VNF instance still in INSTANTIATED state and external connectivity of the VNF is changed @@ -39,19 +36,11 @@ Initialize System ${body}= Get File jsons/changeExtVnfConnectivityRequest.json ${changeVnfExtConnectivityRequest}= evaluate json.loads('''${body}''') json -Precondition Checks - Check resource instantiated - ${LccnSubscriptions}= Check subscriptions about one VNFInstance and operation type ${vnfInstanceId} VnfLcmOperationOccurrenceNotification operationType=SCALE - Check Postcondition VNF Change Ext Connectivity Check resource instantiated ${extVLId}= Get Vnf Ext Link Id ${vnfInstanceId} Should be Equal ${changeVnfExtConnectivityRequest["extVirtualLinks"][0]["id"]} ${extVLId} -Create a new Grant - Sync - OPERATE - Create a new Grant - Synchronous mode ${vnfInstanceId} ${vnfLcmOpOccId} OPERATE - Check Operation Notification For Change Ext Connectivity [Arguments] ${status} - Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} - \ No newline at end of file + Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot b/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot index 8ef6b52ddd5b2a54b7ae03fc9dab591cef3d52c6..93a4003e08a9d345765a899c8b0b19fc5d5d5a15 100644 --- a/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot +++ b/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourTask.robot @@ -1,5 +1,4 @@ *** Settings *** -Resource environment/configuration.txt Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Resource VnfLcmMntOperationKeywords.robot @@ -13,7 +12,7 @@ POST Change deployment flavour of a vnfInstance ... Test title: POST Change deployment flavour of a vnfInstance ... Test objective: The objective is to test that POST method trigger a change in VNF deployment flavour ... Pre-conditions: VNF instance resource is not in NOT-INSTANTIATED state - ... Reference: Clause 5.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: in response header Location shall not be null @@ -26,36 +25,33 @@ POST Change deployment flavour of a vnfInstance Conflict (Not-Instantiated) ... Test title: POST Change deployment flavour of a vnfInstance Conflict (Not-Instantiated) ... Test objective: The objective is to test that POST method cannot trigger a change in VNF deployment flavour because of a conflict with the state of the VNF instance resource. (VNF instance resource is not in NOT-INSTANTIATED state) ... Pre-conditions: VNF instance resource is in NOT-INSTANTIATED state - ... Reference: Clause 5.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - POST Change VNF deployment flavour + POST Change VNF deployment flavour of NOT-INSTANTIATED VNF Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - POST Change deployment flavour of a vnfInstance Not Found - # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent [Documentation] Test ID: 7.3.1.6.3 ... Test title: POST Change deployment flavour of a vnfInstance Not Found ... Test objective: The objective is to test that POST method cannot trigger a change in VNF deployment flavour because the VNF instance resource is not found. ... Pre-conditions: the VNF instance resource is not existing - ... Reference: Clause 5.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - POST Change VNF deployment flavour + POST Change VNF deployment flavour of not existing VNF Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails - - + GET Change deployment flavour VNFInstance - Method not implemented [Documentation] Test ID: 7.3.1.6.4 ... Test title: GET Change deployment flavour VNFInstance - Method not implemented ... Test objective: The objective is to test that GET method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -67,7 +63,7 @@ PUT Change deployment flavour VNFInstance - Method not implemented ... Test title: PUT Change deployment flavour VNFInstance - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.7.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.7.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -79,7 +75,7 @@ PATCH Change deployment flavour VNFInstance - Method not implemented ... Test title: PATCH Change deployment flavour VNFInstance - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.7.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.7.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -91,46 +87,9 @@ DELETE Change deployment flavour VNFInstance - Method not implemented ... Test title: DELETE Change deployment flavour VNFInstance - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.7.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.7.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none DELETE Change VNF deployment flavour - Check HTTP Response Status Code Is 405 - -*** Keywords *** -Check resource existence - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Integer response status 200 - -Check resource not instantiated - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - String response body instantiationState NOT_INSTANTIATED - -Check resource instantiated - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - String response body instantiationState INSTANTIATED - -Check change flavour not supported - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - # how to check if change floavour is not supported? "flavourId" doesn't exist? - -Launch another LCM operation - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} - Integer response status 202 \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourWorkflow.robot b/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourWorkflow.robot index 7d9d96b68f3f66a4ef8b79c894ae7c19ce362941..c772ba1c10322d408e0cc8def639e2338b6e6a41 100644 --- a/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/ChangeVNFFlavourWorkflow.robot @@ -1,7 +1,5 @@ *** Settings *** -Resource environment/configuration.txt Resource environment/variables.txt -Resource environment/scaleVariables.txt Resource VnfLcmMntOperationKeywords.robot Resource SubscriptionKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -13,14 +11,13 @@ Library Process Suite Setup Initialize System Suite Teardown Terminate All Processes kill=true - *** Test Cases *** Change VNF Flavour Workflow [Documentation] Test ID: 7.3.1.21.1 ... Test title: Change VNF Flavour Workflow ... Test objective: The objective is to test the workflow for a change flavour of an existing VNF instance ... Pre-conditions: VNF instance in INSTANTIATED state . NFVO is subscribed to VNF LCM Operation Occurrence notifications - ... Reference: Clause 5.4.7 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.7 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: Multiple flavours are supported for the VNF (as capability in the VNFD). NFVO is able to receive notifications from VNFM ... Post-Conditions: VNF instance still in INSTANTIATED state and the flavour is changed @@ -42,21 +39,12 @@ Initialize System ${body}= Get File jsons/changeVnfFlavourRequest.json ${changeVnfFlavourRequest}= evaluate json.loads('''${body}''') json ${requestedFlavour}= Get Value From Json ${changeVnfFlavourRequest} $..newFlavourId - -Precondition Checks - Check resource instantiated - ${LccnSubscriptions}= Check subscriptions about one VNFInstance and operation type ${vnfInstanceId} VnfLcmOperationOccurrenceNotification operationType=SCALE - ${scaleInfo}= Get Vnf Scale Info ${vnfInstanceId} Check Postcondition VNF Flavor Changed Check resource instantiated ${newFlavour}= Get Vnf Flavour Info ${vnfInstanceId} Should be Equal ${requestedFlavour} ${newFlavour} - -Create a new Grant - Sync - CHANGE_FLAVOUR - Create a new Grant - Synchronous mode ${vnfInstanceId} ${vnfLcmOpOccId} CHANGE_FLAVOUR - + Check Operation Notification For Change Flavour [Arguments] ${status} - Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} - \ No newline at end of file + Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/CreateVNFWorkflow.robot b/SOL003/VNFLifecycleManagement-API/CreateVNFWorkflow.robot index e5e3012df0a060ea9acd343c72938e6c4123b070..a3d0dab024ffcd1b87658fd73a78d3aef5dc589f 100644 --- a/SOL003/VNFLifecycleManagement-API/CreateVNFWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/CreateVNFWorkflow.robot @@ -1,7 +1,5 @@ *** Settings *** -Resource environment/configuration.txt Resource environment/variables.txt -Resource environment/scaleVariables.txt Resource VnfLcmMntOperationKeywords.robot Resource SubscriptionKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -13,14 +11,13 @@ Library Process Suite Setup Initialize System Suite Teardown Terminate All Processes kill=true - *** Test Cases *** Create VNF Instance Resource [Documentation] Test ID: 7.3.1.22.1 ... Test title: Create VNF Instance workflow ... Test objective: The objective is to test the workflow for the creation of a new VNF instance resource. ... Pre-conditions: NFVO is subscribed to VNF Identifier Creation notifications - ... Reference: Clause 5.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: NFVO is able to receive notifications from VNFM ... Post-Conditions: The VNF instance resource has been created in "NOT_INSTANTIATED" state. @@ -42,5 +39,4 @@ Check Postcondition VNF Instance Created status is Check VNF Status ${response['body']['instantiationState']} ${status} Check Operation Notification For VNF Instance Creation - Check VNF Instance Operation Notification VnfIdentifierCreationNotification ${vnfInstanceId} - \ No newline at end of file + Check VNF Instance Operation Notification VnfIdentifierCreationNotification ${vnfInstanceId} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/DeleteVNFWorkflow.robot b/SOL003/VNFLifecycleManagement-API/DeleteVNFWorkflow.robot index cf7d52867134e36385989528dc85d1fdb7d98665..353a4c42a3e918a01911b38969d2287865e3730c 100644 --- a/SOL003/VNFLifecycleManagement-API/DeleteVNFWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/DeleteVNFWorkflow.robot @@ -1,7 +1,5 @@ *** Settings *** -Resource environment/configuration.txt Resource environment/variables.txt -Resource environment/scaleVariables.txt Resource VnfLcmMntOperationKeywords.robot Resource SubscriptionKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -13,14 +11,13 @@ Library Process Suite Setup Initialize System Suite Teardown Terminate All Processes kill=true - *** Test Cases *** Delete VNF Instance Resource [Documentation] Test ID: 7.3.1.23.1 ... Test title: Delete VNF Instance workflow ... Test objective: The objective is to test the workflow for the deleteion of an existing VNF instance resource ... Pre-conditions: The VNF Instance resource is in NOT_INSTANTIATED state. NFVO is subscribed to VNF Identifier Creation notifications - ... Reference: Clause 5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: NFVO is able to receive notifications from VNFM ... Post-Conditions: The VNF instance resource is deleted on the VNFM. diff --git a/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot b/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot index 5e0c6ba821a5938db4e5f25e1aa891a6c0f7186e..646a2ab3c578ad747fb0a196a252d98621e7a8e7 100644 --- a/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/FailOperationTask.robot @@ -1,6 +1,5 @@ *** Settings *** -Resource environment/configuration.txt -Resource environment/variables.txt +Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library DependencyLibrary Library JSONLibrary @@ -13,48 +12,47 @@ POST Fail operation task ... Test title: POST Fail operation task ... Test objective: The objective is to test that POST method mark as "finally failed" a VNF lifecycle operation ... Pre-conditions: the "VNF LCM operation occurrence" resource is in "FAILED_TEMP" state. - ... Reference: Clause 5.4.16.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.16.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: VNF resource state is FINALLY_FAILED Post Fail operation - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check Operation Occurrence Id existence Check operation resource state is FINALLY_FAILED Post Fail operation task Conflict (Not-FAILED_TEMP) - # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state [Documentation] Test ID: 7.3.1.15.2 ... Test title: Post Fail operation task Conflict (Not-FAILED_TEMP) ... Test objective: The objective is to test that POST method cannot mark as "finally failed" a VNF lifecycle operation ... Pre-conditions: the "VNF LCM operation occurrence" resource is not in "FAILED_TEMP" state. - ... Reference: Clause 5.4.16.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.16.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Post Fail operation + Post Fail operation with conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails Post Fail operation task Not Found - # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent [Documentation] Test ID: 7.3.1.15.3 ... Test title: Post Fail operation task Not Found ... Test objective: The objective is to test that POST method cannot mark as "finally failed" a VNF lifecycle operation because the operation is not supported - ... Pre-conditions: - ... Reference: Clause 5.4.16.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.16.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Post Fail operation + Post Fail operation not existing Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails GET Fail operation task - Method not implemented [Documentation] Test ID: 7.3.1.15.4 ... Test title: GET Fail operation task- Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.16.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.16.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: @@ -66,7 +64,7 @@ PUT Fail operation task - Method not implemented ... Test title: PUT Fail operation task- Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.16.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.16.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: @@ -78,7 +76,7 @@ PATCH Fail operation task - Method not implemented ... Test title: PATCH Fail operation task- Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.16.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.16.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: @@ -90,27 +88,9 @@ DELETE Fail operation task - Method not implemented ... Test title: DELETE Fail operation task- Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.16.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.16.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: Delete Fail operation Check HTTP Response Status Code Is 405 - -*** Keywords *** -Check resource existence - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - Integer response status 200 - -Launch another error handling action - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry - Integer response status 202 - -Check Fail not supported - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - # how to check if Fail is not supported? - diff --git a/SOL003/VNFLifecycleManagement-API/FailOperationWorkflow.robot b/SOL003/VNFLifecycleManagement-API/FailOperationWorkflow.robot index 35c87ff12bf4e4ed79e3c6835e7d0436856d3008..e7bdd1e7428e4748b4818c758d77a5a130f18fe2 100644 --- a/SOL003/VNFLifecycleManagement-API/FailOperationWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/FailOperationWorkflow.robot @@ -1,7 +1,5 @@ *** Settings *** -Resource environment/configuration.txt Resource environment/variables.txt -Resource environment/scaleVariables.txt Resource VnfLcmMntOperationKeywords.robot Resource SubscriptionKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -13,39 +11,30 @@ Library Process Suite Setup Initialize System Suite Teardown Terminate All Processes kill=true - *** Test Cases *** Fail a VNF LCM Operation Workflow [Documentation] Test ID: 7.3.1.24.1 ... Test title: Fail a VNF LCM Operation Workflow ... Test objective: The objective is to test the workflow for a Fail VNF LCM Operation ... Pre-conditions: The VNF lifecycle management operation occurrence is in FAILED_TEMP state. NFVO is subscribed to VNF LCM Operation Occurrence notifications - ... Reference: Clause 5.4.16 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.16 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: NFVO is able to receive notifications from VNFM ... Post-Conditions: The VNF lifecycle management operation occurrence is in FAILED state Send Fail Operation Request Check Operation Notification For Fail FAILED - Check HTTP Response Status Code Is 200 #the order of notification and the response code is not defined. How to implement this? + Check HTTP Response Status Code Is 200 Check Postcondition VNF Fail - *** Keywords *** Initialize System Create Sessions - -Precondition Checks - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - String response body operationState FAILED_TEMP Check Postcondition VNF Fail - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body operationState FAILED Check Operation Notification For Fail [Arguments] ${status} - Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} - - \ No newline at end of file + Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/HealVNFTask.robot b/SOL003/VNFLifecycleManagement-API/HealVNFTask.robot index f3c586a63bfae8469afbfc19cb359a3c9471ac7c..ca6daf95ba835959dcdfac6d842864027c78f19c 100644 --- a/SOL003/VNFLifecycleManagement-API/HealVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/HealVNFTask.robot @@ -1,6 +1,5 @@ *** Settings *** -Resource environment/configuration.txt -Resource environment/variables.txt +Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library OperatingSystem Library JSONLibrary @@ -13,53 +12,49 @@ POST Heal a vnfInstance ... Test title: POST Heal a vnfInstance ... Test objective: The objective is to test that POST method heal a VNF instance ... Pre-conditions: the VNF instance resource is not in NOT-INSTANTIATED state - ... Reference: Clause 5.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none POST Heal VNF Check HTTP Response Status Code Is 202 Check Operation Occurrence Id existence POST Heal a vnfInstance Conflict (Not-Instantiated) - # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state [Documentation] Test ID: 7.3.1.8.2 ... Test title: POST Heal a vnfInstance Conflict (Not-Instantiated) ... Test objective: The objective is to test that the operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. ... Pre-conditions: the VNF instance resource is in NOT-INSTANTIATED state - ... Reference: Clause 5.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: - POST Heal VNF + ... Post-Conditions: none + POST Heal VNF Not Instantiated Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - - POST Heal a vnfInstance Not Found [Documentation] Test ID: 7.3.1.8.3 ... Test title: POST Heal a vnfInstance Not Found ... Test objective: The objective is to test that the operation cannot be executed because the VNF instance resource is not found. ... Pre-conditions: the VNF instance resource is not existing - ... Reference: Clause 5.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: - POST Heal VNF + ... Post-Conditions: none + POST Heal VNF Not Existing Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails - GET Heal VNFInstance - Method not implemented [Documentation] Test ID: 7.3.1.8.4 ... Test title: GET Heal a vnfInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.9.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.9.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none GET Heal VNF Check HTTP Response Status Code Is 405 @@ -68,10 +63,10 @@ PUT Heal VNFInstance - Method not implemented ... Test title: PUT Heal a vnfInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.9.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.9.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none PUT Heal VNF Check HTTP Response Status Code Is 405 @@ -80,10 +75,10 @@ PATCH Heal VNFInstance - Method not implemented ... Test title: PATCH Heal a vnfInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.9.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.9.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none PATCH Heal VNF Check HTTP Response Status Code Is 405 @@ -92,39 +87,9 @@ DELETE Heal VNFInstance - Method not implemented ... Test title: DELETE Heal a vnfInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.9.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.9.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none DELETE Heal VNF - Check HTTP Response Status Code Is 405 - -*** Keywords *** -Check resource existence - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Integer response status 200 - -Check resource not instantiated - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - String response body instantiationState NOT_INSTANTIATED - -Check heal not supported - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - # how to check if heal is not supported? "flavourId" doesn't exist? - -Launch another LCM operation - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} - Integer response status 202 \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/HealVNFWorkflow.robot b/SOL003/VNFLifecycleManagement-API/HealVNFWorkflow.robot index 854f1aed974cf77605d7085f850fdaab08cf1639..0b2a3b86842f6d808807c763b3fe3ca7d6c4fade 100644 --- a/SOL003/VNFLifecycleManagement-API/HealVNFWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/HealVNFWorkflow.robot @@ -1,7 +1,5 @@ *** Settings *** -Resource environment/configuration.txt Resource environment/variables.txt -Resource environment/scaleVariables.txt Resource VnfLcmMntOperationKeywords.robot Resource SubscriptionKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -13,14 +11,13 @@ Library Process Suite Setup Initialize System Suite Teardown Terminate All Processes kill=true - *** Test Cases *** Heal a VNF Instance [Documentation] Test ID: 7.3.1.25.1 ... Test title: Heal a VNF Instance ... Test objective: The objective is to heal a VNF instance. ... Pre-conditions: VNF instance in INSTANTIATED state - ... Reference: Clause 5.4.9 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.9 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: NFVO is able to receive notifications from VNFM. Heal a VNF instance is supported for the VNF (as capability in the VNFD) ... Post-Conditions: VNF instance still in INSTANTIATED state @@ -38,17 +35,9 @@ Heal a VNF Instance Initialize System Create Sessions -Precondition Checks - Check resource instantiated - ${LccnSubscriptions}= Check subscriptions about one VNFInstance and operation type ${vnfInstanceId} VnfLcmOperationOccurrenceNotification operationType=SCALE - Check Postcondition VNF Heal Check resource Instantiated -Create a new Grant - Sync - OPERATE - Create a new Grant - Synchronous mode ${vnfInstanceId} ${vnfLcmOpOccId} OPERATE - Check Operation Notification For Heal [Arguments] ${status} - Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} - \ No newline at end of file + Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/IndividualSubscription.robot b/SOL003/VNFLifecycleManagement-API/IndividualSubscription.robot index d41331c9f31ee067590f493c5c0ae738b056a9cb..f5f85691b0c3dfdfc841dae72367b308d24f829d 100644 --- a/SOL003/VNFLifecycleManagement-API/IndividualSubscription.robot +++ b/SOL003/VNFLifecycleManagement-API/IndividualSubscription.robot @@ -1,6 +1,5 @@ *** Settings *** -Resource environment/configuration.txt -Resource environment/variables.txt +Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library JSONLibrary Library JSONSchemaLibrary schemas/ @@ -12,7 +11,7 @@ POST Individual Subscription - Method not implemented ... Test title: POST Individual Subscription - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.19.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.19.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -24,7 +23,7 @@ GET Individual Subscription ... Test title: GET Individual Subscription ... Test objective: The objective is to test the Get individual subscription ... Pre-conditions: none - ... Reference: Clause 5.4.19.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.19.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -37,7 +36,7 @@ PUT an individual subscription - Method not implemented ... Test title: PUT an individual subscription - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.19.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.19.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -49,7 +48,7 @@ PATCH an individual subscription - Method not implemented ... Test title: PATCH an individual subscription - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.19.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.19.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -61,17 +60,22 @@ DELETE an individual subscription ... Test title: DELETE an individual subscription ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.19.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.19.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: subscription deleted from VNFM Delete Individual subscription Check HTTP Response Status Code Is 405 - -*** Keywords *** -Check resource existence - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - Integer response status 200 \ No newline at end of file + +GET Individual Subscription - Not Found + [Documentation] Test ID: 7.3.1.18.6 + ... Test title: GET Individual Subscription - Not Found + ... Test objective: The objective is to test the retrieval of individual subscription fails when subscription is not present + ... Pre-conditions: none + ... Reference: Clause 5.4.19.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get Individual Subscription + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot b/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot index 4d5a7fda190f5efae6baac44c79a3f608314e5f5..b87e388bad3a350616de9e2b756ca39db8766fe1 100644 --- a/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot +++ b/SOL003/VNFLifecycleManagement-API/IndividualVNFInstance.robot @@ -1,6 +1,4 @@ *** Settings *** -Resource environment/configuration.txt -# Suite setup Expect spec SOL003-VNFLifecycleManagement-API.yaml Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Resource VnfLcmMntOperationKeywords.robot @@ -18,10 +16,10 @@ Post Individual VNFInstance - Method not implemented ... Test title: Post Individual VNFInstance - Method not implemented ... Test objective: The objective is to test that POST method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none POST individual vnfInstance Check HTTP Response Status Code Is 405 @@ -30,23 +28,24 @@ Get Information about an individual VNF Instance ... Test title: Get Information about an individual VNF Instance ... Test objective: The objective is to create a new VNF instance resource ... Pre-conditions: none - ... Reference: Clause 5.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET individual vnfInstance Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is vnfInstance + Check HTTP Response Body vnfInstance content against VNF Descriptor PUT Individual VNFInstance - Method not implemented [Documentation] Test ID: 7.3.1.2.3 ... Test title: PUT Individual VNFInstance - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none PUT individual vnfInstance Check HTTP Response Status Code Is 405 @@ -55,9 +54,9 @@ PATCH Individual VNFInstance ... Test title: PATCH Individual VNFInstance ... Test objective: This method modifies an individual VNF instance resource ... Pre-conditions: an existing VNF instance resource - ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: + ... Applicability: none ... Post-Conditions: VNFInstance modified PATCH individual vnfInstance Check HTTP Response Status Code Is 202 @@ -68,9 +67,9 @@ PATCH Individual VNFInstance Precondition failed ... Test title: PATCH Individual VNFInstance Precondition failed ... Test objective: The objective is to create a new VNF instance resource ... Pre-conditions: ETag mismatch - ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: + ... Applicability: none ... Post-Conditions: VNFInstance not modified PATCH individual vnfInstance Check HTTP Response Status Code Is 412 @@ -81,9 +80,9 @@ PATCH Individual VNFInstance Conflict ... Test title: PATCH Individual VNFInstance Conflict ... Test objective: The objective is to test the conflict while modifying a VNF instance resource ... Pre-conditions: another LCM operation is ongoing - ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: + ... Applicability: none ... Post-Conditions: VNFInstance not modified PATCH individual vnfInstance Check HTTP Response Status Code Is 409 @@ -94,9 +93,9 @@ DELETE Individual VNFInstance ... Test title: DELETE Individual VNFInstance ... Test objective: The objective is to delete a VNF instance ... Pre-conditions: the VNF instance resource is existing - ... Reference: Clause 5.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: + ... Applicability: none ... Post-Conditions: VNFInstance deleted DELETE individual vnfInstance Check HTTP Response Status Code Is 204 @@ -106,37 +105,32 @@ DELETE Individual VNFInstance Conflict ... Test title: DELETE Individual VNFInstance Conflict ... Test objective: The objective is to verify that the deletion cannot be executed currently, due to a conflict with the state of the VNF instance resource. ... Pre-conditions: VNF instance resource is in INSTANTIATED state - ... Reference: Clause 5.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: + ... Applicability: none ... Post-Conditions: Resources are not deleted - DELETE individual vnfInstance + DELETE individual vnfInstance in INSTANTIATED state Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails Check resource existence +Get Information about an individual VNF Instance - Not Found + [Documentation] Test ID: 7.3.1.2.9 + ... Test title: Get Information about an individual VNF Instance - Not Found + ... Test objective: The objective is to test that the retrieval of an individual VNF Instance fails when instance is not present. + ... Pre-conditions: none + ... Reference: Clause 5.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET individual vnfInstance + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails + *** Keywords *** Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Integer response status 200 - -Check resource instantiated - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - String response body instantiationState INSTANTIATED - -Launch another LCM operation - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfToLevelRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${body} - Integer response status 202 -SET etag - ${etag} Output response headers ETag - Set Suite Variable ${original_etag} ${etag} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} + Integer response status 200 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot b/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot index fbe80d6ad63a71e1cf693e87c555c45f45a0a5d6..823f35ca99d4ea17cbca8d93a21f967237568a29 100644 --- a/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot +++ b/SOL003/VNFLifecycleManagement-API/IndividualVnfLcmOperationOccurence.robot @@ -1,79 +1,83 @@ *** Settings *** -Resource environment/configuration.txt -Resource environment/variables.txt +Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library JSONLibrary Library JSONSchemaLibrary schemas/ Resource VnfLcmMntOperationKeywords.robot *** Test Cases *** -Post Individual VNF LCM Operation occurrences - Method not implemented +Post Individual VNF LCM OP occurrence - Method not implemented [Documentation] Test ID: 7.3.1.12.1 - ... Test title: Post Individual VNF LCM Operation occurrences - Method not implemented + ... Test title: Post Individual VNF LCM OP occurrence - Method not implemented ... Test objective: The objective is to test that POST method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.13.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.13.3.1 - ETSI GS NFV-SOL 003 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Post Individual VNF LCM Operation occurrences + Post Individual VNF LCM OP occurrence Check HTTP Response Status Code Is 405 -Get information about multiple VNF instances +Get Individual VNF LCM OP occurrence [Documentation] Test ID: 7.3.1.12.2 - ... Test title: Get information about multiple VNF instances - ... Test objective: The objective is to test that this method retrieve information about a VNF lifecycle management operation occurrence + ... Test title: Get Individual VNF LCM OP occurrence + ... Test objective: The objective is to test that this method retrieve a VNF lifecycle management operation occurrence and perform a JSON schema validation of the returned data structure ... Pre-conditions: none - ... Reference: Clause 5.4.13.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.13.3.2 - ETSI GS NFV-SOL 003 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Get multiple VNF instances + Get Individual VNF LCM OP occurrence Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is VnfLcmOpOcc + Check HTTP Response Body Json Schema Is VnfLcmOpOcc + Check HTTP Response Body of Individual VNF LCM Operation occurrences content against VNF Descriptor -PUT Individual VNF LCM Operation occurrences - Method not implemented +PUT Individual VNF LCM OP occurrence - Method not implemented [Documentation] Test ID: 7.3.1.12.3 - ... Test title: PUT Individual VNF LCM Operation occurrences - Method not implemented + ... Test title: PUT Individual VNF LCM OP occurrence - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.13.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.13.3.3 - ETSI GS NFV-SOL 003 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Put multiple VNF instances + Put Individual VNF LCM OP occurrence Check HTTP Response Status Code Is 405 -PATCH Individual VNF LCM Operation occurrences - Method not implemented +PATCH Individual VNF LCM OP occurrence - Method not implemented [Documentation] Test ID: 7.3.1.12.4 - ... Test title: PATCH Individual VNF LCM Operation occurrences - Method not implemented + ... Test title: PATCH Individual VNF LCM OP occurrence - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.13.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.13.3.4 - ETSI GS NFV-SOL 003 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Patch multiple VNF instances + Patch Individual VNF LCM OP occurrence Check HTTP Response Status Code Is 405 - DELETE Individual VNF LCM Operation occurrences - Method not implemented +DELETE Individual VNF LCM OP occurrence - Method not implemented [Documentation] Test ID: 7.3.1.12.5 - ... Test title: DELETE Individual VNF LCM Operation occurrences - Method not implemented + ... Test title: DELETE Individual VNF LCM OP occurrence - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.13.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.13.3.5 - ETSI GS NFV-SOL 003 [2] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Delete multiple VNF instances + Delete Individual VNF LCM OP occurrence Check HTTP Response Status Code Is 405 - -*** Keywords *** -Get multiple VNF instances - Log Query status information about multiple VNF lifecycle management operation occurrences. - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} \ No newline at end of file + +Get Individual VNF LCM Operation occurrence - Not Found + [Documentation] Test ID: 7.3.1.12.6 + ... Test title: Get Individual VNF LCM Operation occurrence - Not Found + ... Test objective: The objective is to test that the retrieval of VNF lifecycle management operation occurrence fails when instance is not present. + ... Pre-conditions: none + ... Reference: Clause 5.4.13.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get Individual VNF LCM OP occurrence with invalid resource identifier + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails + diff --git a/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot b/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot index 97f4aaf8e603100e7aa695ad41396aeed19ea9d4..5a2275f778739041f9f5e1fc04e3fc34b7ec2dea 100644 --- a/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/InstantiateVNFTask.robot @@ -1,6 +1,5 @@ *** Settings *** -Resource environment/configuration.txt -Resource environment/variables.txt +Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library DependencyLibrary Library OperatingSystem @@ -8,32 +7,30 @@ Library JSONLibrary Library JSONSchemaLibrary schemas/ Resource VnfLcmMntOperationKeywords.robot - *** Test Cases *** Instantiate a vnfInstance [Documentation] Test ID: 7.3.1.3.1 ... Test title: Post Instantiate Individual VNFInstance ... Test objective: The objective is to instantiate a VNF instance ... Pre-conditions: VNF instance resource is in NOT INSTANTIATED state - ... Reference: Clause 5.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none POST instantiate individual vnfInstance Check HTTP Response Status Code Is 202 Check Operation Occurrence Id existence Instantiate a vnfInstance Conflict - # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state [Documentation] Test ID: 7.3.1.3.2 ... Test title: Post Instantiate Individual VNFInstance ... Test objective: The objective is to verify that the instantiation of the vnf cannot be executed currently, due to a conflict with the state of the VNF instance resource. ... Pre-conditions: VNF instance resource is in INSTANTIATED state - ... Reference: Clause 5.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: - POST instantiate individual vnfInstance + ... Applicability: none + ... Post-Conditions: none + POST instantiate individual vnfInstance with conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails @@ -41,11 +38,11 @@ GET Instantiate VNFInstance - Method not implemented [Documentation] Test ID: 7.3.1.3.3 ... Test title: GET Instantiate Individual VNFInstance - Method not implemented ... Test objective: The objective is to test that GET method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET instantiate individual vnfInstance Check HTTP Response Status Code Is 405 @@ -53,11 +50,11 @@ PUT Instantiate VNFInstance - Method not implemented [Documentation] Test ID: 7.3.1.3.4 ... Test title: PUT Instantiate Individual VNFInstance - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.4.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.4.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none PUT instantiate individual vnfInstance Check HTTP Response Status Code Is 405 @@ -65,11 +62,11 @@ PATCH Instantiate VNFInstance - Method not implemented [Documentation] Test ID: 7.3.1.3.5 ... Test title: PATCH Instantiate Individual VNFInstance - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.4.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.4.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none PATCH instantiate individual vnfInstance Check HTTP Response Status Code Is 405 @@ -77,25 +74,10 @@ DELETE Instantiate VNFInstance - Method not implemented [Documentation] Test ID: 7.3.1.3.6 ... Test title: DELETE Instantiate Individual VNFInstance - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.4.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.4.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none DELETE instantiate individual vnfInstance - Check HTTP Response Status Code Is 405 - -*** Keywords *** -Check resource existence - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Integer response status 200 - -Check resource instantiated - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - String response body instantiationState INSTANTIATED \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/InstantiateVNFTaskWorkflow.robot b/SOL003/VNFLifecycleManagement-API/InstantiateVNFTaskWorkflow.robot index 24fb72421d3fe355caa241e4c86dbf5a3a171d34..3b2377c2ddc3fe6e80872d12d46684b38503902c 100644 --- a/SOL003/VNFLifecycleManagement-API/InstantiateVNFTaskWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/InstantiateVNFTaskWorkflow.robot @@ -1,7 +1,6 @@ *** Setting *** Suite Setup Initialize System Suite Teardown Terminate All Processes kill=true -Resource environment/configuration.txt Resource environment/variables.txt Resource VnfLcmMntOperationKeywords.robot Resource SubscriptionKeywords.robot @@ -15,14 +14,13 @@ Library JSONSchemaLibrary schemas/ Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false - *** Test Cases *** VNF Instantiation [Documentation] Test ID: 7.3.1.26.1 ... Test title: VNF Instantiation workflow ... Test objective: The objective is to test the workflow for the instantiation of a VNF instance ... Pre-conditions: VNF instance resources is already created. NFVO is subscribed to VNF LCM Operation Occurrence notifications - ... Reference: Clause 5.4.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: NFVO is able to receive notifications from VNFM ... Post-Conditions: VNF instance in INSTANTIATED state @@ -40,9 +38,9 @@ Send VNF Instantiation Request Log Instantiate a VNF Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/instantiateVnfRequest.json - ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate ${body} + ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${body} Check Operation Notification For Instantiation [Arguments] ${status} diff --git a/SOL003/VNFLifecycleManagement-API/ModifyVNFInformationWorkflow.robot b/SOL003/VNFLifecycleManagement-API/ModifyVNFInformationWorkflow.robot index 74cf83d7357b44e6eb6b7837986020dd76850415..c3a7159cf356f6429664612c62d6de3ccf8264a2 100644 --- a/SOL003/VNFLifecycleManagement-API/ModifyVNFInformationWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/ModifyVNFInformationWorkflow.robot @@ -1,7 +1,5 @@ *** Settings *** -Resource environment/configuration.txt Resource environment/variables.txt -Resource environment/scaleVariables.txt Resource VnfLcmMntOperationKeywords.robot Resource SubscriptionKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -13,14 +11,13 @@ Library Process Suite Setup Initialize System Suite Teardown Terminate All Processes kill=true - *** Test Cases *** Modify info of a VNF Instance [Documentation] Test ID: 7.3.1.27.1 ... Test title: Update information about a VNF instance ... Test objective: The objective is to update information about a VNF instance. ... Pre-conditions: VNF instance is created - ... Reference: Clause 5.3.6 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.3.6 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: NFVO is able to receive notifications from VNFM. Update information of a VNF instance is supported for the VNF (as capability in the VNFD) ... Post-Conditions: VNF instance info is updated @@ -39,19 +36,10 @@ Initialize System ${body}= Get File jsons/patchBodyRequest.json ${patchBodyRequest}= evaluate json.loads('''${body}''') json -Precondition Checks - Check resource instantiated - ${LccnSubscriptions}= Check subscriptions about one VNFInstance and operation type ${vnfInstanceId} VnfLcmOperationOccurrenceNotification operationType=SCALE - Check Postcondition VNF Modify Info Check VNF Instance ${vnfInstanceId} Check HTTP Response Status Code Is 200 - #do we need to compare the modified info in the updated VNF instance with the values in the request? - -Create a new Grant - Sync - OPERATE - Create a new Grant - Synchronous mode ${vnfInstanceId} ${vnfLcmOpOccId} OPERATE - + Check Operation Notification For Modify Info [Arguments] ${status} - Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} - \ No newline at end of file + Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/NotificationEndpoint.robot b/SOL003/VNFLifecycleManagement-API/NotificationEndpoint.robot index 271e2c094a7dc0873efa5c1861b710e8b05c1b3e..19460670929c5d6150c558a736cfe97f4b0fb57b 100644 --- a/SOL003/VNFLifecycleManagement-API/NotificationEndpoint.robot +++ b/SOL003/VNFLifecycleManagement-API/NotificationEndpoint.robot @@ -1,191 +1,92 @@ *** Settings *** -Suite Setup Create Sessions -Suite Teardown Terminate All Processes kill=true -Resource environment/variables.txt -Library MockServerLibrary -Library Process +Library String Library OperatingSystem -Library Collections +Resource environment/variables.txt +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Suite Setup Check resource existence and get CallbackUri *** Test Cases *** -VNF LCM Operation Occurrence Start Notification - [Documentation] Test ID: 7.3.1.34.1 - ... Test title: VNF LCM Operation Occurrence Start Notification - ... Test objective: The objective is to test the dispatch of VNF LCM Operation Occurrence Start Notification when a new VNF LCM operation is started in the VNFM, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. +VNF LCM Operation Occurrence Notification + [Documentation] Test ID: 7.3.1.36.1 + ... Test title: VNF LCM Operation Occurrence Notification + ... Test objective: The objective is to test that the POST request triggers VNF LCM Operation Occurrence Notification. ... Pre-conditions: A subscription for VNF LCM Operation Occurrence notifications is available in the VNFM. - ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM + ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none - Trigger a VNF LCM operation (external action) - Check VNF LCM Operation Occurrence Start Notification Http POST Request Body Json Schema Is VnfLcmOperationOccurrenceNotification - Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationType attribute Is VnfLcmOperationOccurrenceNotification - Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is START - -VNF LCM Operation Occurrence Result Notification - [Documentation] Test ID: 7.3.1.34.2 - ... Test title: VNF LCM Operation Occurrence Result Notification - ... Test objective: The objective is to test the dispatch of VNF LCM Operation Occurrence Result Notification when a VNF LCM operation is completed in the VNFM, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. - ... Pre-conditions: An VNF LCM operation is in progress, and a subscription for VNF LCM Operation Occurrence notifications is available in the VNFM. - ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Trigger the completion of an VNF LCM operation (external action) - Check VNF LCM Operation Occurrence Result Notification Http POST Request Body Json Schema Is VnfLcmOperationOccurrenceNotification - Check VNF LCM Operation Occurrence Result Notification Http POST Request Body notificationType attribute Is VnfLcmOperationOccurrenceNotification - Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is RESULT + Post VNF LCM Operation Occurrence Notification + Check HTTP Response Status Code Is 204 VNF Identifier Creation Notification - [Documentation] Test ID: 7.3.1.34.3 + [Documentation] Test ID: 7.3.1.36.2 ... Test title: VNF Identifier Creation Notification - ... Test objective: The objective is to test the dispatch of VNF Identifier Creation Notification when a new VNF instance resource is created in the VNFM, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. - ... Pre-conditions: A subscription for VNF identifier creation notifications is available in the VNFM. - ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM + ... Test objective: The objective is to test that the POST request triggers VNF Identifier Creation Notification. + ... Pre-conditions: A subscription for VNF identifier creation cotification is available in the VNFM. + ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none - Trigger the creation of a VNF instance resource (external action) - Check VNF Identifier Creation Notification Http POST Request Body Json Schema Is VnfIdentifierCreationNotification - Check VNF Identifier Creation Notification Http POST Request Body notificationType attribute Is VnfIdentifierCreationNotification - + Post VNF Identifier Creation Notification + Check HTTP Response Status Code Is 204 + VNF Identifier Deletion Notification - [Documentation] Test ID: 7.3.1.34.4 + [Documentation] Test ID: 7.3.1.36.3 ... Test title: VNF Identifier Deletion Notification - ... Test objective: The objective is to test the dispatch of VNF Identifier Deletion Notification when a VNF instance resource is deleted in the VNFM, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. - ... Pre-conditions: A VNF instance resource is created, and a subscription for VNF identifier creation notifications is available in the VNFM. - ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM + ... Test objective: The objective is to test that the POST request triggers VNF Identifier Deletion Notification. + ... Pre-conditions: A subscription for VNF identifier deletion notifications is available in the VNFM. + ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none - Trigger the deletion of a VNF instance resource (external action) - Check VNF Identifier Deletion Notification Http POST Request Body Json Schema Is VnfIdentifierDeletionNotification - Check VNF Identifier Deletion Notification Http POST Request Body notificationType attribute Is VnfIdentifierDeletionNotification - + Post VNF LCM Operation Occurrence Notification + Check HTTP Response Status Code Is 204 *** Keywords *** -Trigger a VNF LCM operation (external action) - #do nothing - Log do nothing - -Trigger the completion of an VNF LCM operation (external action) - #do nothing - Log do nothing - -Trigger the creation of a VNF instance resource (external action) - #do nothing - Log do nothing - -Trigger the deletion of a VNF instance resource (external action) - #do nothing - Log do nothing - -Check VNF LCM Operation Occurrence Start Notification Http POST Request Body Json Schema Is - [Arguments] ${element} - ${schema}= Get File schemas/${element}.schema.json - Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} - -Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationType attribute Is - [Arguments] ${type} - Configure Notification VNF LCM Operation Occurrence Start Handler ${callback_endpoint_fwd} ${type} START - Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} - Clear Requests ${callback_endpoint} - Clear Requests ${callback_endpoint_fwd} +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body Subscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri -Configure Notification VNF LCM Operation Occurrence Start Handler - [Arguments] ${endpoint} ${type} ${status} - ${json}= evaluate {} - set to dictionary ${json} notificationType ${type} changeType ${status} - ${BODY}= evaluate json.dumps(${json}) json - Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${notification_request} ${notification_response} - -Check VNF LCM Operation Occurrence Result Notification Http POST Request Body Json Schema Is - [Arguments] ${element} - ${schema}= Get File schemas/${element}.schema.json - Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} - -Check VNF LCM Operation Occurrence Result Notification Http POST Request Body notificationType attribute Is - [Arguments] ${type} - Configure Notification VNF LCM Operation Occurrence Result Handler ${callback_endpoint_fwd} ${type} RESULT - Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} - Clear Requests ${callback_endpoint} - Clear Requests ${callback_endpoint_fwd} - -Configure Notification VNF LCM Operation Occurrence Result Handler - [Arguments] ${endpoint} ${type} ${status} - ${json}= evaluate {} - set to dictionary ${json} notificationType ${type} changeType ${status} - ${BODY}= evaluate json.dumps(${json}) json - Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${notification_request} ${notification_response} - -Check VNF Identifier Creation Notification Http POST Request Body Json Schema Is - [Arguments] ${element} - ${schema}= Get File schemas/${element}.schema.json - Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} - -Check VNF Identifier Creation Notification Http POST Request Body notificationType attribute Is - [Arguments] ${type} - Configure Notification VNF Identifier Creation Handler ${callback_endpoint_fwd} ${type} - Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} - Clear Requests ${callback_endpoint} - Clear Requests ${callback_endpoint_fwd} - -Configure Notification VNF Identifier Creation Handler - [Arguments] ${endpoint} ${type} - ${json}= evaluate {} - set to dictionary ${json} notificationType ${type} - ${BODY}= evaluate json.dumps(${json}) json - Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${notification_request} ${notification_response} - -Check VNF Identifier Deletion Notification Http POST Request Body Json Schema Is - [Arguments] ${element} - ${schema}= Get File schemas/${element}.schema.json - Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} - -Check VNF Identifier Deletion Notification Http POST Request Body notificationType attribute Is - [Arguments] ${type} - Configure Notification VNF Identifier Deletion Handler ${callback_endpoint_fwd} ${type} - Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} - Clear Requests ${callback_endpoint} - Clear Requests ${callback_endpoint_fwd} - -Configure Notification VNF Identifier Deletion Handler - [Arguments] ${endpoint} ${type} - ${json}= evaluate {} - set to dictionary ${json} notificationType ${type} - ${BODY}= evaluate json.dumps(${json}) json - Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${notification_request} ${notification_response} - -Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is - [Arguments] ${type} - #do nothing - Log do nothing - -Check VNF LCM Operation Occurrence Result Notification Http POST Request Body notificationStatus attribute Is - [Arguments] ${type} - #do nothing - Log do nothing - -Configure Notification Forward - [Arguments] ${schema} ${endpoint} ${endpoint_fwd} - Log Creating mock Http POST forward to handle ${schema} - &{notification_tmp}= Create Mock Request Matcher POST ${endpoint} body_type="JSON_SCHEMA" body=${schema} - &{notification_fwd}= Create Mock Http Forward ${endpoint_fwd} - Create Mock Expectation With Http Forward ${notification_tmp} ${notification_fwd} - -Create Sessions - Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance - Wait For Process handle=mockInstance timeout=5s on_timeout=continue - Create Mock Session ${callback_uri}:${callback_port} +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated +Post VNF LCM Operation Occurrence Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/VnfLcmOperationOccurrenceNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post VNF Identifier Creation Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/VnfIdentifierCreationNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfInstanceId=${vnfInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post VNF Identifier Deletion Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/VnfIdentifierDeletionNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfInstanceId=${vnfInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/Notifications.robot b/SOL003/VNFLifecycleManagement-API/Notifications.robot new file mode 100644 index 0000000000000000000000000000000000000000..fd51a9ed61223157dc8da25c66008429291c5ead --- /dev/null +++ b/SOL003/VNFLifecycleManagement-API/Notifications.robot @@ -0,0 +1,199 @@ +*** Settings *** +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true +Resource environment/variables.txt +Library MockServerLibrary +Library Process +Library OperatingSystem +Library Collections + +*** Test Cases *** +VNF LCM Operation Occurrence Start Notification + [Documentation] Test ID: 7.3.1.34.1 + ... Test title: VNF LCM Operation Occurrence Start Notification + ... Test objective: The objective is to test the dispatch of VNF LCM Operation Occurrence Start Notification when a new VNF LCM operation is started in the VNFM, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A subscription for VNF LCM Operation Occurrence notifications is available in the VNFM. + ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Trigger a VNF LCM operation (external action) + Check VNF LCM Operation Occurrence Start Notification Http POST Request Body Json Schema Is VnfLcmOperationOccurrenceNotification + Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationType attribute Is VnfLcmOperationOccurrenceNotification + Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is START + +VNF LCM Operation Occurrence Result Notification + [Documentation] Test ID: 7.3.1.34.2 + ... Test title: VNF LCM Operation Occurrence Result Notification + ... Test objective: The objective is to test the dispatch of VNF LCM Operation Occurrence Result Notification when a VNF LCM operation is completed in the VNFM, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: An VNF LCM operation is in progress, and a subscription for VNF LCM Operation Occurrence notifications is available in the VNFM. + ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Trigger the completion of an VNF LCM operation (external action) + Check VNF LCM Operation Occurrence Result Notification Http POST Request Body Json Schema Is VnfLcmOperationOccurrenceNotification + Check VNF LCM Operation Occurrence Result Notification Http POST Request Body notificationType attribute Is VnfLcmOperationOccurrenceNotification + Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is RESULT + +VNF Identifier Creation Notification + [Documentation] Test ID: 7.3.1.34.3 + ... Test title: VNF Identifier Creation Notification + ... Test objective: The objective is to test the dispatch of VNF Identifier Creation Notification when a new VNF instance resource is created in the VNFM, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A subscription for VNF identifier creation notifications is available in the VNFM. + ... Reference: Clause 5.4.20.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Trigger the creation of a VNF instance resource (external action) + Check VNF Identifier Creation Notification Http POST Request Body Json Schema Is VnfIdentifierCreationNotification + Check VNF Identifier Creation Notification Http POST Request Body notificationType attribute Is VnfIdentifierCreationNotification + +VNF Identifier Deletion Notification + [Documentation] Test ID: 7.3.1.34.4 + ... Test title: VNF Identifier Deletion Notification + ... Test objective: The objective is to test the dispatch of VNF Identifier Deletion Notification when a VNF instance resource is deleted in the VNFM, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A VNF instance resource is created, and a subscription for VNF identifier creation notifications is available in the VNFM. + ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Trigger the deletion of a VNF instance resource (external action) + Check VNF Identifier Deletion Notification Http POST Request Body Json Schema Is VnfIdentifierDeletionNotification + Check VNF Identifier Deletion Notification Http POST Request Body notificationType attribute Is VnfIdentifierDeletionNotification + +*** Keywords *** +Trigger a VNF LCM operation (external action) + #do nothing + Log do nothing + +Trigger the completion of an VNF LCM operation (external action) + #do nothing + Log do nothing + +Trigger the creation of a VNF instance resource (external action) + #do nothing + Log do nothing + +Trigger the deletion of a VNF instance resource (external action) + #do nothing + Log do nothing + +Check VNF LCM Operation Occurrence Start Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + +Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification VNF LCM Operation Occurrence Start Handler ${callback_endpoint_fwd} ${type} START + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Configure Notification VNF LCM Operation Occurrence Start Handler + [Arguments] ${endpoint} ${type} ${status} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} changeType ${status} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Check VNF LCM Operation Occurrence Result Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + +Check VNF LCM Operation Occurrence Result Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification VNF LCM Operation Occurrence Result Handler ${callback_endpoint_fwd} ${type} RESULT + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Configure Notification VNF LCM Operation Occurrence Result Handler + [Arguments] ${endpoint} ${type} ${status} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} changeType ${status} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Check VNF Identifier Creation Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + +Check VNF Identifier Creation Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification VNF Identifier Creation Handler ${callback_endpoint_fwd} ${type} + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Configure Notification VNF Identifier Creation Handler + [Arguments] ${endpoint} ${type} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Check VNF Identifier Deletion Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + +Check VNF Identifier Deletion Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification VNF Identifier Deletion Handler ${callback_endpoint_fwd} ${type} + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Configure Notification VNF Identifier Deletion Handler + [Arguments] ${endpoint} ${type} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Check VNF LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is + [Arguments] ${type} + #do nothing + Log do nothing + +Check VNF LCM Operation Occurrence Result Notification Http POST Request Body notificationStatus attribute Is + [Arguments] ${type} + #do nothing + Log do nothing + +Configure Notification Forward + [Arguments] ${schema} ${endpoint} ${endpoint_fwd} + Log Creating mock Http POST forward to handle ${schema} + &{notification_tmp}= Create Mock Request Matcher POST ${endpoint} body_type="JSON_SCHEMA" body=${schema} + &{notification_fwd}= Create Mock Http Forward ${endpoint_fwd} + Create Mock Expectation With Http Forward ${notification_tmp} ${notification_fwd} + +Create Sessions + Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance + Wait For Process handle=mockInstance timeout=5s on_timeout=continue + Create Mock Session ${callback_uri}:${callback_port} + diff --git a/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot b/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot index 3666b24b3d0d1d5dbbadc3ae077185ee524205b9..f0d227b3e58eac340510a596ab5f22c5e47fd4bf 100644 --- a/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/OperateVNFTask.robot @@ -1,6 +1,5 @@ *** Settings *** -Resource environment/configuration.txt -Resource environment/variables.txt +Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library OperatingSystem Library JSONLibrary @@ -15,10 +14,10 @@ POST Operate a vnfInstance ... Test title: POST Operate a vnfInstance ... Test objective: The objective is to test that POST method operate a VNF instance ... Pre-conditions: none - ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none POST Operate VNF Check HTTP Response Status Code Is 202 Check Operation Occurrence Id existence @@ -28,26 +27,25 @@ POST Operate a vnfInstance Conflict (Not-Instantiated) ... Test title: POST Operate a vnfInstance Conflict (Not-Instantiated) ... Test objective: The objective is to test that the operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. ... Pre-conditions: the VNF instance resource is in NOT-INSTANTIATED state - ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: - POST Operate VNF + ... Post-Conditions: none + POST Operate VNF with conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - - + POST Operate a vnfInstance Not Found [Documentation] Test ID: 7.3.1.9.3 ... Test title: POST Operate a vnfInstance Not Found ... Test objective: The objective is to test that the operation cannot be executed currently, because the resource is not existing ... Pre-conditions: the VNF instance resource is in not existing - ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: - POST Operate VNF - Check HTTP Response Status Code Is 409 + ... Post-Conditions: none + POST Operate VNF not existing + Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails GET Operate VNFInstance - Method not implemented @@ -55,10 +53,10 @@ GET Operate VNFInstance - Method not implemented ... Test title: GET Operate a vnfInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.10.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.10.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none GET Operate VNF Check HTTP Response Status Code Is 405 @@ -67,10 +65,10 @@ PUT Operate VNFInstance - Method not implemented ... Test title: PUT Operate a vnfInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.10.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.10.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none PUT Operate VNF Check HTTP Response Status Code Is 405 @@ -79,10 +77,10 @@ PATCH Operate VNFInstance - Method not implemented ... Test title: PATCH Operate a vnfInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.10.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.10.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none PATCH Operate VNF Check HTTP Response Status Code Is 405 @@ -91,39 +89,17 @@ DELETE Operate VNFInstance - Method not implemented ... Test title: DELETE Operate a vnfInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.10.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.10.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none DELETE Operate VNF Check HTTP Response Status Code Is 405 - + *** Keywords *** Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} Integer response status 200 - -Check resource not instantiated - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - String response body instantiationState NOT_INSTANTIATED - -Check operate not supported - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - # how to check if operate is not supported? "flavourId" doesn't exist? - -Launch another LCM operation - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} - Integer response status 202 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/OperateVNFWorkflow.robot b/SOL003/VNFLifecycleManagement-API/OperateVNFWorkflow.robot index c6812d3f2eb2e54ceef845e064e155827046ba1e..8755e4780a5008a51c38473d35596334e7b59f3b 100644 --- a/SOL003/VNFLifecycleManagement-API/OperateVNFWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/OperateVNFWorkflow.robot @@ -1,7 +1,5 @@ *** Settings *** -Resource environment/configuration.txt Resource environment/variables.txt -Resource environment/scaleVariables.txt Resource VnfLcmMntOperationKeywords.robot Resource SubscriptionKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -20,7 +18,7 @@ Operate a VNF Instance ... Test title: Operate a VNF Instance ... Test objective: The objective is to test the workflow of operational change of a VNF instance. ... Pre-conditions: VNF instance in INSTANTIATED state - ... Reference: Clause 5.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: change the operational state of a VNF instance is supported for the VNF (as capability in the VNFD) ... Post-Conditions: VNF instance still in INSTANTIATED state and the operational state is changed @@ -40,19 +38,11 @@ Initialize System ${changeVnfOperateRequest}= evaluate json.loads('''${body}''') json ${requestedState}= Get Value From Json ${changeVnfOperateRequest} $..changeStateTo -Precondition Checks - Check resource instantiated - ${LccnSubscriptions}= Check subscriptions about one VNFInstance and operation type ${vnfInstanceId} VnfLcmOperationOccurrenceNotification operationType=SCALE - Check Postcondition VNF OPERATE Check resource instantiated ${newState}= Get Vnf Operational State Info ${vnfInstanceId} Should be Equal ${requestedState} ${newState} -Create a new Grant - Sync - OPERATE - Create a new Grant - Synchronous mode ${vnfInstanceId} ${vnfLcmOpOccId} OPERATE - Check Operation Notification For Operate [Arguments] ${status} - Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} - \ No newline at end of file + Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot b/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot index a6610845efd316ba9743a81efc36bdff1051555f..8f52055f4feda9daca0b6a55c39d589a3f76d095 100644 --- a/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/RetryOperationTask.robot @@ -1,5 +1,4 @@ *** Settings *** -Resource environment/configuration.txt Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library DependencyLibrary @@ -16,7 +15,7 @@ Post Retry operation task ... Test title: Post Retry operation task ... Test objective: The objective is to test that POST method The POST method initiates retrying a VNF lifecycle operation if the operation is in FAILED_TEMP state ... Pre-conditions: the "VNF LCM operation occurrence" resource is in "FAILED_TEMP" state. - ... Reference: Clause 5.4.14.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.14.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -29,36 +28,36 @@ Post Retry operation task Conflict (Not-FAILED_TEMP) ... Test title: Post Retry operation task Conflict (Not-FAILED_TEMP) ... Test objective: The objective is to test that the retry operation cannot be executed currently, due to a conflict with the state of the VNF instance resource. (i.e. the VNF instance resource is not in FAILED_TEMP state) ... Pre-conditions: the "VNF LCM operation occurrence" resource is not in "FAILED_TEMP" state. - ... Reference: Clause 5.4.14.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.14.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Post Retry operation + Post Retry operation with conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - Post Retry operation task Not Found [Documentation] Test ID: 7.3.1.13.3 ... Test title: Post Retry operation task Not Found ... Test objective: The objective is to test that the retry operation cannot be executed because the operation is not supported ... Pre-conditions: - ... Reference: Clause 5.4.14.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.14.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Post Retry operation + Post Retry operation not existing Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails GET Retry operation task - Method not implemented [Documentation] Test ID: 7.3.1.13.4 ... Test title: GET Retry operation task- Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.14.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.14.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none Get Retry operation Check HTTP Response Status Code Is 405 @@ -67,10 +66,10 @@ PUT Retry operation task - Method not implemented ... Test title: PUT Retry operation task- Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.14.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.14.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none Put Retry operation Check HTTP Response Status Code Is 405 @@ -79,10 +78,10 @@ PATCH Retry operation task - Method not implemented ... Test title: PATCH Retry operation task- Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.14.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.14.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none Patch Retry operation Check HTTP Response Status Code Is 405 @@ -91,27 +90,16 @@ DELETE Retry operation task - Method not implemented ... Test title: DELETE Retry operation task- Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.14.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.14.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none Delete Retry operation Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - Integer response status 200 - -Launch another error handling action - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback - Integer response status 202 - -Check retry not supported - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - # how to check if retry is not supported? - + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Integer response status 200 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/RetryOperationWorkflow.robot b/SOL003/VNFLifecycleManagement-API/RetryOperationWorkflow.robot index 8a62a5f30c2ff37ee1b6a7455fe54826066db467..c512576c836472413bdc6f4a0b1bf4114ccb4404 100644 --- a/SOL003/VNFLifecycleManagement-API/RetryOperationWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/RetryOperationWorkflow.robot @@ -1,7 +1,5 @@ *** Settings *** -Resource environment/configuration.txt Resource environment/variables.txt -Resource environment/scaleVariables.txt Resource VnfLcmMntOperationKeywords.robot Resource SubscriptionKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -11,21 +9,18 @@ Library Collections Library JSONLibrary Library Process - *** Test Cases *** Retry VNF LCM Operation - Successful [Documentation] Test ID: 7.3.1.29.1 ... Test title: Retry VNF LCM Operation - Successful ... Test objective: The objective is to test the workflow for a successful Retry VNF LCM Operation and the status notifications ... Pre-conditions: The VNF lifecycle management operation occurrence is in FAILED_TEMP state. NFVO is subscribed to VNF LCM Operation Occurrence notifications - ... Reference: Clause 5.3.10 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.3.10 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: NFVO is able to receive notifications from VNFM ... Post-Conditions: The VNF lifecycle management operation occurrence is in COMPLETED state Send Retry Operation Request Check HTTP Response Status Code Is 202 - Check HTTP Response Header Contains Location - Check Operation Occurrence Id existence Check Operation Notification For Retry PROCESSING Check Operation Notification For Retry COMPLETED Check Postcondition VNF Retry Successful @@ -35,38 +30,27 @@ Retry VNF LCM Operation - Unsuccessful ... Test title: Retry VNF LCM Operation - Unsuccessful ... Test objective: The objective is to test the workflow for an unsuccesful Retry VNF LCM Operation and the status notifications ... Pre-conditions: The VNF lifecycle management operation occurrence is in FAILED_TEMP state. NFVO is subscribed to VNF LCM Operation Occurrence notifications - ... Reference: Clause 5.3.10 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.3.10 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: NFVO is able to receive notifications from VNFM ... Post-Conditions: The VNF lifecycle management operation occurrence is in FAILED_TEMP state Send Retry Operation Request Check HTTP Response Status Code Is 202 - Check HTTP Response Header Contains Location - Check Operation Occurrence Id existence Check Operation Notification For Retry PROCESSING Check Operation Notification For Retry FAILED_TEMP Check Postcondition VNF Retry Unsuccessful *** Keywords *** -Initialize System - Create Sessions - -Precondition Checks - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - String response body operationState FAILED_TEMP - Check Postcondition VNF Retry Successful - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body operationState COMPLETED Check Postcondition VNF Retry Unsuccessful - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body operationState FAILED_TEMP Check Operation Notification For Retry [Arguments] ${status} - Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} - \ No newline at end of file + Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/RollBackOperationWorkflow.robot b/SOL003/VNFLifecycleManagement-API/RollBackOperationWorkflow.robot index e22b001c84ef5fdbaeddeb31ba91fde809f009b1..d3787aecab70dbbdd913f0719a9f4c60dfc49b21 100644 --- a/SOL003/VNFLifecycleManagement-API/RollBackOperationWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/RollBackOperationWorkflow.robot @@ -1,7 +1,5 @@ *** Settings *** -Resource environment/configuration.txt Resource environment/variables.txt -Resource environment/scaleVariables.txt Resource VnfLcmMntOperationKeywords.robot Resource SubscriptionKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -13,21 +11,18 @@ Library Process Suite Setup Initialize System Suite Teardown Terminate All Processes kill=true - *** Test Cases *** Rollback a VNF LCM Operation - Successful [Documentation] Test ID: 7.3.1.30.1 ... Test title: Rollback VNF LCM Operation - Successful ... Test objective: The objective is to test the workflow for a Rolling Back a VNF LCM Operation and the operation is successful ... Pre-conditions: The VNF lifecycle management operation occurrence is in FAILED_TEMP state. NFVO is subscribed to VNF LCM Operation Occurrence notifications - ... Reference: Clause 5.3.11 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.3.11 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: NFVO is able to receive notifications from VNFM ... Post-Conditions: The VNF lifecycle management operation occurrence is in ROLLED_BACK state Send Roll back Operation Request Check HTTP Response Status Code Is 202 - Check HTTP Response Header Contains Location - Check Operation Occurrence Id existence Check Operation Notification For Roll Back ROLLING_BACK Check Operation Notification For Roll Back ROLLED_BACK Check Postcondition VNF Roll Back Successful @@ -37,14 +32,12 @@ Rollback VNF LCM Operation - Unsuccessful ... Test title: Rollback VNF LCM Operation - Unsuccessful ... Test objective: The objective is to test the workflow for a Rollback VNF LCM Operation and the operation is not successful ... Pre-conditions: The VNF lifecycle management operation occurrence is in FAILED_TEMP state. NFVO is subscribed to VNF LCM Operation Occurrence notifications - ... Reference: Clause 5.3.10 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.3.10 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: NFVO is able to receive notifications from VNFM ... Post-Conditions: The VNF lifecycle management operation occurrence is in FAILED_TEMP state Send Roll back Operation Request Check HTTP Response Status Code Is 202 - Check HTTP Response Header Contains Location - Check Operation Occurrence Id existence Check Operation Notification For Roll Back ROLLING_BACK Check Operation Notification For Roll Back FAILED_TEMP Check Postcondition VNF Roll Back UnSuccessful @@ -53,23 +46,17 @@ Rollback VNF LCM Operation - Unsuccessful Initialize System Create Sessions - -Precondition Checks - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - String response body operationState FAILED_TEMP Check Postcondition VNF Roll Back Successful - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body operationState ROLLED_BACK Check Postcondition VNF Roll Back Unsuccessful - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body operationState FAILED_TEMP Check Operation Notification For Roll Back [Arguments] ${status} - Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} - \ No newline at end of file + Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot b/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot index acf2f998b236122fdfcd294b4ac6f90c383c685f..34443682d30bf58c8a38c7c36f13894f49267ec2 100644 --- a/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot +++ b/SOL003/VNFLifecycleManagement-API/RollbackOperationTask.robot @@ -1,6 +1,5 @@ *** Settings *** -Resource environment/configuration.txt -Resource environment/variables.txt +Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library DependencyLibrary Library JSONLibrary @@ -15,7 +14,7 @@ Post Rollback operation task ... Test title: Post Rollback operation task ... Test objective: The objective is to test that POST method initiates rollback on a VNF lifecycle operation ... Pre-conditions: the "VNF LCM operation occurrence" resource is in "FAILED_TEMP" state. - ... Reference: Clause 5.4.15.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.15.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -24,41 +23,40 @@ Post Rollback operation task Check Operation Occurrence Id existence POST Rollback operation task Conflict (Not-FAILED_TEMP) - # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state [Documentation] Test ID: 7.3.1.14.2 ... Test title: POST Rollback operation task Conflict (Not-FAILED_TEMP) ... Test objective: The objective is to test that POST method initiates a rollback on a VNF lifecycle operation ... Pre-conditions: the "VNF LCM operation occurrence" resource is not in "FAILED_TEMP" state. - ... Reference: Clause 5.4.15.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.15.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Post Rollback operation + Post Rollback operation with conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - POST Rollback operation task Not Found [Documentation] Test ID: 7.3.1.14.3 ... Test title: POST Rollback operation task Not Found ... Test objective: The objective is to test that the retry operation cannot be executed because the operation is not supported ... Pre-conditions: - ... Reference: Clause 5.4.15.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.15.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - Post Rollback operation + Post Rollback operation not existing Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails GET Rollback operation task - Method not implemented [Documentation] Test ID: 7.3.1.14.4 ... Test title: GET Rollback operation task - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.15.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.15.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none Get Rollback operation Check HTTP Response Status Code Is 405 @@ -67,10 +65,10 @@ PUT Rollback operation task - Method not implemented ... Test title: PUT Rollback operation task - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.15.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.15.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none Put Rollback operation Check HTTP Response Status Code Is 405 @@ -79,10 +77,10 @@ PATCH Rollback operation task - Method not implemented ... Test title: PATCH Rollback operation task - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.15.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.15.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none Patch Rollback operation Check HTTP Response Status Code Is 405 @@ -91,27 +89,16 @@ DELETE Rollback operation task - Method not implemented ... Test title: DELETE Rollback operation task - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.15.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.15.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none Delete Rollback operation Check HTTP Response Status Code Is 405 *** Keywords *** Check resource existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - Integer response status 200 - -Launch another error handling action - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry - Integer response status 202 - -Check Rollback not supported - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} - # how to check if Rollback is not supported? - + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Integer response status 200 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/ScaleVNFTask.robot b/SOL003/VNFLifecycleManagement-API/ScaleVNFTask.robot index 3f070338644909621a24e13dcaae1a1f3b6f01c0..5d6da78eec3cc8ca7194d3ca133d9ff28330fbf1 100644 --- a/SOL003/VNFLifecycleManagement-API/ScaleVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/ScaleVNFTask.robot @@ -1,6 +1,5 @@ *** Settings *** -Resource environment/configuration.txt -Resource environment/variables.txt +Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library OperatingSystem Library JSONLibrary @@ -14,39 +13,37 @@ POST Scale a vnfInstance ... Test title: POST Scale a vnfInstance ... Test objective: The objective is to scale a VNF instance ... Pre-conditions: none - ... Reference: Clause 5.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none POST Scale vnfInstance Check HTTP Response Status Code Is 202 Check Operation Occurrence Id existence POST Scale a vnfInstance Conflict (Not-Instantiated) - # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state [Documentation] Test ID: 7.3.1.4.2 ... Test title: POST Scale a vnfInstance Conflict (Not-Instantiated) ... Test objective: The objective is to verify that the scale operation cannot be executed ... Pre-conditions: VNF instance resource is in NOT-INSTANTIATED state - ... Reference: Clause 5.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: - POST Scale vnfInstance + ... Applicability: none + ... Post-Conditions: none + POST Scale vnfInstance with VNF NOT-INSTANTIATED Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails POST Scale a vnfInstance Not Found - # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent [Documentation] Test ID: 7.3.1.4.3 ... Test title: POST Scale a vnfInstance Not Found ... Test objective: The objective is to verify that the operation cannot be executed currently, because the VNF instance resource is not found. - ... Pre-conditions: - ... Reference: Clause 5.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: - POST Scale vnfInstance + ... Applicability: none + ... Post-Conditions: none + POST Scale vnfInstance with not existing VNF Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails @@ -54,11 +51,11 @@ GET Scale VNFInstance - Method not implemented [Documentation] Test ID: 7.3.1.4.4 ... Test title: GET Scale VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Scale vnfInstance Check HTTP Response Status Code Is 405 @@ -66,11 +63,11 @@ PUT Scale VNFInstance - Method not implemented [Documentation] Test ID: 7.3.1.4.5 ... Test title: PUT Scale VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.5.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.5.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none PUT Scale vnfInstance Check HTTP Response Status Code Is 405 @@ -78,11 +75,11 @@ PATCH Scale VNFInstance - Method not implemented [Documentation] Test ID: 7.3.1.4.6 ... Test title: PATCH Scale VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.5.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.5.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none PATCH Scale vnfInstance Check HTTP Response Status Code Is 405 @@ -90,41 +87,18 @@ DELETE Scale VNFInstance - Method not implemented [Documentation] Test ID: 7.3.1.4.7 ... Test title: DELETE Scale VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.5.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.5.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: Resource are not deleted + ... Applicability: none + ... Post-Conditions: none DELETE Scale vnfInstance Check HTTP Response Status Code Is 405 - Check resource existence *** Keywords *** Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Integer response status 200 - -Check resource not instantiated - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - String response body instantiationState NOT_INSTANTIATED - -Check scale not supported - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Missing response body instantiatedVnfInfo scaleStatus - -Launch another LCM operation - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfToLevelRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${body} - Integer response status 202 \ No newline at end of file + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} + Integer response status 200 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot b/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot index 56f1c4c057e7a1f71065eaf4e0b461df1dccdf66..0b9f1c50db8296d53a4cea88adcbf4d0141731d8 100644 --- a/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot +++ b/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelTask.robot @@ -1,6 +1,5 @@ *** Settings *** -Resource environment/configuration.txt -Resource environment/variables.txt +Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library OperatingSystem Library JSONLibrary @@ -13,53 +12,49 @@ POST Scale a vnfInstance to level ... Test title: POST Scale a vnfInstance to level ... Test objective: The objective is to scale a VNF instance to a target level. ... Pre-conditions: none - ... Reference: Clause 5.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none POST Scale vnfInstance to level Check HTTP Response Status Code Is 202 Check Operation Occurrence Id existence POST Scale a vnfInstance to level Conflict (Not-Instantiated) - # TODO: Need to set the pre-condition of the test. VNF instance shall be in INSTANTIATED state [Documentation] Test ID: 7.3.1.5.2 ... Test title: POST Scale a vnfInstance to level Conflict (Not-Instantiated) ... Test objective: The objective is to verify that the scale operation cannot be executed because the resource is not instantiated ... Pre-conditions: VNF instance resource is in NOT-INSTANTIATED state - ... Reference: Clause 5.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: - POST Scale vnfInstance to level + ... Applicability: none + ... Post-Conditions: none + POST Scale vnfInstance to level with VNF NOT-INSTANTIATED Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - Scale a vnfInstance Not Found - # TODO: Need to create a vnfInstance which's instantiatedVnfInfo.scaleStatus is absent [Documentation] Test ID: 7.3.1.5.3 ... Test title: Scale a vnfInstance Not Found ... Test objective: The objective is to verify that the operation cannot be executed , because the VNF instance resource cannot be found. ... Pre-conditions: VNF instance resource is in NOT-INSTANTIATED state - ... Reference: Clause 5.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: - POST Scale vnfInstance to level - Check HTTP Response Status Code Is 409 + ... Applicability: none + ... Post-Conditions: none + POST Scale vnfInstance to level with not existing VNF + Check HTTP Response Status Code Is 404 Check HTTP Response Body Json Schema Is ProblemDetails - GET Scale to level VNFInstance - Method not implemented [Documentation] Test ID: 7.3.1.5.4 ... Test title: GET Scale to level VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Scale vnfInstance to level Check HTTP Response Status Code Is 405 @@ -67,11 +62,11 @@ PUT Scale to level VNFInstance - Method not implemented [Documentation] Test ID: 7.3.1.5.5 ... Test title: PUT Scale to level VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.6.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.6.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none PUT Scale vnfInstance to level Check HTTP Response Status Code Is 405 @@ -79,11 +74,11 @@ PATCH Scale to level VNFInstance - Method not implemented [Documentation] Test ID: 7.3.1.5.6 ... Test title: PATCH Scale to level VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.6.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.6.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none PATCH Scale vnfInstance to level Check HTTP Response Status Code Is 405 @@ -91,41 +86,10 @@ DELETE Scale to level VNFInstance - Method not implemented [Documentation] Test ID: 7.3.1.5.7 ... Test title: DELETE Scale to level VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: Resources are not deleted + ... Applicability: none + ... Post-Conditions: none DELETE Scale vnfInstance to level - Check HTTP Response Status Code Is 405 - Check resource existence - -*** Keywords *** -Check resource existence - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Integer response status 200 - -Check resource not instantiated - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${notInstantiatedVnfInstanceId} - String response body instantiationState NOT_INSTANTIATED - - Check scale to level not supported - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Missing response body instantiatedVnfInfo scaleStatus - -Launch another LCM operation - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} - Integer response status 202 \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelWorkflow.robot b/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelWorkflow.robot index 9b67474be7a954f485ddf53c339cdeb9ac66493e..bc7c374b9beeabb3bf110f00cde541bf540d2cde 100644 --- a/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/ScaleVNFToLevelWorkflow.robot @@ -1,7 +1,5 @@ *** Settings *** -Resource environment/configuration.txt Resource environment/variables.txt -Resource environment/scaleVariables.txt Resource VnfLcmMntOperationKeywords.robot Resource SubscriptionKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -11,14 +9,13 @@ Library Collections Library JSONLibrary Library Process - *** Test Cases *** VNF Instance Scale To Level [Documentation] Test ID: 7.3.1.31.1 ... Test title: VNF Instance Scale To Level workflow ... Test objective: The objective is to test the workflow for the scale to level of a VNF instance ... Pre-conditions: VNF instance in INSTANTIATED state . NFVO is subscribed to VNF LCM Operation Occurrence notifications - ... Reference: Clause 5.4.6 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.6 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: NFVO is able to receive notifications from VNFM. Scale operation is supported for the VNF (as capability in the VNFD) ... Post-Conditions: VNF instance still in INSTANTIATED state and VNF is scaled to the new level @@ -34,14 +31,6 @@ VNF Instance Scale To Level #Create a new Grant - Sync - Scale REMOVED *** Keywords *** - -Initialize System - Create Sessions - ${body}= Get File jsons/scaleVnfToLevelRequest.json - ${scaleVnfToLevelRequest}= evaluate json.loads('''${body}''') json - ${instantiationLevelId}= Get Value From Json ${scaleVnfToLevelRequest} $..instantiationLevelId #How to use this info to get the instantiation scale level? - ${scaleInfo}= Get Value From Json ${scaleVnfToLevelRequest} $..scaleInfo - Check Postcondition VNF Scaled To New Level Check resource instantiated ${newScaleInfo}= Get Vnf Scale Info ${vnfInstanceId} @@ -59,11 +48,6 @@ Compare ScaleInfos END Should be true ${old_level_value}==${new_level_value} - -Create a new Grant - Sync - ScaleToLevel - Create a new Grant - Synchronous mode ${vnfInstanceId} ${vnfLcmOpOccId} SCALE_TO_LEVEL - Check Operation Notification For Scale [Arguments] ${status} - Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} - \ No newline at end of file + Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/ScaleVNFWorkflow.robot b/SOL003/VNFLifecycleManagement-API/ScaleVNFWorkflow.robot index 12ec5afefde2e4cfd78dc79ef85478321627b027..7e5c507fe412bbe7febcba4c3aa8a5e428c45dd5 100644 --- a/SOL003/VNFLifecycleManagement-API/ScaleVNFWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/ScaleVNFWorkflow.robot @@ -1,7 +1,5 @@ *** Settings *** -Resource environment/configuration.txt Resource environment/variables.txt -Resource environment/scaleVariables.txt Resource VnfLcmMntOperationKeywords.robot Resource SubscriptionKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -11,14 +9,13 @@ Library Collections Library JSONLibrary Library Process - *** Test Cases *** VNF Instance Scale Out [Documentation] Test ID: 7.3.1.32.1 ... Test title: VNF Instance Scale Out workflow ... Test objective: The objective is to test the workflow for the scaling out a VNF instance ... Pre-conditions: VNF instance in INSTANTIATED state (Test ID 5.4.4.1). NFVO is subscribed to VNF LCM Operation Occurrence notifications (Test ID 5.4.20.1) - ... Reference: Clause 5.4.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: NFVO is able to receive notifications from VNFM. Scale operation is supported for the VNF (as capability in the VNFD) ... Post-Conditions: VNF instance still in INSTANTIATED state and VNF is scaled out @@ -34,16 +31,6 @@ VNF Instance Scale Out #Create a new Grant - Sync - Scale REMOVED *** Keywords *** - -Initialize System - Create Sessions - ${scaleInfo}= Get Vnf Scale Info ${vnfInstanceId} - -Precondition Checks - Check resource instantiated - ${LccnSubscriptions}= Check subscriptions about one VNFInstance and operation type ${vnfInstanceId} VnfLcmOperationOccurrenceNotification operationType=SCALE - ${scaleInfo}= Get Vnf Scale Info ${vnfInstanceId} - Check Postcondition VNF [Arguments] ${operation} Check resource instantiated @@ -62,11 +49,7 @@ Compare ScaleInfos END Run Keyword If ${type}==SCALE_OUT Should Be True ${old_level_value}<${new_level_value} ... ELSE Should Be True ${old_level_value}<${new_level_value} - -Create a new Grant - Sync - Scale - Create a new Grant - Synchronous mode ${vnfInstanceId} ${vnfLcmOpOccId} SCALE Check Operation Notification For Scale [Arguments] ${status} - Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} - \ No newline at end of file + Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/SubscriptionKeywords.robot b/SOL003/VNFLifecycleManagement-API/SubscriptionKeywords.robot index 54fa12754175c7ecb76c2eedc8dcaac06ded665f..cc358f27c591738d00059a4b8979dfb1fa7f8242 100644 --- a/SOL003/VNFLifecycleManagement-API/SubscriptionKeywords.robot +++ b/SOL003/VNFLifecycleManagement-API/SubscriptionKeywords.robot @@ -13,18 +13,13 @@ Library MockServerLibrary Check subscriptions about one VNFInstance and operation type [Arguments] ${vnfInstanceId} ${notificationType} ${operationType}="" ${operationState}="" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - Run Keyword If ${notificationType}=="VnfIdentifierCreationNotification" or ${notificationType}=="VnfIdentifierDeletionNotification" GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?vnfInstanceIds=${vnfInstanceId}¬ificationTypes=${notificationType} - ... ELSE GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?vnfInstanceIds=${vnfInstanceId}¬ificationTypes=${notificationType}&operationTypes=${operationType}&operationStates=${operationState} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${notificationType}=="VnfIdentifierCreationNotification" or ${notificationType}=="VnfIdentifierDeletionNotification" GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?vnfInstanceIds=${vnfInstanceId}¬ificationTypes=${notificationType} + ... ELSE GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?vnfInstanceIds=${vnfInstanceId}¬ificationTypes=${notificationType}&operationTypes=${operationType}&operationStates=${operationState} Integer response status 200 Array response body minItems=1 ${body} Output response body [Return] ${body} - -Create Sessions - Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance - Wait For Process handle=mockInstance timeout=5s on_timeout=continue - Create Mock Session ${callback_uri}:${callback_port} Configure Notification Status Handler [Arguments] ${endpoint} ${status}="" diff --git a/SOL003/VNFLifecycleManagement-API/Subscriptions.robot b/SOL003/VNFLifecycleManagement-API/Subscriptions.robot index 4e05efb62ceb361058cf0155388bbe8cb26b5f1d..a8ee0fba17d15a066d17e8bc83cacc0da4c663a4 100644 --- a/SOL003/VNFLifecycleManagement-API/Subscriptions.robot +++ b/SOL003/VNFLifecycleManagement-API/Subscriptions.robot @@ -1,12 +1,13 @@ *** Settings *** -Resource environment/configuration.txt -Resource environment/variables.txt +Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ Resource VnfLcmMntOperationKeywords.robot - +Library Process +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true *** Test Cases *** POST Create a new subscription @@ -14,7 +15,7 @@ POST Create a new subscription ... Test title: POST Create a new subscription ... Test objective: The POST method creates a new subscription ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.18.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: in response header Location shall not be null @@ -25,9 +26,9 @@ POST Create a new subscription Create a new Subscription - DUPLICATION [Documentation] Test ID: 7.3.1.17.2 ... Test title: POST Create a new subscription - DUPLICATION - ... Test objective: The objective is to test request to create a duplicate (same cakkbackurl and filter) subscription + ... Test objective: The objective is to test request to create a duplicate (same callbackurl and filter) subscription ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.18.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: duplication is supported by SUT ... Post-Conditions: in response header Location shall not be null @@ -40,7 +41,7 @@ Create a new Subscription - NO-DUPLICATION ... Test title: POST Create a new subscription - NO-DUPLICATION ... Test objective: The objective is to test the request that does not create a duplicate (same callbackurl and filter) subscription ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.18.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: duplication is not supported by SUT ... Post-Conditions: in response header Location shall not be null @@ -53,7 +54,7 @@ GET Subscriptions ... Test title: GET Subscriptions ... Test objective: The objective is Get the list of active subscriptions ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -66,7 +67,7 @@ GET Subscription - Filter ... Test title: GET Subscriptions - Filter ... Test objective: The objective is Get the list of active subscriptions using a filter ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -80,7 +81,7 @@ GET subscriptions - Bad Request Invalid attribute-based filtering parameters ... Test title: GET subscriptions - Bad Request Invalid attribute-based filtering parameters ... Test objective: The objective is Get the list of active subscriptions using an invalid filter ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -93,7 +94,7 @@ GET subscriptions with all_fields attribute selector ... Test title: GET subscriptions with all_fields attribute selector ... Test objective: The objective is Get the list of active subscriptions ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -106,7 +107,7 @@ GET subscriptions with exclude_default attribute selector ... Test title: GET subscriptions with exclude_default attribute selector ... Test objective: The objective is Get the list of active subscriptions ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -119,7 +120,7 @@ GET subscriptions with fields attribute selector ... Test title: GET subscriptions with fields attribute selector ... Test objective: The objective is Get the list of active subscriptions ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -132,7 +133,7 @@ GET subscriptions with exclude_fields attribute selector ... Test title: GET subscriptions with exclude_fields attribute selector ... Test objective: The objective is Get the list of active subscriptions ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -145,7 +146,7 @@ PUT subscriptions - Method not implemented ... Test title: PUT subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.18.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -157,10 +158,10 @@ PATCH subscriptions - Method not implemented ... Test title: PATCH subscriptions - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.18.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: subscription not modified + ... Post-Conditions: none PATCH subscriptions Check HTTP Response Status Code Is 405 @@ -169,10 +170,10 @@ DELETE subscriptions - Method not implemented ... Test title: DELETE subscriptions - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.18.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: subscription not deleted + ... Post-Conditions: none DELETE subscriptions Check HTTP Response Status Code Is 405 @@ -181,23 +182,36 @@ GET Subscriptions as a Paged Response ... Test title: GET Subscriptions as a Paged Response ... Test objective: The objective is Get the list of active subscriptions as a Paged Response. ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Get subscriptions Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link GET subscriptions - Bad Request Response too Big [Documentation] Test ID: 7.3.1.17.15 ... Test title: GET subscriptions - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of the list of active subscriptions fails because response is too big. The test also checks the JSON schema of the unsuccessful operation HTTP response. ... Pre-conditions: none - ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.18.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Get subscriptions Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file + Check HTTP Response Body Json Schema Is ProblemDetails + +POST Create a new Subscription - Unprocessable Entity + [Documentation] Test ID: 7.3.1.17.16 + ... Test title: POST Create a new Subscription - Unprocessable Entity + ... Test objective: The objective is to test that content type of the payload body is supported and the payload body of a request contains syntactically correct data but the data cannot be processed. + ... re-conditions: none + ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Post Create subscription + Check HTTP Response Status Code Is 422 + Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/TerminateVNFTask.robot b/SOL003/VNFLifecycleManagement-API/TerminateVNFTask.robot index d61927bee49cd9641b6cb0c54a1547152b43dea8..aa110655b57a022a0bb32effa3749b448381955b 100644 --- a/SOL003/VNFLifecycleManagement-API/TerminateVNFTask.robot +++ b/SOL003/VNFLifecycleManagement-API/TerminateVNFTask.robot @@ -1,6 +1,5 @@ *** Settings *** -Resource environment/configuration.txt -Resource environment/variables.txt +Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Resource VnfLcmMntOperationKeywords.robot Library OperatingSystem @@ -14,10 +13,10 @@ POST Terminate a vnfInstance ... Test title: POST Terminate a vnfInstance ... Test objective: The objective is to test that POST method terminate a VNF instance ... Pre-conditions: none - ... Reference: Clause 5.4.8.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.8.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: + ... Post-Conditions: none POST Terminate VNF Check HTTP Response Status Code Is 202 Check Operation Occurrence Id existence @@ -27,12 +26,12 @@ POST Terminate a vnfInstance Conflict (Not-Instantiated) ... Test title: POST Terminate a vnfInstance Conflict (Not-Instantiated) ... Test objective: The objective is to test that the vnf Instance cannot be terminated ... Pre-conditions: VNF instance resource is in NOT-INSTANTIATED state - ... Reference: Clause 5.4.8.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.8.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: - POST Terminate VNF - Check HTTP Response Status Code Is 202 + ... Post-Conditions: none + POST Terminate VNF in NOT-INSTANTIATED state + Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails @@ -41,7 +40,7 @@ GET Terminate VNFInstance - Method not implemented ... Test title: GET Terminate VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.8.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.8.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -53,7 +52,7 @@ PUT Terminate VNFInstance - Method not implemented ... Test title: PUT Terminate VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.8.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.8.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -65,7 +64,7 @@ PATCH Terminate VNFInstance - Method not implemented ... Test title: PATCH Terminate VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.8.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.8.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -77,7 +76,7 @@ DELETE Terminate VNFInstance - Method not implemented ... Test title: DELETE Terminate VNFInstance - Method not implemented ... Test objective: The objective is to verify that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.8.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.8.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -88,28 +87,6 @@ DELETE Terminate VNFInstance - Method not implemented Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - Integer response status 200 - -Check resource not instantiated - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - String response body instantiationState NOT_INSTANTIATED - -Check change flavour not supported - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} - # how to check if change floavour is not supported? "flavourId" doesn't exist? - -Launch another LCM operation - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} - Integer response status 202 \ No newline at end of file + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} + Integer response status 200 \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/TerminateVNFWorkflow.robot b/SOL003/VNFLifecycleManagement-API/TerminateVNFWorkflow.robot index e502115cb060dd490d767791c46712b41c6af13d..2e76987841420fc41b30eed608f9b2f5a2cdd185 100644 --- a/SOL003/VNFLifecycleManagement-API/TerminateVNFWorkflow.robot +++ b/SOL003/VNFLifecycleManagement-API/TerminateVNFWorkflow.robot @@ -1,7 +1,5 @@ *** Settings *** -Resource environment/configuration.txt Resource environment/variables.txt -Resource environment/scaleVariables.txt Resource VnfLcmMntOperationKeywords.robot Resource SubscriptionKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -11,14 +9,13 @@ Library Collections Library JSONLibrary Library Process - *** Test Cases *** Terminate a VNF Instance [Documentation] Test ID: 7.3.1.33.1 ... Test title: Terminate a VNF Instance ... Test objective: The objective is to terminate a VNF instance. ... Pre-conditions: VNF instance in INSTANTIATED state - ... Reference: Clause 5.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: NFVO is able to receive notifications from VNFM. ... Post-Conditions: VNF instance in NOT_INSTANTIATED state @@ -32,21 +29,9 @@ Terminate a VNF Instance Check Postcondition VNF Terminate *** Keywords *** - -Initialize System - Create Sessions - -Precondition Checks - Check resource instantiated - ${LccnSubscriptions}= Check subscriptions about one VNFInstance and operation type ${vnfInstanceId} VnfLcmOperationOccurrenceNotification operationType=SCALE - Check Postcondition VNF Terminate Check resource not Instantiated - -Create a new Grant - Sync - OPERATE - Create a new Grant - Synchronous mode ${vnfInstanceId} ${vnfLcmOpOccId} OPERATE Check Operation Notification For Terminate [Arguments] ${status} - Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} - \ No newline at end of file + Check Operation Notification VnfLcmOperationOccurrenceNotification ${status} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/VNFInstances.robot b/SOL003/VNFLifecycleManagement-API/VNFInstances.robot index 8b817204babfdc0c152c2277c90276422584fdf4..fbf1f03dbbab99ae387a43f596ec9e7f7e5fc64b 100644 --- a/SOL003/VNFLifecycleManagement-API/VNFInstances.robot +++ b/SOL003/VNFLifecycleManagement-API/VNFInstances.robot @@ -1,7 +1,6 @@ *** Settings *** # Suite setup Expect spec SOL003-VNFLifecycleManagement-API.yaml -Resource environment/configuration.txt -Resource environment/variables.txt +Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Resource VnfLcmMntOperationKeywords.robot Library OperatingSystem @@ -14,9 +13,9 @@ POST Create a new vnfInstance ... Test title: POST Create a new vnfInstance ... Test objective: The objective is to create a new VNF instance resource ... Pre-conditions: none - ... Reference: Clause 5.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: + ... Applicability: none ... Post-Conditions: VNF instance created POST Create a new vnfInstance Check HTTP Response Status Code Is 201 @@ -26,11 +25,11 @@ GET information about multiple VNF instances [Documentation] Test ID: 7.3.1.1.2 ... Test title: GET information about multiple VNF instances ... Test objective: The objective is to query information about multiple VNF instances - ... Pre-conditions: - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET multiple vnfInstances Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is vnfInstances @@ -39,11 +38,11 @@ GET information about multiple VNF instances Bad Request Invalid attribute-based [Documentation] Test ID: 7.3.1.1.3 ... Test title: GET information about multiple VNF instances Bad Request Invalid attribute-based filtering parameters ... Test objective: The objective is to query information about multiple VNF instances with Invalid attribute-based filtering parameters - ... Pre-conditions: A VNF is instantiated, a bad filter selector (filter selectors are listed in Table 5.4.2.3.2-1 - ETSI GS NFV-SOL 003 [1] v2.6.1). - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: A VNF is instantiated, a bad filter selector (filter selectors are listed in Table 5.4.2.3.2-1 - ETSI GS NFV-SOL 003 [1] v2.7.1). + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET multiple vnfInstances with bad attribute Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails @@ -53,11 +52,11 @@ GET information about multiple VNF instances Bad Request Invalid attribute selec [Documentation] Test ID: 7.3.1.1.4 ... Test title: GET information about multiple VNF instances Bad Request Invalid attribute selector ... Test objective: The objective is to query information about multiple VNF instances with Invalid attribute selector - ... Pre-conditions: A VNF is instantiated, a bad attribute selector (attribute selectors are listed in Table 5.4.2.3.2-1 - ETSI GS NFV-SOL 003 [1] v2.6.1). - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: A VNF is instantiated, a bad attribute selector (attribute selectors are listed in Table 5.4.2.3.2-1 - ETSI GS NFV-SOL 003 [1] v2.7.1). + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET multiple vnfInstances with bad filter Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails @@ -66,11 +65,11 @@ GET information about multiple VNF instances with "all_fields" attribute selecto [Documentation] Test ID: 7.3.1.1.5 ... Test title: GET information about multiple VNF instances with "all_fields" attribute selector ... Test objective: The objective is to query information about multiple VNF instances - ... Pre-conditions: - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET multiple vnfInstances with all_fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is vnfInstances @@ -79,11 +78,11 @@ GET information about multiple VNF instances with "exclude_default" attribute se [Documentation] Test ID: 7.3.1.1.6 ... Test title: GET information about multiple VNF instances with "exclude_default" attribute selector ... Test objective: The objective is to query information about multiple VNF instances - ... Pre-conditions: - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET multiple vnfInstances with exclude_default attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is vnfInstances @@ -92,11 +91,11 @@ GET information about multiple VNF instances with "fields" attribute selector [Documentation] Test ID: 7.3.1.1.7 ... Test title: GET information about multiple VNF instances with "fields" attribute selector ... Test objective: The objective is to query information about multiple VNF instances - ... Pre-conditions: - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET multiple vnfInstances with fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is vnfInstances @@ -105,11 +104,11 @@ GET information about multiple VNF instances with "exclude_fields" attribute sel [Documentation] Test ID: 7.3.1.1.8 ... Test title: GET information about multiple VNF instances with "exclude_fields" attribute selector ... Test objective: The objective is to query information about multiple VNF instances - ... Pre-conditions: - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET multiple vnfInstances with exclude_fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is vnfInstances @@ -118,60 +117,73 @@ PUT multiples VNFInstances - Method not implemented [Documentation] Test ID: 7.3.1.1.9 ... Test title: PUT multiples VNFInstances - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: - PUT multiple vnfInstances + ... Applicability: none + ... Post-Conditions: none + PUT VNFInstances Check HTTP Response Status Code Is 405 PATCH multiples VNFInstances - Method not implemented [Documentation] Test ID: 7.3.1.1.10 ... Test title: PATCH multiples VNFInstances - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: - PATCH multiple vnfInstances + ... Applicability: none + ... Post-Conditions: none + PATCH VNFInstances Check HTTP Response Status Code Is 405 DELETE VNFInstances - Method not implemented [Documentation] Test ID: 7.3.1.1.11 ... Test title: DELETE multiples VNFInstances - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: - ... Reference: Clause 5.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: resources are not deleted - DELETE multiple vnfInstances + ... Applicability: none + ... Post-Conditions: none + DELETE VNFInstances Check HTTP Response Status Code Is 405 GET information about multiple VNF instances to get Paged Response [Documentation] Test ID: 7.3.1.1.12 ... Test title: GET information about multiple VNF instances to get Paged Response ... Test objective: The objective is to query information about multiple VNF instances to get Paged Response. - ... Pre-conditions: - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET multiple vnfInstances Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link GET information about multiple VNF instances - Bad Request Response too Big [Documentation] Test ID: 7.3.1.1.13 ... Test title: GET information about multiple VNF instances - Bad Request Response too Big ... Test objective: The objective is to query information about multiple VNF instances fails because response is too big. The test also checks the JSON schema of the unsuccessful operation HTTP response. - ... Pre-conditions: A VNF is instantiated, a bad attribute selector (attribute selectors are listed in Table 5.4.2.3.2-1 - ETSI GS NFV-SOL 003 [1] v2.6.1). - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Pre-conditions: A VNF is instantiated, a bad attribute selector (attribute selectors are listed in Table 5.4.2.3.2-1 - ETSI GS NFV-SOL 003 [1] v2.7.1). + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET multiple vnfInstances Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file + Check HTTP Response Body Json Schema Is ProblemDetails + +GET information about multiple VNF instances with "exclude_default" and "fields" attribute selector + [Documentation] Test ID: 7.3.1.1.14 + ... Test title: GET information about multiple VNF instances with "exclude_default" and "fields" attribute selector + ... Test objective: The objective is to query information about multiple VNF instances + ... Pre-conditions: none + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET multiple vnfInstances with exclude_default and fields attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is vnfInstances \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot index bc4b649a64407aa2c33037358969ecb12e604f9e..aa04c1b31c8a69cda58be2b9e65c512f7ccf040c 100644 --- a/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot +++ b/SOL003/VNFLifecycleManagement-API/VnfLcmMntOperationKeywords.robot @@ -1,23 +1,29 @@ *** Settings *** -Resource environment/configuration.txt +Library String Resource environment/variables.txt -Resource environment/scaleVariables.txt Library MockServerLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library OperatingSystem Library BuiltIn Library JSONLibrary Library Collections +Library Process Library JSONSchemaLibrary schemas/ +#Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml +#Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml *** Keywords *** - +Create Sessions + Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance + Wait For Process handle=mockInstance timeout=5s on_timeout=continue + Create Mock Session ${callback_uri}:${callback_port} + Get Vnf Instance [Arguments] ${vnfInstanceId} Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${body}= Output response body [Return] ${body} @@ -54,8 +60,8 @@ Check VNF Instance [Arguments] ${vnfId} Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${response}= Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${response}= Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfId} Check VNF Status [Arguments] ${current} ${expected} @@ -63,13 +69,13 @@ Check VNF Status Log VNF Status in the correct status Check operation resource state is FAILED_TEMP - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body instantiationState FAILED_TEMP Check operation resource state is FINALLY_FAILED - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} String response body instantiationState FINALLY_FAILED Get Vnf Scale Info [Arguments] ${vnfInstanceId} @@ -103,116 +109,118 @@ Send VNF Scale Out Request Log Trying to scale a vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfOutRequest.json ${json}= evaluate json.loads('''${body}''') json ${aspectId}= Set Variable ${json.aspectId} - ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} + ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${body} Send VNF Scale To Level Request [Documentation] Instantiate VNF The POST method instantiates a VNF instance. Log Trying to Instantiate a vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfToLevelRequest.json ${json}= evaluate json.loads('''${body}''') json ${aspectId}= Set Variable ${json.aspectId} - ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${body} + ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${body} Send VNF Instance Resource Create Request - Log Create VNF instance by POST to ${apiRoot}/${apiName}/${apiVersion}/vnf_instances + Log Create VNF instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/createVnfRequest.json - ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File + ${template}= Get File jsons/createVnfRequest.json + ${body}= Format String ${template} vnfdId=${Descriptor_ID} vnfProvider=${Provider} vnfProductName=${Product_Name} vnfSoftwareVersion=${Software_Version} vnfdVersion= ${Descriptor_Version} flavourId=${Flavour_ID} + ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${body} Send VNF Instance Resource Delete Request log Delete an individual VNF instance - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${response}= Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${response}= Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} Send Change VNF Flavour Request Log Trying to change the deployment flavour of a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/changeVnfFlavourRequest.json - ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body} + ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body} Send Change VNF Operational State Request Log Trying to change the operational state of a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/operateVnfRequest.json - ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate ${body} + ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${body} Send Heal VNF Request Log Trying to heal a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/healVnfRequest.json - ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal ${body} + ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${body} Send Change Ext Connectivity Request Log Trying to change the external connectivity of a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/changeExtVnfConnectivityRequest.json - ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${body} + ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${body} Send Terminate VNF Request Log Trying to terminate a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/terminateVnfRequest.json - ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate ${body} + ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${body} Send Info Modification Request Log Trying to update information of a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/patchBodyRequest.json - ${response}= Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} ${body} + ${response}= Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${body} Send Retry Operation Request Log Retry a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry Send Roll back Operation Request Log Rollback a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback Send Fail Operation Request Log Fail a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail Send Cancel Operation Request Log Cancel an ongoing VNF lifecycle operation - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${response}= Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${CancelMode} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${response}= Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${CancelMode} Create a new Grant - Synchronous mode [Arguments] ${vnfInstanceId} ${vnfLcmOpOccId} ${operation} - Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiVersion}/grants + Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants Pass Execution If ${SYNC_MODE} == 0 The Granting process is asynchronous mode. Skipping the test Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/grantRequest.json ${json_body}= evaluate json.loads('''${body}''') json Set To Dictionary ${json_body} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} operation=${operation} ${body}= evaluate json.dumps(${json_body}) json - Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} Integer response status 201 Log Status code validated ${headers}= Output response headers @@ -225,16 +233,16 @@ Create a new Grant - Synchronous mode Create a new Grant - Asynchronous mode [Arguments] ${vnfInstanceId} ${vnfLcmOpOccId} ${operation} - Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiVersion}/grants + Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants Pass Execution If ${SYNC_MODE} == 1 The Granting process is synchronous mode. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/grantRequest.json ${json_body}= evaluate json.loads('''${body}''') json Set To Dictionary ${json_body} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} operation=${operation} ${body}= evaluate json.dumps(${json_body}) json - Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} Output response Integer response status 202 Log Status code validated @@ -246,38 +254,56 @@ Create a new Grant - Asynchronous mode POST Cancel operation task Log Cancel an ongoing VNF lifecycle operation - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Cancel a VNF lifecycle operation + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${CancelMode} + Log Validate Status code + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST Cancel operation task with conflict + Log Cancel an ongoing VNF lifecycle operation + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Cancel a VNF lifecycle operation + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccIdNotStartingProcessingRollingback}/cancel ${CancelMode} + Log Validate Status code + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST Cancel operation task not existing + Log Cancel an ongoing VNF lifecycle operation + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Cancel a VNF lifecycle operation - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${CancelMode} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${notExistingVnfLcmOpOccId}/cancel ${CancelMode} Log Validate Status code ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Cancel operation task log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Cancel operation task log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Cancel operation task Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Cancel operation task Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -285,37 +311,37 @@ POST Change External VNF Connectivity Log Trying to change the external connectivity of a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/changeExtVnfConnectivityRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Change External VNF Connectivity log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Change External VNF Connectivity log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Change External VNF Connectivity Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Change External VNF Connectivity Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_ext_conn ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -323,36 +349,61 @@ POST Change VNF deployment flavour Log Trying to change the deployment flavour of a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/changeVnfFlavourRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File + ${template}= Get File jsons/changeVnfFlavourRequest.json + ${body}= Format String ${template} newFlavourId=${Flavour_ID} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST Change VNF deployment flavour of NOT-INSTANTIATED VNF + Log Trying to change the deployment flavour of a VNF instance. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/changeVnfFlavourRequest.json + ${body}= Format String ${template} newFlavourId=${newFlavourId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notInstantiatedVnfInstanceId}/change_flavour ${body} ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Global Variable ${response} ${outputResponse} + +POST Change VNF deployment flavour of not existing VNF + Log Trying to change the deployment flavour of a VNF instance. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/changeVnfFlavourRequest.json + ${body}= Format String ${template} newFlavourId=${newFlavourId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notExistingVnfInstanceId}/change_flavour ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + GET Change VNF deployment flavour log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Change VNF deployment flavour log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Change VNF deployment flavour Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Change VNF deployment flavour Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/change_flavour + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/change_flavour ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -360,9 +411,11 @@ POST Create a new vnfInstance Log Create VNF instance by POST to /vnf_instances Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/createVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File + ${template}= Get File jsons/createVnfRequest.json + ${body}= Format String ${template} vnfdId=${Descriptor_ID} vnfProvider=${Provider} vnfProductName=${Product_Name} vnfSoftwareVersion=${Software_Version} vnfdVersion= ${Descriptor_Version} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -370,9 +423,9 @@ GET multiple vnfInstances Log Query VNF The GET method queries information about multiple VNF instances. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -380,9 +433,9 @@ GET multiple vnfInstances with bad attribute Log Query VNF The GET method queries information about multiple VNF instances. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances?attribute_not_exist=some_value + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?attribute_not_exist=some_value ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -390,74 +443,81 @@ GET multiple vnfInstances with bad filter Log Query VNF The GET method queries information about multiple VNF instances. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances?attribute_not_exist=some_value + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?attribute_not_exist=some_value ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET multiple vnfInstances with all_fields attribute selector Log Query status information about multiple VNF instances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_instances?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET multiple vnfInstances with exclude_default attribute selector Log Query status information about multiple VNF instances using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_instances?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET multiple vnfInstances with fields attribute selector Log Query status information about multiple VNF instances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_instances?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?fields=${fields} + ${output}= Output response + Set Suite Variable ${response} ${output} +GET multiple vnfInstances with exclude_default and fields attribute selector + Log Query status information about multiple VNF instances, using fields + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?fields=${fields}&exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET multiple vnfInstances with exclude_fields attribute selector Log Query status information about multiple VNF instances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_instances?exclude_fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} - -PUT VNFInstances - Method not implemented + +PUT VNFInstances log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances - Log Validate Status code - Integer response status 405 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances + ${output}= Output response + Set Suite Variable ${response} ${output} -PATCH VNFInstances - Method not implemented +PATCH VNFInstances log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances - Log Validate Status code - Integer response status 405 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances + ${output}= Output response + Set Suite Variable ${response} ${output} -DELETE VNFInstances - Method not implemented +DELETE VNFInstances log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances - Log Validate Status code - Integer response status 405 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances + ${output}= Output response + Set Suite Variable ${response} ${output} POST individual vnfInstance log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -465,8 +525,8 @@ GET individual vnfInstance log Trying to get information about an individual VNF instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -474,8 +534,8 @@ PUT individual vnfInstance log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -483,134 +543,194 @@ PATCH individual vnfInstance log Trying to modify an individual VNF instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/patchBodyRequest.json - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File + ${template}= Get File jsons/patchBodyRequest.json + ${body}= Format String ${template} vnfdId=${Descriptor_ID} vnfdVersion= ${Descriptor_Version} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + DELETE individual vnfInstance log Trying to delete an individual VNF instance - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} +DELETE individual vnfInstance in INSTANTIATED state + log Trying to delete an individual VNF instance + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${instantiatedVnfInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} - POST instantiate individual vnfInstance Log Trying to Instantiate a vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body}= Get File jsons/instantiateVnfRequest.json + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST instantiate individual vnfInstance with conflict + Log Trying to Instantiate a vnf Instance + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/instantiateVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${instantiatedVnfInstanceId}/instantiate ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET instantiate individual vnfInstance log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT instantiate individual vnfInstance log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH instantiate individual vnfInstance log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE instantiate individual vnfInstance log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/instantiate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST Scale vnfInstance Log Trying to Instantiate a vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/scaleVnfRequest.json + ${body}= Format String ${template} scaletype=${scaletype} scaleAspectId=${scaleAspectId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} +POST Scale vnfInstance with VNF NOT-INSTANTIATED + Log Trying to Instantiate a vnf Instance + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/scaleVnfRequest.json + ${body}= Format String ${template} scaletype=${scaletype} scaleAspectId=${scaleAspectId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notInstantiatedVnfInstanceId}/scale ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} +POST Scale vnfInstance with not existing VNF + Log Trying to Instantiate a vnf Instance + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/scaleVnfRequest.json + ${body}= Format String ${template} scaletype=${scaletype} scaleAspectId=${scaleAspectId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notExistingVnfInstanceId}/scale ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} GET Scale vnfInstance Log Trying to get a scale a vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Scale vnfInstance Log Trying to modify a scale vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfRequest.json - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Scale vnfInstance Log Trying to modify a scale vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfRequest.json - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Scale vnfInstance Log Trying to modify a scale vnf Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/scaleVnfRequest.json - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST Scale vnfInstance to level Log Trying to scale a vnf Instance to level Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleVnfToLevelRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/scaleVnfToLevelRequest.json + ${body}= Format String ${template} instantiationLevelId=${instantiationLevelId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} +POST Scale vnfInstance to level with VNF NOT-INSTANTIATED + Log Trying to scale a vnf Instance to level + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/scaleVnfToLevelRequest.json + ${body}= Format String ${template} instantiationLevelId=${instantiationLevelId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notInstantiatedVnfInstanceId}/scale_to_level ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} +POST Scale vnfInstance to level with not existing VNF + Log Trying to scale a vnf Instance to level + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/scaleVnfToLevelRequest.json + ${body}= Format String ${template} instantiationLevelId=${instantiationLevelId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notExistingVnfInstanceId}/scale_to_level ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Scale vnfInstance to level log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Scale vnfInstance to level log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Scale vnfInstance to level log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Scale vnfInstance to level log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/scale_to_level + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/scale_to_level ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -618,37 +738,49 @@ POST Terminate VNF Log Trying to terminate a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/terminateVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/terminateVnfRequest.json + ${body}= Format String ${template} terminationType=${terminationType} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST Terminate VNF in NOT-INSTANTIATED state + Log Trying to terminate a VNF instance. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/terminateVnfRequest.json + ${body}= Format String ${template} terminationType=${terminationType} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notInstantiatedVnfInstanceId}/terminate ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Terminate VNF log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Terminate VNF log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Terminate VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Terminate VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/terminate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -656,37 +788,60 @@ POST Heal VNF Log Trying to heal a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/healVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/healVnfRequest.json + ${body}= Format String ${template} healingCause=${healingCause} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST Heal VNF Not Instantiated + Log Trying to heal a VNF instance. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/healVnfRequest.json + ${body}= Format String ${template} healingCause=${healingCause} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notInstantiatedVnfInstanceId}/heal ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST Heal VNF Not Existing + Log Trying to heal a VNF instance. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/healVnfRequest.json + ${body}= Format String ${template} healingCause=${healingCause} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notExistingVnfInstanceId}/heal ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Heal VNF log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Heal VNF log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Heal VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Heal VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/heal + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -694,396 +849,541 @@ POST Operate VNF Log Trying to operate a VNF instance. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/operateVnfRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/operateVnfRequest.json + ${body}= Format String ${template} changeStateTo=${changeStateTo} stopType=${stopType} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + +POST Operate VNF with conflict + Log Trying to operate a VNF instance. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/operateVnfRequest.json + ${body}= Format String ${template} changeStateTo=${changeStateTo} stopType=${stopType} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notInstantiatedVnfInstanceId}/operate ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST Operate VNF not existing + Log Trying to operate a VNF instance. + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/operateVnfRequest.json + ${body}= Format String ${template} changeStateTo=${changeStateTo} stopType=${stopType} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${notExistingVnfInstanceId}/operate ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} GET Operate VNF log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Operate VNF log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Operate VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Operate VNF log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_instances/${vnfInstanceId}/operate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_instances/${vnfInstanceId}/operate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Post VNF LCM Operation occurrences log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET VNF LCM Operation occurrences Log Query status information about multiple VNF lifecycle management operation occurrences. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET VNF LCM Operation occurrences invalid attribute Log Query status information about multiple VNF lifecycle management operation occurrences. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs?attribute_not_exist=some_value + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?attribute_not_exist=some_value ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET VNF LCM Operation occurrences invalid filter Log Query status information about multiple VNF lifecycle management operation occurrences. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs?fields=wrong_field + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?fields=wrong_field ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get VNF LCM Operation occurrences with all_fields attribute selector Log Query status information about multiple VNF lifecycle management operation occurrences, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?exclude_default + ${output}= Output response + Set Suite Variable ${response} ${output} +Get VNF LCM Operation occurrences with exclude_default and fields attribute selector + Log Query status information about multiple VNF lifecycle management operation occurrences, using fields + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?fields=${fields}&exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get VNF LCM Operation occurrences with exclude_default attribute selector Log Query status information about multiple VNF lifecycle management operation occurrences using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get VNF LCM Operation occurrences with fields attribute selector Log Query status information about multiple VNF lifecycle management operation occurrences, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} Get VNF LCM Operation occurrences with exclude_fields attribute selector Log Query status information about multiple VNF lifecycle management operation occurrences, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs?exclude_fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} PUT VNF LCM Operation occurrences log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH VNF LCM Operation occurrences log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE VNF LCM Operation occurrences log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} +Post Individual VNF LCM OP occurrence + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} -Post Individual VNF LCM Operation occurrences + +Get Individual VNF LCM OP occurrence log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} +Get Individual VNF LCM OP occurrence with invalid resource identifier + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${notExistingVnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Put Individual VNF LCM OP occurrence + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Patch Individual VNF LCM OP occurrence + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Delete Individual VNF LCM OP occurrence + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Put multiple VNF instances log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Patch multiple VNF instances log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Delete multiple VNF instances log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Post Retry operation Log Retry a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Set Global Variable ${response} ${outputResponse} +Post Retry operation with conflict + Log Retry a VNF lifecycle operation if that operation has experienced a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Execute Query and validate response + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccIdNotFailedTemp}/retry + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} +Post Retry operation not existing + Log Retry a VNF lifecycle operation if that operation has experienced a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Execute Query and validate response + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${notExistingVnfLcmOpOccId}/retry + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} Get Retry operation Log Trying to perform a GET. This method should not be implemented. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Put Retry operation log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Patch Retry operation log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Delete Retry operation log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Post Rollback operation Log Rollback a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Execute Query and validate response + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} +Post Rollback operation with conflict + Log Rollback a VNF lifecycle operation if that operation has experienced a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Execute Query and validate response + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccIdNotFailedTemp}/rollback + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} +Post Rollback operation not existing + Log Rollback a VNF lifecycle operation if that operation has experienced a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${notExistingVnfLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get Rollback operation Log Trying to perform a GET. This method should not be implemented. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Put Rollback operation log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Patch Rollback operation log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Delete Rollback operation log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Post Fail operation Log mark as Failed a VNF lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Post ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + +Post Fail operation with conflict + Log mark as Failed a VNF lifecycle operation if that operation has experienced a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Execute Query and validate response + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccIdNotFailedTemp}/fail + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Fail operation not existing + Log mark as Failed a VNF lifecycle operation if that operation has experienced a temporary failure + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Execute Query and validate response + Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${notExistingvnfLcmOpOccId}/fail + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Get Fail operation Log Trying to perform a GET. This method should not be implemented. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Put Fail operation log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Patch Fail operation log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Delete Fail operation log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_lcm_op_occs/${vnfLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Post Create subscription - Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/lccnSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/lccnSubscriptionRequest.json + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint + Post Create subscription - DUPLICATION Log Trying to create a subscription with an already created content Pass Execution If ${VNFM_DUPLICATION} == 0 VNFM is not permitting duplication. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/lccnSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/lccnSubscriptionRequest.json + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint + Post Create subscription - NO-DUPLICATION Log Trying to create a subscription with an already created content Pass Execution If ${VNFM_DUPLICATION} == 1 VNFM permits duplication. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/lccnSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/lccnSubscriptionRequest.json + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint + Get subscriptions Log Get the list of active subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get subscriptions - filter Log Get the list of active subscriptions using a filter Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get subscriptions - invalid filter Log Get the list of active subscriptions using an invalid filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter_invalid} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter_invalid} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get subscriptions with all_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_default attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?exclude_fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} PUT subscriptions log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH subscriptions log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE subscriptions log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Post Create Individual subscription log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get Individual subscription log Trying to get information about an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Put Individual subscription log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Patch Individual subscription log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Delete Individual subscription log Try to delete an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Put Notification subscription @@ -1149,6 +1449,171 @@ GET test endpoint Verify Mock Expectation ${req} Clear Requests ${callback_endpoint} -Check LINK in Header +Check HTTP Response Header Contain Link ${linkURL}= Get Value From Json ${response['headers']} $..Link Should Not Be Empty ${linkURL} + +Check HTTP Response Body vnfInstance content against VNF Descriptor + Run Keyword If ${check_descriptors} == 1 Check Individual VNF Instance Content + +Check Individual VNF Instance Content + PARSE the Descriptor File + Match the VNF Instance Response Attributes with Descriptors + +PARSE the Descriptor File + Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file + +Fetch Information from SOL001 descriptor file + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml + @{VDU_labels}= Create List + @{VNF_labels}= Create List + @{VirtualLink_labels}= Create List + @{CP_labels}= Create List + @{Storage_labels}= Create List + FOR ${key} IN @{topology_template.node_templates.keys()} + ${key_type}= Get Variable Value ${topology_template.node_templates.${key}.type} + ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VDU_compute} + ${VNF_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VNF} + ${Link_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_virtual_link} + ${VDUcp_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VDU_cp} + ${Storage_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_storage} + Run Keyword If ${VDU_check} Append To List ${VDU_labels} ${key} + Run Keyword If ${VNF_check} Append To List ${VNF_labels} ${key} + Run Keyword If ${VNF_check} Get VNF Attributes from SOL001 ${key} + Run Keyword If ${Link_check} Append To List ${VirtualLink_labels} ${key} + Run Keyword If ${VDUcp_check} Append To List ${CP_labels} ${key} + Run Keyword If ${Storage_check} Append To List ${Storage_labels} ${key} + END + Set Global Variable @{VDU_IDs} @{VDU_labels} + Set Global Variable @{VNF_IDs} @{VNF_labels} + Set Global Variable @{VirtualLink_IDs} @{VirtualLink_labels} + Set Global Variable @{CP_IDs} @{CP_labels} + Set Global Variable @{Storage_IDs} @{Storage_labels} + +Get VNF Attributes from SOL001 + [Arguments] ${VNF_label} + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml + ${descriptor_id}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.descriptor_id} + ${provider}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.provider} + ${product_name}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.product_name} + ${software_version}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.software_version} + ${descriptor_version}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.descriptor_version} + ${flavour_id}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.flavour_id} + + Set Global Variable ${Descriptor_ID} ${descriptor_id} + Set Global Variable ${Provider} ${provider} + Set Global Variable ${Product_Name} ${product_name} + Set Global Variable ${Software_Version} ${software_version} + Set Global Variable ${Descriptor_Version} ${descriptor_version} + Set Global Variable ${Flavour_ID} ${flavour_id} + + +Fetch Information from SOL006 descriptor file + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id} + ${provider}= Get Variable Value ${nfv.vnfd[0].provider} + ${product_name}= Get Variable Value ${nfv.vnfd[0]['product-name']} + ${software_version}= Get Variable Value ${nfv.vnfd[0]['software-version']} + ${descriptor_version}= Get Variable Value ${nfv.vnfd[0].version} + ${VDUcount}= Get Length ${nfv.vnfd[0].vdu} + ${extCP_count}= Get Length ${nfv.vnfd[0]['ext-cpd']} + ${virtualLink_count}= Get length ${nfv.vnfd[0]['int-virtual-link-desc']} + ${instantiation_levels}= Get Length ${nfv.vnfd[0].df['instantiation-level']} + FOR ${key} IN @{nfv.vnfd[0].keys()} + ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} vdu + Run Keyword If ${VDU_check} Get VDU IDs ${VDUcount} + ${extCP_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} ext-cpd + Run Keyword If ${extCP_check} Get External CP IDs ${extCP_count} + ${virtualLink_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} int-virtual-link-desc + Run Keyword If ${virtualLink_check} Get Virtual Link IDs ${virtualLink_count} + ${DF_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} df + Run Keyword If ${DF_check} Get Instantiation Levels ${instantiation_levels} + END + Set Global Variable ${Descriptor_ID} ${descriptor_id} + Set Global Variable ${Provider} ${provider} + Set Global Variable ${Product_Name} ${product_name} + Set Global Variable ${Software_Version} ${software_version} + Set Global Variable ${Descriptor_Version} ${descriptor_version} + +Get VDU IDs + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{VDU_labels}= Create List + ${Storage_labels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${VDU_labels} ${nfv.vnfd[0].vdu[${i}]['id']} + Append To List ${Storage_labels} ${nfv.vnfd[0].vdu[${i}]['virtual-storage-desc']} + Get Internal CPs for each VDU ${i} + END + Set Global Variable ${VDU_IDs} ${VDU_labels} + Set Global Variable ${Storage_IDs} ${Storage_labels} + +Get Internal CPs for each VDU + [Arguments] ${vdu} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${count}= Get Length ${nfv.vnfd[0].vdu[${vdu}]['int-cpd']} + ${internal_CPs}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${internal_CPs} ${nfv.vnfd[0].vdu[${vdu}]['int-cpd'][${i}]['id']} + END + Set Global Variable ${internalCP_IDs} ${internal_CPs} + +Get External CP IDs + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{external_CPs}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${external_CPs} ${nfv.vnfd[0].ext_cpd[${i}].id} + END + Set Global Variable ${externalCP_IDs} ${external_CPs} + +Get Virtual Link IDs + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${VirtualLink_labels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${VirtualLink_labels} ${nfv.vnfd[0]['int-virtual-link-desc'][${i}]['id']} + END + Set Global Variable ${VirtualLink_IDs} ${VirtualLink_labels} + +Get Instantiation Levels + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{Instantiation_Levels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${Instantiation_Levels} ${nfv.vnfd[0].df['instantiation-level'][${i}]['id']} + END + Set Global Variable ${InstantiationLevel_IDs} ${Instantiation_Levels} + +Match the VNF Instance Response Attributes with Descriptors + #Checking Response attributes with VNF Descriptors + Should Be Equal As Strings ${response['body']['vnfdId']} ${Descriptor_ID} + Should Be Equal As Strings ${response['body']['vnfProvider']} ${Provider} + Should Be Equal As Strings ${response['body']['vnfProductName']} ${Product_Name} + Should Be Equal As Strings ${response['body']['vnfSoftwareVersion']} ${Software_Version} + Should Be Equal As Strings ${response['body']['vnfdVersion']} ${Descriptor_Version} + Should Be Equal As Strings ${response['body']['instantiatedVnfInfo']['flavourId']} ${Flavour_ID} + List Should Contain Value ${VDU_IDs} ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo']['vduId']} + Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${externalCP_IDs} ${response['body']['instantiatedVnfInfo']['extCpInfo'][0]['cpdId']} + Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${internalCP_IDs} ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo'][0]['vnfcCpInfo'][0]['cpdId']} + Run Keyword If '${descriptorType}'=='SOL001' List Should Contain Value @{CP_IDs} ${response['body']['instantiatedVnfInfo']['extCpInfo'][0]['cpdId']} + Run Keyword If '${descriptorType}'=='SOL001' List Should Contain Value @{CP_IDs} ${response['body']['instantiatedVnfInfo']['vnfcResourceInfo'][0]['vnfcCpInfo'][0]['cpdId']} + List Should Contain value ${Storage_IDs} ${response['body']['instantiatedVnfInfo']['virtualStorageResourceInfo'][0]['virtualStorageDescId']} + List Should Contain Value ${VirtualLink_IDs} ${response['body']['instantiatedVnfInfo']['extManagedVirtualLinkInfo'][0]['vnfVirtualLinkDescId']} + +Check HTTP Response Body of Individual VNF LCM Operation occurrences content against VNF Descriptor + Run Keyword If ${check_descriptors} == 1 Check Individual VNF LCM Operation Occurence Content + +Check Individual VNF LCM Operation Occurence Content + PARSE the Descriptor File + Match the VNF LCM Operation Occurence Response Attributes with Descriptors + +Match the VNF LCM Operation Occurence Response Attributes with Descriptors + #Checking Response attributes with VNF Descriptors + Should Be Equal As Strings ${response['body']['changedInfo']['vnfdId']} ${Descriptor_ID} + Should Be Equal As Strings ${response['body']['changedInfo']['vnfdVersion']} ${Descriptor_Version} + List Should Contain Value ${VDU_IDs} ${response['body']['resourceChanges']['affectedVnfcs'][0]['vduId']} + List Should Contain value ${Storage_IDs} ${response['body']['resourceChanges']['affectedVirtualStorages'][0]['virtualStorageDescId']} + List Should Contain Value ${VirtualLink_IDs} ${response['body']['resourceChanges']['affectedVirtualLinks'][0]['virtualStorageDescId']} + + diff --git a/SOL003/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot b/SOL003/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot index dcdc287d2891411c130e38bf48a517810a42cad8..c5bb08b038c0a2e39c75946544428c4ff8672919 100644 --- a/SOL003/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot +++ b/SOL003/VNFLifecycleManagement-API/VnfLcmOperationOccurences.robot @@ -1,6 +1,5 @@ *** Settings *** -Resource environment/configuration.txt -Resource environment/variables.txt +Resource environment/variables.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library JSONLibrary Library JSONSchemaLibrary schemas/ @@ -12,7 +11,7 @@ POST VNF LCM Operation occurrences - Method not implemented ... Test title: POST VNF LCM Operation occurrences - Method not implemented ... Test objective: The objective is to test that POST method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.12.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -24,12 +23,12 @@ GET status information about multiple VNF LCM Operation OCC ... Test title: GET status information about multiple VNF LCM Operation OCC ... Test objective: The objective is to test that GET method retrieve Query status information about multiple VNF lifecycle management operation occurrences. ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none GET VNF LCM Operation occurrences - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs GET status information about multiple VNF LCM Operation OCC Bad Request Invalid attribute-based filtering parameters @@ -37,7 +36,7 @@ GET status information about multiple VNF LCM Operation OCC Bad Request Invalid ... Test title: GET status information about multiple VNF LCM Operation OCC Bad Request Invalid attribute-based filtering parameters ... Test objective: The objective is to test that GET method fail retrieving status information about multiple VNF lifecycle management operation occurrences because attribute is invalid. ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -50,7 +49,7 @@ GET status information about multiple VNF LCM Operation OCC Bad Request Invalid ... Test title: GET status information about multiple VNF LCM Operation OCC Bad Request Invalid attribute selector ... Test objective: The objective is to test that GET method fail retrieving status information about multiple VNF lifecycle management operation occurrences because attribute is invalid. ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -63,12 +62,12 @@ GET status information about multiple VNF LCM Operation OCC with "all_fields" ... Test title: GET status information about multiple VNF LCM Operation OCC with "all_fields" ... Test objective: The objective is to test that GET method retrieve Query status information about multiple VNF lifecycle management operation occurrences. ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Get VNF LCM Operation occurrences with all_fields attribute selector - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs GET status information about multiple VNF LCM Operation OCC with "exlude_default" @@ -76,12 +75,12 @@ GET status information about multiple VNF LCM Operation OCC with "exlude_default ... Test title: GET status information about multiple VNF LCM Operation OCC with "exclude_default" ... Test objective: The objective is to test that GET method retrieve Query status information about multiple VNF lifecycle management operation occurrences. ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Get VNF LCM Operation occurrences with exclude_default attribute selector - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs GET status information about multiple VNF LCM Operation OCC with "fields" @@ -89,12 +88,12 @@ GET status information about multiple VNF LCM Operation OCC with "fields" ... Test title: GET status information about multiple VNF LCM Operation OCC with "fields" ... Test objective: The objective is to test that GET method retrieve Query status information about multiple VNF lifecycle management operation occurrences. ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Get VNF LCM Operation occurrences with fields attribute selector - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs GET status information about multiple VNF LCM Operation OCC with "exclude_fields" @@ -102,12 +101,12 @@ GET status information about multiple VNF LCM Operation OCC with "exclude_fields ... Test title: GET status information about multiple VNF LCM Operation OCC with "exclude_fields" ... Test objective: The objective is to test that GET method retrieve Query status information about multiple VNF lifecycle management operation occurrences. ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Get VNF LCM Operation occurrences with exclude_fields attribute selector - Check HTTP Response Status Code Is 202 + Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is VnfLcmOpOccs PUT status information about multiple VNF LCM Operation OCC - Method not implemented @@ -115,7 +114,7 @@ PUT status information about multiple VNF LCM Operation OCC - Method not impleme ... Test title: PUT status information about multiple VNF LCM Operation OCC - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.12.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -127,7 +126,7 @@ PATCH status information about multiple VNF LCM Operation OCC - Method not imple ... Test title: PATCH status information about multiple VNF LCM Operation OCC - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.12.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -139,7 +138,7 @@ DELETE status information about multiple VNF LCM Operation OCC - Method not impl ... Test title: DELETE status information about multiple VNF LCM Operation OCC - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.12.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -151,23 +150,36 @@ GET status information about multiple VNF LCM Operation OCC to get Paged Respons ... Test title: GET status information about multiple VNF LCM Operation OCC to get Paged Response ... Test objective: The objective is to test that GET method retrieve Query status information about multiple VNF lifecycle management operation occurrences to get a Paged Response. ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none GET VNF LCM Operation occurrences - Check HTTP Response Status Code Is 202 - Check LINK in Header + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Contain Link GET status information about multiple VNF LCM Operation OCC - Bad Request Response too Big [Documentation] Test ID: 7.3.1.11.13 ... Test title: GET status information about multiple VNF LCM Operation OCC - Bad Request Response too Big ... Test objective: The objective is to test that GET method fail retrieving status information about multiple VNF lifecycle management operation occurrences because response is too big. The test also checks the JSON schema of the unsuccessful operation HTTP response. ... Pre-conditions: none - ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none GET VNF LCM Operation occurrences Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file + Check HTTP Response Body Json Schema Is ProblemDetails + +GET status information about multiple VNF LCM Operation OCC with "exclude_default" and "fields" + [Documentation] Test ID: 7.3.1.11.14 + ... Test title: GET status information about multiple VNF LCM Operation OCC with "exclude_default" and "fields" + ... Test objective: The objective is to test that GET method retrieve Query status information about multiple VNF lifecycle management operation occurrences. + ... Pre-conditions: none + ... Reference: Clause 5.4.12.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get VNF LCM Operation occurrences with exclude_default and fields attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is VnfLcmOpOccs \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL003/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml new file mode 100644 index 0000000000000000000000000000000000000000..413d76def0e50c64c1890a8476fa7bdb22981ae3 --- /dev/null +++ b/SOL003/VNFLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -0,0 +1,167 @@ +tosca_definitions_version: tosca_simple_yaml_1_2 +description: "TST010 reference VNF-B" + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v2.7.1/etsi_nfv_sol001_vnfd_types.yaml + +metadata: + descriptor_id: "VNF-B" + vendor: "ETSI TST WG" + version: "2.0" + +node_types: + tst010.vnf.simple: + derived_from: tosca.nodes.nfv.VNF + properties: + descriptor_id: + type: string + default: VNF-B + descriptor_version: + type: string + default: '1.0' + provider: + type: string + default: ETSI TST WG + product_name: + type: string + default: VNF-B + software_version: + type: string + default: '1.0' + product_info_name: + type: string + default: VNF-B + product_info_description: + type: string + default: TST010 reference VNF-B + flavour_id: + type: string + default: VNF-B_flavor + flavour_description: + type: string + default: "VNF-B flavor" + vnfm_info: + type: list + entry_schema: + type: string + default: [ 'etsivnfm:v2.3.1' ] + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + description: Invoked upon receipt of a Scale VNF request + terminate: + description: Invoked upon receipt Terminate VNF request + operate: + description: Invoked upon receipt of an Operate VNF request + requirements: + - virtual_link_right: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_left: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_management: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 0] + +topology_template: + substitution_mappings: + node_type: "tst010.vnf.simple" + requirements: + virtual_link_right: + [right, virtual_link_right] + virtual_link_management: + [management, virtual_link_management] + virtual_link_left: + [left, virtual_link_left] + node_templates: + right: + type: "tosca.nodes.nfv.VduCp" + properties: + layer_protocols: [ ipv4 ] + order: 1 + requirements: + - virtual_binding: VDU-B + vdu-b-1-vsd: + management: + type: "tosca.nodes.nfv.VduCp" + properties: + layer_protocols: [ ipv4 ] + order: 0 + requirements: + - virtual_binding: VDU-B + vdu-b-1-vsd: + left: + type: "tosca.nodes.nfv.VduCp" + properties: + layer_protocols: [ ipv4 ] + order: 2 + requirements: + - virtual_binding: VDU-B + vdu-b-1-vsd: + type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" + properties: + virtual_block_storage_data: + size_of_storage: 20 GB + rdma_enabled: false + sw_image_data: + name: "vdu-b-1 image" + version: "1.1" + checksum: + algorithm: "sha-224" + hash: "somehashfortst010" + container_format: "bare" + disk_format: qcow2 + min_disk: '1' + min_ram: '2' + size: '1' + VDU-B: + type: "tosca.nodes.nfv.Vdu.Compute" + properties: + name: "vdu-b-1-vcd" + description: "Description of VDU-B-1" + vdu_profile: + min_number_of_instances: 1 + max_number_of_instances: 2 + capabilities: + virtual_compute: + properties: + virtual_memory: + virtual_mem_size: 4096 MB + numa_enabled: false + virtual_cpu: + num_virtual_cpu: 2 + requirements: + - virtual_storage: vdu-b-1-vsd + + vnf-b-1_VNF: + type: "tst010.vnf.simple" + properties: + descriptor_id: "VNF-B" + descriptor_version: "2.0" + provider: "ETSI TST WG" + product_name: "VDU_VNF-B" + software_version: "2.0" + product_info_name: "VDU_VNF-B" + product_info_description: "TST010 reference VNF-A" + flavour_id: "VNF-B_flavor" + flavour_description: "VNF-B flavor" + vnfm_info: + - etsivnfm:v2.3.1 + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + implementation: scale-example.yaml + terminate: + implementation: terminate-example.yaml + operate: + implementation: operate-example.yaml \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/descriptors/SOL006/VNFD/vnfd_SOL006.yaml b/SOL003/VNFLifecycleManagement-API/descriptors/SOL006/VNFD/vnfd_SOL006.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d902779a2d42d34a9f93513512d8a485dc1d838b --- /dev/null +++ b/SOL003/VNFLifecycleManagement-API/descriptors/SOL006/VNFD/vnfd_SOL006.yaml @@ -0,0 +1,137 @@ +nfv: + vnfd: + - id: VNF-B-2vdu + provider: ETSI TST WG + product-name: TST010 reference VNF-B with 2 VDUs + software-version: '2.2' + version: '2.2' + vnfm-info: ETSI VNFM + vdu: + - id: vdu-b-1 + name: VNF-B VDU 1 + int-cpd: + - id: left + layer-protocol: ethernet + - id: management + layer-protocol: ethernet + - id: internal + layer-protocol: ethernet + int-virtual-link-desc: internal-vl + virtual-compute-desc: vdu-b-1-vcd + virtual-storage-desc: vdu-b-1-vsd + sw-image-desc: vdu-b-1-image + - id: vdu-b-2 + name: VNF-B VDU 2 + int-cpd: + - id: right + layer-protocol: ethernet + - id: management + layer-protocol: ethernet + - id: internal + layer-protocol: ethernet + int-virtual-link-desc: internal-vl + virtual-compute-desc: vdu-b-2-vcd + virtual-storage-desc: vdu-b-2-vsd + sw-image-desc: vdu-b-2-image + virtual-compute-desc: + id: vdu-b-1-vcd + virtual-memory: + size: '4.0' + virtual-cpu: + num-virtual-cpu: '2' + virtual-storage-desc: + id: vdu-b-1-vsd + type-of-storage: root-storage + size-of-storage: '0' + sw-image-desc: + id: vdu-b-1-image + name: VNF-B image + version: '1.1' + checksum: + algorithm: sha-224 + hash: somehashfortst010 + container-format: bare + disk-format: qcow2 + min-disk: '1' + min-ram: '2.0' + size: '1' + image: 'http://someurl.com/VNF-B.qcow2' + virtual-compute-desc: + id: vdu-b-2-vcd + virtual-memory: + size: '6.0' + virtual-cpu: + num-virtual-cpu: '2' + virtual-storage-desc: + id: vdu-b-2-vsd + type-of-storage: root-storage + size-of-storage: '0' + sw-image-desc: + id: vdu-b-2-image + name: VNF-B-2 image + version: '1.1' + checksum: + algorithm: sha-224 + hash: somehashfortst010 + container-format: bare + disk-format: qcow2 + min-disk: '1' + min-ram: '2.0' + size: '1' + image: 'http://someurl.com/VNF-B-2.qcow2' + int-virtual-link-desc: + - id: internal-vl + flavour: + id: internal-vl-flavour + qos: + latency: '1' + packet-delay-variation: '1' + packet-loss-ratio: '0.05' + connectivity-type: + layer-protocol: ethernet + ext-cpd: + - id: ext-b-left + int-cpd: + vdu-id: vdu-b-1 + cpd: left + layer-protocol: ethernet + - id: management + int-cpd: + vdu-id: vdu-b-1 + cpd: management + layer-protocol: ethernet + - id: ext-b-right + int-cpd: + vdu-id: vdu-b-2 + cpd: right + layer-protocol: ethernet + df: + id: normal + vdu-profile: + - id: vdu-b-1 + min-number-of-instances: '1' + max-number-of-instances: '2' + - id: vdu-b-2 + min-number-of-instances: '1' + max-number-of-instances: '4' + instantiation-level: + - id: double + vdu-level: + - vdu-id: vdu-b-1 + number-of-instances: '2' + - vdu-id: vdu-b-2 + number-of-instances: '2' + - id: single + vdu-level: + - vdu-id: vdu-b-1 + number-of-instances: '1' + - vdu-id: vdu-b-2 + number-of-instances: '1' + default-instantiation-level: single + lcm-operations-configuration: + scale-vnf-to-level-op-config: + arbitrary-target-levels-supported: 'true' + terminate-vnf-op-config: + min-graceful-termination: '1' + operate-vnf-op-config: + min-graceful-stop-timeout: '1' \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/environment/configuration.txt b/SOL003/VNFLifecycleManagement-API/environment/configuration.txt deleted file mode 100644 index 5363f3f0ca19ac8079f864eaf2802c7cdb4205ab..0000000000000000000000000000000000000000 --- a/SOL003/VNFLifecycleManagement-API/environment/configuration.txt +++ /dev/null @@ -1,39 +0,0 @@ -*** Variables *** -${VNFM_HOST} localhost # Hostname of the VNFM -${VNFM_PORT} 8080 # Listening port of the VNFM -${VNFM_SCHEMA} https -${ACCEPT} application/json -${ACCEPT_JSON} application/json -${CONTENT_TYPE} application/json -${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== -${AUTH_USAGE} 1 -${CONTENT_TYPE_PATCH} application/merge-patch+json - -${apiRoot} / -${apiName} vnflcm -${apiVersion} v1 - -${CancelMode} GRACEFUL -${VNFM_DUPLICATION} 0 - - - - - -${NFVO_HOST} localhost # Hostname of the NFVO -${NFVO_PORT} 8081 # Listening port of the NFVO -${NFVO_SCHEMA} https -${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX -${SINGLE_FILE_VNFD} 1 # If VNFD is PLAIN TEXT -${ACCEPT_PLAIN} text/plain -${ACCEPT_ZIP} application/zip -${vnfPkgId_processing} 007c111c-38a1-42c0-a666-7475ecb1567c -${ARTIFACT_TYPE} application/octet-stream -${ARTIFACT_ID} artifactId -${WRONG_ACCEPT} application/json -${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d -${SYNC_MODE} 0 -${sleep_interval} 20s -${callback_uri} http://localhost -${callback_port} 9091 -${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/environment/scaleVariables.txt b/SOL003/VNFLifecycleManagement-API/environment/scaleVariables.txt deleted file mode 100644 index d8e260b924a90f7744a738e16fdd2aa62a4939cf..0000000000000000000000000000000000000000 --- a/SOL003/VNFLifecycleManagement-API/environment/scaleVariables.txt +++ /dev/null @@ -1,6 +0,0 @@ -*** variables *** -${LccnSubscriptions} -${scaleInfo} -${element} -${aspectId} -${scaleOutResponse} diff --git a/SOL003/VNFLifecycleManagement-API/environment/variables.txt b/SOL003/VNFLifecycleManagement-API/environment/variables.txt index 75ef919b56af5f33f0d0d05d1ec96d087e9815ac..d8e12f693db43407d4cd18239d19df650ae53ab4 100644 --- a/SOL003/VNFLifecycleManagement-API/environment/variables.txt +++ b/SOL003/VNFLifecycleManagement-API/environment/variables.txt @@ -1,9 +1,46 @@ *** Variables *** +${VNFM_HOST} localhost # Hostname of the VNFM +${VNFM_PORT} 8080 # Listening port of the VNFM +${VNFM_SCHEMA} https +${ACCEPT} application/json +${ACCEPT_JSON} application/json +${CONTENT_TYPE} application/json +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${AUTH_USAGE} 1 +${CONTENT_TYPE_PATCH} application/merge-patch+json + +${apiRoot} / +${apiName} vnflcm +${apiMajorVersion} v1 + +${CancelMode} GRACEFUL +${VNFM_DUPLICATION} 0 + +${NFVO_HOST} localhost # Hostname of the NFVO +${NFVO_PORT} 8081 # Listening port of the NFVO +${NFVO_SCHEMA} https +${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX +${SINGLE_FILE_VNFD} 1 # If VNFD is PLAIN TEXT +${ACCEPT_PLAIN} text/plain +${ACCEPT_ZIP} application/zip +${ARTIFACT_TYPE} application/octet-stream +${ARTIFACT_ID} artifactId +${WRONG_ACCEPT} application/json +${SYNC_MODE} 0 + +${instantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${notInstantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${notExistingVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${vnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f -${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d ${conflicVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${vnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d +${notExistingVnfLcmOpOccId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d +${vnfLcmOpOccIdNotStartingProcessingRollingback} 6fc3539c-e602-4afa-8e13-962fb5a7d81d +${vnfLcmOpOccIdNotFailedTemp} 6fc3539c-e602-4afa-8e13-962fb5a7d81d + ${VnfLcmOperationOccurrenceNotification} {} ${VnfIdentifierCreationNotification} {} ${VnfIdentifierDeletionNotification} {} @@ -14,8 +51,6 @@ ${requestedFlavour} test ${sub_filter} filter ${sub_filter_invalid} filter_invalid -${notInstantiatedVnfInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f - ${fields} criteria,objectInstanceIds ${vnfInstanceName} Test-VnfInstance @@ -31,6 +66,7 @@ ${patchBodyRequest} {} ${callback_uri} http://localhost ${callback_port} 9091 +${callback_notification} /notification ${callback_endpoint} /endpoint ${callback_endpoint_fwd} /endpoint/check ${callback_endpoint_error} /endpoint_404 @@ -42,3 +78,53 @@ ${notification_request} [] ${notification_response} [] ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + +${vnfdId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f + +${scaletype} SCALE_OUT +${scaleAspectId} myAspect + +${instantiationLevelId} myNextLevel + +${newFlavourId} myFlavour_new + +${healingCause} a new cause + +${changeStateTo} STOPPED +${stopType} FORCEFUL + +${terminationType} GRACEFUL + + +${LccnSubscriptions} +${scaleInfo} +${element} +${aspectId} +${scaleOutResponse} + +${callbackResp} localhost + +${descriptorType} SOL001 +${check_descriptors} 1 + +${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute +${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder +${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink +${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp +${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage + +@{VDU_IDs} +@{VNF_IDs} +@{virtualLink_IDs} +@{CP_IDs} +@{Storage_IDs} +@{internalCP_IDs} +@{externalCP_IDs} +@{InstantiationLevel_IDs} + +${Descriptor_ID} +${Provider} +${Product_Name} +${Software_Version} +${Descriptor_Version} +${Flavour_ID} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/jsons/VnfIdentifierCreationNotification.json b/SOL003/VNFLifecycleManagement-API/jsons/VnfIdentifierCreationNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..dfc860f3d5f9c5995c5733f3ed9767fd7062f791 --- /dev/null +++ b/SOL003/VNFLifecycleManagement-API/jsons/VnfIdentifierCreationNotification.json @@ -0,0 +1,8 @@ +{{ + "id":"", + "notificationType":"VnfIdentifierCreationNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "vnfInstanceId":"{vnfInstanceId}", + "_links":"" +}} diff --git a/SOL003/VNFLifecycleManagement-API/jsons/VnfIdentifierDeletionNotification.json b/SOL003/VNFLifecycleManagement-API/jsons/VnfIdentifierDeletionNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..3754be2b93a321628a1cb21c37d341d85815fbee --- /dev/null +++ b/SOL003/VNFLifecycleManagement-API/jsons/VnfIdentifierDeletionNotification.json @@ -0,0 +1,8 @@ +{{ + "id":"", + "notificationType":"VnfIdentifierDeletionNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "vnfInstanceId":"{vnfInstanceId}", + "_links":"" +}} diff --git a/SOL003/VNFLifecycleManagement-API/jsons/VnfLcmOperationOccurrenceNotification.json b/SOL003/VNFLifecycleManagement-API/jsons/VnfLcmOperationOccurrenceNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..0756a33236eed8b46adb43ec61ca36fc0a84e3cf --- /dev/null +++ b/SOL003/VNFLifecycleManagement-API/jsons/VnfLcmOperationOccurrenceNotification.json @@ -0,0 +1,13 @@ +{{ + "id":"", + "notificationType":"VnfLcmOperationOccurrenceNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "notificationStatus":"STRAT", + "operationState":"PROCESSING", + "vnfInstanceId":"{vnfInstanceId}", + "operation":"SCALE", + "isAutomaticInvocation":"false", + "vnfLcmOpOccId":"{vnfLcmOpOccId}", + "_links":"" +}} diff --git a/SOL003/VNFLifecycleManagement-API/jsons/changeVnfFlavourRequest.json b/SOL003/VNFLifecycleManagement-API/jsons/changeVnfFlavourRequest.json index 5b52927e97d1566e4aeec39de314a263ec3a0560..50d5eb5db52d57e0a3cf8184cf315baea933745c 100644 --- a/SOL003/VNFLifecycleManagement-API/jsons/changeVnfFlavourRequest.json +++ b/SOL003/VNFLifecycleManagement-API/jsons/changeVnfFlavourRequest.json @@ -1,3 +1,3 @@ -{ - "newFlavourId": "myFlavour_new" -} \ No newline at end of file +{{ + "newFlavourId": "{newFlavourId}" +}} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/jsons/createVnfRequest.json b/SOL003/VNFLifecycleManagement-API/jsons/createVnfRequest.json index 290151ae0de5286745c29b9a12df050a9b3ce9f9..15a5f7f7d55b743b4ec3d2284656960023d6b7f4 100644 --- a/SOL003/VNFLifecycleManagement-API/jsons/createVnfRequest.json +++ b/SOL003/VNFLifecycleManagement-API/jsons/createVnfRequest.json @@ -1,6 +1,9 @@ -{ - "vnfdId": "6fc3539c-e602-4afa-8e13-962fb5a7d81f", +{{ "vnfInstanceName": "string", "vnfInstanceDescription": "string", - "metadata":{} -} \ No newline at end of file + "vnfdId": "{vnfdId}", + "vnfProvider":"{vnfProvider}", + "vnfProductName":"{vnfProductName}", + "vnfSoftwareVersion":"{vnfSoftwareVersion}", + "vnfdVersion":"{vnfdVersion}" +}} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/jsons/healVnfRequest.json b/SOL003/VNFLifecycleManagement-API/jsons/healVnfRequest.json index 8981fa94238e3e44ee17147f70898a8e9d831a40..640cd60d96154eeca640ec825bc88defd6499ac2 100644 --- a/SOL003/VNFLifecycleManagement-API/jsons/healVnfRequest.json +++ b/SOL003/VNFLifecycleManagement-API/jsons/healVnfRequest.json @@ -1,4 +1,4 @@ -{ - "cause": "a specific cause", - "additionalParams": {} -} \ No newline at end of file +{{ + "cause": "{healingCause}", + "additionalParams": {{}} +}} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/jsons/lccnSubscriptionRequest.json b/SOL003/VNFLifecycleManagement-API/jsons/lccnSubscriptionRequest.json index f44d3cec5b8b268efaa23b3b9a12d2948076acc7..9ba2f50477c152925e056e5008c266ddaff8fe3f 100644 --- a/SOL003/VNFLifecycleManagement-API/jsons/lccnSubscriptionRequest.json +++ b/SOL003/VNFLifecycleManagement-API/jsons/lccnSubscriptionRequest.json @@ -1,10 +1,10 @@ -{ - "filter": { - "vnfInstanceSubscriptionFilter": { +{{ + "filter": {{ + "vnfInstanceSubscriptionFilter": {{ "vnfdIds": [ "6fc3539c-e602-4afa-8e13-962fb5a7d81f" ] - } - }, - "callbackUri": "http://localhost:9091/notification" -} + }} + }}, + "callbackUri": "{callback_uri}{callback_endpoint}" +}} diff --git a/SOL003/VNFLifecycleManagement-API/jsons/operateVnfRequest.json b/SOL003/VNFLifecycleManagement-API/jsons/operateVnfRequest.json index 8f7b4a1921382044a1fbeccef580901f80157ee9..b878c437d955c2a84737288868630483c4e32612 100644 --- a/SOL003/VNFLifecycleManagement-API/jsons/operateVnfRequest.json +++ b/SOL003/VNFLifecycleManagement-API/jsons/operateVnfRequest.json @@ -1,5 +1,5 @@ -{ - "changeStateTo": "STOPPED", - "stopType": "FORCEFUL", - "additionalParams": {} -} +{{ + "changeStateTo": "{changeStateTo}", + "stopType": "{stopType}", + "additionalParams": {{}} +}} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/jsons/patchBodyRequest.json b/SOL003/VNFLifecycleManagement-API/jsons/patchBodyRequest.json index 0c8845c218393245163304406c1ef2556b4472fd..679cc4c7f673d5b02f730c67dd9679735cbb41f2 100644 --- a/SOL003/VNFLifecycleManagement-API/jsons/patchBodyRequest.json +++ b/SOL003/VNFLifecycleManagement-API/jsons/patchBodyRequest.json @@ -1,4 +1,7 @@ -{ - "vnfInstanceName": "vnf new name", - "vnfInstanceDescription": "new description" -} \ No newline at end of file +{{ + "vnfInstanceName": "vnf string", + "vnfInstanceDescription": "string", + "vnfdId": "{vnfdId}", + "vnfdVersion":"{vnfdVersion}", + "metadata":{{}} +}} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/jsons/scaleVnfRequest.json b/SOL003/VNFLifecycleManagement-API/jsons/scaleVnfRequest.json index 09dc7dffb4a74b17a8773924ada8afe4f5dc5104..142fad5a0c65a720df50cd44edf66dc3d9e08e39 100644 --- a/SOL003/VNFLifecycleManagement-API/jsons/scaleVnfRequest.json +++ b/SOL003/VNFLifecycleManagement-API/jsons/scaleVnfRequest.json @@ -1,4 +1,4 @@ -{ - "type": "SCALE_OUT", - "aspectId": "myAspect" -} \ No newline at end of file +{{ + "type": "{scaletype}", + "aspectId": "{scaleAspectId}" +}} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/jsons/scaleVnfToLevelRequest.json b/SOL003/VNFLifecycleManagement-API/jsons/scaleVnfToLevelRequest.json index 1c39a7bb51571dfc2af274795d0bc9d932eccafd..ca0ea8d3fea407220ef2b6537ab9be062994a73b 100644 --- a/SOL003/VNFLifecycleManagement-API/jsons/scaleVnfToLevelRequest.json +++ b/SOL003/VNFLifecycleManagement-API/jsons/scaleVnfToLevelRequest.json @@ -1,3 +1,3 @@ -{ - "instantiationLevelId": "myNextLevel" -} \ No newline at end of file +{{ + "instantiationLevelId": "{instantiationLevelId}" +}} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/jsons/terminateVnfRequest.json b/SOL003/VNFLifecycleManagement-API/jsons/terminateVnfRequest.json index 0a4f9592d9062dc9c8bf10d81858cddc71cb78aa..bc9553a2e3312701e95513b636bdc5e7e9def725 100644 --- a/SOL003/VNFLifecycleManagement-API/jsons/terminateVnfRequest.json +++ b/SOL003/VNFLifecycleManagement-API/jsons/terminateVnfRequest.json @@ -1,4 +1,4 @@ -{ - "terminationType": "GRACEFUL", - "additionalParams": {} -} \ No newline at end of file +{{ + "terminationType": "{terminationType}", + "additionalParams": {{}} +}} \ No newline at end of file diff --git a/SOL003/VNFLifecycleManagement-API/schemas/Subscriptions.schema.json b/SOL003/VNFLifecycleManagement-API/schemas/Subscriptions.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..75ab7eb899910a4119074e104c15378b8586c851 --- /dev/null +++ b/SOL003/VNFLifecycleManagement-API/schemas/Subscriptions.schema.json @@ -0,0 +1,148 @@ +{ + "type": "array", + "items": { + "description": "This type represents a subscription related to notifications about VNF lifecycle changes.\n", + "type": "object", + "required": ["id", "callbackUri", "_links"], + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "filter": { + "description": "This type represents a subscription filter related to notifications about VNF lifecycle changes. At a particular nesting level in the filter structure, the following applies: All attributes shall match in order for the filter to match (logical \"and\" between different filter attributes). If an attribute is an array, the attribute shall match if at least one of the values in the array matches (logical \"or\" between the values of one filter attribute).\n", + "type": "object", + "properties": { + "vnfInstanceSubscriptionFilter": { + "description": "This type represents subscription filter criteria to match VNF instances.\n", + "type": "object", + "properties": { + "vnfdIds": { + "description": "If present, match VNF instances that were created based on a VNFD identified by one of the vnfdId values listed in this attribute. The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to VNF instances that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", + "type": "array", + "items": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + } + }, + "vnfProductsFromProviders": { + "description": "If present, match VNF instances that belong to VNF products from certain providers. The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to VNF instances that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", + "type": "array", + "items": { + "type": "object", + "required": ["vnfProvider"], + "properties": { + "vnfProvider": { + "description": "Name of the VNF provider to match.\n", + "type": "string" + }, + "vnfProducts": { + "description": "If present, match VNF instances that belong to VNF products with certain product names, from one particular provider.\n", + "type": "array", + "items": { + "type": "object", + "required": ["vnfProductName"], + "properties": { + "vnfProductName": { + "description": "Name of the VNF product to match.\n", + "type": "string" + }, + "versions": { + "description": "If present, match VNF instances that belong to VNF products with certain versions and a certain product name, from one particular provider.\n", + "type": "array", + "items": { + "type": "object", + "required": ["vnfSoftwareVersion"], + "properties": { + "vnfSoftwareVersion": { + "description": "A version.\n", + "type": "string" + }, + "vnfdVersions": { + "description": "If present, match VNF instances that belong to VNF products with certain VNFD versions, a certain software version and a certain product name, from one particular provider.\n", + "type": "array", + "items": { + "description": "A version.\n", + "type": "string" + } + } + } + } + } + } + } + } + } + } + }, + "vnfInstanceIds": { + "description": "If present, match VNF instances with an instance identifier listed in this attribute. The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to particular VNF Instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", + "type": "array", + "items": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + } + }, + "vnfInstanceNames": { + "description": "If present, match VNF instances with a VNF Instance Name listed in this attribute. The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to particular VNF Instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "notificationTypes": { + "description": "Match particular notification types. Permitted values: * VnfLcmOperationOccurrenceNotification * VnfIdentifierCreationNotification * VnfIdentifierDeletionNotification The permitted values of the \"notificationTypes\" attribute are spelled exactly as the names of the notification types to facilitate automated code generation systems.\n", + "type": "array", + "items": { + "type": "string", + "enum": ["VnfLcmOperationOccurrenceNotification", "VnfIdentifierCreationNotification", "VnfIdentifierDeletionNotification"] + } + }, + "operationTypes": { + "description": "Match particular VNF lifecycle operation types for the notification of type VnfLcmOperationOccurrenceNotification. May be present if the \"notificationTypes\" attribute contains the value \"VnfLcmOperationOccurrenceNotification\", and shall be absent otherwise.\n", + "type": "array", + "items": { + "description": "Value | Description ------|------------ INSTANTIATE | Represents the \"Instantiate VNF\" LCM operation. SCALE | Represents the \"Scale VNF\" LCM operation. SCALE_TO_LEVEL | Represents the \"Scale VNF to Level\" LCM operation. CHANGE_FLAVOUR | Represents the \"Change VNF Flavour\" LCM operation. TERMINATE | Represents the \"Terminate VNF\" LCM operation. HEAL | Represents the \"Heal VNF\" LCM operation. OPERATE | Represents the \"Operate VNF\" LCM operation. CHANGE_EXT_CONN | Represents the \"Change external VNF connectivity\" LCM operation. MODIFY_INFO | Represents the \"Modify VNF Information\" LCM operation. \n", + "type": "string", + "enum": ["INSTANTIATE", "SCALE", "SCALE_TO_LEVEL", "CHANGE_FLAVOUR", "TERMINATE", "HEAL", "OPERATE", "CHANGE_EXT_CONN", "MODIFY_INFO"] + } + }, + "operationStates": { + "description": "Match particular LCM operation state values as reported in notifications of type VnfLcmOperationOccurrenceNotification. May be present if the \"notificationTypes\" attribute contains the value \"VnfLcmOperationOccurrenceNotification\", and shall be absent otherwise.\n", + "type": "array", + "items": { + "description": "Value | Description ------|------------ STARTING | The LCM operation is starting. PROCESSING | The LCM operation is currently in execution. COMPLETED | he LCM operation has been completed successfully. FAILED_TEMP | The LCM operation has failed and execution has stopped, but the execution of the operation is not considered to be closed. FAILED | The LCM operation has failed and it cannot be retried or rolled back, as it is determined that such action won't succeed. ROLLING_BACK | The LCM operation is currently being rolled back. ROLLED_BACK | The LCM operation has been successfully rolled back, i.e. The state of the VNF prior to the original operation invocation has been restored as closely as possible.\n", + "type": "string", + "enum": ["STARTING", "PROCESSING", "COMPLETED", "FAILED_TEMP", "FAILED", "ROLLING_BACK", "ROLLED_BACK"] + } + } + } + }, + "callbackUri": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + }, + "_links": { + "description": "Links to resources related to this resource.\n", + "type": "object", + "required": ["self"], + "properties": { + "self": { + "description": "This type represents a link to a resource.\n", + "type": "object", + "required": ["href"], + "properties": { + "href": { + "description": "URI of the referenced resource.\n", + "type": "string", + "format": "url" + } + } + } + } + } + } + } +} diff --git a/SOL003/VNFLifecycleManagement-API/schemas/vnfLcmOpOcc.schema.json b/SOL003/VNFLifecycleManagement-API/schemas/VnfLcmOpOcc.schema.json similarity index 100% rename from SOL003/VNFLifecycleManagement-API/schemas/vnfLcmOpOcc.schema.json rename to SOL003/VNFLifecycleManagement-API/schemas/VnfLcmOpOcc.schema.json diff --git a/SOL003/VNFLifecycleManagement-API/schemas/VnfLcmOperationOccurrenceNotification.schema.json b/SOL003/VNFLifecycleManagement-API/schemas/VnfLcmOperationOccurrenceNotification.schema.json index 85468696c8604ab56d09f03651ade2f14d6a1c17..bf0bfcd302dbb18b3d4f92c7d596bea8c5a3936c 100644 --- a/SOL003/VNFLifecycleManagement-API/schemas/VnfLcmOperationOccurrenceNotification.schema.json +++ b/SOL003/VNFLifecycleManagement-API/schemas/VnfLcmOperationOccurrenceNotification.schema.json @@ -347,11 +347,11 @@ "type": "string" }, "vnfProvider": { - "description": "If present, this attribute signals modifications of the \"vnfProvider\" attribute in \"VnfInstance\". If present, this attribute (which depends on the value of the \"vnfPkgId\" attribute) was modified implicitly following a request to modify the \"vnfPkgId\" attribute, by copying the value of this attribute from the VNFD in the VNF Package identified by the \"vnfPkgId” attribute.\n", + "description": "If present, this attribute signals modifications of the \"vnfProvider\" attribute in \"VnfInstance\". If present, this attribute (which depends on the value of the \"vnfPkgId\" attribute) was modified implicitly following a request to modify the \"vnfPkgId\" attribute, by copying the value of this attribute from the VNFD in the VNF Package identified by the \"vnfPkgId\" attribute.\n", "type": "string" }, "vnfProductName": { - "description": "If present, this attribute signals modifications of the \"vnfProductName\" attribute in \"VnfInstance\". If present, this attribute (which depends on the value of the \"vnfPkgId\" attribute) was modified implicitly following a request to modify the \"vnfPkgId\" attribute, by copying the value of this attribute from the VNFD in the VNF Package identified by the \"vnfPkgId” attribute.\n", + "description": "If present, this attribute signals modifications of the \"vnfProductName\" attribute in \"VnfInstance\". If present, this attribute (which depends on the value of the \"vnfPkgId\" attribute) was modified implicitly following a request to modify the \"vnfPkgId\" attribute, by copying the value of this attribute from the VNFD in the VNF Package identified by the \"vnfPkgId\" attribute.\n", "type": "string" }, "vnfSoftwareVersion": { @@ -565,4 +565,4 @@ } } } - } \ No newline at end of file + } diff --git a/SOL003/VNFLifecycleManagement-API/schemas/subscriptions.schema.json b/SOL003/VNFLifecycleManagement-API/schemas/subscriptions.schema.json deleted file mode 100644 index fefb142da9f905120ff32246f73e6b88062978d5..0000000000000000000000000000000000000000 --- a/SOL003/VNFLifecycleManagement-API/schemas/subscriptions.schema.json +++ /dev/null @@ -1 +0,0 @@ -{ "type": "array", "items": { "description": "This type represents a subscription.\n", "type": "object", "required": [ "id", "callbackUri", "_links" ], "properties": { "id": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" }, "filter": { "description": "This type represents a filter that can be used to subscribe for notifications related to performance management events.\n", "type": "object", "properties": { "vnfInstanceSubscriptionFilter": { "description": "This type represents subscription filter criteria to match VNF instances.\n", "type": "object", "properties": { "vnfdIds": { "description": "If present, match VNF instances that were created based on a VNFD identified by one of the vnfdId values listed in this attribute. The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to VNF instances that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", "type": "array", "items": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" } }, "vnfProductsFromProviders": { "description": "If present, match VNF instances that belong to VNF products from certain providers. The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to VNF instances that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", "type": "array", "items": { "type": "object", "required": [ "vnfProvider" ], "properties": { "vnfProvider": { "description": "Name of the VNF provider to match.\n", "type": "string" }, "vnfProducts": { "description": "If present, match VNF instances that belong to VNF products with certain product names, from one particular provider.\n", "type": "array", "items": { "type": "object", "required": [ "vnfProductName" ], "properties": { "vnfProductName": { "description": "Name of the VNF product to match.\n", "type": "string" }, "versions": { "description": "If present, match VNF instances that belong to VNF products with certain versions and a certain product name, from one particular provider.\n", "type": "array", "items": { "type": "object", "required": [ "vnfSoftwareVersion" ], "properties": { "vnfSoftwareVersion": { "description": "A version.\n", "type": "string" }, "vnfdVersions": { "description": "If present, match VNF instances that belong to VNF products with certain VNFD versions, a certain software version and a certain product name, from one particular provider.\n", "type": "array", "items": { "description": "A version.\n", "type": "string" } } } } } } } } } } }, "vnfInstanceIds": { "description": "If present, match VNF instances with an instance identifier listed in this attribute. The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to particular VNF Instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", "type": "array", "items": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" } }, "vnfInstanceNames": { "description": "If present, match VNF instances with a VNF Instance Name listed in this attribute. The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to particular VNF Instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", "type": "array", "items": { "type": "string" } } } }, "notificationTypes": { "description": "Match particular notification types. Permitted values: * ThresholdCrossedNotification * PerformanceInformationAvailableNotification The permitted values of the \"notificationTypes\" attribute are spelled exactly as the names of the notification types to facilitate automated code generation systems.\n", "type": "string", "enum": [ "ThresholdCrossedNotification", "PerformanceInformationAvailableNotification" ] } } }, "callbackUri": { "description": "The URI of the endpoint to send the notification to.\n", "type": "string", "format": "url" }, "_links": { "description": "Links to resources related to this resource.\n", "type": "object", "required": [ "self" ], "properties": { "self": { "description": "This type represents a link to a resource.\n", "type": "object", "required": [ "href" ], "properties": { "href": { "description": "URI of the referenced resource.\n", "type": "string", "format": "url" } } } } } } }} \ No newline at end of file diff --git a/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot b/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot index 1740b98ed35798b48ab83ff61bfcc8fe189f18e5..37846692b2601d06947f6861aeaef49f40f9f658 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/ApiVersion.robot @@ -1,213 +1,213 @@ -*** Settings *** - -Resource environment/variables.txt - -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Library DependencyLibrary -Library JSONLibrary -Library JSONSchemaLibrary schemas/ - -*** Test Cases *** -POST API Version - Method not implemented - [Documentation] Test ID: 7.3.2.3.1 - ... Test title: POST API version - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version - [Documentation] Test ID: 7.3.2.3.2 - ... Test title: GET API Version - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version - Method not implemented - [Documentation] Test ID: 7.3.2.3.3 - ... Test title: PUT API Version - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version - Method not implemented - [Documentation] Test ID: 7.3.2.3.4 - ... Test title: PATCH API Version - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version - Method not implemented - [Documentation] Test ID: 7.3.2.3.5 - ... Test title: DELETE API Version - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -POST API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.2.3.6 - ... Test title: POST API version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version with apiMajorVerion - [Documentation] Test ID: 7.3.2.3.7 - ... Test title: GET API Version with apiMajorVerion - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.2.3.8 - ... Test title: PUT API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.2.3.9 - ... Test title: PATCH API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.2.3.10 - ... Test title: DELETE API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -*** Keywords *** -POST API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response['body']} +*** Settings *** + +Resource environment/variables.txt + +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 7.3.2.3.1 + ... Test title: POST API version - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 7.3.2.3.2 + ... Test title: GET API Version + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version - Method not implemented + [Documentation] Test ID: 7.3.2.3.3 + ... Test title: PUT API Version - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 7.3.2.3.4 + ... Test title: PATCH API Version - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 7.3.2.3.5 + ... Test title: DELETE API Version - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +POST API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.2.3.6 + ... Test title: POST API version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 7.3.2.3.7 + ... Test title: GET API Version with apiMajorVerion + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.2.3.8 + ... Test title: PUT API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.2.3.9 + ... Test title: PATCH API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.2.3.10 + ... Test title: DELETE API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot index 392ae4b54ca3dfc3a9a070b3b696451137280c63..31cde48e9c12d806330518431c0b21e9044bb6a5 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/Grants.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/Grants.robot @@ -1,9 +1,13 @@ *** Settings *** +Library String Resource environment/variables.txt Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Library Collections +#Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml +#Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml Documentation This resource represents grants. The client can use this resource to obtain permission ... from the NFVO to perform a particular VNF lifecycle operation. @@ -18,7 +22,7 @@ Requests a grant for a particular VNF lifecycle operation - Synchronous mode ... Test title: Requests a grant for a particular VNF lifecycle operation - Synchronous mode ... Test objective: The objective is to request a grant for a particular VNF lifecycle operation and perform a JSON schema validation on the returned grant data structure ... Pre-conditions: - ... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO can decide immediately what to respond to a grant request ... Post-Conditions: The grant information is available to the VNFM. @@ -27,13 +31,12 @@ Requests a grant for a particular VNF lifecycle operation - Synchronous mode Check Operation Occurrence Id existence Check HTTP Response Body Json Schema Is grant - Requests a grant for a particular VNF lifecycle operation - Asynchronous mode [Documentation] Test ID: 7.3.2.1.2 ... Test title: Requests a grant for a particular VNF lifecycle operation - Asynchronous mode ... Test objective: The objective is to request a grant for a particular VNF lifecycle operation and perform a JSON schema validation on the returned grant data structure ... Pre-conditions: - ... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO can not decide immediately what to respond to a grant request ... Post-Conditions: The grant information is available to the VNFM. @@ -48,7 +51,7 @@ Requests a grant for a particular VNF lifecycle operation - Forbidden ... Test title: Requests a grant for a particular VNF lifecycle operation - Forbidden ... Test objective: The objective is to request a grant for a particular VNF lifecycle operation and the grant is rejected ... Pre-conditions: none - ... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -61,7 +64,7 @@ GET Grants - Method not implemented ... Test title: GET Grants - Method not implemented ... Test objective: The objective is to test that GET method is not allowed for Life cycle operation granting ... Pre-conditions: none - ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -73,7 +76,7 @@ PUT Grants - Method not implemented ... Test title: PUT Grants - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed for Life cycle operation granting ... Pre-conditions: none - ... Reference: Clause 9.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -85,7 +88,7 @@ PATCH Grants - Method not implemented ... Test title: PATCH Grants - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed for Life cycle operation granting ... Pre-conditions: none - ... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -97,7 +100,7 @@ DELETE Grants - Method not implemented ... Test title: DELETE Grants - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed for Life cycle operation granting ... Pre-conditions: none - ... Reference: Clause 9.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: resources are not deleted @@ -109,48 +112,43 @@ DELETE Grants - Method not implemented Wait for individual grant successful notification Wait Until Keyword Succeeds ${retry} ${polling} Get an individual grant - Successful Send Request Grant Request in Synchronous mode - Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiVersion}/grants + Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants Pass Execution If ${SYNC_MODE} == 0 The Granting process is asynchronous mode. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/grantRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to Grant Request + ${template}= Get File jsons/grantRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${Descriptor_ID} flavourId=${Flavour_ID} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} ${body}= Output response Set Suite Variable ${response} ${body} Send Request Grant Request in Asynchronous mode - Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiVersion}/grants + Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants Pass Execution If ${SYNC_MODE} == 1 The Granting process is synchronous mode. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/grantRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to Grant Request + ${template}= Get File jsons/grantRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${Descriptor_ID} flavourId=${Flavour_ID} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} ${body}= Output response Set Suite Variable ${response} ${body} Send Request for a new Grant Forbiden Operation - Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiVersion}/grants + Log Request a new Grant for a VNF LCM operation by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/grants Log The grant request should be rejected Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/grantRejectedRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 Add VNF Descriptor Content to Grant Request + ${template}= Get File jsons/grantRejectedRequest.json + ${body}= Format String ${template} vnfInstanceId=${vnfInstanceId} vnfLcmOpOccId=${vnfLcmOpOccId} vnfdId=${Descriptor_ID} flavourId=${Flavour_ID} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body} ${body}= Output response Set Suite Variable ${response} ${body} - -Send Request Grant Request - Set Headers {"Accept": "${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/grantRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/grants ${body} allow_redirects=false - ${resp} Output response - ${result}= evaluate json.loads(json.dumps(${resp})) json - Log ${result} - Set Suite Variable ${response} ${result} Check HTTP Response Status Code Is [Arguments] ${expected_status} @@ -168,13 +166,13 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Get an individual grant - Successful log Trying to read an individual grant Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Get ${response['headers']['Location']} Log Validate Status code Integer response status 200 @@ -182,34 +180,67 @@ Get an individual grant - Successful Get Grants Log Trying to perform a GET. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/grants + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body}= Output response Set Suite Variable ${response} ${body} Put Grants Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/grants + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body}= Output response Set Suite Variable ${response} ${body} Patch Grants Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/grants + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body}= Output response - Set Suite Variable ${response} ${body} - + Set Suite Variable ${response} ${body} Delete Grants Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/grants + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/grants ${body}= Output response Set Suite Variable ${response} ${body} +Add VNF Descriptor Content to Grant Request + PARSE the Descriptor File + +PARSE the Descriptor File + Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file + +Fetch Information from SOL001 descriptor file + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml + ${descriptor_id}= Get Variable Value ${topology_template.node_templates.properties.descriptor_id} + ${provider}= Get Variable Value ${topology_template.node_templates.properties.provider} + ${product_name}= Get Variable Value ${topology_template.node_templates.properties.product_name} + ${software_version}= Get Variable Value ${topology_template.node_templates.properties.software_version} + ${descriptor_version}= Get Variable Value ${topology_template.node_templates.properties.descriptor_version} + ${flavour_id}= Get Variable Value ${topology_template.node_templates.properties.flavour_id} + Set Global Variable ${Descriptor_ID} ${descriptor_id} + Set Global Variable ${Provider} ${provider} + Set Global Variable ${Product_Name} ${product_name} + Set Global Variable ${Software_Version} ${software_version} + Set Global Variable ${Descriptor_Version} ${descriptor_version} + Set Global Variable ${Flavour_ID} ${flavour_id} + +Fetch Information from SOL006 descriptor file + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id} + ${provider}= Get Variable Value ${nfv.vnfd[0].provider} + ${product_name}= Get Variable Value ${nfv.vnfd[0]['product-name']} + ${software_version}= Get Variable Value ${nfv.vnfd[0]['software-version']} + ${descriptor_version}= Get Variable Value ${nfv.vnfd[0].version} + Set Global Variable ${Descriptor_ID} ${descriptor_id} + Set Global Variable ${Provider} ${provider} + Set Global Variable ${Product_Name} ${product_name} + Set Global Variable ${Software_Version} ${software_version} + Set Global Variable ${Descriptor_Version} ${descriptor_version} + diff --git a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot index cb95734f572cf460f38d3d9f57db9d704eb17f43..77235ac6391b27878d1d06567a2e093f8b8e4626 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot +++ b/SOL003/VNFLifecycleOperationGranting-API/IndividualGrant.robot @@ -3,21 +3,21 @@ Resource environment/variables.txt Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Library Collections Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +#Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml +#Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml Documentation This resource represents an individual grant. The client can use this resource to read the grant. ... It is determined by means outside the scope of the present document, such as configuration or policy, ... how long an individual grant is available. -*** Variables *** -${response} {} - *** Test Cases *** POST Individual Grant - Method not implemented [Documentation] Test ID: 7.3.2.2.1 ... Test title: POST Individual Grant - Method not implemented ... Test objective: The objective is to test that POST method is not allowed for Life cycle operation granting ... Pre-conditions: none - ... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -29,13 +29,14 @@ GET an individual grant - Successful ... Test title: GET an individual grant - Successful ... Test objective: The objective is to retrieve a grant for a particular VNF Lifecycle Operation. ... Pre-conditions: The grant information is available to the VNFM - ... Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Get individual grant Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is grant + Check HTTP Response Body grant content against VNF Descriptor GET an individual grant - Process ongoing [Tags] no-synchronous-mode @@ -43,7 +44,7 @@ GET an individual grant - Process ongoing ... Test title: GET an individual grant - Process ongoing ... Test objective: The objective is to retrieve a grant for a particular VNF lifecycle operation when process is ongoing and no grant is available yet. ... Pre-conditions: The process of creating the grant is ongoing, no grant is available yet. - ... Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -57,7 +58,7 @@ GET an individual grant - grant rejected ... Test title: GET an individual grant - grant rejected ... Test objective: The objective is to retrieve a grant for a particular VNF Lifecycle Operation but error returned because grant has been rejected. ... Pre-conditions: none - ... Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -70,7 +71,7 @@ PUT an individual grant - Method not implemented ... Test title: PUT an individual grant - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to for Life cycle operation granting ... Pre-conditions: none - ... Reference: Clause 9.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -82,7 +83,7 @@ PATCH an individual grant - Method not implemented ... Test title: PATCH an individual grant - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to for Life cycle operation granting ... Pre-conditions: none - ... Reference: Clause 9.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -94,7 +95,7 @@ DELETE an individual grant - Method not implemented ... Test title: DELETE an individual grant - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to for Life cycle operation granting ... Pre-conditions: none - ... Reference: Clause 9.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.4.1 + ... Reference: Clause 9.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -105,47 +106,47 @@ DELETE an individual grant - Method not implemented Get individual grant log Trying to read an individual grant Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} ${body}= Output response Set Suite Variable ${response} ${body} Check resource existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 Post individual Grant log Trying to read an individual grant Pass Execution If ${SYNC_MODE} == 1 Skipping. Synchronous mode is supported Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} ${body}= Output response Set Suite Variable ${response} ${body} Put individual Grant Log Trying to perform a GET. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} ${body}= Output response Set Suite Variable ${response} ${body} Patch individual Grant Log Trying to perform a GET. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} ${body}= Output response Set Suite Variable ${response} ${body} Delete individual Grant Log Trying to perform a GET. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/grants/${grantId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/grants/${grantId} ${body}= Output response Set Suite Variable ${response} ${body} @@ -161,5 +162,83 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} + +Check HTTP Response Body grant content against VNF Descriptor + Run Keyword If ${check_descriptors} == 1 Check Individual grant Content + +Check Individual grant Content + PARSE the Descriptor File + Match the grant Response Attributes with Descriptors + +PARSE the Descriptor File + Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file + +Fetch Information from SOL001 descriptor file + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml + @{VDU_labels}= Create List + @{VirtualLink_labels}= Create List + @{CP_labels}= Create List + FOR ${key} IN @{topology_template.node_templates.keys()} + ${key_type}= Get Variable Value ${topology_template.node_templates.${key}.type} + ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VDU_compute} + ${Link_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_virtual_link} + ${VDUcp_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VDU_cp} + Run Keyword If ${VDU_check} Append To List ${VDU_labels} ${key} + Run Keyword If ${Link_check} Append To List ${VirtualLink_labels} ${key} + Run Keyword If ${VDUcp_check} Append To List ${CP_labels} ${key} + END + Set Global Variable @{VDU_IDs} @{VDU_labels} + Set Global Variable @{VirtualLink_IDs} @{VirtualLink_labels} + Set Global Variable @{CP_IDs} @{CP_labels} + +Fetch Information from SOL006 descriptor file + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${VDUcount}= Get Length ${nfv.vnfd[0].vdu} + ${extCP_count}= Get Length ${nfv.vnfd[0]['ext-cpd']} + ${virtualLink_count}= Get length ${nfv.vnfd[0]['int-virtual-link-desc']} + FOR ${key} IN @{nfv.vnfd[0].keys()} + ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} vdu + Run Keyword If ${VDU_check} Get VDU IDs ${VDUcount} + ${extCP_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} ext-cpd + Run Keyword If ${extCP_check} Get External CP IDs ${extCP_count} + ${virtualLink_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} int-virtual-link-desc + Run Keyword If ${virtualLink_check} Get Virtual Link IDs ${virtualLink_count} + END + +Get VDU IDs + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{VDU_labels}= Create List + @{Compute_labels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${VDU_labels} ${nfv.vnfd[0].vdu[${i}]['id']} + Append To List ${Compute_labels} ${nfv.vnfd[0].vdu[${i}]['virtual-compute-desc']} + END + Set Global Variable ${VDU_IDs} ${VDU_labels} + Set Global Variable ${Compute_IDs} ${Compute_labels} + +Get External CP IDs + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{external_CPs}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${external_CPs} ${nfv.vnfd[0].ext_cpd[${i}].id} + END + Set Global Variable ${externalCP_IDs} ${external_CPs} + +Get Virtual Link IDs + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${VirtualLink_labels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${VirtualLink_labels} ${nfv.vnfd[0]['int-virtual-link-desc'][${i}]['id']} + END + Set Global Variable ${VirtualLink_IDs} ${VirtualLink_labels} + +Match the grant Response Attributes with Descriptors + Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${externalCP_IDs} ${response['body']['extVirtualLinks'][0]['extCps'][0]['cpdId']} + Run Keyword If '${descriptorType}'=='SOL001' List Should Contain Value @{CP_IDs} ${response['body']['extVirtualLinks'][0]['extCps'][0]['cpdId']} + List Should Contain Value ${VirtualLink_IDs} ${response['body']['extManagedVirtualLinkData'][0]['vnfVirtualLinkDescId']} + List Should Contain value ${Compute_IDs} ${response['body']['vimAssets']['computeResourceFlavours'][0]['vnfdVirtualComputeDescId']} diff --git a/SOL003/VNFLifecycleOperationGranting-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL003/VNFLifecycleOperationGranting-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml new file mode 100644 index 0000000000000000000000000000000000000000..413d76def0e50c64c1890a8476fa7bdb22981ae3 --- /dev/null +++ b/SOL003/VNFLifecycleOperationGranting-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -0,0 +1,167 @@ +tosca_definitions_version: tosca_simple_yaml_1_2 +description: "TST010 reference VNF-B" + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v2.7.1/etsi_nfv_sol001_vnfd_types.yaml + +metadata: + descriptor_id: "VNF-B" + vendor: "ETSI TST WG" + version: "2.0" + +node_types: + tst010.vnf.simple: + derived_from: tosca.nodes.nfv.VNF + properties: + descriptor_id: + type: string + default: VNF-B + descriptor_version: + type: string + default: '1.0' + provider: + type: string + default: ETSI TST WG + product_name: + type: string + default: VNF-B + software_version: + type: string + default: '1.0' + product_info_name: + type: string + default: VNF-B + product_info_description: + type: string + default: TST010 reference VNF-B + flavour_id: + type: string + default: VNF-B_flavor + flavour_description: + type: string + default: "VNF-B flavor" + vnfm_info: + type: list + entry_schema: + type: string + default: [ 'etsivnfm:v2.3.1' ] + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + description: Invoked upon receipt of a Scale VNF request + terminate: + description: Invoked upon receipt Terminate VNF request + operate: + description: Invoked upon receipt of an Operate VNF request + requirements: + - virtual_link_right: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_left: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_management: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 0] + +topology_template: + substitution_mappings: + node_type: "tst010.vnf.simple" + requirements: + virtual_link_right: + [right, virtual_link_right] + virtual_link_management: + [management, virtual_link_management] + virtual_link_left: + [left, virtual_link_left] + node_templates: + right: + type: "tosca.nodes.nfv.VduCp" + properties: + layer_protocols: [ ipv4 ] + order: 1 + requirements: + - virtual_binding: VDU-B + vdu-b-1-vsd: + management: + type: "tosca.nodes.nfv.VduCp" + properties: + layer_protocols: [ ipv4 ] + order: 0 + requirements: + - virtual_binding: VDU-B + vdu-b-1-vsd: + left: + type: "tosca.nodes.nfv.VduCp" + properties: + layer_protocols: [ ipv4 ] + order: 2 + requirements: + - virtual_binding: VDU-B + vdu-b-1-vsd: + type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" + properties: + virtual_block_storage_data: + size_of_storage: 20 GB + rdma_enabled: false + sw_image_data: + name: "vdu-b-1 image" + version: "1.1" + checksum: + algorithm: "sha-224" + hash: "somehashfortst010" + container_format: "bare" + disk_format: qcow2 + min_disk: '1' + min_ram: '2' + size: '1' + VDU-B: + type: "tosca.nodes.nfv.Vdu.Compute" + properties: + name: "vdu-b-1-vcd" + description: "Description of VDU-B-1" + vdu_profile: + min_number_of_instances: 1 + max_number_of_instances: 2 + capabilities: + virtual_compute: + properties: + virtual_memory: + virtual_mem_size: 4096 MB + numa_enabled: false + virtual_cpu: + num_virtual_cpu: 2 + requirements: + - virtual_storage: vdu-b-1-vsd + + vnf-b-1_VNF: + type: "tst010.vnf.simple" + properties: + descriptor_id: "VNF-B" + descriptor_version: "2.0" + provider: "ETSI TST WG" + product_name: "VDU_VNF-B" + software_version: "2.0" + product_info_name: "VDU_VNF-B" + product_info_description: "TST010 reference VNF-A" + flavour_id: "VNF-B_flavor" + flavour_description: "VNF-B flavor" + vnfm_info: + - etsivnfm:v2.3.1 + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + implementation: scale-example.yaml + terminate: + implementation: terminate-example.yaml + operate: + implementation: operate-example.yaml \ No newline at end of file diff --git a/SOL003/VNFLifecycleOperationGranting-API/descriptors/SOL006/VNFD/vnfd_SOL006.yaml b/SOL003/VNFLifecycleOperationGranting-API/descriptors/SOL006/VNFD/vnfd_SOL006.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d902779a2d42d34a9f93513512d8a485dc1d838b --- /dev/null +++ b/SOL003/VNFLifecycleOperationGranting-API/descriptors/SOL006/VNFD/vnfd_SOL006.yaml @@ -0,0 +1,137 @@ +nfv: + vnfd: + - id: VNF-B-2vdu + provider: ETSI TST WG + product-name: TST010 reference VNF-B with 2 VDUs + software-version: '2.2' + version: '2.2' + vnfm-info: ETSI VNFM + vdu: + - id: vdu-b-1 + name: VNF-B VDU 1 + int-cpd: + - id: left + layer-protocol: ethernet + - id: management + layer-protocol: ethernet + - id: internal + layer-protocol: ethernet + int-virtual-link-desc: internal-vl + virtual-compute-desc: vdu-b-1-vcd + virtual-storage-desc: vdu-b-1-vsd + sw-image-desc: vdu-b-1-image + - id: vdu-b-2 + name: VNF-B VDU 2 + int-cpd: + - id: right + layer-protocol: ethernet + - id: management + layer-protocol: ethernet + - id: internal + layer-protocol: ethernet + int-virtual-link-desc: internal-vl + virtual-compute-desc: vdu-b-2-vcd + virtual-storage-desc: vdu-b-2-vsd + sw-image-desc: vdu-b-2-image + virtual-compute-desc: + id: vdu-b-1-vcd + virtual-memory: + size: '4.0' + virtual-cpu: + num-virtual-cpu: '2' + virtual-storage-desc: + id: vdu-b-1-vsd + type-of-storage: root-storage + size-of-storage: '0' + sw-image-desc: + id: vdu-b-1-image + name: VNF-B image + version: '1.1' + checksum: + algorithm: sha-224 + hash: somehashfortst010 + container-format: bare + disk-format: qcow2 + min-disk: '1' + min-ram: '2.0' + size: '1' + image: 'http://someurl.com/VNF-B.qcow2' + virtual-compute-desc: + id: vdu-b-2-vcd + virtual-memory: + size: '6.0' + virtual-cpu: + num-virtual-cpu: '2' + virtual-storage-desc: + id: vdu-b-2-vsd + type-of-storage: root-storage + size-of-storage: '0' + sw-image-desc: + id: vdu-b-2-image + name: VNF-B-2 image + version: '1.1' + checksum: + algorithm: sha-224 + hash: somehashfortst010 + container-format: bare + disk-format: qcow2 + min-disk: '1' + min-ram: '2.0' + size: '1' + image: 'http://someurl.com/VNF-B-2.qcow2' + int-virtual-link-desc: + - id: internal-vl + flavour: + id: internal-vl-flavour + qos: + latency: '1' + packet-delay-variation: '1' + packet-loss-ratio: '0.05' + connectivity-type: + layer-protocol: ethernet + ext-cpd: + - id: ext-b-left + int-cpd: + vdu-id: vdu-b-1 + cpd: left + layer-protocol: ethernet + - id: management + int-cpd: + vdu-id: vdu-b-1 + cpd: management + layer-protocol: ethernet + - id: ext-b-right + int-cpd: + vdu-id: vdu-b-2 + cpd: right + layer-protocol: ethernet + df: + id: normal + vdu-profile: + - id: vdu-b-1 + min-number-of-instances: '1' + max-number-of-instances: '2' + - id: vdu-b-2 + min-number-of-instances: '1' + max-number-of-instances: '4' + instantiation-level: + - id: double + vdu-level: + - vdu-id: vdu-b-1 + number-of-instances: '2' + - vdu-id: vdu-b-2 + number-of-instances: '2' + - id: single + vdu-level: + - vdu-id: vdu-b-1 + number-of-instances: '1' + - vdu-id: vdu-b-2 + number-of-instances: '1' + default-instantiation-level: single + lcm-operations-configuration: + scale-vnf-to-level-op-config: + arbitrary-target-levels-supported: 'true' + terminate-vnf-op-config: + min-graceful-termination: '1' + operate-vnf-op-config: + min-graceful-stop-timeout: '1' \ No newline at end of file diff --git a/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt b/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt index cfb4467269e5d363d2cbd00279419d2c84d27c0b..1355aa15903c689bc10816a60754684e14160fdb 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt +++ b/SOL003/VNFLifecycleOperationGranting-API/environment/variables.txt @@ -2,7 +2,8 @@ ${NFVO_HOST} localhost # Hostname of the NFVO ${NFVO_PORT} 8081 # Listening port of the NFVO ${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${CONTENT_TYPE} application/json ${ACCEPT} application/json ${AUTH_USAGE} 1 @@ -10,16 +11,11 @@ ${grantId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d ${apiRoot} / ${apiName} grant -${apiVersion} v1 +${apiMajorVersion} v1 ${SYNC_MODE} 1 - - - -${response} - - +${response} {} ${VNFM_HOST} localhost # Hostname of the VNFM ${VNFM_PORT} 8080 # Listening port of the VNFM @@ -42,3 +38,29 @@ ${sub_filter_invalid} filter_invalid ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${notification_ep} notification ${VrQuotaAvailNotification} {} + +${vnfInstanceId} myVnfInstanceId +${vnfLcmOpOccId} myLcmOccId +${vnfdId} myVnF +${flavourId} string + +${descriptorType} SOL001 +${check_descriptors} 1 + +${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder +${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute +${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink +${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp + +@{VDU_IDs} +@{virtualLink_IDs} +@{CP_IDs} +@{externalCP_IDs} +@{Compute_IDs} + +${Descriptor_ID} +${Provider} +${Product_Name} +${Software_Version} +${Descriptor_Version} +${Flavour_ID} \ No newline at end of file diff --git a/SOL003/VNFLifecycleOperationGranting-API/jsons/grantRejectedRequest.json b/SOL003/VNFLifecycleOperationGranting-API/jsons/grantRejectedRequest.json index d8ae1e89714d46dc7b84a3997716e48395cb647e..f335ba6332e2f7cab1eb8e2de44a3dee58e7a7e8 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/jsons/grantRejectedRequest.json +++ b/SOL003/VNFLifecycleOperationGranting-API/jsons/grantRejectedRequest.json @@ -1,16 +1,16 @@ -{ - "vnfInstanceId": "string", - "vnfLcmOpOccId": "string", - "vnfdId": "string", - "flavourId": "string", +{{ + "vnfInstanceId": "{vnfInstanceId}", + "vnfLcmOpOccId": "{vnfLcmOpOccId}", + "vnfdId": "{vnfdId}", + "flavourId": "{flavourId}", "operation": "INSTANTIATE", "isAutomaticInvocation": true, - "_links": { - "vnfLcmOpOcc": { + "_links": {{ + "vnfLcmOpOcc": {{ "href": "string" - }, - "vnfInstance": { + }}, + "vnfInstance": {{ "href": "string" - } - } -} \ No newline at end of file + }} + }} +}} \ No newline at end of file diff --git a/SOL003/VNFLifecycleOperationGranting-API/jsons/grantRequest.json b/SOL003/VNFLifecycleOperationGranting-API/jsons/grantRequest.json index 74b326828dccd6517c183eb0e5959f38268bc241..f335ba6332e2f7cab1eb8e2de44a3dee58e7a7e8 100644 --- a/SOL003/VNFLifecycleOperationGranting-API/jsons/grantRequest.json +++ b/SOL003/VNFLifecycleOperationGranting-API/jsons/grantRequest.json @@ -1,16 +1,16 @@ -{ - "vnfInstanceId": "myVnfInstanceId", - "vnfLcmOpOccId": "myLcmOccId", - "vnfdId": "myVnF", - "flavourId": "string", +{{ + "vnfInstanceId": "{vnfInstanceId}", + "vnfLcmOpOccId": "{vnfLcmOpOccId}", + "vnfdId": "{vnfdId}", + "flavourId": "{flavourId}", "operation": "INSTANTIATE", "isAutomaticInvocation": true, - "_links": { - "vnfLcmOpOcc": { + "_links": {{ + "vnfLcmOpOcc": {{ "href": "string" - }, - "vnfInstance": { + }}, + "vnfInstance": {{ "href": "string" - } - } -} \ No newline at end of file + }} + }} +}} \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/ApiVersion.robot b/SOL003/VNFPackageManagement-API/ApiVersion.robot index 85c0567dc001be5e07d4a13b8f9fa8680a255222..2f7e5495d4c33564cbc431439ae7588b12636d01 100644 --- a/SOL003/VNFPackageManagement-API/ApiVersion.robot +++ b/SOL003/VNFPackageManagement-API/ApiVersion.robot @@ -1,215 +1,215 @@ -*** Settings *** - -Resource environment/variables.txt - -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Library DependencyLibrary -Library JSONLibrary -Library JSONSchemaLibrary schemas/ - -*** Test Cases *** -POST API Version - Method not implemented - [Documentation] Test ID: 7.3.3.9.1 - ... Test title: POST API version - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version - [Documentation] Test ID: 7.3.3.9.2 - ... Test title: GET API Version - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version - Method not implemented - [Documentation] Test ID: 7.3.3.9.3 - ... Test title: PUT API Version - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version - Method not implemented - [Documentation] Test ID: 7.3.3.9.4 - ... Test title: PATCH API Version - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version - Method not implemented - [Documentation] Test ID: 7.3.3.9.5 - ... Test title: DELETE API Version - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -POST API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.3.9.6 - ... Test title: POST API version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version with apiMajorVerion - [Documentation] Test ID: 7.3.3.9.7 - ... Test title: GET API Version with apiMajorVerion - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.3.9.8 - ... Test title: PUT API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.3.9.9 - ... Test title: PATCH API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.3.9.10 - ... Test title: DELETE API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -*** Keywords *** -POST API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response['body']} +*** Settings *** + +Resource environment/variables.txt + +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 7.3.3.9.1 + ... Test title: POST API version - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 7.3.3.9.2 + ... Test title: GET API Version + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version - Method not implemented + [Documentation] Test ID: 7.3.3.9.3 + ... Test title: PUT API Version - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 7.3.3.9.4 + ... Test title: PATCH API Version - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 7.3.3.9.5 + ... Test title: DELETE API Version - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +POST API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.3.9.6 + ... Test title: POST API version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 7.3.3.9.7 + ... Test title: GET API Version with apiMajorVerion + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.3.9.8 + ... Test title: PUT API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.3.9.9 + ... Test title: PATCH API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.3.9.10 + ... Test title: DELETE API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/IndividualSubscription.robot b/SOL003/VNFPackageManagement-API/IndividualSubscription.robot index 2d97f97c96db8aa401c230d9a26f2a281708fcf0..41839a657f0a1b90af8892c2edf659db9d5a9283 100644 --- a/SOL003/VNFPackageManagement-API/IndividualSubscription.robot +++ b/SOL003/VNFPackageManagement-API/IndividualSubscription.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/individualSubscription.txt Resource VNFPackageManagementKeywords.robot Library OperatingSystem Library JSONLibrary @@ -13,7 +12,7 @@ GET Individual VNF Package Subscription ... Test title: GET Individual VNF Package Subscription ... Test objective: The objective is to test the retrieval of individual VNF package subscription and perform a JSON schema and content validation of the returned subscription data structure ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 10.4.8.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.8.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -21,13 +20,14 @@ GET Individual VNF Package Subscription Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is PkgmSubscription Check HTTP Response Body Subscription Identifier matches the requested Subscription + Check HTTP Response Body of Individual Subscription content against VNF Descriptor GET Individual VNF Package Subscription with invalid resource identifier [Documentation] Test ID: 7.3.3.7.2 ... Test title: GET Individual VNF Package Subscription with invalid resource identifier ... Test objective: The objective is to test that the retrieval of an individual VNF package subscription fails when using an invalid resource identifier ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 10.4.8.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.8.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -39,7 +39,7 @@ DELETE Individual VNF Package Subscription with invalid resource identifier ... Test title: DELETE Individual VNF Package Subscription with invalid resource identifier ... Test objective: The objective is to test that the deletion of an individual VNF package subscription fails when using an invalid resource identifier ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 10.4.8.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.8.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -51,49 +51,46 @@ POST Individual VNF Package Subscription - Method not implemented ... Test title: POST Individual VNF Package Subscription - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new VNF Package Subscription ... Pre-conditions: none - ... Reference: Clause 10.4.8.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.8.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The VNF Package Subscription is not created on the NFVO + ... Post-Conditions: none Send Post request for individual VNF Package Subscription Check HTTP Response Status Code Is 405 - Check Postcondition VNF Package Subscription is not Created PUT Individual VNF Package Subscription - Method not implemented [Documentation] Test ID: 7.3.3.7.5 ... Test title: PUT Individual VNF Package Subscription - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing VNF Package subscription ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 10.4.8.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.8.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The VNF Package subscription is not modified by the operation + ... Post-Conditions: none Send Put request for individual VNF Package Subscription Check HTTP Response Status Code Is 405 - Check Postcondition VNF Package Subscription is Unmodified (Implicit) PATCH Individual VNF Package Subscription - Method not implemented [Documentation] Test ID: 7.3.3.7.6 ... Test title: PATCH Individual VNF Package Subscription - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing VNF Package subscription ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 10.4.8.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.8.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The VNF Package subscription is not modified by the operation + ... Post-Conditions: none Send Patch request for individual VNF Package Subscription Check HTTP Response Status Code Is 405 - Check Postcondition VNF Package Subscription is Unmodified (Implicit) DELETE Individual VNF Package Subscription [Documentation] Test ID: 7.3.3.7.7 ... Test title: DELETE Individual VNF Package Subscription ... Test objective: The objective is to test the deletion of an individual VNF package subscription ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 10.4.8.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.8.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The VNF Package Subscription is not available anymore in the NFVO + ... Post-Conditions: The VNF Package Subscription is not available anymore in the NFVO Send Delete request for individual VNF Package Subscription Check HTTP Response Status Code Is 204 Check Postcondition VNF Package Subscription is Deleted \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/IndividualVNFPackage.robot b/SOL003/VNFPackageManagement-API/IndividualVNFPackage.robot index 2c2f1e3c86e01bfb7334c66e60bacef93a5af5f0..875b06bf86d03760f60f8f6252a5f306821e43c2 100644 --- a/SOL003/VNFPackageManagement-API/IndividualVNFPackage.robot +++ b/SOL003/VNFPackageManagement-API/IndividualVNFPackage.robot @@ -1,18 +1,18 @@ *** Settings *** 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} ssl_verify=false + *** Test Cases *** GET Individual VNF Package [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: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -20,25 +20,27 @@ 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 + Check HTTP Response Body of Individual VNF Package content against VNF Descriptor 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: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.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 + Check HTTP Response Body Json Schema Is ProblemDetails 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: Clause 10.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -50,7 +52,7 @@ PUT Individual VNF Package - Method not implemented ... 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: Clause 10.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -62,7 +64,7 @@ PATCH Individual VNF Package - Method not implemented ... 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: Clause 10.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -74,20 +76,19 @@ DELETE Individual VNF Package - Method not implemented ... 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: Clause 10.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The VNF Package is not deleted by the failed operation + ... Post-Conditions: none Send DELETE Request for individual VNF Package Check HTTP Response Status Code Is 405 - Check Postcondition VNF Package Exist GET Individual OnBoarded VNF Package [Documentation] Test ID: 7.3.3.2.7 ... Test title: GET Individual OnBoarded VNF Package ... Test objective: The objective is to test the retrieval of an individual OnBoarded 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: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -101,19 +102,20 @@ GET Individual OnBoarded VNF Package with invalid resource identifier ... Test title: GET Individual OnBoarded VNF Package with invalid resource identifier ... Test objective: The objective is to test that the retrieval of an individual OnBoarded VNF package fails when using an invalid resource identifier ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET Individual OnBoarded VNF Package with invalid resource identifier Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails POST Individual OnBoarded VNF Package - Method not implemented [Documentation] Test ID: 7.3.3.2.9 ... Test title: POST Individual OnBoarded VNF Package - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create new OnBoarded VNF Package ... Pre-conditions: none - ... Reference: Clause 10.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -125,7 +127,7 @@ PUT Individual OnBoarded VNF Package - Method not implemented ... Test title: PUT Individual OnBoarded 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: Clause 10.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -137,7 +139,7 @@ PATCH Individual OnBoarded VNF Package - Method not implemented ... Test title: PATCH Individual OnBoarded 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: Clause 10.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -149,10 +151,9 @@ DELETE Individual OnBoarded VNF Package - Method not implemented ... Test title: DELETE Individual OnBoarded 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: Clause 10.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The VNF Package is not deleted by the failed operation + ... Post-Conditions: none Send DELETE Request for individual OnBoarded VNF Package - Check HTTP Response Status Code Is 405 - Check Postcondition VNF Package Exist \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/IndividualVNFPackageArtifacts.robot b/SOL003/VNFPackageManagement-API/IndividualVNFPackageArtifacts.robot new file mode 100644 index 0000000000000000000000000000000000000000..cab10266e3182bbf792bec1459c66e8a4c3d0a37 --- /dev/null +++ b/SOL003/VNFPackageManagement-API/IndividualVNFPackageArtifacts.robot @@ -0,0 +1,359 @@ +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt # Generic Parameters +Resource VNFPackageManagementKeywords.robot +Library JSONLibrary +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false + +*** Test Cases *** +GET Individual VNF Package Artifact + [Documentation] Test ID: 7.3.3.5.1 + ... Test title: GET Individual VNF Package Artifact + ... Test objective: The objective is to test the retrieval of an individual VNF package artifact + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Individual VNF Package Artifact + Check HTTP Response Status Code Is 200 + +GET Individual VNF Package Artifact in octet stream format + [Documentation] Test ID: 7.3.3.5.2 + ... Test title: GET Individual VNF Package Artifact in octet stream format + ... Test objective: The objective is to test the retrieval of an individual VNF package artifact when the NFVO cannot determine the artifact content type. The test performs a validation that the returned artifcat in is octet-stream format + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO cannot determine the content type of the artifact + ... Post-Conditions: none + GET Individual VNF Package Artifact in octet stream format + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/octet-stream + +GET Individual VNF Package Artifact with Range Request and NFVO supporting Range Requests + [Documentation] Test ID: 7.3.3.5.3 + ... Test title: GET Individual VNF Package Artifact with Range Request and NFVO supporting Range Requests + ... Test objective: The objective is to test the retrieval of an individual VNF package artifact 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.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.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 Individual VNF Package Artifact 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 Individual VNF Package Artifact with Range Request and NFVO not supporting Range Requests + [Documentation] Test ID: 7.3.3.5.4 + ... Test title: GET Individual VNF Package Artifact with Range Request and NFVO not supporting Range Requests + ... Test objective: The objective is to test that the retrieval of an individual VNF package artifact, 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 artifact. + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO does not support range requests to return single range of bytes from the VNF package artifact + ... Post-Conditions: none + GET Individual VNF Package Artifact with Range Request + Check HTTP Response Status Code Is 200 + +GET Individual VNF Package Artifact with invalid Range Request + [Documentation] Test ID: 7.3.3.5.5 + ... Test title: GET Individual VNF Package Artifact with invalid Range Request + ... Test objective: The objective is to test that the retrieval of an individual VNF package artifact 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.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.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 Individual VNF Package Artifact with invalid Range Request + Check HTTP Response Status Code Is 416 + +GET Individual VNF Package Artifact with invalid resource identifier + [Documentation] Test ID: 7.3.3.5.6 + ... Test title: GET Individual VNF Package Artifact with invalid resource identifier + ... Test objective: The objective is to test that the retrieval of an individual VNF package artifact fails when using an invalid resource identifier + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Individual VNF Package Artifact with invalid resource identifier + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET Individual VNF Package Artifact with conflict due to onboarding state + [Documentation] Test ID: 7.3.3.5.7 + ... Test title: GET Individual VNF Package Artifact with conflict due to onboarding state + ... Test objective: The objective is to test that the retrieval of an individual VNF package artifact 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.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Artifact for VNF Package in onboarding state different from ONBOARDED + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST Individual VNF Package Artifact - Method not implemented + [Documentation] Test ID: 7.3.3.5.8 + ... Test title: POST Individual 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.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for individual VNF Package Artifact + Check HTTP Response Status Code Is 405 + +PUT Individual VNF Package Artifact - Method not implemented + [Documentation] Test ID: 7.3.3.5.9 + ... Test title: PUT Individual 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.6.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for individual VNF Package Artifact + Check HTTP Response Status Code Is 405 + +PATCH Individual VNF Package Artifact - Method not implemented + [Documentation] Test ID: 7.3.3.5.10 + ... Test title: PATCH Individual 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.6.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for individual VNF Package Artifact + Check HTTP Response Status Code Is 405 + +DELETE Individual VNF Package Artifact - Method not implemented + [Documentation] Test ID: 7.3.3.5.11 + ... Test title: DELETE Individual 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.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send DELETE Request for individual VNF Package Artifact + Check HTTP Response Status Code Is 405 + +GET Individual OnBoarded VNF Package Artifact + [Documentation] Test ID: 7.3.3.5.12 + ... Test title: GET Individual OnBoarded VNF Package Artifact + ... Test objective: The objective is to test the retrieval of an individual OnBoarded VNF package artifact + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Individual OnBoarded VNF Package Artifact + Check HTTP Response Status Code Is 200 + +GET Individual OnBoarded VNF Package Artifact in octet stream format + [Documentation] Test ID: 7.3.3.5.13 + ... Test title: GET Individual OnBoarded VNF Package Artifact in octet stream format + ... Test objective: The objective is to test the retrieval of an individual OnBoarded VNF package artifact when the NFVO cannot determine the artifact content type. The test performs a validation that the returned artifcat in is octet-stream format + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO cannot determine the content type of the artifact + ... Post-Conditions: none + GET Individual OnBoarded VNF Package Artifact in octet stream format + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/octet-stream + +GET Individual OnBoarded VNF Package Artifact with Range Request and NFVO supporting Range Requests + [Documentation] Test ID: 7.3.3.5.14 + ... Test title: GET Individual OnBoarded VNF Package Artifact with Range Request and NFVO supporting Range Requests + ... Test objective: The objective is to test the retrieval of an individual OnBoarded VNF package artifact 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.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.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 Individual OnBoarded VNF Package Artifact 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 Individual OnBoarded VNF Package Artifact with Range Request and NFVO not supporting Range Requests + [Documentation] Test ID: 7.3.3.5.15 + ... Test title: GET Individual OnBoarded VNF Package Artifact with Range Request and NFVO not supporting Range Requests + ... Test objective: The objective is to test that the retrieval of an individual OnBoarded VNF package artifact, 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 artifact. + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO does not support range requests to return single range of bytes from the VNF package artifact + ... Post-Conditions: none + GET Individual OnBoarded VNF Package Artifact with Range Request + Check HTTP Response Status Code Is 200 + +GET Individual OnBoarded VNF Package Artifact with invalid Range Request + [Documentation] Test ID: 7.3.3.5.16 + ... Test title: GET Individual OnBoarded VNF Package Artifact with invalid Range Request + ... Test objective: The objective is to test that the retrieval of an individual OnBoarded VNF package artifact 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.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.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 Individual OnBoarded VNF Package Artifact with invalid Range Request + Check HTTP Response Status Code Is 416 + +GET Individual OnBoarded VNF Package Artifact with invalid resource identifier + [Documentation] Test ID: 7.3.3.5.17 + ... Test title: GET Individual OnBoarded VNF Package Artifact with invalid resource identifier + ... Test objective: The objective is to test that the retrieval of an individual OnBoarded VNF package artifact fails when using an invalid resource identifier + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Individual OnBoarded VNF Package Artifact with invalid resource identifier + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET Individual OnBoarded VNF Package Artifact with conflict due to onboarding state + [Documentation] Test ID: 7.3.3.5.18 + ... Test title: GET Individual OnBoarded VNF Package Artifact with conflict due to onboarding state + ... Test objective: The objective is to test that the retrieval of an individual OnBoarded VNF package artifact 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.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Artifact for OnBoarded VNF Package in onboarding state different from ONBOARDED + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST Individual OnBoarded VNF Package Artifact - Method not implemented + [Documentation] Test ID: 7.3.3.5.19 + ... Test title: POST Individual OnBoarded 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.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for individual OnBoarded VNF Package Artifact + Check HTTP Response Status Code Is 405 + +PUT Individual OnBoarded VNF Package Artifact - Method not implemented + [Documentation] Test ID: 7.3.3.5.20 + ... Test title: PUT Individual OnBoarded 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.6.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for individual OnBoarded VNF Package Artifact + Check HTTP Response Status Code Is 405 + +PATCH Individual OnBoarded VNF Package Artifact - Method not implemented + [Documentation] Test ID: 7.3.3.5.21 + ... Test title: PATCH Individual OnBoarded 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.6.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for individual OnBoarded VNF Package Artifact + Check HTTP Response Status Code Is 405 + +DELETE Individual OnBoarded VNF Package Artifact - Method not implemented + [Documentation] Test ID: 7.3.3.5.22 + ... Test title: DELETE Individual OnBoarded 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.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send DELETE Request for individual OnBoarded VNF Package Artifact + Check HTTP Response Status Code Is 405 + +GET Individual VNF Package Artifact with security information + [Documentation] Test ID: 7.3.3.5.23 + ... Test title: GET Individual VNF Package Artifact with security information + ... Test objective: The objective is to test the retrieval of an individual VNF package artifact shall include in the ZIP archive the security information when requested with "include_signature" parameter + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO cannot determine the content type of the artifact + ... Post-Conditions: none + GET Individual VNF Package Artifact with security information + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +GET Individual OnBoarded VNF Package Artifact with security information + [Documentation] Test ID: 7.3.3.5.24 + ... Test title: GET Individual OnBoarded VNF Package Artifact with security information + ... Test objective: The objective is to test the retrieval of an individual OnBoarded VNF package artifact shall include in the ZIP archive the security information when requested with "include_signature" parameter + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO cannot determine the content type of the artifact + ... Post-Conditions: none + GET Individual OnBoarded VNF Package Artifact with security information + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +GET Individual VNF Package Artifact with encrypted artifact + [Documentation] Test ID: 7.3.3.5.25 + ... Test title: GET Individual VNF Package Artifact with encrypted artifact + ... Test objective: The objective is to test the retrieval of an individual VNF package artifact shall include an encrypted artifact + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO cannot determine the content type of the artifact + ... Post-Conditions: none + GET Individual VNF Package Artifact with encrypted artifact + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/cms + +GET Individual OnBoarded VNF Package Artifact with encrypted artifact + [Documentation] Test ID: 7.3.3.5.26 + ... Test title: GET Individual OnBoarded VNF Package Artifact with encrypted artifact + ... Test objective: The objective is to test the retrieval of an individual OnBoarded VNF package artifact shall include an encrypted artifact + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO cannot determine the content type of the artifact + ... Post-Conditions: none + GET Individual OnBoarded VNF Package Artifact with encrypted artifact + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/cms + +GET Individual VNF Package Artifact - Not Acceptable + [Documentation] Test ID: 7.3.3.5.27 + ... Test title: GET Individual VNF Package Artifact with invalid Range Request + ... Test objective: The objective is to test that the retrieval of an individual VNF package artifact fails when related request contained an "Accept" header not compatible with the Content type "application/zip" but the "include_signatures" flag was provided + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Individual VNF Package Artifact with incompatable header + Check HTTP Response Status Code Is 406 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET Individual OnBoarded VNF Package Artifact - Not Acceptable + [Documentation] Test ID: 7.3.3.5.28 + ... Test title: GET Individual OnBoarded VNF Package Artifact with invalid Range Request + ... Test objective: The objective is to test that the retrieval of an individual OnBoarded VNF package artifact fails when related request contained an "Accept" header not compatible with the Content type "application/zip" but the "include_signatures" flag was provided + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Individual OnBoarded VNF Package Artifact with incompatable header + Check HTTP Response Status Code Is 406 + Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/ManifestInIndividualVNFPackage.robot b/SOL003/VNFPackageManagement-API/ManifestInIndividualVNFPackage.robot new file mode 100644 index 0000000000000000000000000000000000000000..2635c198a6dd08fa64783fb04cf17e2db82626e1 --- /dev/null +++ b/SOL003/VNFPackageManagement-API/ManifestInIndividualVNFPackage.robot @@ -0,0 +1,208 @@ +*** 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 Manifest in Individual VNF Package + [Documentation] Test ID: 7.3.3.10.1 + ... Test title: Get Manifest in Individual VNF Package + ... Test objective: The objective is to test that the Get request read the content of manifest within a NVF Package and perform a validation that returned content is in plain text format + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual VNF Package + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is text/plain + +Get Manifest in Individual VNF Package with security information + [Documentation] Test ID: 7.3.3.10.2 + ... Test title: Get Manifest in Individual VNF Package with security information + ... Test objective: The objective is to test the retrieval of manifest for an individual VNF package shall also 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.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual VNF Package with security information + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get Manifest in Individual VNF Package - Not acceptable + [Documentation] Test ID: 7.3.3.10.3 + ... Test title: Get Manifest in Individual VNF Package - Not acceptable + ... Test objective: The objective is to test that retriveal of the of manifest for an individual VNF package fails when request contained an "Accept" header not compatible with the Content type "application/zip" but the "include_signatures" flag was provided, and perform a validation of the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual VNF Package + Check HTTP Response Status Code Is 406 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get Manifest in Individual VNF Package - Conflict + [Documentation] Test ID: 7.3.3.10.4 + ... Test title: Get Manifest in Individual VNF Package - Conflict + ... Test objective: The objective is to test that the retrieval of the manifest for an individual VNF package 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 VNFD is requested is different from ONBOARDED. + ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual VNF Package with conflict due to onboarding state + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST Manifest in Individual VNF Package - Method not implemented + [Documentation] Test ID: 7.3.3.10.5 + ... Test title: POST Manifest in Individual VNF Package - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create new resource + ... Pre-conditions: none + ... Reference: Clause 10.4.4a.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for Manifest in individual VNF Package + Check HTTP Response Status Code Is 405 + +PUT Manifest in Individual VNF Package - Method not implemented + [Documentation] Test ID: 7.3.3.10.6 + ... Test title: PUT Manifest in Individual VNF Package - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to modify resource + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for Manifest in individual VNF Package + Check HTTP Response Status Code Is 405 + +PATCH Manifest in Individual VNF Package - Method not implemented + [Documentation] Test ID: 7.3.3.10.7 + ... Test title: PATCH Manifest in Individual VNF Package - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update resource + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for Manifest in individual VNF Package + Check HTTP Response Status Code Is 405 + +DELETE Manifest in Individual VNF Package - Method not implemented + [Documentation] Test ID: 7.3.3.10.8 + ... Test title: DELETE Manifest in Individual VNF Package - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete resource + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: Resource is not deleted by the failed operation + Send DELETE Request for Manifest in individual VNF Package + Check HTTP Response Status Code Is 405 + + +Get Manifest in Individual OnBoarded VNF Package + [Documentation] Test ID: 7.3.3.10.9 + ... Test title: Get Manifest in Individual OnBoarded VNF Package + ... Test objective: The objective is to test that the Get request read the content of manifest within a OnBoarded NVF Package and perform a validation that returned content is in plain text format + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual OnBoarded VNF Package + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is text/plain + +Get Manifest in Individual OnBoarded VNF Package with security information + [Documentation] Test ID: 7.3.3.10.10 + ... Test title: Get Manifest in Individual OnBoarded VNF Package with security information + ... Test objective: The objective is to test the retrieval of manifest for an individual OnBoarded VNF package shall also 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.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual OnBoarded VNF Package with security information + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get Manifest in Individual OnBoarded VNF Package - Not acceptable + [Documentation] Test ID: 7.3.3.10.11 + ... Test title: Get Manifest in Individual OnBoarded VNF Package - Not acceptable + ... Test objective: The objective is to test that retriveal of the of manifest for an individual OnBoarded VNF package fails when request contained an "Accept" header not compatible with the Content type "application/zip" but the "include_signatures" flag was provided, and perform a validation of the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual OnBoarded VNF Package + Check HTTP Response Status Code Is 406 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get Manifest in Individual OnBoarded VNF Package - Conflict + [Documentation] Test ID: 7.3.3.10.12 + ... Test title: Get Manifest in Individual OnBoarded VNF Package - Conflict + ... Test objective: The objective is to test that the retrieval of the manifest for an individual OnBoarded VNF package 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 VNFD is requested is different from ONBOARDED. + ... Reference: Clause 10.4.4a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual OnBoarded VNF Package with conflict due to onboarding state + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST Manifest in Individual OnBoarded VNF Package - Method not implemented + [Documentation] Test ID: 7.3.3.10.13 + ... Test title: POST Manifest in Individual OnBoarded VNF Package - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create new resource + ... Pre-conditions: none + ... Reference: Clause 10.4.4a.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for Manifest in individual OnBoarded VNF Package + Check HTTP Response Status Code Is 405 + +PUT Manifest in Individual OnBoarded VNF Package - Method not implemented + [Documentation] Test ID: 7.3.3.10.14 + ... Test title: PUT Manifest in Individual OnBoarded VNF Package - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to modify resource + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for Manifest in individual OnBoarded VNF Package + Check HTTP Response Status Code Is 405 + +PATCH Manifest in Individual OnBoarded VNF Package - Method not implemented + [Documentation] Test ID: 7.3.3.10.15 + ... Test title: PATCH Manifest in Individual OnBoarded VNF Package - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update resource + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for Manifest in individual OnBoarded VNF Package + Check HTTP Response Status Code Is 405 + +DELETE Manifest in Individual OnBoarded VNF Package - Method not implemented + [Documentation] Test ID: 7.3.3.10.16 + ... Test title: DELETE Manifest in Individual OnBoarded VNF Package - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete resource + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.4a.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: Resource is not deleted by the failed operation + Send DELETE Request for Manifest in individual OnBoarded VNF Package + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/NotificationEndpoint.robot b/SOL003/VNFPackageManagement-API/NotificationEndpoint.robot new file mode 100644 index 0000000000000000000000000000000000000000..bc6a26684094ee8641730d8ca70268b998be4fde --- /dev/null +++ b/SOL003/VNFPackageManagement-API/NotificationEndpoint.robot @@ -0,0 +1,70 @@ +*** Settings *** +Library String +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Library OperatingSystem +Library JSONLibrary +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +VNF Package Onboarding Notification + [Documentation] Test ID: 7.3.3.12.1 + ... Test title: VNF Package Onboarding Notification + ... Test objective: The objective is to test that the POST request triggers VNF Package Onboarding notification. + ... Pre-conditions: A VNF package subscription for onboarding notifications is available in the NFVO. + ... Reference: Clause 10.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post VNF Package Onboarding Notification + Check HTTP Response Status Code Is 204 + +VNF Package Change Notification + [Documentation] Test ID: 7.3.3.12.2 + ... Test title: VNF Package Change Notification + ... Test objective: The objective is to test that the POST request triggers VNF Package Change notification. + ... Pre-conditions: A VNF package subscription for change notifications is available in the NFVO. + ... Reference: Clause 10.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post VNF Package Change Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body PkgmSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post VNF Package Onboarding Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/VnfPackageOnboardingNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfPackageId=${vnfPackageId} vndId=${vndId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post VNF Package Change Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/VnfPackageChangeNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfPackageId=${vnfPackageId} vndId=${vndId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/PackageManagementNotification.robot b/SOL003/VNFPackageManagement-API/Notifications.robot similarity index 88% rename from SOL003/VNFPackageManagement-API/PackageManagementNotification.robot rename to SOL003/VNFPackageManagement-API/Notifications.robot index b775527f802a8296ecc4239923d404840a26ef7f..148e6e3d70028227bc97949775b6186a4a56656c 100644 --- a/SOL003/VNFPackageManagement-API/PackageManagementNotification.robot +++ b/SOL003/VNFPackageManagement-API/Notifications.robot @@ -16,7 +16,7 @@ VNF Package Onboarding Notification ... Test title: VNF Package Onboarding Notification ... Test objective: The objective is to test the dispatch of VNF Package Onboarding notification when the VNF package onboarding operation is successfully completed, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A VNF package subscription for onboarding notifications is available in the NFVO. - ... Reference: Clause 10.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -29,7 +29,7 @@ VNF Package Operational State Change Notification ... Test title: VNF Package Operational State Change Notification ... Test objective: The objective is to test the dispatch of VNF Package Change notification when the VNF package operational state is modified, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A VNF package subscription for change notifications is available in the NFVO. - ... Reference: Clause 10.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -43,7 +43,7 @@ VNF Package Deletion Notification ... Test title: VNF Package Deletion Notification ... Test objective: The objective is to test the dispatch of VNF Package Change notification when the VNF package is deleted on the NFVO, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A VNF package subscription for change notifications is available in the NFVO. - ... Reference: Clause 10.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -118,8 +118,10 @@ Configure Notification Onboarding Handler set to dictionary ${json} notificationType ${type} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Delete Handler @@ -128,8 +130,10 @@ Configure Notification Delete Handler set to dictionary ${json} notificationType ${type} changeType ${change} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Change Status Handler @@ -138,8 +142,10 @@ Configure Notification Change Status Handler set to dictionary ${json} notificationType ${type} changeType ${change} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL003/VNFPackageManagement-API/Subscriptions.robot b/SOL003/VNFPackageManagement-API/Subscriptions.robot index bc60615dc6e7b53e59cfe0c706218ad79734e3b0..534beaa727626f1e91b1c4e96d5769e3522a9f19 100644 --- a/SOL003/VNFPackageManagement-API/Subscriptions.robot +++ b/SOL003/VNFPackageManagement-API/Subscriptions.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/subscriptions.txt Resource VNFPackageManagementKeywords.robot Library OperatingSystem Library JSONLibrary @@ -17,7 +16,7 @@ Get All VNF Package Subscriptions ... Test title: GET all VNF Package Subscriptions ... Test objective: The objective is to test the retrieval of all VNF package subscriptions and perform a JSON schema validation of the returned subscriptions data structure ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 10.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -25,13 +24,12 @@ Get All VNF Package Subscriptions Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is PkgmSubscriptions - Get VNF Package Subscriptions with attribute-based filter [Documentation] Test ID: 7.3.3.6.2 ... Test title: Get VNF Package Subscriptions with attribute-based filter ... Test objective: The objective is to test the retrieval of VNF package subscriptions using attribute-based filter, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 10.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -40,13 +38,12 @@ Get VNF Package Subscriptions with attribute-based filter Check HTTP Response Body Json Schema Is PkgmSubscription Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter - Get VNF Package Subscriptions with invalid attribute-based filter [Documentation] Test ID: 7.3.3.6.3 ... Test title: Get VNF Package Subscriptions with attribute-based filters ... Test objective: The objective is to test that the retrieval of VNF package subscriptions fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 10.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -59,19 +56,20 @@ GET VNF Package Subscription with invalid resource endpoint ... Test title: GET VNF Package Subscription with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of all VNF package subscriptions fails when using invalid resource endpoint. ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 10.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Get VNF Package Subscriptions with invalid resource endpoint Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails Create new VNF Package subscription [Documentation] Test ID: 7.3.3.6.5 ... Test title: Create new VNF Package subscription ... Test objective: The objective is to test the creation of a new VNF package subscription and perform a JSON schema and content validation of the returned subscription data structure ... Pre-conditions: none - ... Reference: Clause 10.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The VNF package subscription is successfully set and it matches the issued subscription @@ -88,7 +86,7 @@ Create duplicated VNF Package subscription with NFVO not creating duplicated sub ... Test title: Create duplicated VNF Package subscription with NFVO not creating duplicated subscriptions ... Test objective: The objective is to test the attempt of a creation of a duplicated VNF package subscription and check that no new subscription is created by the NFVO and a link to the original subscription is returned ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 10.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO does not support the creation of duplicated subscriptions ... Post-Conditions: The existing VNF package subscription returned is available in the NFVO @@ -104,7 +102,7 @@ Create duplicated VNF Package subscription with NFVO creating duplicated subscri ... Test title: Create duplicated VNF Package subscription with NFVO creating duplicated subscriptions ... Test objective: The objective is to test the creation of a duplicated VNF package subscription and perform a JSON schema and content validation of the returned duplicated subscription data structure ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 10.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO supports the creation of duplicated subscriptions ... Post-Conditions: The duplicated VNF package subscription is successfully set and it matches the issued subscription @@ -119,7 +117,7 @@ PUT VNF Package Subscriptions - Method not implemented ... Test title: PUT VNF Package Subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify VNF package subscriptions ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 10.4.7.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.7.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -131,7 +129,7 @@ PATCH VNF Package Subscriptions - Method not implemented ... Test title: PATCH VNF Package Subscriptions - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update VNF package subscriptions ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 10.4.7.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.7.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -144,36 +142,48 @@ DELETE VNF Package Subscriptions - Method not implemented ... Test title: DELETE VNF Package Subscriptions - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete VNF package subscriptions ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 10.4.7.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.7.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The VNF package subscriptions are not deleted by the failed operation + ... Post-Conditions: none Send Delete Request for VNF Package Subscriptions Check HTTP Response Status Code Is 405 - Check Postcondition VNF Package Subscriptions Exists Get All VNF Package Subscriptions as Paged Response [Documentation] Test ID: 7.3.3.6.11 ... Test title: GET all VNF Package Subscriptions as Paged Response ... Test objective: The objective is to test the retrieval of all VNF package subscriptions as Paged Response. ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 10.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Get all VNF Package Subscriptions Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link Get VNF Package Subscriptions - Bad Request Response too Big [Documentation] Test ID: 7.3.3.6.12 ... Test title: Get VNF Package Subscriptions - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of VNF package subscriptions fails because reponse is too big, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 10.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Get all VNF Package Subscriptions Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get VNF Package Subscriptions - Unprocessable Entity + [Documentation] Test ID: 7.3.3.6.13 + ... Test title: Get VNF Package Subscriptions - Unprocessable Entity + ... Test objective: The objective is to test that content type of the payload body is supported and the payload body of a request contains syntactically correct data but the data cannot be processed., and perform the JSON schema validation of the failed operation HTTP response. + ... Pre-conditions: At least one VNF package subscription is available in the NFVO. + ... Reference: Clause 10.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get all VNF Package Subscriptions + Check HTTP Response Status Code Is 422 Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/VNFDInIndividualVNFPackage.robot b/SOL003/VNFPackageManagement-API/VNFDInIndividualVNFPackage.robot index c8f945db6284b4dce7cefab71e2b2333d106ef6b..0cfc35ffd913dfe9daf610b76d34efe307b1de59 100644 --- a/SOL003/VNFPackageManagement-API/VNFDInIndividualVNFPackage.robot +++ b/SOL003/VNFPackageManagement-API/VNFDInIndividualVNFPackage.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/vnfdInIndividualVnfPackage.txt Resource VNFPackageManagementKeywords.robot Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false @@ -12,7 +11,7 @@ Get single file VNFD in Individual VNF Package in Plain Format ... Test title: Get single file VNFD in Individual VNF Package in Plain Format ... Test objective: The objective is to test the retrieval of the VNFD in plain format for an individual VNF package and perform a validation that returned content is in plain format ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The VNFD is implemented as a single file ... Post-Conditions: none @@ -25,7 +24,7 @@ Get VNFD in Individual VNF Package in Zip Format ... Test title: Get VNFD in Individual VNF Package in Zip Format ... Test objective: The objective is to test the retrieval of the VNFD in zip format for an individual VNF package 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.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -38,7 +37,7 @@ Get single file VNFD in Individual VNF Package in Plain or Zip Format ... Test title: Get single file VNFD in Individual VNF Package in Plain or Zip Format ... Test objective: The objective is to test the retrieval of the single file VNFD for an individual VNF package when requesting Plain or Zip format to NFVO by including both formats in the request, and perform a validation that returned content is in Plain or Zip format ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The VNFD is implemented as a single file ... Post-Conditions: none @@ -51,7 +50,7 @@ Get multi file VNFD in Individual VNF Package in Plain or Zip Format ... Test title: Get multi file VNFD in Individual VNF Package in Plain or Zip Format ... Test objective: The objective is to test the retrieval of the multi file VNFD for an individual VNF package when requesting Plain or Zip format to NFVO by including both formats in the request, 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.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The VNFD is implemented as a multi file ... Post-Conditions: none @@ -59,25 +58,23 @@ Get multi file VNFD in Individual VNF Package in Plain or Zip Format Check HTTP Response Status Code Is 200 Check HTTP Response Header Content-Type Is application/zip -Get multi file VNFD in Individual VNF Package in Plain Format - [Documentation] Test ID: 7.3.3.4.5 - ... Test title: Get multi file VNFD in Individual VNF Package in Plain Format - ... Test objective: The objective is to test that the retrieval of the multi file VNFD for an individual VNF package fails when requesting it in Plain format, and perform a validation of the JSON schema validation of the failed operation HTTP response - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The VNFD is implemented as a multi file - ... Post-Conditions: none - Get multi file VNFD in Individual VNF Package in Plain Format - Check HTTP Response Status Code Is 406 - Check HTTP Response Body Json Schema Is ProblemDetails +Void + [Documentation] Test ID: 7.3.3.4.5 + ... Test title: Void + ... Test objective: Void + ... Pre-conditions: Void + ... Reference: Void + ... Config ID: Void + ... Applicability: Void + ... Post-Conditions: Void + Void Get VNFD in Individual VNF Package with invalid resource identifier [Documentation] Test ID: 7.3.3.4.6 ... Test title: Get VNFD in Individual VNF Package with invalid resource identifier ... Test objective: The objective is to test that the retrieval of the VNFD for an individual VNF package content fails when using an invalid resource identifier ... Pre-conditions: none - ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -89,7 +86,7 @@ Get VNFD in Individual VNF Package Content with conflict due to onboarding state ... Test title: Get VNFD in Individual VNF Package Content with conflict due to onboarding state ... Test objective: The objective is to test that the retrieval of the VNFD for 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 VNFD is requested is different from ONBOARDED. - ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -102,7 +99,7 @@ POST VNFD in Individual VNF Package Content - Method not implemented ... Test title: POST VNFD in Individual VNF Package Content - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create new VNFD ... Pre-conditions: none - ... Reference: Clause 10.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -114,7 +111,7 @@ PUT VNFD in Individual VNF Package Content - Method not implemented ... Test title: PUT VNFD in Individual VNF Package Content - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify a VNFD ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.4.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -126,7 +123,7 @@ PATCH VNFD in Individual VNF Package Content - Method not implemented ... Test title: PATCH VNFD in Individual VNF Package Content - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update a VNFD ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.4.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -138,20 +135,19 @@ DELETE VNFD in Individual VNF Package Content - Method not implemented ... Test title: DELETE VNFD in Individual VNF Package Content - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete a VNFD ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.4.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The VNFD is not deleted by the failed operation + ... Post-Conditions: none Send DELETE Request for VNFD in individual VNF Package Check HTTP Response Status Code Is 405 - Check Postcondition VNFD Exist Get single file VNFD in Individual OnBoarded VNF Package in Plain Format [Documentation] Test ID: 7.3.3.4.12 ... Test title: Get single file VNFD in Individual OnBoarded VNF Package in Plain Format ... Test objective: The objective is to test the retrieval of the VNFD in plain format for an individual OnBoarded VNF package and perform a validation that returned content is in plain format ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The VNFD is implemented as a single file ... Post-Conditions: none @@ -164,7 +160,7 @@ Get VNFD in Individual OnBoarded VNF Package in Zip Format ... Test title: Get VNFD in Individual OnBoarded VNF Package in Zip Format ... Test objective: The objective is to test the retrieval of the VNFD in zip format for an individual OnBoarded VNF package 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.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -177,7 +173,7 @@ Get single file VNFD in Individual OnBoarded VNF Package in Plain or Zip Format ... Test title: Get single file VNFD in Individual OnBoarded VNF Package in Plain or Zip Format ... Test objective: The objective is to test the retrieval of the single file VNFD for an individual OnBoarded VNF package when requesting Plain or Zip format to NFVO by including both formats in the request, and perform a validation that returned content is in Plain or Zip format ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The VNFD is implemented as a single file ... Post-Conditions: none @@ -190,7 +186,7 @@ Get multi file VNFD in Individual OnBoarded VNF Package in Plain or Zip Format ... Test title: Get multi file VNFD in Individual OnBoarded VNF Package in Plain or Zip Format ... Test objective: The objective is to test the retrieval of the multi file VNFD for an individual OnBoarded VNF package when requesting Plain or Zip format to NFVO by including both formats in the request, 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.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The VNFD is implemented as a multi file ... Post-Conditions: none @@ -198,25 +194,23 @@ Get multi file VNFD in Individual OnBoarded VNF Package in Plain or Zip Format Check HTTP Response Status Code Is 200 Check HTTP Response Header Content-Type Is application/zip -Get multi file VNFD in Individual OnBoarded VNF Package in Plain Format - [Documentation] Test ID: 7.3.3.4.16 - ... Test title: Get multi file VNFD in Individual OnBoarded VNF Package in Plain Format - ... Test objective: The objective is to test that the retrieval of the multi file VNFD for an individual OnBoarded VNF package fails when requesting it in Plain format, and perform a validation of the JSON schema validation of the failed operation HTTP response - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The VNFD is implemented as a multi file - ... Post-Conditions: none - Get multi file VNFD in Individual OnBoarded VNF Package in Plain Format - Check HTTP Response Status Code Is 406 - Check HTTP Response Body Json Schema Is ProblemDetails +Void + [Documentation] Test ID: 7.3.3.4.16 + ... Test title: Void + ... Test objective: Void + ... Pre-conditions: Void + ... Reference: Void + ... Config ID: Void + ... Applicability: Void + ... Post-Conditions: Void + Void Get VNFD in Individual OnBoarded VNF Package with invalid resource identifier [Documentation] Test ID: 7.3.3.4.17 ... Test title: Get VNFD in Individual OnBoarded VNF Package with invalid resource identifier ... Test objective: The objective is to test that the retrieval of the VNFD for an individual OnBoarded VNF package content fails when using an invalid resource identifier ... Pre-conditions: none - ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -228,7 +222,7 @@ Get VNFD in Individual OnBoarded VNF Package Content with conflict due to onboar ... Test title: Get VNFD in Individual OnBoarded VNF Package Content with conflict due to onboarding state ... Test objective: The objective is to test that the retrieval of the VNFD for an individual OnBoarded 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 VNFD is requested is different from ONBOARDED. - ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -241,7 +235,7 @@ POST VNFD in Individual OnBoarded VNF Package Content - Method not implemented ... Test title: POST VNFD in Individual OnBoarded VNF Package Content - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create new VNFD ... Pre-conditions: none - ... Reference: Clause 10.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -253,7 +247,7 @@ PUT VNFD in Individual OnBoarded VNF Package Content - Method not implemented ... Test title: PUT VNFD in Individual OnBoarded VNF Package Content - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify a VNFD ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.4.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -265,7 +259,7 @@ PATCH VNFD in Individual OnBoarded VNF Package Content - Method not implemented ... Test title: PATCH VNFD in Individual OnBoarded VNF Package Content - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update a VNFD ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.4.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -277,10 +271,40 @@ DELETE VNFD in Individual OnBoarded VNF Package Content - Method not implemented ... Test title: DELETE VNFD in Individual OnBoarded VNF Package Content - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete a VNFD ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.4.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.4.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The VNFD is not deleted by the failed operation + ... Post-Conditions: none Send DELETE Request for VNFD in individual OnBoarded VNF Package Check HTTP Response Status Code Is 405 - Check Postcondition VNFD Exist + +Get multi file VNFD in Individual VNF Package with security information + [Documentation] Test ID: 7.3.3.4.23 + ... Test title: Get multi file VNFD in Individual VNF Package with security information + ... Test objective: The objective is to test the retrieval of the multi file VNFD for an individual VNF package shall include in the ZIP archive the security information 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.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The VNFD is implemented as a multi file + ... Post-Conditions: none + Get multi file VNFD in Individual VNF Package with security information + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get multi file VNFD in Individual OnBoarded VNF Package with security information + [Documentation] Test ID: 7.3.3.4.24 + ... Test title: Get multi file VNFD in Individual OnBoarded VNF Package with security information + ... Test objective: The objective is to test the retrieval of the multi file VNFD for an individual OnBoarded VNF package shall include in the ZIP archive the security information 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.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The VNFD is implemented as a multi file + ... Post-Conditions: none + Get multi file VNFD in Individual OnBoarded VNF Package with security information + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +*** Keywords *** + +Void + log do nothing \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/VNFPackageArtifacts.robot b/SOL003/VNFPackageManagement-API/VNFPackageArtifacts.robot index d4b7ce9989145867fcac47b958cf91d8c73765fb..4fe69be4164bdc8fdf5955566ab4505248a8c3c7 100644 --- a/SOL003/VNFPackageManagement-API/VNFPackageArtifacts.robot +++ b/SOL003/VNFPackageManagement-API/VNFPackageArtifacts.robot @@ -1,283 +1,389 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt # Generic Parameters -Resource environment/vnfPackageArtifacts.txt +Resource environment/variables.txt Resource VNFPackageManagementKeywords.robot Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false *** Test Cases *** -GET Individual VNF Package Artifact - [Documentation] Test ID: 7.3.3.5.1 - ... Test title: GET Individual VNF Package Artifact - ... Test objective: The objective is to test the retrieval of an individual VNF package artifact +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.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - GET Individual VNF Package Artifact + Get Artifact in VNF Package Check HTTP Response Status Code Is 200 - -GET Individual VNF Package Artifact in octet stream format - [Documentation] Test ID: 7.3.3.5.2 - ... Test title: GET Individual VNF Package Artifact in octet stream format - ... Test objective: The objective is to test the retrieval of an individual VNF package artifact when the NFVO cannot determine the artifact content type. The test performs a validation that the returned artifcat in is octet-stream format + 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.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: The NFVO cannot determine the content type of the artifact + ... Applicability: none ... Post-Conditions: none - GET Individual VNF Package Artifact in octet stream format + 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/octet-stream - -GET Individual VNF Package Artifact with Range Request and NFVO supporting Range Requests - [Documentation] Test ID: 7.3.3.5.3 - ... Test title: GET Individual VNF Package Artifact with Range Request and NFVO supporting Range Requests - ... Test objective: The objective is to test the retrieval of an individual VNF package artifact 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 + 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.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.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.7.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.7.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.7.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 Individual VNF Package Artifact with Range Request + 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 Individual VNF Package Artifact with Range Request and NFVO not supporting Range Requests - [Documentation] Test ID: 7.3.3.5.4 - ... Test title: GET Individual VNF Package Artifact with Range Request and NFVO not supporting Range Requests - ... Test objective: The objective is to test that the retrieval of an individual VNF package artifact, 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 artifact. + +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.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: The NFVO does not support range requests to return single range of bytes from the VNF package artifact - ... Post-Conditions: none - GET Individual VNF Package Artifact with Range Request - Check HTTP Response Status Code Is 200 - -GET Individual VNF Package Artifact with invalid Range Request - [Documentation] Test ID: 7.3.3.5.5 - ... Test title: GET Individual VNF Package Artifact with invalid Range Request - ... Test objective: The objective is to test that the retrieval of an individual VNF package artifact fails when using a range request that does not match any available byte range in the file. + ... 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.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.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 Individual VNF Package Artifact with invalid Range Request - Check HTTP Response Status Code Is 416 - -GET Individual VNF Package Artifact with invalid resource identifier - [Documentation] Test ID: 7.3.3.5.6 - ... Test title: GET Individual VNF Package Artifact with invalid resource identifier - ... Test objective: The objective is to test that the retrieval of an individual VNF package artifact fails when using an invalid resource identifier + ... 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.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none - GET Individual VNF Package Artifact with invalid resource identifier - Check HTTP Response Status Code Is 404 + ... 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 Individual VNF Package Artifact with conflict due to onboarding state - [Documentation] Test ID: 7.3.3.5.7 - ... Test title: GET Individual VNF Package Artifact with conflict due to onboarding state - ... Test objective: The objective is to test that the retrieval of an individual VNF package artifact 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 +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.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - GET Artifact for VNF Package in onboarding state different from ONBOARDED + 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 - -POST Individual VNF Package Artifact - Method not implemented - [Documentation] Test ID: 7.3.3.5.8 - ... Test title: POST Individual VNF Package Artifact - Method not implemented + +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.7.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.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5a.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Send POST Request for individual VNF Package Artifact + Send POST Request for VNF Package Artifact Check HTTP Response Status Code Is 405 -PUT Individual VNF Package Artifact - Method not implemented - [Documentation] Test ID: 7.3.3.5.9 - ... Test title: PUT Individual VNF Package Artifact - Method not implemented +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.6.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5a.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Send PUT Request for individual VNF Package Artifact + Send PUT Request for VNF Package Artifact Check HTTP Response Status Code Is 405 -PATCH Individual VNF Package Artifact - Method not implemented - [Documentation] Test ID: 7.3.3.5.10 - ... Test title: PATCH Individual VNF Package Artifact - Method not implemented +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.6.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5a.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Send PATCH Request for individual VNF Package Artifact + Send PATCH Request for VNF Package Artifact Check HTTP Response Status Code Is 405 -DELETE Individual VNF Package Artifact - Method not implemented - [Documentation] Test ID: 7.3.3.5.11 - ... Test title: DELETE Individual VNF Package Artifact - Method not implemented +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 + ... Reference: Clause 10.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.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 individual VNF Package Artifact + ... Post-Conditions: none + Send DELETE Request for VNF Package Artifact Check HTTP Response Status Code Is 405 - Check Postcondition VNF Package Artifact Exist - -GET Individual OnBoarded VNF Package Artifact - [Documentation] Test ID: 7.3.3.5.12 - ... Test title: GET Individual OnBoarded VNF Package Artifact - ... Test objective: The objective is to test the retrieval of an individual OnBoarded VNF package artifact + +Get OnBoarded VNF Package Artifact + [Documentation] Test ID: 7.3.3.11.16 + ... Test title: Get OnBoarded VNF Package Artifact + ... Test objective: The objective is to test that the GET request read the whole content of the archive containing the OnBoarded VNF Package 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.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - GET Individual OnBoarded VNF Package Artifact + Get Artifact in OnBoarded VNF Package Check HTTP Response Status Code Is 200 - -GET Individual OnBoarded VNF Package Artifact in octet stream format - [Documentation] Test ID: 7.3.3.5.13 - ... Test title: GET Individual OnBoarded VNF Package Artifact in octet stream format - ... Test objective: The objective is to test the retrieval of an individual OnBoarded VNF package artifact when the NFVO cannot determine the artifact content type. The test performs a validation that the returned artifcat in is octet-stream format + Check HTTP Response Header Content-Type Is application/zip + +Get OnBoarded VNF Package Artifact with "exclude_all_mano_artifacts" parameter + [Documentation] Test ID: 7.3.3.11.17 + ... Test title: Get OnBoarded 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 OnBoarded VNF Package 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.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: The NFVO cannot determine the content type of the artifact + ... Applicability: none ... Post-Conditions: none - GET Individual OnBoarded VNF Package Artifact in octet stream format + Get Artifact in OnBoarded VNF Package with exclude_all_mano_artifacts parameter Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/octet-stream - -GET Individual OnBoarded VNF Package Artifact with Range Request and NFVO supporting Range Requests - [Documentation] Test ID: 7.3.3.5.14 - ... Test title: GET Individual OnBoarded VNF Package Artifact with Range Request and NFVO supporting Range Requests - ... Test objective: The objective is to test the retrieval of an individual OnBoarded VNF package artifact 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 + Check HTTP Response Header Content-Type Is application/zip + +Get OnBoarded VNF Package Artifact with "exclude_all_non_mano_artifacts" parameter + [Documentation] Test ID: 7.3.3.11.18 + ... Test title: Get OnBoarded 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 OnBoarded VNF Package 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.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in OnBoarded 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 OnBoarded VNF Package Artifact with "select_non_mano_artifact_sets" parameter + [Documentation] Test ID: 7.3.3.11.19 + ... Test title: Get OnBoarded 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 OnBoarded VNF Package 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.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in OnBoarded 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 OnBoarded VNF Package Artifact with "include_signatures" parameter + [Documentation] Test ID: 7.3.3.11.20 + ... Test title: Get OnBoarded 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 OnBoarded VNF Package 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.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Artifact in OnBoarded VNF Package with include_signatures parameter + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get OnBoarded VNF Package Artifact with Range Request and NFVO supporting Range Requests + [Documentation] Test ID: 7.3.3.11.21 + ... Test title: Get OnBoarded 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 OnBoarded VNF Package 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.7.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 Individual OnBoarded VNF Package Artifact with Range Request + Get Artifact in OnBoarded 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 Individual OnBoarded VNF Package Artifact with Range Request and NFVO not supporting Range Requests - [Documentation] Test ID: 7.3.3.5.15 - ... Test title: GET Individual OnBoarded VNF Package Artifact with Range Request and NFVO not supporting Range Requests - ... Test objective: The objective is to test that the retrieval of an individual OnBoarded VNF package artifact, 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 artifact. + +Get OnBoarded VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "select_non_mano_artifact_sets" + [Documentation] Test ID: 7.3.3.11.22 + ... Test title: Get OnBoarded 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 OnBoarded VNF Package 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.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: The NFVO does not support range requests to return single range of bytes from the VNF package artifact - ... Post-Conditions: none - GET Individual OnBoarded VNF Package Artifact with Range Request - Check HTTP Response Status Code Is 200 - -GET Individual OnBoarded VNF Package Artifact with invalid Range Request - [Documentation] Test ID: 7.3.3.5.16 - ... Test title: GET Individual OnBoarded VNF Package Artifact with invalid Range Request - ... Test objective: The objective is to test that the retrieval of an individual OnBoarded VNF package artifact fails when using a range request that does not match any available byte range in the file. + ... Applicability: none + ... Post-Conditions: none + Get Artifact in OnBoarded 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 OnBoarded VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "exclude_all_mano_artifacts" + [Documentation] Test ID: 7.3.3.11.23 + ... Test title: Get OnBoarded 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 OnBoarded VNF Package 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.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.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 Individual OnBoarded VNF Package Artifact with invalid Range Request - Check HTTP Response Status Code Is 416 - -GET Individual OnBoarded VNF Package Artifact with invalid resource identifier - [Documentation] Test ID: 7.3.3.5.17 - ... Test title: GET Individual OnBoarded VNF Package Artifact with invalid resource identifier - ... Test objective: The objective is to test that the retrieval of an individual OnBoarded VNF package artifact fails when using an invalid resource identifier + ... Applicability: none + ... Post-Conditions: none + Get Artifact in OnBoarded 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 OnBoarded VNF Package Artifact with invalid URI parameters undifend select_non_mano_artifact_sets + [Documentation] Test ID: 7.3.3.11.24 + ... Test title: Get OnBoarded 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 OnBoarded VNF Package 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.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none - GET Individual OnBoarded VNF Package Artifact with invalid resource identifier - Check HTTP Response Status Code Is 404 + ... Post-Conditions: none + Get Artifact in OnBoarded 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 Individual OnBoarded VNF Package Artifact with conflict due to onboarding state - [Documentation] Test ID: 7.3.3.5.18 - ... Test title: GET Individual OnBoarded VNF Package Artifact with conflict due to onboarding state - ... Test objective: The objective is to test that the retrieval of an individual OnBoarded VNF package artifact 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 +Get OnBoarded VNF Package Artifact with conflict due to onboarding state + [Documentation] Test ID: 7.3.3.11.25 + ... Test title: Get OnBoarded 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 OnBoarded VNF Package 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.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5a.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - GET Artifact for OnBoarded VNF Package in onboarding state different from ONBOARDED + GET Artifact of OnBoarded VNF Package in onboarding state different from ONBOARDED Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - -POST Individual OnBoarded VNF Package Artifact - Method not implemented - [Documentation] Test ID: 7.3.3.5.19 - ... Test title: POST Individual OnBoarded VNF Package Artifact - Method not implemented + +GET OnBoarded VNF Package Artifact with invalid Range Request + [Documentation] Test ID: 7.3.3.11.26 + ... Test title: GET OnBoarded 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 OnBoarded VNF Package 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.7.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 OnBoarded VNF Package Artifact with invalid Range Request + Check HTTP Response Status Code Is 416 + +POST OnBoarded VNF Package Artifact - Method not implemented + [Documentation] Test ID: 7.3.3.11.27 + ... Test title: POST OnBoarded 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.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5a.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Send POST Request for individual OnBoarded VNF Package Artifact + Send POST Request for OnBoarded VNF Package Artifact Check HTTP Response Status Code Is 405 -PUT Individual OnBoarded VNF Package Artifact - Method not implemented - [Documentation] Test ID: 7.3.3.5.20 - ... Test title: PUT Individual OnBoarded VNF Package Artifact - Method not implemented +PUT OnBoarded VNF Package Artifact - Method not implemented + [Documentation] Test ID: 7.3.3.11.28 + ... Test title: PUT OnBoarded 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.6.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5a.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Send PUT Request for individual OnBoarded VNF Package Artifact + Send PUT Request for OnBoarded VNF Package Artifact Check HTTP Response Status Code Is 405 -PATCH Individual OnBoarded VNF Package Artifact - Method not implemented - [Documentation] Test ID: 7.3.3.5.21 - ... Test title: PATCH Individual OnBoarded VNF Package Artifact - Method not implemented +PATCH OnBoarded VNF Package Artifact - Method not implemented + [Documentation] Test ID: 7.3.3.11.29 + ... Test title: PATCH OnBoarded 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.6.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5a.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Send PATCH Request for individual OnBoarded VNF Package Artifact + Send PATCH Request for OnBoarded VNF Package Artifact Check HTTP Response Status Code Is 405 -DELETE Individual OnBoarded VNF Package Artifact - Method not implemented - [Documentation] Test ID: 7.3.3.5.22 - ... Test title: DELETE Individual OnBoarded VNF Package Artifact - Method not implemented +DELETE OnBoarded VNF Package Artifact - Method not implemented + [Documentation] Test ID: 7.3.3.11.30 + ... Test title: DELETE OnBoarded 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 + ... Reference: Clause 10.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.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 individual OnBoarded VNF Package Artifact - Check HTTP Response Status Code Is 405 - Check Postcondition OnBoarded VNF Package Artifact Exist - + ... Post-Conditions: none + Send DELETE Request for OnBoarded VNF Package Artifact + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/VNFPackageContent.robot b/SOL003/VNFPackageManagement-API/VNFPackageContent.robot index 856c54c2ef12a7b07ff4cfadac37fbe113c252c1..ded06fca30c167e6118f89d6f0d989fe0c2f3aaa 100644 --- a/SOL003/VNFPackageManagement-API/VNFPackageContent.robot +++ b/SOL003/VNFPackageManagement-API/VNFPackageContent.robot @@ -1,7 +1,6 @@ *** Settings *** 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} ssl_verify=false @@ -12,7 +11,7 @@ GET Individual VNF Package Content ... 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: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -25,7 +24,7 @@ GET Individual VNF Package Content with Range Request and NFVO supporting Range ... 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: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.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 @@ -40,11 +39,11 @@ GET Individual VNF Package Content with Range Request and NFVO not supporting Ra ... 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: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.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 + GET Individual VNF Package Content with explicit Range Request Check HTTP Response Status Code Is 200 Check HTTP Response Header Content-Type Is application/zip @@ -53,7 +52,7 @@ GET Individual VNF Package Content with invalid Range Request ... 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: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.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 @@ -65,19 +64,20 @@ GET Individual VNF Package Content with invalid resource identifier ... 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: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.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 + Check HTTP Response Body Json Schema Is ProblemDetails 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: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -90,11 +90,11 @@ POST Individual VNF Package Content - Method not implemented ... 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: Clause 10.4.3.5.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.3.5.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Send POST Request for individual VNF Package + Send POST Request for individual VNF Package Content Check HTTP Response Status Code Is 405 PUT Individual VNF Package Content - Method not implemented @@ -102,11 +102,11 @@ PUT Individual VNF Package Content - Method not implemented ... 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: Clause 10.4.3.5.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.3.5.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Send PUT Request for individual VNF Package + Send PUT Request for individual VNF Package Content Check HTTP Response Status Code Is 405 PATCH Individual VNF Package Content - Method not implemented @@ -114,11 +114,11 @@ PATCH Individual VNF Package Content - Method not implemented ... 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: Clause 10.4.3.5.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.3.5.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Send PATCH Request for individual VNF Package + Send PATCH Request for individual VNF Package Content Check HTTP Response Status Code Is 405 DELETE Individual VNF Package Content - Method not implemented @@ -126,20 +126,19 @@ DELETE Individual VNF Package Content - Method not implemented ... 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: Clause 10.4.3.5.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.3.5.5 - ETSI GS NFV-SOL 003 [1] v2.7.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 + ... Post-Conditions: none + Send DELETE Request for individual VNF Package Content Check HTTP Response Status Code Is 405 - Check Postcondition VNF Package Content Exist GET Individual OnBoarded VNF Package Content [Documentation] Test ID: 7.3.3.3.11 ... Test title: GET Individual OnBoarded VNF Package Content ... Test objective: The objective is to test the retrieval of an individual OnBoarded 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: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -152,7 +151,7 @@ GET Individual OnBoarded VNF Package Content with Range Request and NFVO support ... Test title: GET Individual OnBoarded VNF Package Content with Range Request and NFVO supporting Range Requests ... Test objective: The objective is to test the retrieval of an individual OnBoarded 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: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.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 @@ -167,7 +166,7 @@ GET Individual OnBoarded VNF Package Content with Range Request and NFVO not sup ... Test title: GET Individual OnBoarded 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 OnBoarded 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: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.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 @@ -180,7 +179,7 @@ GET Individual OnBoarded VNF Package Content with invalid Range Request ... Test title: GET Individual OnBoarded VNF Package Content with invalid Range Request ... Test objective: The objective is to test that the retrieval of an individual OnBoarded 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: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.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 @@ -192,7 +191,7 @@ GET Individual OnBoarded VNF Package Content with invalid resource identifier ... Test title: GET Individual OnBoarded VNF Package Content with invalid resource identifier ... Test objective: The objective is to test that the retrieval of an individual OnBoarded VNF package content fails when using an invalid resource identifier ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -204,7 +203,7 @@ GET Individual OnBoarded VNF Package Content with conflict due to onboarding sta ... Test title: GET Individual OnBoarded 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: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -217,7 +216,7 @@ POST Individual OnBoarded VNF Package Content - Method not implemented ... Test title: POST Individual OnBoarded 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: Clause 10.4.3.5.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.3.5.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -229,7 +228,7 @@ PUT Individual OnBoarded VNF Package Content - Method not implemented ... Test title: PUT Individual OnBoarded 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: Clause 10.4.3.5.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.3.5.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -241,7 +240,7 @@ PATCH Individual OnBoarded VNF Package Content - Method not implemented ... Test title: PATCH Individual OnBoarded 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: Clause 10.4.3.5.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.3.5.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -253,10 +252,9 @@ DELETE Individual OnBoarded VNF Package Content - Method not implemented ... Test title: DELETE Individual OnBoarded 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: Clause 10.4.3.5.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.3.5.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The VNF Package content is not deleted by the failed operation + ... Post-Conditions: none Send DELETE Request for individual OnBoarded VNF Package - Check HTTP Response Status Code Is 405 - GET Individual OnBoarded VNF Package Content \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index 18bd70bcf2fff4d4052f80dc8acae6f2d2bfa299..c2475eff0c33ffb4a3d299811efe9882d78e2f4b 100644 --- a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -1,12 +1,5 @@ *** Settings *** Resource environment/variables.txt -Resource environment/subscriptions.txt -Resource environment/individualSubscription.txt -Resource environment/vnfPackages.txt -Resource environment/individualVnfPackage.txt -Resource environment/vnfPackageContent.txt -Resource environment/vnfPackageArtifacts.txt -Resource environment/vnfdInIndividualVnfPackage.txt Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library MockServerLibrary Library OperatingSystem @@ -16,14 +9,15 @@ Library Collections Library JSONSchemaLibrary schemas/ Library Process Library String - +#Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml +#Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml *** 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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} @@ -48,31 +42,31 @@ Check HTTP Response Body Does Not Contain userDefinedData 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} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/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 - @{attr} = Split String ${POS_FILTER} ,${VAR_SEPERATOR} - @{var_id} = Split String @{attr}[0] ,${SEPERATOR} - @{var_provider} = Split String @{attr}[1] ,${SEPERATOR} + @{attr} = Split String ${POS_FILTER} ${VAR_SEPARATOR} + @{var_id} = Split String @{attr}[0] ${SEPARATOR} + @{var_provider} = Split String @{attr}[1] ${SEPARATOR} Should Be True "${response['body'][0]['vnfdId']}"=="@{var_id}[1]" and "${response['body'][0]['vnfProvider']}"=="@{var_provider}[1]" 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} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?all_fields ${output}= Output response Set Suite Variable ${response} ${output} @@ -92,8 +86,8 @@ Check HTTP Response Body VnfPkgsInfo Matches the requested all_fields selector 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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -111,8 +105,8 @@ 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} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -126,12 +120,31 @@ Check HTTP Response Body vnfPkgsInfo Matches the requested fields selector Validate Json additionalArtifacts.schema.json ${additional_artifacts[0]} Log Validation for additionalArtifacts schema OK +GET VNF Packages with fields and exclude_default 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?fields=${fields}&exclude_default + ${output}= Output response + Set Suite Variable ${response} ${output} + +Check HTTP Response Body vnfPkgsInfo Matches the requested fields and exclude_default 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} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -148,52 +161,48 @@ Check HTTP Response Body vnfPkgsInfo Matches the requested exclude_fields select 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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/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} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -205,52 +214,48 @@ Check HTTP Response Body vnfPkgInfo Identifier matches the requested VNF Package 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} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/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} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/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} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/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} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/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} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -262,16 +267,26 @@ 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 + Set Headers {"Range": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET Individual VNF Package Content with explicit Range Request + Log Trying to get a VNF Package Content using RANGE using an NFVO that can handle it + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Set Headers {"Range": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/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} + Should Be Equal As Strings ${response['headers']['Content-Range']} bytes ${range}/${full_length} Log Header Content-Range is present Check HTTP Response Header Content-Length Is Present and Matches the requested range length @@ -284,93 +299,89 @@ 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 + Set Headers {"Range": "bytes=${erroneousRange}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/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}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/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}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ok} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/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 Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ko} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/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}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscription + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscription ${output}= Output response Set Suite Variable ${response} ${output} @@ -378,65 +389,77 @@ Send Post Request for VNF Package Subscription Log Trying to create a new 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 + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_uri=${callback_endpoint} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint Send Post Request for Duplicated VNF Package Subscription Log Trying to create a subscription with an already created content 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} + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_uri=${callback_endpoint} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint Send Put Request for VNF Package Subscriptions 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}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} Send Patch Request for VNF Package Subscriptions 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}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} Send Delete Request for VNF Package Subscriptions 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}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response - Set Suite Variable ${response} ${output} - -Check Postcondition VNF Package Subscriptions Exists - Log Checking that subscriptions exists - Get all VNF Package Subscriptions + Set Suite Variable ${response} ${output} Get single file VNFD in Individual VNF Package in Plain Format Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgPlainVNFD}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgPlainVNFD}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} Get VNFD in Individual VNF Package in Zip Format Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -444,8 +467,8 @@ Get single file VNFD in Individual VNF Package in Plain or Zip Format Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgPlainVNFD}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgPlainVNFD}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -453,8 +476,8 @@ Get multi file VNFD in Individual VNF Package in Plain or Zip Format Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -465,8 +488,8 @@ Check HTTP Response Header Content-Type Is Any of Get multi file VNFD in Individual VNF Package in Plain Format Log Trying to get a negative case performing a get on a VNFD from a given VNF Package present in the NFVO Catalogue. Accept will be text/plain but VNFD is composed my multiple files. Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -474,8 +497,8 @@ Get VNFD in Individual VNF Package with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${erroneousVnfPkgId}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${erroneousVnfPkgId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -483,71 +506,63 @@ Get VNFD in Individual VNF Package Content with conflict due to onboarding state Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${onboardingStateVnfPkgId}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${onboardingStateVnfPkgId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} Send POST Request for VNFD in individual VNF Package Log Trying to perform a POST. This 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}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for VNFD in individual VNF Package 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}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for VNFD in individual VNF Package 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}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for VNFD in individual VNF Package 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/${vnfPkgZipVNFD}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} -Check Postcondition VNFD Exist - Log Checking that vnf pacakge still exists - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd - Check HTTP Response Status Code Is 200 - GET Individual VNF Package Artifact Log Trying to get a VNF Package Artifact - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Individual VNF Package Artifact in octet stream format Log Trying to get a VNF Package Artifact - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageOctetStreamId}/artifacts/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageOctetStreamId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Individual VNF Package Artifact 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/${artifactPath} + Set Headers {"Range": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -555,64 +570,57 @@ GET Individual 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/${artifactPath} + Set Headers {"Range": "bytes=${erroneousRange}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Individual VNF Package Artifact with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${erroneousVnfPkgId}/artifacts/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${erroneousVnfPkgId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Artifact for 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/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${onboardingStateVnfPkgId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} Send POST Request for individual 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/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for individual 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/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for individual 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/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for individual 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/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${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/${artifactPath} - Check HTTP Response Status Code Is 200 Check HTTP Response Status Code Is [Arguments] ${expected_status} @@ -635,7 +643,7 @@ Check HTTP Response Body Is Empty Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes VNF Package Management according to filter - @{words} = Split String ${filter_ok} ,${SEPERATOR} + @{words} = Split String ${filter_ok} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['callbackUri']} @{words}[1] Check HTTP Response Body PkgmSubscription Attributes Values Match the Issued Subscription @@ -650,9 +658,9 @@ Check Postcondition VNF Package Subscription Is Set Log Check Postcondition subscription exist Log Trying to get the subscription Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${location} == Location - ... GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${response['body']['id']} + ... GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${response['body']['id']} Run Keyword If ${location} == Location ... GET ${response['headers']['Location']} ${output}= Output response @@ -661,7 +669,7 @@ Check Postcondition VNF Package Subscription Is Set Check Postcondition Subscription Resource Returned in Location Header Is Available Log Going to check postcondition - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${response['headers']['Location']} Integer response status 200 Log Received a 200 OK as expected @@ -678,80 +686,58 @@ Check Postcondition Subscription Resource Returned in Location Header Is Availab Get Individual VNF Package Subscription Log Trying to get a single subscription identified by subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} GET individual VNF Package Subscription with invalid resource identifier Log Trying to perform a request on a subscriptionID which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Package Subscription Log Trying to perform a DELETE on a subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response - Set Suite Variable ${response} ${output} - -Check Postcondition VNF Package Subscription is Deleted - Log Check Postcondition Subscription is deleted - GET individual VNF Package Subscription - Check HTTP Response Status Code Is 404 + Set Suite Variable ${response} ${output} Send Delete request for individual VNF Package Subscription with invalid resource identifier Log Trying to perform a DELETE on a subscriptionId which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual VNF Package Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${newSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for individual VNF Package Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Patch request for individual VNF Package Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - ${output}= Output response - Set Suite Variable ${response} ${output} - -Check Postcondition VNF Package Subscription is Unmodified (Implicit) - Log Check postconidtion subscription not modified - GET individual VNF Package Subscription - Log Check Response matches original VNF Threshold - ${subscription}= evaluate json.loads('''${response['body']}''') json - Should Be Equal ${origResponse['body']['id']} ${subscription.id} - Should Be Equal ${origResponse['body']['callbackUri']} ${subscription.callbackUri} - -Check Postcondition VNF Package Subscription is not Created - Log Trying to get a new subscription - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} - Check HTTP Response Status Code Is 404 Check HTTP Response Header Contains [Arguments] ${CONTENT_TYPE} @@ -768,8 +754,7 @@ Create Sessions Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri}:${callback_port} - - + Check Notification Endpoint &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 @@ -777,47 +762,47 @@ Check Notification Endpoint Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} -Check LINK in Header +Check HTTP Response Header Contain Link ${linkURL}= Get Value From Json ${response['headers']} $..Link Should Not Be Empty ${linkURL} Get all OnBoarded VNF Packages Log Trying to get all OnBoarded 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}/onboarded_vnf_packages + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} GET OnBoarded VNF Packages with attribute-based filter Log Trying to get all OnBoarded 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}/onboarded_vnf_packages?${POS_FILTER} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages?${POS_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} GET OnBoarded 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}/onboarded_vnf_packages?${NEG_FILTER} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages?${NEG_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} GET OnBoarded VNF Packages with all_fields attribute selector Log Trying to get all OnBoarded 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}/onboarded_vnf_packages?all_fields + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages?all_fields ${output}= Output response Set Suite Variable ${response} ${output} GET OnBoarded VNF Packages with exclude_default attribute selector Log Trying to get all OnBoarded 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}/onboarded_vnf_packages?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -825,8 +810,8 @@ GET OnBoarded VNF Packages with fields attribute selector Log Trying to get all OnBoarded 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}/onboarded_vnf_packages?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -834,112 +819,112 @@ GET OnBoarded VNF Packages with exclude_fields attribute selector Log Trying to get all OnBoarded 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}/onboarded_vnf_packages?exclude_fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} GET OnBoarded 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}/onboarded_vnf_package + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_package ${output}= Output response Set Suite Variable ${response} ${output} Send OnBoarded 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}/onboarded_vnf_packages + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} Send OnBoarded 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}/onboarded_vnf_packages + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} Send OnBoarded 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}/onboarded_vnf_packages + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} Send OnBoarded 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}/onboarded_vnf_packages + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} GET Individual OnBoarded VNF Package Log Trying to get a OnBoarded 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}/onboarded_vnf_packages/${vndId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId} ${output}= Output response Set Suite Variable ${response} ${output} GET Individual OnBoarded 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}/onboarded_vnf_packages/${erroneousVnfdId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${erroneousVnfdId} ${output}= Output response Set Suite Variable ${response} ${output} Send POST Request for individual OnBoarded 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}/onboarded_vnf_packages/${vndId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId} ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for individual OnBoarded 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}/onboarded_vnf_packages/${vndId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId} ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for individual OnBoarded 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}/onboarded_vnf_packages/${vndId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId} ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for individual OnBoarded 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}/onboarded_vnf_packages/${vndId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId} ${output}= Output response Set Suite Variable ${response} ${output} Get single file VNFD in Individual OnBoarded VNF Package in Plain Format Log Trying to get a VNFD from a given OnBoarded VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/onboarded_vnf_packages/${vndId}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} Get VNFD in Individual OnBoarded VNF Package in Zip Format Log Trying to get a VNFD from a given OnBoarded VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/onboarded_vnf_packages/${vndId}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -947,8 +932,8 @@ Get single file VNFD in Individual OnBoarded VNF Package in Plain or Zip Format Log Trying to get a VNFD from a given OnBoarded VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/onboarded_vnf_packages/${vndId}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -956,16 +941,16 @@ Get multi file VNFD in Individual OnBoarded VNF Package in Plain or Zip Format Log Trying to get a VNFD from a given OnBoarded VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/onboarded_vnf_packages/${vndId}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} Get multi file VNFD in Individual OnBoarded VNF Package in Plain Format Log Trying to get a negative case performing a get on a VNFD from a given VNF Package present in the NFVO Catalogue. Accept will be text/plain but VNFD is composed my multiple files. Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/onboarded_vnf_packages/${vndIdZipVnfd}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndIdZipVnfd}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -973,8 +958,8 @@ Get VNFD in Individual OnBoarded VNF Package with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/onboarded_vnf_packages/${erroneousVnfdId}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${erroneousVnfdId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -982,48 +967,48 @@ Get VNFD in Individual OnBoarded VNF Package Content with conflict due to onboar Log Trying to get a VNFD from a given OnBoarded VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/onboarded_vnf_packages/${onboardingStateVnfdId}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${onboardingStateVnfdId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} Send POST Request for VNFD in individual OnBoarded VNF Package Log Trying to perform a POST. This method should not be implemented Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/onboarded_vnf_packages/${vndId}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for VNFD in individual OnBoarded VNF Package 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}/onboarded_vnf_packages/${vndId}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for VNFD in individual OnBoarded VNF Package 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}/onboarded_vnf_packages/${vndId}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for VNFD in individual OnBoarded VNF Package 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}/onboarded_vnf_packages/${vndIdZipVnfd}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndIdZipVnfd}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} GET Individual OnBoarded 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}/onboarded_vnf_packages/${vndId}/package_content + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -1031,9 +1016,9 @@ GET Individual OnBoarded 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}/onboarded_vnf_packages/${vndId}/package_content + Set Headers {"Range": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -1041,48 +1026,48 @@ GET Individual OnBoarded 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}/onboarded_vnf_packages/${vndId}/package_content + Set Headers {"Range": "bytes=${erroneousRange}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} GET Individual OnBoarded 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}/onboarded_vnf_packages/${erroneousVnfdId}/package_content + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${erroneousVnfdId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} GET Content for OnBoarded 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}/onboarded_vnf_packages/${onboardingStateVnfdId}/package_content + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${onboardingStateVnfdId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} GET Individual OnBoarded VNF Package Artifact Log Trying to get a VNF Package Artifact - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Individual OnBoarded VNF Package Artifact in octet stream format Log Trying to get a VNF Package Artifact - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/onboarded_vnf_packages/${vnfdOctetStreamId}/artifacts/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfdOctetStreamId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Individual OnBoarded VNF Package Artifact 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}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} + Set Headers {"Range": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -1090,61 +1075,539 @@ GET Individual OnBoarded 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}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} + Set Headers {"Range": "bytes=${erroneousRange}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Individual OnBoarded VNF Package Artifact with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/onboarded_vnf_packages/${erroneousVnfdId}/artifacts/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${erroneousVnfdId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Artifact for OnBoarded 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}/onboarded_vnf_packages/${onboardingStateVnfdId}/artifacts/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${onboardingStateVnfdId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} Send POST Request for individual OnBoarded 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}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for individual OnBoarded 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}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for individual OnBoarded 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}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for individual OnBoarded 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}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get multi file VNFD in Individual OnBoarded VNF Package with security information + Log Trying to get a VNFD from a given OnBoarded VNF Package present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/vnfd/include_signatures + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get multi file VNFD in Individual VNF Package with security information + Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd/include_signatures + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET Individual VNF Package Artifact with security information + Log Trying to get a VNF Package Artifact + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vndId}/artifacts/${artifactPath}/include_signatures + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET Individual OnBoarded VNF Package Artifact with security information + Log Trying to get a VNF Package Artifact + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath}/include_signatures + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET Individual VNF Package Artifact with encrypted artifact + Log Trying to get a VNF Package Artifact + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vndEncryptedArtifactID}/artifacts/${artifactPath} + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET Individual OnBoarded VNF Package Artifact with encrypted artifact + Log Trying to get a VNF Package Artifact + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndEncryptedArtifactID}/artifacts/${artifactPath} + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET Individual VNF Package Artifact with incompatable header + Log Trying to get a VNF Package Artifact + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vndId}/artifacts/${artifactPath}/include_signatures + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET Individual OnBoarded VNF Package Artifact with incompatable header + Log Trying to get a VNF Package Artifact + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath}/include_signatures + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Manifest in Individual VNF Package + Log Trying to get content of manifest file from a given VNF Package present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Manifest in Individual VNF Package with security information + Log Trying to get a manifest from a given VNF Package present in the NFVO Catalogue with security certificates + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/manifest/include_signatures + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Manifest in Individual VNF Package with conflict due to onboarding state + Log Trying to get a manifest from a given VNF Package present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${onboardingStateVnfPkgId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send POST Request for Manifest in individual VNF Package + Log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PUT Request for Manifest in individual VNF Package + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PATCH Request for Manifest in individual VNF Package + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send DELETE Request for Manifest in individual VNF Package + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Manifest in Individual OnBoarded VNF Package + Log Trying to get content of manifest file from a given OnBoarded VNF Package present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Manifest in Individual OnBoarded VNF Package with security information + Log Trying to get a manifest from a given OnBoarded VNF Package present in the NFVO Catalogue with security certificates + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndIdZipVnfd}/manifest/include_signatures + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Manifest in Individual OnBoarded VNF Package with conflict due to onboarding state + Log Trying to get a manifest from a given OnBoarded VNF Package present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${onboardingStateVnfdId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send POST Request for Manifest in individual OnBoarded VNF Package + Log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PUT Request for Manifest in individual OnBoarded VNF Package + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PATCH Request for Manifest in individual OnBoarded VNF Package + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send DELETE Request for Manifest in individual OnBoarded VNF Package + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vndId}/manifest + ${output}= Output response + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/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_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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} + +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}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/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": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/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_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/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_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/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_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/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": "bytes=${erroneousRange}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/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_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/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_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/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_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/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_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Artifact in OnBoarded VNF Package + Log Trying to get Artifact in OnBoarded VNF Package + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Artifact in OnBoarded VNF Package with exclude_all_mano_artifacts parameter + Log Trying to get Artifact in OnBoarded VNF Package with exclude_all_mano_artifacts + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts/exclude_all_mano_artifacts + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Artifact in OnBoarded VNF Package with exclude_all_non_mano_artifacts parameter + Log Trying to get Artifact in OnBoarded VNF Package with security certificates + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts/exclude_all_non_mano_artifacts + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Artifact in OnBoarded VNF Package with select_non_mano_artifact_sets parameter + Log Trying to get Artifact in OnBoarded 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts/select_non_mano_artifact_sets=${non_mano_artifact_sets} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Artifact in OnBoarded VNF Package with include_signatures parameter + Log Trying to get Artifact in OnBoarded VNF Package with security certificates + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts/include_signatures + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Artifact in OnBoarded 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": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Artifact in OnBoarded VNF Package with exclude_all_non_mano_artifacts and select_non_mano_artifact_sets + Log Trying to get Artifact in OnBoarded VNF Package + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_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 OnBoarded VNF Package with exclude_all_non_mano_artifacts and exclude_all_mano_artifacts + Log Trying to get Artifact in OnBoarded VNF Package + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_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 OnBoarded VNF Package in onboarding state different from ONBOARDED + Log Trying to get a OnBoarded VNF Package artifact present in the NFVO Catalogue, but not in ONBOARDED operationalStatus + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${onboardingStateVnfPkgId}/artifacts + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET OnBoarded VNF Package Artifact with invalid Range Request + Log Trying to get a range of bytes of the limit of the OnBoarded 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": "bytes=${erroneousRange}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send POST Request for OnBoarded 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts ${output}= Output response Set Suite Variable ${response} ${output} -Check Postcondition OnBoarded VNF Package Artifact Exist - Log Checking that vnf pacakge still exists +Send PUT Request for OnBoarded 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}"} - GET ${apiRoot}/${apiName}/${apiVersion}/onboarded_vnf_packages/${vndId}/artifacts/${artifactPath} - Check HTTP Response Status Code Is 200 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PATCH Request for OnBoarded 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send DELETE Request for OnBoarded 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages/${vnfPackageId}/artifacts + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET OnBoarded VNF Packages with fields and exclude_default attribute selector + Log Trying to get all OnBoarded 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/onboarded_vnf_packages?fields=${fields}&exclude_default + ${output}= Output response + Set Suite Variable ${response} ${output} + +Check Postcondition VNF Package Subscription is Deleted + Log Check Postcondition Subscription is deleted + GET individual VNF Package Subscription + Check HTTP Response Status Code Is 404 + +Check HTTP Response Body of Individual VNF Package content against VNF Descriptor + Run Keyword If ${check_descriptors} == 1 Check Individual VNF Package Content + +Check Individual VNF Package Content + PARSE the Descriptor File + Match the VNF Package Response Attributes with Descriptors + +PARSE the Descriptor File + Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file + +Fetch Information from SOL001 descriptor file + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml + ${descriptor_id}= Get Variable Value ${topology_template.node_templates.properties.descriptor_id} + ${provider}= Get Variable Value ${topology_template.node_templates.properties.provider} + ${product_name}= Get Variable Value ${topology_template.node_templates.properties.product_name} + ${software_version}= Get Variable Value ${topology_template.node_templates.properties.software_version} + ${descriptor_version}= Get Variable Value ${topology_template.node_templates.properties.descriptor_version} + Set Global Variable ${Descriptor_ID} ${descriptor_id} + Set Global Variable ${Provider} ${provider} + Set Global Variable ${Product_Name} ${product_name} + Set Global Variable ${Software_Version} ${software_version} + Set Global Variable ${Descriptor_Version} ${descriptor_version} + +Fetch Information from SOL006 descriptor file + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id} + ${provider}= Get Variable Value ${nfv.vnfd[0].provider} + ${product_name}= Get Variable Value ${nfv.vnfd[0]['product-name']} + ${software_version}= Get Variable Value ${nfv.vnfd[0]['software-version']} + ${descriptor_version}= Get Variable Value ${nfv.vnfd[0].version} + Set Global Variable ${Descriptor_ID} ${descriptor_id} + Set Global Variable ${Provider} ${provider} + Set Global Variable ${Product_Name} ${product_name} + Set Global Variable ${Software_Version} ${software_version} + Set Global Variable ${Descriptor_Version} ${descriptor_version} + +Match the VNF Package Response Attributes with Descriptors + #Checking Response attributes with VNF Descriptors + Should Be Equal As Strings ${response['body']['vnfdId']} ${Descriptor_ID} + Should Be Equal As Strings ${response['body']['vnfProvider']} ${Provider} + Should Be Equal As Strings ${response['body']['vnfProductName']} ${Product_Name} + Should Be Equal As Strings ${response['body']['vnfSoftwareVersion']} ${Software_Version} + Should Be Equal As Strings ${response['body']['vnfdVersion']} ${Descriptor_Version} + + +Check HTTP Response Body of Individual Subscription content against VNF Descriptor + Run Keyword If ${check_descriptors} == 1 Check Individual VNF Subscription Content + +Check Individual VNF Subscription Content + PARSE the Descriptor File + Match the VNF subscription Response Attributes with Descriptors + +Match the VNF subscription Response Attributes with Descriptors + #Checking Response attributes with VNF Descriptors + Should Be Equal As Strings ${response['body']['filter']['vnfdId']} ${Descriptor_ID} + Should Be Equal As Strings ${response['body']['filter']['vnfProductsFromProviders'][0]['vnfProvider']} ${Provider} + Should Be Equal As Strings ${response['body']['filter']['vnfProductsFromProviders'][0]['vnfProducts'][0]['vnfProductName']} ${Product_Name} + Should Be Equal As Strings ${response['body']['filter']['vnfProductsFromProviders'][0]['vnfProducts']['versions'][0]['vnfSoftwareVersion']} ${Software_Version} + Should Be Equal As Strings ${response['body']['filter']['vnfProductsFromProviders'][0]['vnfProducts']['versions'][0]['vnfdVersion']} ${Descriptor_Version} + \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/VNFPackages.robot b/SOL003/VNFPackageManagement-API/VNFPackages.robot index 0e55fa20c42e8f90c7d53aa28e73d2a20e1aee4e..77773430de7957253c6aba18b1154781d960fd6e 100644 --- a/SOL003/VNFPackageManagement-API/VNFPackages.robot +++ b/SOL003/VNFPackageManagement-API/VNFPackages.robot @@ -1,5 +1,4 @@ *** Settings *** -Resource environment/vnfPackages.txt # VNF Packages specific parameters Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters Resource VNFPackageManagementKeywords.robot @@ -12,7 +11,7 @@ GET all VNF Packages ... Test title: GET all VNF Packages ... Test objective: The objective is to test the retrieval of all the available VNF packages information and perform a JSON schema and content validation of the collected data structure ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -28,7 +27,7 @@ GET VNF Packages with attribute-based filter ... Test title: GET VNF Packages with attribute-based filter ... Test objective: The objective is to test the retrieval of VNF packages using attribute-based filter, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued attribute-based filter ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -42,7 +41,7 @@ GET VNF Packages with invalid attribute-based filter ... Test title: GET VNF Packages with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of VNF packages fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -55,7 +54,7 @@ GET VNF Packages with "all_fields" attribute selector ... Test title: GET VNF Packages with "all_fields" attribute selector ... Test objective: The objective is to test the retrieval of VNF packages with "all_fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "all_fileds" selector ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -69,7 +68,7 @@ GET VNF Packages with "exclude_default" attribute selector ... Test title: GET VNF Packages with exclude_default attribute selector ... Test objective: The objective is to test the retrieval of VNF packages with "exclude_default" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "exclude_default" selector ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -83,7 +82,7 @@ GET VNF Packages with "fields" attribute selector ... Test title: GET VNF Packages with fields attribute selector ... Test objective: The objective is to test the retrieval of VNF packages with "fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "fields" selector ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The VNFM supports the use of fields attribute selector ... Post-Conditions: none @@ -97,7 +96,7 @@ GET VNF Packages with "exclude_fields" attribute selector ... Test title: GET VNF Packages with exclude_fields attribute selector ... Test objective: The objective is to test the retrieval of VNF packages with "exclude_fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "exclude_fields" selector ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The VNFM supports the use of exclude_fields attribute selector ... Post-Conditions: none @@ -111,7 +110,7 @@ GET all VNF Packages with invalid resource endpoint ... Test title: GET VNF Packages with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of VNF packages fails when using invalid resource endpoint ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -123,7 +122,7 @@ POST all VNF Packages - Method not implemented ... Test title: POST all VNF Packages - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create new VNF Packages ... Pre-conditions: none - ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -135,7 +134,7 @@ PUT all VNF Packages - Method not implemented ... Test title: PUT all VNF Packages - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify existing VNF Packages ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -147,7 +146,7 @@ PATCH all VNF Packages - Method not implemented ... Test title: PATCH all VNF Packages - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update existing VNF Packages ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -159,33 +158,32 @@ DELETE all VNF Packages - Method not implemented ... Test title: DELETE all VNF Packages - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete existing VNF Packages ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The VNF Packages are not deleted by the failed operation + ... Post-Conditions: none Send DELETE Request for all VNF Packages Check HTTP Response Status Code Is 405 - Check Postcondition VNF Packages Exist GET all VNF Packages as a Paged Response [Documentation] Test ID: 7.3.3.1.13 ... Test title: GET all VNF Packages as a Paged Response ... Test objective: The objective is to test the retrieval of all the available VNF packages information as a Paged Response. ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET all VNF Packages Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link GET VNF Packages - Bad Request Response too Big [Documentation] Test ID: 7.3.3.1.14 ... Test title: GET VNF Packages - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of VNF packages fails because response is too big, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -198,7 +196,7 @@ GET all OnBoarded VNF Packages ... Test title: GET all OnBoarded VNF Packages ... Test objective: The objective is to test the retrieval of all the available onboarded VNF packages information and perform a JSON schema and content validation of the collected data structure ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -214,7 +212,7 @@ GET OnBoarded VNF Packages with attribute-based filter ... Test title: GET OnBoarded VNF Packages with attribute-based filter ... Test objective: The objective is to test the retrieval of OnBoarded VNF packages using attribute-based filter, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued attribute-based filter ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -228,7 +226,7 @@ GET OnBoarded VNF Packages with invalid attribute-based filter ... Test title: GET OnBoarded VNF Packages with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of OnBoarded VNF packages fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -241,7 +239,7 @@ GET OnBoarded VNF Packages with "all_fields" attribute selector ... Test title: GET OnBoarded VNF Packages with "all_fields" attribute selector ... Test objective: The objective is to test the retrieval of OnBoarded VNF packages with "all_fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "all_fileds" selector ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 4.3.3.2.1, 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 4.3.3.2.1, 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -255,7 +253,7 @@ GET OnBoarded VNF Packages with "exclude_default" attribute selector ... Test title: GET OnBoarded VNF Packages with exclude_default attribute selector ... Test objective: The objective is to test the retrieval of OnBoarded VNF packages with "exclude_default" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "exclude_default" selector ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 4.3.3.2.1, 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 4.3.3.2.1, 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -269,7 +267,7 @@ GET OnBoarded VNF Packages with "fields" attribute selector ... Test title: GET OnBoarded VNF Packages with fields attribute selector ... Test objective: The objective is to test the retrieval of OnBoarded VNF packages with "fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "fields" selector ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 4.3.3.2.1, 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 4.3.3.2.1, 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The VNFM supports the use of fields attribute selector ... Post-Conditions: none @@ -283,7 +281,7 @@ GET OnBoarded VNF Packages with "exclude_fields" attribute selector ... Test title: GET OnBoarded VNF Packages with exclude_fields attribute selector ... Test objective: The objective is to test the retrieval of OnBoarded VNF packages with "exclude_fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "exclude_fields" selector ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 4.3.3.2.1, 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 4.3.3.2.1, 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The VNFM supports the use of exclude_fields attribute selector ... Post-Conditions: none @@ -297,7 +295,7 @@ GET all OnBoarded VNF Packages with invalid resource endpoint ... Test title: GET OnBoarded VNF Packages with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of OnBoarded VNF packages fails when using invalid resource endpoint ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -309,7 +307,7 @@ POST all OnBoarded VNF Packages - Method not implemented ... Test title: POST all OnBoarded VNF Packages - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create new OnBoarded VNF Packages ... Pre-conditions: none - ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -321,7 +319,7 @@ PUT all OnBoarded VNF Packages - Method not implemented ... Test title: PUT all OnBoarded VNF Packages - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify existing OnBoarded VNF Packages ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -333,7 +331,7 @@ PATCH all OnBoarded VNF Packages - Method not implemented ... Test title: PATCH all OnBoarded VNF Packages - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update existing OnBoarded VNF Packages ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -345,36 +343,63 @@ DELETE all OnBoarded VNF Packages - Method not implemented ... Test title: DELETE all OnBoarded VNF Packages - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete existing OnBoarded VNF Packages ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The VNF Packages are not deleted by the failed operation + ... Post-Conditions: none Send OnBoarded DELETE Request for all VNF Packages Check HTTP Response Status Code Is 405 - Check Postcondition VNF Packages Exist GET all OnBoarded VNF Packages as a Paged Response [Documentation] Test ID: 7.3.3.1.27 ... Test title: GET all OnBoarded VNF Packages as a Paged Response ... Test objective: The objective is to test the retrieval of all the available OnBoarded VNF packages information as a Paged Response. ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Get all OnBoarded VNF Packages Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link GET OnBoarded VNF Packages - Bad Request Response too Big [Documentation] Test ID: 7.3.3.1.28 ... Test title: GET OnBoarded VNF Packages - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of OnBoarded VNF packages fails because response is too big, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Get all OnBoarded VNF Packages Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file + Check HTTP Response Body Json Schema Is ProblemDetails + +GET VNF Packages with "fields" and "exclude_default" attribute selector + [Documentation] Test ID: 7.3.3.1.29 + ... Test title: GET VNF Packages with fields and exclude_default attribute selector + ... Test objective: The objective is to test the retrieval of VNF packages with "fields" and "exclude_default" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "fields" selector + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The VNFM supports the use of fields attribute selector + ... Post-Conditions: none + GET VNF Packages with fields and exclude_default attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is vnfPkgsInfo + Check HTTP Response Body vnfPkgsInfo Matches the requested fields and exclude_default selector + +GET OnBoarded VNF Packages with "fields" and "exclude_default" attribute selector + [Documentation] Test ID: 7.3.3.1.30 + ... Test title: GET OnBoarded VNF Packages with fields and exclude_default attribute selector + ... Test objective: The objective is to test the retrieval of OnBoarded VNF packages with "fields" and "exclude_default" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "fields" selector + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 4.3.3.2.1, 10.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The VNFM supports the use of fields attribute selector + ... Post-Conditions: none + GET OnBoarded VNF Packages with fields and exclude_default attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is vnfPkgsInfo + Check HTTP Response Body vnfPkgsInfo Matches the requested fields selector \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL003/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml new file mode 100644 index 0000000000000000000000000000000000000000..413d76def0e50c64c1890a8476fa7bdb22981ae3 --- /dev/null +++ b/SOL003/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -0,0 +1,167 @@ +tosca_definitions_version: tosca_simple_yaml_1_2 +description: "TST010 reference VNF-B" + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v2.7.1/etsi_nfv_sol001_vnfd_types.yaml + +metadata: + descriptor_id: "VNF-B" + vendor: "ETSI TST WG" + version: "2.0" + +node_types: + tst010.vnf.simple: + derived_from: tosca.nodes.nfv.VNF + properties: + descriptor_id: + type: string + default: VNF-B + descriptor_version: + type: string + default: '1.0' + provider: + type: string + default: ETSI TST WG + product_name: + type: string + default: VNF-B + software_version: + type: string + default: '1.0' + product_info_name: + type: string + default: VNF-B + product_info_description: + type: string + default: TST010 reference VNF-B + flavour_id: + type: string + default: VNF-B_flavor + flavour_description: + type: string + default: "VNF-B flavor" + vnfm_info: + type: list + entry_schema: + type: string + default: [ 'etsivnfm:v2.3.1' ] + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + description: Invoked upon receipt of a Scale VNF request + terminate: + description: Invoked upon receipt Terminate VNF request + operate: + description: Invoked upon receipt of an Operate VNF request + requirements: + - virtual_link_right: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_left: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_management: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 0] + +topology_template: + substitution_mappings: + node_type: "tst010.vnf.simple" + requirements: + virtual_link_right: + [right, virtual_link_right] + virtual_link_management: + [management, virtual_link_management] + virtual_link_left: + [left, virtual_link_left] + node_templates: + right: + type: "tosca.nodes.nfv.VduCp" + properties: + layer_protocols: [ ipv4 ] + order: 1 + requirements: + - virtual_binding: VDU-B + vdu-b-1-vsd: + management: + type: "tosca.nodes.nfv.VduCp" + properties: + layer_protocols: [ ipv4 ] + order: 0 + requirements: + - virtual_binding: VDU-B + vdu-b-1-vsd: + left: + type: "tosca.nodes.nfv.VduCp" + properties: + layer_protocols: [ ipv4 ] + order: 2 + requirements: + - virtual_binding: VDU-B + vdu-b-1-vsd: + type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" + properties: + virtual_block_storage_data: + size_of_storage: 20 GB + rdma_enabled: false + sw_image_data: + name: "vdu-b-1 image" + version: "1.1" + checksum: + algorithm: "sha-224" + hash: "somehashfortst010" + container_format: "bare" + disk_format: qcow2 + min_disk: '1' + min_ram: '2' + size: '1' + VDU-B: + type: "tosca.nodes.nfv.Vdu.Compute" + properties: + name: "vdu-b-1-vcd" + description: "Description of VDU-B-1" + vdu_profile: + min_number_of_instances: 1 + max_number_of_instances: 2 + capabilities: + virtual_compute: + properties: + virtual_memory: + virtual_mem_size: 4096 MB + numa_enabled: false + virtual_cpu: + num_virtual_cpu: 2 + requirements: + - virtual_storage: vdu-b-1-vsd + + vnf-b-1_VNF: + type: "tst010.vnf.simple" + properties: + descriptor_id: "VNF-B" + descriptor_version: "2.0" + provider: "ETSI TST WG" + product_name: "VDU_VNF-B" + software_version: "2.0" + product_info_name: "VDU_VNF-B" + product_info_description: "TST010 reference VNF-A" + flavour_id: "VNF-B_flavor" + flavour_description: "VNF-B flavor" + vnfm_info: + - etsivnfm:v2.3.1 + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + implementation: scale-example.yaml + terminate: + implementation: terminate-example.yaml + operate: + implementation: operate-example.yaml \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/descriptors/SOL006/VNFD/vnfd_SOL006.yaml b/SOL003/VNFPackageManagement-API/descriptors/SOL006/VNFD/vnfd_SOL006.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d902779a2d42d34a9f93513512d8a485dc1d838b --- /dev/null +++ b/SOL003/VNFPackageManagement-API/descriptors/SOL006/VNFD/vnfd_SOL006.yaml @@ -0,0 +1,137 @@ +nfv: + vnfd: + - id: VNF-B-2vdu + provider: ETSI TST WG + product-name: TST010 reference VNF-B with 2 VDUs + software-version: '2.2' + version: '2.2' + vnfm-info: ETSI VNFM + vdu: + - id: vdu-b-1 + name: VNF-B VDU 1 + int-cpd: + - id: left + layer-protocol: ethernet + - id: management + layer-protocol: ethernet + - id: internal + layer-protocol: ethernet + int-virtual-link-desc: internal-vl + virtual-compute-desc: vdu-b-1-vcd + virtual-storage-desc: vdu-b-1-vsd + sw-image-desc: vdu-b-1-image + - id: vdu-b-2 + name: VNF-B VDU 2 + int-cpd: + - id: right + layer-protocol: ethernet + - id: management + layer-protocol: ethernet + - id: internal + layer-protocol: ethernet + int-virtual-link-desc: internal-vl + virtual-compute-desc: vdu-b-2-vcd + virtual-storage-desc: vdu-b-2-vsd + sw-image-desc: vdu-b-2-image + virtual-compute-desc: + id: vdu-b-1-vcd + virtual-memory: + size: '4.0' + virtual-cpu: + num-virtual-cpu: '2' + virtual-storage-desc: + id: vdu-b-1-vsd + type-of-storage: root-storage + size-of-storage: '0' + sw-image-desc: + id: vdu-b-1-image + name: VNF-B image + version: '1.1' + checksum: + algorithm: sha-224 + hash: somehashfortst010 + container-format: bare + disk-format: qcow2 + min-disk: '1' + min-ram: '2.0' + size: '1' + image: 'http://someurl.com/VNF-B.qcow2' + virtual-compute-desc: + id: vdu-b-2-vcd + virtual-memory: + size: '6.0' + virtual-cpu: + num-virtual-cpu: '2' + virtual-storage-desc: + id: vdu-b-2-vsd + type-of-storage: root-storage + size-of-storage: '0' + sw-image-desc: + id: vdu-b-2-image + name: VNF-B-2 image + version: '1.1' + checksum: + algorithm: sha-224 + hash: somehashfortst010 + container-format: bare + disk-format: qcow2 + min-disk: '1' + min-ram: '2.0' + size: '1' + image: 'http://someurl.com/VNF-B-2.qcow2' + int-virtual-link-desc: + - id: internal-vl + flavour: + id: internal-vl-flavour + qos: + latency: '1' + packet-delay-variation: '1' + packet-loss-ratio: '0.05' + connectivity-type: + layer-protocol: ethernet + ext-cpd: + - id: ext-b-left + int-cpd: + vdu-id: vdu-b-1 + cpd: left + layer-protocol: ethernet + - id: management + int-cpd: + vdu-id: vdu-b-1 + cpd: management + layer-protocol: ethernet + - id: ext-b-right + int-cpd: + vdu-id: vdu-b-2 + cpd: right + layer-protocol: ethernet + df: + id: normal + vdu-profile: + - id: vdu-b-1 + min-number-of-instances: '1' + max-number-of-instances: '2' + - id: vdu-b-2 + min-number-of-instances: '1' + max-number-of-instances: '4' + instantiation-level: + - id: double + vdu-level: + - vdu-id: vdu-b-1 + number-of-instances: '2' + - vdu-id: vdu-b-2 + number-of-instances: '2' + - id: single + vdu-level: + - vdu-id: vdu-b-1 + number-of-instances: '1' + - vdu-id: vdu-b-2 + number-of-instances: '1' + default-instantiation-level: single + lcm-operations-configuration: + scale-vnf-to-level-op-config: + arbitrary-target-levels-supported: 'true' + terminate-vnf-op-config: + min-graceful-termination: '1' + operate-vnf-op-config: + min-graceful-stop-timeout: '1' \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/environment/individualSubscription.txt b/SOL003/VNFPackageManagement-API/environment/individualSubscription.txt deleted file mode 100644 index caf1c582e27a28d0e6af0d90e9e9561a2746c177..0000000000000000000000000000000000000000 --- a/SOL003/VNFPackageManagement-API/environment/individualSubscription.txt +++ /dev/null @@ -1,6 +0,0 @@ -*** Variables *** -${subscriptionId} f3ae6df7-07e1-47c9-8924-9ebe10343586 -${erroneousSubscriptionId} 442e3ee5-0499-4849-9b31-eb91ce1638f1 # Not existing ID on the subscriptions -${newSubscriptionId} newSubsciptionId -${response} httpresponse -${origResponse} httpresponse diff --git a/SOL003/VNFPackageManagement-API/environment/individualVnfPackage.txt b/SOL003/VNFPackageManagement-API/environment/individualVnfPackage.txt deleted file mode 100644 index 43f793bdd4995eeea4e5e3cc8954c904c7fdd3e6..0000000000000000000000000000000000000000 --- a/SOL003/VNFPackageManagement-API/environment/individualVnfPackage.txt +++ /dev/null @@ -1,3 +0,0 @@ -*** Variables *** -${erroneousVnfPackageId} erroneousVnfPackageId # Given ID for vnfPkg not present in database -${erroneousVnfdId} erroneousVnfdId \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/environment/subscriptions.txt b/SOL003/VNFPackageManagement-API/environment/subscriptions.txt deleted file mode 100644 index ca34ee831fbdd3dd3727821ab00ee81d82c00fc6..0000000000000000000000000000000000000000 --- a/SOL003/VNFPackageManagement-API/environment/subscriptions.txt +++ /dev/null @@ -1,7 +0,0 @@ -*** Variables *** -${filter_ok} callbackUri=http://172.22.1.7:9091/vnfpkgm/subscriptions -${filter_ko} nfvId=f9f130e4-05eb-4082-a676-4c97d13a883d # Not existant filter attribute-based -${callbackUri} http://172.22.1.7:9091/vnfpkgm/subscriptions -${total_polling_time} 2 min -${polling_interval} 10 sec -${SEPERATOR} = \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/environment/variables.txt b/SOL003/VNFPackageManagement-API/environment/variables.txt index 460aa79d15b58d9131e98e55bfdd9543e579278b..18ab0c53a07d6b272e647cb138ca11227801acb6 100644 --- a/SOL003/VNFPackageManagement-API/environment/variables.txt +++ b/SOL003/VNFPackageManagement-API/environment/variables.txt @@ -2,7 +2,8 @@ ${NFVO_HOST} localhost # Hostname of the NFVO ${NFVO_PORT} 8081 # Listening port of the NFVO ${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${ACCEPT_JSON} application/json ${AUTH_USAGE} 1 ${CONTENT_TYPE_JSON} application/json @@ -15,14 +16,14 @@ ${onboardingStateVnfPkgId} f9f130e4-05eb-4082-a676-4c97d13a883d ${onboardingStateVnfdId} f9f130e4-05eb-4082-a676-4c97d13a883d ${apiRoot} / -${apiVersion} v1 +${apiMajorVersion} v1 ${apiName} vnfpkgm ${NFVO_CHECKS_NOTIF_ENDPOINT} 1 ## If true, during subscription, the FUT performs a get to the notification endpoint ${NFVO_ALLOWS_DUPLICATE_SUBS} 1 -${response} +${response} httpresponse ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar @@ -37,4 +38,65 @@ ${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} + + +${subscriptionId} f3ae6df7-07e1-47c9-8924-9ebe10343586 +${erroneousSubscriptionId} 442e3ee5-0499-4849-9b31-eb91ce1638f1 # Not existing ID on the subscriptions +${newSubscriptionId} newSubsciptionId + +${origResponse} httpresponse + + +${erroneousVnfPackageId} erroneousVnfPackageId # Given ID for vnfPkg not present in database +${erroneousVnfdId} erroneousVnfdId + + +${filter_ok} callbackUri=http://172.22.1.7:9091/vnfpkgm/subscriptions +${filter_ko} nfvId=f9f130e4-05eb-4082-a676-4c97d13a883d # Not existant filter attribute-based +${SEPARATOR} = + + +${ACCEPT_PLAIN} text/plain +${CONTENT_TYPE_PLAIN} text/plain +${vnfPkgPlainVNFD} c26ad7fb-072b-48c4-a663-7d71646d9e98 # The VNF Pakcage contains a VNFD which is a Single Plain File +${ACCEPT_ZIP} application/zip +${CONTENT_TYPE_ZIP} application/zip +${vnfPkgZipVNFD} f5b220d4-6177-4ebb-a554-a43311e16075 # The VNF Package contains a VNFD composed by multiple files +${erroneousVnfPkgId} erroneousVnfPackageId # Given ID for vnfPkg not present in database +${vndIdZipVnfd} f5b220d4-6177-4ebb-a554-a43311e16075 + + +${artifactPath} artifactPath +${CONTENT_TYPE_OCTET} application/octet-stream +${NFVO_RANGE_OK} 1 # If 1 means that Range is supported by the NFVO +${range} 0-1023 +${full_length} 2000 # Size of the requested artifact to be downloaded via partial downloads +${length} 1024 # Size of the requested range +${erroneousRange} 10000000-1000000000 # Requesting a out of range number of bytes +${vnfPackageOctetStreamId} octetStreamPkgId +${vnfdOctetStreamId} octetStreamVnfdId +${vndEncryptedArtifactID} encryptedId + + +${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 +${VAR_SEPARATOR} & + +${callbackResp} localhost + +${descriptorType} SOL001 +${check_descriptors} 1 + +${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder + +${Descriptor_ID} +${Provider} +${Product_Name} +${Software_Version} +${Descriptor_Version} +${Flavour_ID} diff --git a/SOL003/VNFPackageManagement-API/environment/vnfPackageArtifacts.txt b/SOL003/VNFPackageManagement-API/environment/vnfPackageArtifacts.txt deleted file mode 100644 index d18ef5961aeb65da0b14f831716a9dc9b7b9c3b7..0000000000000000000000000000000000000000 --- a/SOL003/VNFPackageManagement-API/environment/vnfPackageArtifacts.txt +++ /dev/null @@ -1,9 +0,0 @@ -*** Variables *** -${artifactPath} artifactPath -${CONTENT_TYPE_OCTET} application/octet-stream -${NFVO_RANGE_OK} 1 # If 1 means that Range is supported by the NFVO -${range} bytes=0-1023 -${erroneousRange} bytes=10000000-1000000000 # Requesting a out of range number of bytes -${erroneousVnfPkgId} erroneousPkgId -${vnfPackageOctetStreamId} octetStreamPkgId -${vnfdOctetStreamId} octetStreamVnfdId diff --git a/SOL003/VNFPackageManagement-API/environment/vnfPackageContent.txt b/SOL003/VNFPackageManagement-API/environment/vnfPackageContent.txt deleted file mode 100644 index 1fd004bfd7248c4c637c50524c3738628e4f2bca..0000000000000000000000000000000000000000 --- a/SOL003/VNFPackageManagement-API/environment/vnfPackageContent.txt +++ /dev/null @@ -1,8 +0,0 @@ -*** Variables *** -${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 diff --git a/SOL003/VNFPackageManagement-API/environment/vnfPackages.txt b/SOL003/VNFPackageManagement-API/environment/vnfPackages.txt deleted file mode 100644 index ff87485e017f6ead1e9f0ab3dc53f5d7c1eb25f6..0000000000000000000000000000000000000000 --- a/SOL003/VNFPackageManagement-API/environment/vnfPackages.txt +++ /dev/null @@ -1,7 +0,0 @@ -*** Variables *** -${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 -${SEPERATOR} = -${VAR_SEPERATOR} & \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/environment/vnfdInIndividualVnfPackage.txt b/SOL003/VNFPackageManagement-API/environment/vnfdInIndividualVnfPackage.txt deleted file mode 100644 index b1100153bf1503d21fcafeec0c2f45f7ba0723ea..0000000000000000000000000000000000000000 --- a/SOL003/VNFPackageManagement-API/environment/vnfdInIndividualVnfPackage.txt +++ /dev/null @@ -1,9 +0,0 @@ -*** Variables *** -${ACCEPT_PLAIN} text/plain -${CONTENT_TYPE_PLAIN} text/plain -${vnfPkgPlainVNFD} c26ad7fb-072b-48c4-a663-7d71646d9e98 # The VNF Pakcage contains a VNFD which is a Single Plain File -${ACCEPT_ZIP} application/zip -${CONTENT_TYPE_ZIP} application/zip -${vnfPkgZipVNFD} f5b220d4-6177-4ebb-a554-a43311e16075 # The VNF Package contains a VNFD composed by multiple files -${erroneousVnfPkgId} erroneousVnfPackageId # Given ID for vnfPkg not present in database -${vndIdZipVnfd} f5b220d4-6177-4ebb-a554-a43311e16075 diff --git a/SOL003/VNFPackageManagement-API/jsons/PkgmSubscription.json b/SOL003/VNFPackageManagement-API/jsons/PkgmSubscription.json deleted file mode 100644 index c01e92b484e9305f89fbd1a54db3d69ea514695c..0000000000000000000000000000000000000000 --- a/SOL003/VNFPackageManagement-API/jsons/PkgmSubscription.json +++ /dev/null @@ -1,414 +0,0 @@ -[ - { - "id": "ABCDEFGHIJKL", - "callbackUri": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "_links": { - "self": { - "href": "ABCDEFGHIJKLMNOPQR" - } - }, - "filter": { - "notificationTypes": [ - "VnfPackageChangeNotification" - ], - "vnfProductsFromProviders": [ - { - "vnfProvider": "ABCDEFGHIJKLMNOPQRSTUVW", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGHIJKLMNOPQRSTUVWX", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQ", - "ABCDE" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXYZA", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ] - } - ] - }, - { - "vnfProductName": "ABCDEFGHIJKLM", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMN", - "vnfdVersions": [ - "ABCDEF", - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "vnfdVersions": [ - "ABCDEFGHIJKLMNO", - "ABCDEFGH", - "ABCDEF" - ] - }, - { - "vnfSoftwareVersion": "ABCD", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXY", - "ABCDEFGHIJ", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRST", - "vnfdVersions": [ - "ABCDEFG", - "ABCDEFGHIJKLMNOPQRSTU" - ] - } - ] - } - ] - }, - { - "vnfProvider": "ABCDEF", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGH", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRST", - "vnfdVersions": [ - "ABCDE", - "ABCDE", - "ABCDEFGHIJKLMNOPQR" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWX", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOP" - ] - } - ] - }, - { - "vnfProductName": "ABCDE", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNO", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJ", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRS" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJK", - "vnfdVersions": [ - "ABCD" - ] - }, - { - "vnfSoftwareVersion": "ABCD", - "vnfdVersions": [ - "ABCDEFGHIJKL", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ] - } - ] - }, - { - "vnfProductName": "ABCD", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRST", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQ", - "ABCDEFGHIJKL" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXY", - "vnfdVersions": [ - "ABCDEF", - "ABCDEFGHIJKLMNOPQRST" - ] - }, - { - "vnfSoftwareVersion": "ABCDEF", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLMNOPQR", - "ABCDEFGHIJKLMNOP" - ] - } - ] - } - ] - } - ], - "vnfdId": [ - "ABCDEFGHIJKLMNOPQRS", - "ABCDEFGHIJKLMNO", - "ABCDEFGHIJKLM", - "ABCDEFGHIJK" - ], - "vnfPkgId": [ - "ABCDEFGH", - "ABCDEFGHIJKLMNOPQ", - "ABCDE", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ], - "operationalState": "DISABLED", - "usageState": {} - } - }, - { - "id": "ABCDE", - "callbackUri": "ABCDEFGHIJKLM", - "_links": { - "self": { - "href": "ABCDEFGHIJKLMNOPQRSTU" - } - }, - "filter": { - "notificationTypes": [ - "VnfPackageOnboardingNotification", - "VnfPackageOnboardingNotification", - "VnfPackageOnboardingNotification" - ], - "vnfProductsFromProviders": [ - { - "vnfProvider": "ABCDEFGH", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGHIJKLMNOPQRSTUV", - "versions": [ - { - "vnfSoftwareVersion": "ABCD", - "vnfdVersions": [ - "ABCDEFGHIJKLMN", - "ABCDEFGHIJKLMNOPQRSTUVW", - "ABCDE", - "ABCDEFGHIJKLMNOPQRS" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRS" - ] - } - ] - }, - { - "vnfProductName": "ABCDEFGHIJKLMN", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOP", - "vnfdVersions": [ - "ABCDEFGHIJ", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLMNOPQRSTUVWX", - "ABCDEFGHIJKLMNOPQR" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMN", - "vnfdVersions": [ - "ABCDEFGHIJKLMNO", - "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "ABCDEFGHIJKLMNOPQRSTUVW" - ] - }, - { - "vnfSoftwareVersion": "ABCDEF", - "vnfdVersions": [ - "ABCDEFGHIJKLM", - "ABCDE", - "ABCDEFGHIJKLMNOPQRSTUVWXYZA" - ] - } - ] - } - ] - }, - { - "vnfProvider": "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGHIJKLMNOPQ", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXY", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQ", - "ABCDE" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMN", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWX", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ] - } - ] - }, - { - "vnfProductName": "ABCDEFGHIJKLMNOP", - "versions": [ - { - "vnfSoftwareVersion": "ABCD", - "vnfdVersions": [ - "ABCDEFGH", - "ABCDEFGHIJKLMN", - "ABCDEFGHIJKLMNOP" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLM", - "vnfdVersions": [ - "ABCDEFGHIJKLM", - "ABCDEFGH" - ] - } - ] - } - ] - } - ], - "vnfdId": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLM", - "ABCDEFGHIJKLMNOPQRS", - "ABCDEFGHIJKL" - ], - "vnfPkgId": [ - "ABCDEFGHIJKLMNOPQRSTUVWXY" - ], - "operationalState": "DISABLED", - "usageState": {} - } - }, - { - "id": "ABCDEF", - "callbackUri": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "_links": { - "self": { - "href": "ABCDEFGHIJKLMNOPQ" - } - }, - "filter": { - "notificationTypes": [ - "VnfPackageChangeNotification", - "VnfPackageOnboardingNotification", - "VnfPackageChangeNotification", - "VnfPackageOnboardingNotification" - ], - "vnfProductsFromProviders": [ - { - "vnfProvider": "ABCDEFGHIJKL", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGHIJK", - "versions": [ - { - "vnfSoftwareVersion": "ABCDE", - "vnfdVersions": [ - "ABCDEFGHI", - "ABCDEFGHIJKLMNOPQRS", - "ABCDEFGHIJKLMNOPQR" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWX", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWX", - "ABCDEFG", - "ABCDEFGHIJKLMNOPQRSTUVW", - "ABCDEFGHIJKLMNOPQRSTUVWXY" - ] - } - ] - } - ] - }, - { - "vnfProvider": "ABCDEFGHI", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGHIJ", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKL", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZA", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKL", - "ABCDEFGHIJKLMNOPQR" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQ", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLMNOPQRSTU", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLMN" - ] - } - ] - } - ] - }, - { - "vnfProvider": "ABCDEFGHIJKLMNOPQRSTUVWXYZA", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGH", - "versions": [ - { - "vnfSoftwareVersion": "ABCDE", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLMNOPQRS", - "ABCDEFGHIJKLMNOPQRST" - ] - } - ] - } - ] - } - ], - "vnfdId": [ - "ABCDEFGHIJKLMNOP", - "ABCDEFGHIJKLMNOPQRSTUVWXYZA" - ], - "vnfPkgId": [ - "ABCDEFGHIJKLMNOPQRSTUVW", - "ABCDEFGHIJKLMNOPQ", - "ABCDEFGHIJKLMN" - ], - "operationalState": "ENABLED", - "usageState": [ - 773, - [ - {}, - [ - false, - true - ], - null, - null - ] - ] - } - } -] \ No newline at end of file diff --git a/SOL003/VNFPackageManagement-API/jsons/VnfPackageChangeNotification.json b/SOL003/VNFPackageManagement-API/jsons/VnfPackageChangeNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..bcea9b7a0fd0b7aca60f772a55d60eda66e97dd3 --- /dev/null +++ b/SOL003/VNFPackageManagement-API/jsons/VnfPackageChangeNotification.json @@ -0,0 +1,10 @@ +{{ + "id":"", + "notificationType":"VnfPackageChangeNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "vnfPkgId":"{indicatorId} ", + "vnfdId":"{vndId}", + "changeType":"PKG_DELETE", + "_links":"" +}} diff --git a/SOL003/VNFPackageManagement-API/jsons/VnfPackageOnboardingNotification.json b/SOL003/VNFPackageManagement-API/jsons/VnfPackageOnboardingNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..f9b87c055cc9a43d45416870c028f4a953752aa5 --- /dev/null +++ b/SOL003/VNFPackageManagement-API/jsons/VnfPackageOnboardingNotification.json @@ -0,0 +1,9 @@ +{{ + "id":"", + "notificationType":"VnfPackageOnboardingNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "vnfPkgId":"{indicatorId} ", + "vnfdId":"{vndId}", + "_links":"" +}} diff --git a/SOL003/VNFPackageManagement-API/jsons/subscriptions.json b/SOL003/VNFPackageManagement-API/jsons/subscriptions.json index 1d5927979bd417a1d1582b05b6daabe5e0c4fa71..42d0689a0f9d60aec42c28ef437bfefe5a526959 100644 --- a/SOL003/VNFPackageManagement-API/jsons/subscriptions.json +++ b/SOL003/VNFPackageManagement-API/jsons/subscriptions.json @@ -1,3 +1,3 @@ -{ - "callbackUri": "http://172.22.1.7:9091/vnfpkgm/subscriptions" -} \ No newline at end of file +{{ + "callbackUri": "{callback_uri}:{callback_port}{callback_endpoint}" +}} \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/ApiVersion.robot b/SOL003/VNFPerformanceManagement-API/ApiVersion.robot index efc29bcee7b6b013e98a62a0ed873aaa2ed50bed..38ce2dbc4d0b72ed9fd9203ffe89fefa576c693e 100644 --- a/SOL003/VNFPerformanceManagement-API/ApiVersion.robot +++ b/SOL003/VNFPerformanceManagement-API/ApiVersion.robot @@ -1,214 +1,214 @@ -*** Settings *** - -Resource environment/variables.txt - -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Library DependencyLibrary -Library JSONLibrary -Library JSONSchemaLibrary schemas/ - -*** Test Cases *** -POST API Version - Method not implemented - [Documentation] Test ID: 7.3.4.9.1 - ... Test title: POST API version - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version - [Documentation] Test ID: 7.3.4.9.2 - ... Test title: GET API Version - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version - Method not implemented - [Documentation] Test ID: 7.3.4.9.3 - ... Test title: PUT API Version - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version - Method not implemented - [Documentation] Test ID: 7.3.4.9.4 - ... Test title: PATCH API Version - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version - Method not implemented - [Documentation] Test ID: 7.3.4.9.5 - ... Test title: DELETE API Version - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -POST API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.4.9.6 - ... Test title: POST API version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version with apiMajorVerion - [Documentation] Test ID: 7.3.4.9.7 - ... Test title: GET API Version with apiMajorVerion - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.4.9.8 - ... Test title: PUT API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.4.9.9 - ... Test title: PATCH API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.4.9.10 - ... Test title: DELETE API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -*** Keywords *** -POST API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response['body']} +*** Settings *** + +Resource environment/variables.txt + +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 7.3.4.9.1 + ... Test title: POST API version - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 7.3.4.9.2 + ... Test title: GET API Version + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version - Method not implemented + [Documentation] Test ID: 7.3.4.9.3 + ... Test title: PUT API Version - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 7.3.4.9.4 + ... Test title: PATCH API Version - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 7.3.4.9.5 + ... Test title: DELETE API Version - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +POST API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.4.9.6 + ... Test title: POST API version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 7.3.4.9.7 + ... Test title: GET API Version with apiMajorVerion + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.4.9.8 + ... Test title: PUT API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.4.9.9 + ... Test title: PATCH API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.4.9.10 + ... Test title: DELETE API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot b/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot index 60129e126f77ae39e71ca79cc607cb9447352ea7..bbe425897991b040c26be786a06969cbe96ce5dd 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot @@ -1,8 +1,8 @@ *** Settings *** +Library OperatingSystem Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters Library JSONLibrary -Resource environment/IndividualPmJob.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false *** Test Cases *** @@ -11,7 +11,7 @@ GET individual VNF Performance Job ... Test title: Get individual VNF Performance Job ... Test objective: The objective is to test the retrieval of an individual VNF performance monitoring job and perform a JSON schema and content validation of the collected job data structure ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -25,7 +25,7 @@ GET individual VNF Performance Job with invalid resource identifier ... Test title: Get individual VNF Performance Job with invalid resource identifier ... Test objective: The objective is to test that the retrieval of an individual VNF performance monitoring job fails when using an invalid resource identifier, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -38,7 +38,7 @@ DELETE Individual VNF Performance Job ... Test title: Delete Individual VNF Performance Job ... Test objective: The objective is to test the deletion of an individual VNF performance monitoring job ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Job is no more available in the VNFM @@ -51,117 +51,131 @@ DELETE Individual VNF Performance Job with invalid resource identifier ... Test title: Delete individual VNF Performance Job with invalid resource identifier ... Test objective: The objective is to test that the deletion of an individual VNF performance monitoring job fails when using an invalid resource identifier ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Send Delete request for individual VNF Performance Job with invalid resource identifier Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails POST Individual VNF Performance Job - Method not implemented [Documentation] Test ID: 7.3.4.2.5 ... Test title: POST Individual VNF Performance Job - method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new VNF Performance Monitoring Job ... Pre-conditions: A VNF instance is instantiated - ... Reference: Clause 6.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The VNF Performance Job is not created on the VNFM + ... Post-Conditions: none Send Post request for individual VNF Performance Job Check HTTP Response Status Code Is 405 - Check Postcondition VNF Performance Job is not Created PUT Individual VNF Performance Job - Method not implemented [Documentation] Test ID: 7.3.4.2.6 ... Test title: PUT Individual VNF Performance Job - method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing VNF Performance Monitoring Job ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The VNF Performance Job is not modified by the operation + ... Post-Conditions: none Send Put request for individual VNF Performance Job Check HTTP Response Status Code Is 405 - Check Postcondition VNF Performance Job is Unmodified (Implicit) -PATCH Individual VNF Performance Job - Method not implemented +PATCH Individual VNF Performance Job [Documentation] Test ID: 7.3.4.2.7 - ... Test title: PATCH Individual VNF Performance Job - method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing new VNF Performance Monitoring Job + ... Test title: PATCH Individual VNF Performance Job + ... Test objective: The objective is to test that PATCH method allows to modify individual performace management job ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The VNF Performance Job is not modified by the operation + ... Post-Conditions: Send Patch request for individual VNF Performance Job - Check HTTP Response Status Code Is 405 - Check Postcondition VNF Performance Job is Unmodified (Implicit) + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PMJobModifications +PATCH Individual VNF Performance Job - Precondition failed + [Documentation] Test ID: 7.3.4.2.8 + ... Test title: PATCH Individual VNF Performance Job - Precondition failed + ... Test objective: The objective is to attempt to Modify an individual alarm resource, where the precondition was not met. + ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. + ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: The VNF Performance Job is not modified by the operation + Send Patch request for individual VNF Performance Job + Check HTTP Response Status Code Is 412 + Check HTTP Response Body Json Schema Is ProblemDetails + Check Postcondition VNF Performance Job is Unmodified (Implicit) *** Keywords *** GET individual VNF Performance Job Log Trying to get a Pm Job present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${output}= Output response Set Suite Variable ${response} ${output} GET individual VNF Performance Job with invalid resource identifier Log Trying to perform a negative get, using erroneous PM Job identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${erroneousPmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${erroneousPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Job Log Trying to delete an existing PM Job Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Job with invalid resource identifier Log Trying to perform a negative delete, using erroneous PM Job identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${erroneousPmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${erroneousPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual VNF Performance Job 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}/pm_jobs/${newPmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${newPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for individual VNF Performance Job 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}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PUT ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${output}= Output response Set Suite Variable ${response} ${output} Send Patch request for individual VNF Performance Job - 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}/pm_jobs/${pmJobId} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body}= Get File jsons/PMJobModifications.json + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${body} + ${output}= Output response Set Suite Variable ${response} ${output} Check Postcondition VNF Performance Job is not Created Log Trying to get a new Pm Job Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${newPmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${newPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 404 diff --git a/SOL003/VNFPerformanceManagement-API/IndividualReport.robot b/SOL003/VNFPerformanceManagement-API/IndividualReport.robot index 6a4de49d01024870148d270a4e370759df061bfa..e029d6cbefb313117bc79bc466a3f57053ef024a 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualReport.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualReport.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/reports.txt Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -11,7 +10,7 @@ Get Individual Performance Report ... Test title: Get Individual Performance Report ... Test objective: The objective is to test the retrieval of an individual VNF performance report associated to a monitoring job and perform a JSON schema validation of the collected report data structure ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM. - ... Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -24,136 +23,113 @@ Get Individual Performance Report with invalid resource endpoint ... Test title: Get Individual Performance Report with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of an individual VNF performance report associated to a monitoring job fails when using an invalid resource endpoint ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM. - ... Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Get Individual Performance Report with invalid resource endpoint Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails POST Individual Performance Report - Method not implemented [Documentation] Test ID: 7.3.4.3.3 ... Test title: POST Individual Performance Report - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new VNF performance report within a monitoring job ... Pre-conditions: A VNF instance is instantiated. - ... Reference: Clause 6.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The VNF performance report is not created on the VNFM + ... Post-Conditions: none Send Post request for Individual Performance Report Check HTTP Response Status Code Is 405 - Check Postcondition VNF Individual Performance Report is not Created PUT Individual Performance Report - Method not implemented [Documentation] Test ID: 7.3.4.3.4 ... Test title: PUT Individual Performance Report - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing VNF performance report within a monitoring job ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM. - ... Reference: Clause 6.4.4.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.4.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The VNF performance report is not modified by the operation + ... Post-Conditions: none Send Put request for Individual Performance Report Check HTTP Response Status Code Is 405 - Check Postcondition VNF Individual Performance Report is Unmodified (Implicit) PATCH Individual Performance Report - Method not implemented [Documentation] Test ID: 7.3.4.3.5 ... Test title: PATCH Individual Performance Report - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing VNF performance report within a monitoring job ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM. - ... Reference: Clause 6.4.4.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.4.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The VNF performance report is not modified by the operation + ... Post-Conditions: none Send Patch request for Individual Performance Report Check HTTP Response Status Code Is 405 - Check Postcondition VNF Individual Performance Report is Unmodified (Implicit) DELETE Individual Performance Report - Method not implemented [Documentation] Test ID: 7.3.4.3.6 ... Test title: DELETE Individual Performance Report - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete an existing VNF performance report within a monitoring job ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM. - ... Reference: Clause 6.4.4.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.4.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The VNF performance report is not deleted by the operation + ... Post-Conditions: none Send Delete request for Individual Performance Report Check HTTP Response Status Code Is 405 - Check Postcondition VNF Individual Performance Report Exists *** Keywords *** Get Individual Performance Report Log Trying to get a performance report present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} Get Individual Performance Report with invalid resource endpoint Log Trying to get a performance report with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${erroneousReportId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${erroneousReportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for Individual Performance Report Log Trying to create new performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${newReportId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${newReportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for Individual Performance Report Log Trying to update performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PUT ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Patch request for Individual Performance Report Log Trying to update performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for Individual Performance Report Log Trying to delete performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} -Check Postcondition VNF Individual Performance Report Exists - Log Checking that report still exists - Get Individual Performance Report - -Check Postcondition VNF Individual Performance Report is not Created - Log Trying to get a new report - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${newReportId} - ${output}= Output response - Set Suite Variable ${response} ${output} - Check HTTP Response Status Code Is 404 - -Check Postcondition VNF Individual Performance Report is Unmodified (Implicit) - Log Check Postcondition VNF PM job is not modified - Get Individual Performance Report - Log Check Response matches original VNF report - ${report}= evaluate json.loads('''${response['body']}''') json - Should Be Equal ${origResponse['body']['entries'][0]['objectInstanceId']} ${report['entries'][0]['objectInstanceId']} - Check HTTP Response Status Code Is [Arguments] ${expected_status} ${status}= Convert To Integer ${expected_status} diff --git a/SOL003/VNFPerformanceManagement-API/IndividualSubscription.robot b/SOL003/VNFPerformanceManagement-API/IndividualSubscription.robot deleted file mode 100644 index 2a5bf91ae72c3d52002277c9db4c3e7fa0bd1dfe..0000000000000000000000000000000000000000 --- a/SOL003/VNFPerformanceManagement-API/IndividualSubscription.robot +++ /dev/null @@ -1,100 +0,0 @@ -*** Settings *** -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt # Generic Parameters -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Library OperatingSystem -Library JSONLibrary -Resource environment/individualSubscription.txt -Resource VNFPerformanceManagementKeywords.robot - -*** Test Cases *** -GET Individual VNF Performance Subscription - [Documentation] Test ID: 7.3.4.7.1 - ... Test title: GET Individual VNF Performance Subscription - ... Test objective: The objective is to test the retrieval of individual VNF performance subscription and perform a JSON schema and content validation of the returned subscription data structure - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.8.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Get Individual VNF Performance Subscription - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is PmSubscription - Check HTTP Response Body Subscription Identifier matches the requested Subscription - -GET Individual VNF Performance Subscription with invalid resource identifier - [Documentation] Test ID: 7.3.4.7.2 - ... Test title: GET Individual VNF Performance Subscription with invalid resource identifier - ... Test objective: The objective is to test that the retrieval of an individual VNF performance subscription fails when using an invalid resource identifier - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.8.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET individual VNF Performance Subscription with invalid resource identifier - Check HTTP Response Status Code Is 404 - -DELETE Individual VNF Performance Subscription - [Documentation] Test ID: 7.3.4.7.3 - ... Test title: DELETE Individual VNF Performance Subscription - ... Test objective: The objective is to test the deletion of an individual VNF performance subscription - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.8.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: The VNF Performance Subscription is not available anymore in the VNFM - Send Delete request for individual VNF Performance Subscription - Check HTTP Response Status Code Is 204 - Check Postcondition VNF Performance Subscription is Deleted - -DELETE Individual VNF Performance Subscription with invalid resource identifier - [Documentation] Test ID: 7.3.4.7.4 - ... Test title: DELETE Individual VNF Performance Subscription with invalid resource identifier - ... Test objective: The objective is to test that the deletion of an individual VNF performance subscription fails when using an invalid resource identifier - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.8.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Send Delete request for individual VNF Performance Subscription with invalid resource identifier - Check HTTP Response Status Code Is 404 - -POST Individual VNF Performance Subscription - Method not implemented - [Documentation] Test ID: 7.3.4.7.5 - ... Test title: POST Individual VNF Performance Subscription - Method not implemented - ... Test objective: The objective is to test that POST method is not allowed to create a new VNF Performance Subscription - ... Pre-conditions: A VNF instance is instantiated - ... Reference: Clause 6.4.8.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: The VNF Performance Subscription is not created on the VNFM - Send Post request for individual VNF Performance Subscription - Check HTTP Response Status Code Is 405 - Check Postcondition VNF Performance Subscription is not Created - -PUT Individual VNF Performance Subscription - Method not implemented - [Documentation] Test ID: 7.3.4.7.6 - ... Test title: PUT Individual VNF Performance Subscription - Method not implemented - ... Test objective: The objective is to test that PUT method is not allowed to update an existing VNF Performance subscription - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.8.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: The VNF Performance subscription is not modified by the operation - Send Put request for individual VNF Performance Threshold - Check HTTP Response Status Code Is 405 - Check Postcondition VNF Performance Subscription is Unmodified (Implicit) - -PATCH Individual VNF Performance Subscription - Method not implemented - [Documentation] Test ID: 7.3.4.7.7 - ... Test title: PATCH Individual VNF Performance Subscription - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing VNF Performance subscription - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.8.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: The VNF Performance subscription is not modified by the operation - Send Patch request for individual VNF Performance Threshold - Check HTTP Response Status Code Is 405 - Check Postcondition VNF Performance Subscription is Unmodified (Implicit) - diff --git a/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot b/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot index 18988757a40504d0f9c3e1c1831f6fcffc39878f..39af0c1aa1cbd321a93f2212d550d4619e382273 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot @@ -4,7 +4,6 @@ Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library OperatingSystem -Resource environment/individualThresholds.txt *** Test Cases *** GET Individual Threshold @@ -12,7 +11,7 @@ GET Individual Threshold ... Test title: GET Individual Threshold ... Test objective: The objective is to test the retrieval of an individual VNF performance threshold and perform a JSON schema and content validation of the collected threshold data structure ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -26,19 +25,20 @@ GET Individual Threshold with invalid resource identifier ... Test title: GET Individual Threshold with invalid resource identifier ... Test objective: The objective is to test that the retrieval of an individual VNF performance threshold fails when using an invalid resource identifier ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none GET individual VNF Performance Threshold with invalid resource identifier Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails DELETE Individual Threshold [Documentation] Test ID: 7.3.4.5.3 ... Test title: DELETE Individual Threshold ... Test objective: The objective is to test the deletion of an individual VNF performance threshold ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Threshold is not available anymore in the VNFM @@ -51,109 +51,120 @@ DELETE Individual Threshold with invalid resource identifier ... Test title: DELETE Individual Threshold with invalid resource identifier ... Test objective: The objective is to test the deletion of an individual VNF performance threshold ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Send Delete request for individual VNF Performance Threshold with invalid resource identifier Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails POST Individual Threshold - Method not implemented [Documentation] Test ID: 7.3.4.5.5 ... Test title: POST Individual Threshold - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new VNF Performance Threshold ... Pre-conditions: A VNF instance is instantiated - ... Reference: Clause 6.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The VNF Performance Threshold is not created on the VNFM + ... Post-Conditions: none Send Post request for individual VNF Performance Threshold Check HTTP Response Status Code Is 405 - Check Postcondition VNF Performance Threshold is not Created PUT Individual Threshold - Method not implemented [Documentation] Test ID: 7.3.4.5.6 ... Test title: PUT Individual Threshold - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing VNF Performance threshold ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.6.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.6.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The VNF Performance Threshold is not modified by the operation + ... Post-Conditions: none Send Put request for individual VNF Performance Threshold Check HTTP Response Status Code Is 405 - Check Postcondition VNF Performance Threshold is Unmodified (Implicit) -PATCH Individual Threshold - Method not implemented +PATCH Individual Threshold [Documentation] Test ID: 7.3.4.5.7 - ... Test title: PATCH Individual Threshold - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing VNF Performance threshold + ... Test title: PATCH Individual Threshold + ... Test objective: The objective is to test that PATCH method allows to modify an Individual threshold resource. ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The VNF Performance Threshold is not modified by the operation + ... Post-Conditions: Send Patch request for individual VNF Performance Threshold - Check HTTP Response Status Code Is 405 + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ThresholdModifications + +PATCH Individual Threshold - Precondition failed + [Documentation] Test ID: 7.3.4.5.8 + ... Test title: PATCH Individual Threshold - Preconition failed + ... Test objective: The objective is to attempt to modify an individual threshold resource, where the precondition was not met. + ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. + ... Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: The VNF Performance Job is not modified by the operation + Send Patch request for individual VNF Performance Threshold + Check HTTP Response Status Code Is 412 + Check HTTP Response Body Json Schema Is ProblemDetails Check Postcondition VNF Performance Threshold is Unmodified (Implicit) - *** Keywords *** GET Individual VNF Performance Threshold Log Trying to get a Threhsold present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} GET individual VNF Performance Threshold with invalid resource identifier Log Trying to get a Threhsold with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${erroneousThresholdId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${erroneousThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Threshold Log Trying to delete a Threhsold in the VNFM - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Threshold with invalid resource identifier Log Trying to delete a Threhsold in the VNFM with invalid id - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds/${erroneousThresholdId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${erroneousThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual VNF Performance Threshold Log Trying to create new threshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/thresholds/${newThresholdId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${newThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for individual VNF Performance Threshold Log Trying to PUT threshold Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PUT ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Patch request for individual VNF Performance Threshold Log Trying to PUT threshold - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} - ${origOutput}= Output response - Set Suite Variable ${origResponse} ${origOutput} - PATCH ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body}= Get File jsons/ThresholdModifications.json + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -164,15 +175,6 @@ Check Postcondition VNF Performance Threshold is Unmodified (Implicit) ${threshold}= evaluate json.loads('''${response['body']}''') json Should Be Equal ${origresponse['body']['id']} ${threshold.id} Should Be Equal ${origresponse['body']['criteria']} ${threshold.criteria} - -Check Postcondition VNF Performance Threshold is not Created - Log Trying to get a new Threshold - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${newThresholdId} - ${output}= Output response - Set Suite Variable ${response} ${output} - Check HTTP Response Status Code Is 404 Check Postcondition VNF Performance Threshold is Deleted Log Check Postcondition Threshold is deleted diff --git a/SOL003/VNFPerformanceManagement-API/NotificationEndpoint.robot b/SOL003/VNFPerformanceManagement-API/NotificationEndpoint.robot new file mode 100644 index 0000000000000000000000000000000000000000..0fa6b98c55533b6f67a4b4271e95c57ff3d01b38 --- /dev/null +++ b/SOL003/VNFPerformanceManagement-API/NotificationEndpoint.robot @@ -0,0 +1,69 @@ +*** Settings *** +Library String +Library OperatingSystem +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Library JSONLibrary +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +Performance Information Available Notification + [Documentation] Test ID: 7.3.4.10.1 + ... Test title: Performance Information Available Notification + ... Test objective: The objective is to test that the POST request triggers Performance Information Available Notification. + ... Pre-conditions: A VNF performance job is created, and a subscription for performance information available notification is available in the VNFM. + ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Performance Information Available Notification + Check HTTP Response Status Code Is 204 + +Threshold Crossed Notification + [Documentation] Test ID: 7.3.4.10.2 + ... Test title: Threshold Crossed Notification + ... Test objective: The objective is to test that the POST request triggers Threshold Crossed Notification + ... Pre-conditions: A VNF performance job is created, and a subscription for threshold crossed notification is available in the VNFM. + ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Threshold Crossed Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} + Integer response status 200 + Validate Json response body PmJob.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + ${status}= Convert To Integer ${expected_status} + Should Be Equal As Strings ${response['status']} ${status} + Log Status code validated + +Post Performance Information Available Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body} = Get File jsons/PerformanceInformationAvailableNotification.json + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Threshold Crossed Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body} = Get File jsons/ThresholdCrossedNotification.json + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/PerformanceManagementNotification.robot b/SOL003/VNFPerformanceManagement-API/Notifications.robot similarity index 89% rename from SOL003/VNFPerformanceManagement-API/PerformanceManagementNotification.robot rename to SOL003/VNFPerformanceManagement-API/Notifications.robot index 9e5392bf27d3346c2a2b279dd83b2b5204c6a598..e21a8b578226e7ab3571b4492feeb6183e1084fa 100644 --- a/SOL003/VNFPerformanceManagement-API/PerformanceManagementNotification.robot +++ b/SOL003/VNFPerformanceManagement-API/Notifications.robot @@ -1,5 +1,4 @@ *** Setting *** -Resource environment/notifications.txt Resource environment/variables.txt Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true @@ -17,7 +16,7 @@ VNF Performance Information Availability Notification ... Test title: VNF Performance Information Availability Notification ... Test objective: The objective is to test the dispatch of VNF Performance Information Availability Notification when new VNF performance information is available in the NFVO, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A VNF performance job is created, and a subscription for information availability notifications is available in the VNFM. - ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -30,7 +29,7 @@ VNF Threshold Crossed Notification ... Test title: VNF Threshold Crossed Notification ... Test objective: The objective is to test the dispatch of VNF Threshold Crossed Notification when a previously set VNF performance metric threshold is crossed, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A VNF performance job is created, and a threshold subscription is available in the VNFM. - ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -86,8 +85,10 @@ Configure Notification Performance Information Available Handler set to dictionary ${json} notificationType ${type} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Threshold Crossed Handler @@ -96,8 +97,10 @@ Configure Notification Threshold Crossed Handler set to dictionary ${json} notificationType ${type} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL003/VNFPerformanceManagement-API/PMJobs.robot b/SOL003/VNFPerformanceManagement-API/PMJobs.robot index 13a3c76342309378b61732b00d5d8dbd421d187c..15f98c68b3ed6e605cb40bb5fb6551c8f0539e7a 100644 --- a/SOL003/VNFPerformanceManagement-API/PMJobs.robot +++ b/SOL003/VNFPerformanceManagement-API/PMJobs.robot @@ -4,7 +4,6 @@ Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library OperatingSystem Library String -Resource environment/pmJobs.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library MockServerLibrary @@ -14,7 +13,7 @@ GET all VNF Performance Monitoring Jobs ... Test title: GET all VNF Performance Monitoring Jobs ... Test objective: The objective is to test the retrieval of all the available VNF performance monitoring jobs and perform a JSON schema and content validation of the collected jobs data structure ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -28,7 +27,7 @@ GET VNF Performance Monitoring Jobs with attribute-based filter ... Test title: GET all VNF Performance Monitoring Jobs with attribute-based filter ... Test objective: The objective is to test the retrieval of VNF performance monitoring jobs using attribute-based filter, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued attribute-based filter ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -42,7 +41,7 @@ GET all VNF Performance Monitoring Jobs with all_fields attribute selector ... Test title: GET all VNF Performance Monitoring Jobs with all_fields attribute selector ... Test objective: The objective is to test the retrieval of all VNF performance monitoring jobs all_fields attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued all_fileds selector ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -56,7 +55,7 @@ GET all VNF Performance Monitoring Jobs with exclude_default attribute selector ... Test title: GET all VNF Performance Monitoring Jobs with exclude_default attribute selector ... Test objective: The objective is to test the retrieval of all VNF performance monitoring jobs exclude_default attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued exclude_default selector ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -70,7 +69,7 @@ GET all VNF Performance Monitoring Jobs with fields attribute selector ... Test title: GET all VNF Performance Monitoring Jobs with fields attribute selector ... Test objective: The objective is to test the retrieval of all VNF performance monitoring jobs fields attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued fields selector ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNFM supports the use of exclude_fields attribute selector ... Post-Conditions: none @@ -84,7 +83,7 @@ GET all VNF Performance Monitoring Jobs with exclude_fields attribute selector ... Test title: GET all VNF Performance Monitoring Jobs with exclude_fields attribute selector ... Test objective: The objective is to test the retrieval of all VNF performance monitoring jobs exclude_fields attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued exclude_fields selector ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNFM supports the use of exclude_fields attribute selector ... Post-Conditions: none @@ -98,7 +97,7 @@ GET VNF Performance Monitoring Jobs with invalid attribute-based filter ... Test title: GET VNF Performance Monitoring Jobs with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of VNF performance monitoring jobs fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -111,7 +110,7 @@ GET VNF Performance Monitoring Jobs with invalid resource endpoint ... Test title: GET VNF Performance Monitoring Jobs with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of VNF performance monitoring jobs fails when using invalid resource endpoint ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -123,7 +122,7 @@ Create new VNF Performance Monitoring Job ... Test title: Create a new VNF Performance Monitoring Job ... Test objective: The objective is to test the creation of a new VNF performance monitoring job and perform the JSON schema validation of the returned job data structure ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Job is successfully created on the VNFM @@ -137,7 +136,7 @@ PUT all VNF Performance Monitoring Jobs - Method not implemented ... Test title: PUT all VNF Performance Monitoring Jobs - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify VNF Performance Monitoring Jobs ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -149,7 +148,7 @@ PATCH all VNF Performance Monitoring Jobs - (Method not implemented) ... Test title: PATCH all VNF Performance Monitoring Jobs - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update VNF Performance Monitoring Jobs ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -161,7 +160,7 @@ DELETE all VNF Performance Monitoring Jobs - Method not implemented ... Test title: DELETE all VNF Performance Monitoring Jobs - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to update VNF Performance Monitoring Jobs ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -174,7 +173,7 @@ GET all VNF Performance Monitoring Jobs as Paged Response ... Test title: GET all VNF Performance Monitoring Jobs as Paged Response ... Test objective: The objective is to test the retrieval of all the available VNF performance monitoring jobs as Paged Response. ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -187,7 +186,7 @@ GET VNF Performance Monitoring Jobs - Bad Request Response too Big ... Test title: GET VNF Performance Monitoring Jobs - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of VNF performance monitoring jobs fails because response is too big, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -195,36 +194,50 @@ GET VNF Performance Monitoring Jobs - Bad Request Response too Big Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails +GET all VNF Performance Monitoring Jobs with fields and exclude_default attribute selector + [Documentation] Test ID: 7.3.4.1.15 + ... Test title: GET all VNF Performance Monitoring Jobs with fields and exclude_default attribute selector + ... Test objective: The objective is to test the retrieval of all VNF performance monitoring jobs fields and exclude_default attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued fields selector + ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: The VNFM supports the use of fields and exclude_fields attribute selector + ... Post-Conditions: none + GET VNF Performance Monitoring Jobs with fields and exclude_default attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJobs + Check HTTP Response Body PmJobs Matches the requested fields selector + *** Keywords *** GET all VNF Performance Monitoring Jobs Log Trying to get all PM Jobs present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} GET VNF Performance Monitoring Jobs with attribute-based filter Log Trying to get all PM Jobs present in the VNFM, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?${POS_FILTER} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?${POS_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} GET VNF Performance Monitoring Jobs with all_fields attribute selector Log Trying to get all PM Jobs present in the VNFM, using 'all_fields' filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?all_fields + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?all_fields ${output}= Output response Set Suite Variable ${response} ${output} GET VNF Performance Monitoring Jobs with exclude_default attribute selector Log Trying to get all VNF Packages present in the VNFM, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -232,33 +245,42 @@ GET VNF Performance Monitoring Jobs with fields attribute selector Log Trying to get all VNF Packages present in the VNFM, using filter params Pass Execution If ${FIELD_USAGE} == 0 Skipping test as VNFM is not supporting 'fields' Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} +GET VNF Performance Monitoring Jobs with fields and exclude_default attribute selector + Log Trying to get all VNF Packages present in the VNFM, using filter params + Pass Execution If ${FIELD_USAGE} == 0 Skipping test as VNFM is not supporting 'fields' + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?fields=${fields}&exclude_default + ${output}= Output response + Set Suite Variable ${response} ${output} + GET VNF Performance Monitoring Jobs with exclude_fields attribute selector Log Trying to get all VNF Packages present in the VNFM, using filter params Pass Execution If ${FIELD_USAGE} == 0 Skipping test as VNFM is not supporting 'fields' Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} GET VNF Performance Monitoring Jobs with invalid attribute-based filter Log Trying to get all PM Jobs present in the VNFM, using an erroneous filter param Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?${NEG_FILTER} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?${NEG_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} GET VNF Performance Monitoring Jobs 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}/pm_job # wrong URI /pm_job instead of /pm_jobs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_job # wrong URI /pm_job instead of /pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} @@ -266,33 +288,34 @@ Send Post Request Create new VNF Performance Monitoring Job Log Creating a new PM Job Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/CreatePmJobRequest.json - POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/CreatePmJobRequest.json + ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${body} ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for all VNF Performance Monitoring Jobs 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}/pm_jobs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for all VNF Performance Monitoring Jobs 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}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for all VNF Performance Monitoring Jobs 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}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} @@ -303,8 +326,8 @@ Check Postcondition VNF Performance Monitoring Jobs Exist Check Postcondition PmJob Exists Log Checking that Pm Job exists Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${response['body']['id']} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 200 @@ -351,7 +374,7 @@ Check HTTP Response Body PmJobs Matches the requested all_fields selector Check HTTP Response Body PmJobs Matches the requested Attribute-Based Filter Log Checking that attribute-based filter is matched - @{words} = Split String ${POS_FILTER} ,${SEPERATOR} + @{words} = Split String ${POS_FILTER} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['objectInstanceIds']} @{words}[1] Check HTTP Response Body Does Not Contain reports diff --git a/SOL003/VNFPerformanceManagement-API/Subscriptions.robot b/SOL003/VNFPerformanceManagement-API/Subscriptions.robot deleted file mode 100644 index cee773e798d8f08f76b072ff86ffa7db71c9daf0..0000000000000000000000000000000000000000 --- a/SOL003/VNFPerformanceManagement-API/Subscriptions.robot +++ /dev/null @@ -1,176 +0,0 @@ -*** Settings *** -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt # Generic Parameters -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Library OperatingSystem -Library JSONLibrary -Resource VNFPerformanceManagementKeywords.robot -Resource environment/subscriptions.txt -Library MockServerLibrary -Library Process -Suite Setup Create Sessions -Suite Teardown Terminate All Processes kill=true - -*** Test Cases *** -GET all VNF Performance Subscriptions - [Documentation] Test ID: 7.3.4.6.1 - ... Test title: GET all VNF Performance Subscriptions - ... Test objective: The objective is to test the retrieval of all VNF performance subscriptions and perform a JSON schema validation of the returned subscriptions data structure - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Get all VNF Performance Subscriptions - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is PmSubscriptions - -GET VNF Performance Subscriptions with attribute-based filter - [Documentation] Test ID: 7.3.4.6.2 - ... Test title: GET VNF Performance Subscriptions with attribute-based filter - ... Test objective: The objective is to test the retrieval of VNF performance subscriptions using attribute-based filter, perform a JSON schema validation of the collected indicators data structure, and verify that the retrieved information matches the issued attribute-based filters - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Get VNF Performance Subscriptions with attribute-based filters - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is PmSubscriptions - Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter - -GET VNF Performance Management Subscriptions with invalid attribute-based filter - [Documentation] Test ID: 7.3.4.6.3 - ... Test title: GET VNF Performance Management Subscriptions with invalid attribute-based filter - ... Test objective: The objective is to test that the retrieval of VNF performance subscriptions fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response. - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Get VNF Performance Subscriptions with invalid attribute-based filters - Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails - -GET VNF Performance Subscriptions with invalid resource endpoint - [Documentation] Test ID: 7.3.4.6.4 - ... Test title: GET VNF Performance Subscriptions with invalid resource endpoint - ... Test objective: The objective is to test that the retrieval of all VNF performance subscriptions fails when using invalid resource endpoint. - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Get VNF Performance Subscriptions with invalid resource endpoint - Check HTTP Response Status Code Is 404 - -Create new VNF Performance subscription - [Documentation] Test ID: 7.3.4.6.5 - ... Test title: Create new VNF Performance subscription - ... Test objective: The objective is to test the creation of a new VNF performance subscription and perform a JSON schema and content validation of the returned subscription data structure - ... Pre-conditions: A VNF instance is instantiated. - ... Reference: Clause 6.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: The VNF performance subscription is successfully set and it matches the issued 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 PmSubscription Attributes Values Match the Issued Subscription - Check Postcondition VNF Performance Subscription Is Set - - -Create duplicated VNF Performance subscription with VNFM not creating duplicated subscriptions - [Tags] no-duplicated-subs - [Documentation] Test ID: 7.3.4.6.6 - ... Test title: Create duplicated VNF Performance subscription with VNFM not creating duplicated subscriptions - ... Test objective: The objective is to test the attempt of a creation of a duplicated VNF performance subscription and check that no new subscription is created by the VNFM and a link to the original subscription is returned - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: The VNFM does not support the creation of duplicated subscriptions - ... Post-Conditions: The existing VNF performance subscription returned is available in the VNFM - Send Post Request for Duplicated VNF Performance Subscription - Check HTTP Response Status Code Is 303 - Check HTTP Response Body Is Empty - Check HTTP Response Header Contains Location - Check Postcondition Subscription Resource Returned in Location Header Is Available - -Create duplicated VNF Performance subscription with VNFM creating duplicated subscriptions - [Tags] duplicated-subs - [Documentation] Test ID: 7.3.4.6.7 - ... Test title: Create duplicated VNF Performance subscription with VNFM creating duplicated subscriptions - ... Test objective: The objective is to test the creation of a duplicated VNF performance subscription and perform a JSON schema and content validation of the returned duplicated subscription data structure - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: The VNFM supports the creation of duplicated subscriptions - ... Post-Conditions: The duplicated VNF performance subscription is successfully set and it matches the issued subscription - 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 PmSubscription Attributes Values Match the Issued Subscription - Check Postcondition VNF Performance Subscription Is Set - -PUT VNF Performance Subscriptions - Method not implemented - [Documentation] Test ID: 7.3.4.6.8 - ... Test title: PUT VNF Performance Subscriptions - Method not implemented - ... Test objective: The objective is to test that PUT method is not allowed to modify VNF performance subscriptions - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Send Put Request for VNF Performance Subscriptions - Check HTTP Response Status Code Is 405 - -PATCH VNF Performance Subscriptions - Method not implemented - [Documentation] Test ID: 7.3.4.6.9 - ... Test title: PATCH VNF Performance Subscriptions - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to update VNF performance subscriptions - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Send Patch Request for VNF Performance Subscriptions - Check HTTP Response Status Code Is 405 - -DELETE VNF Performance Subscriptions - Method not implemented - [Documentation] Test ID: 7.3.4.6.10 - ... Test title: DELETE VNF Performance Subscriptions - Method not implemented - ... Test objective: The objective is to test that DELETE method is not allowed to delete VNF performance subscriptions - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: The VNF performance subscriptions are not deleted by the failed operation - Send Delete Request for VNF Performance Subscriptions - Check HTTP Response Status Code Is 405 - Check Postcondition VNF Performance Subscriptions Exists - -GET all VNF Performance Subscriptions as Paged Response - [Documentation] Test ID: 7.3.4.6.11 - ... Test title: GET all VNF Performance Subscriptions as Paged Response - ... Test objective: The objective is to test the retrieval of all VNF performance subscriptions as Paged Response. - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Get all VNF Performance Subscriptions - Check HTTP Response Status Code Is 200 - Check LINK in Header - -GET VNF Performance Management Subscriptions - Bad Request Response too Big - [Documentation] Test ID: 7.3.4.6.12 - ... Test title: GET VNF Performance Management Subscriptions - Bad Request Response too Big - ... Test objective: The objective is to test that the retrieval of VNF performance subscriptions fails because response is too big, and perform the JSON schema validation of the failed operation HTTP response. - ... Pre-conditions: A VNF instance is instantiated. At least one VNF performance subscription is available in the VNFM. - ... Reference: Clause 6.4.7.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - Get all VNF Performance Subscriptions - Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/Thresholds.robot b/SOL003/VNFPerformanceManagement-API/Thresholds.robot index c1d7f0471034775accc4c29334e405181bc027a9..efcc68988ceafd735f308212439f96361b1fd140 100644 --- a/SOL003/VNFPerformanceManagement-API/Thresholds.robot +++ b/SOL003/VNFPerformanceManagement-API/Thresholds.robot @@ -1,9 +1,9 @@ *** Settings *** +Library String Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Resource environment/thresholds.txt Library OperatingSystem *** Test Cases *** @@ -12,7 +12,7 @@ GET All Performance Thresholds ... Test title: GET All Performance Thresholds ... Test objective: The objective is to test the retrieval of all the available VNF performance thresholds and perform a JSON schema validation of the collected thresholds data structure ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -25,7 +25,7 @@ GET Performance Thresholds with attribute-based filter ... Test title: GET Performance Thresholds with attribute-based filter ... Test objective: The objective is to test the retrieval of all the available VNF performance thresholds when using attribute-based filters, perform a JSON schema validation of the collected thresholds data structure, and verify that the retrieved information matches the issued attribute-based filter ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -39,7 +39,7 @@ GET Performance Thresholds with invalid attribute-based filter ... Test title: GET Performance Thresholds with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of VNF performance thresholds fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -51,7 +51,7 @@ GET Performance Thresholds with invalid resource endpoint ... Test title: GET Performance Thresholds with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of VNF performance thresholds fails when using invalid resource endpoint, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -64,7 +64,7 @@ Create new Performance Threshold ... Test title: Create new Performance Threshold ... Test objective: The objective is to test the creation of a new VNF performance threshold and perform the JSON schema validation of the returned threshold data structure ... Pre-conditions: A VNF instance is instantiated. - ... Reference: Clause 6.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Threshold is successfully created on the VNFM @@ -79,7 +79,7 @@ PUT Performance Thresholds - Method not implemented ... Test title: PUT Performance Thresholds - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify VNF Performance Thresholds ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNF. - ... Reference: Clause 6.4.5.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.5.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -91,7 +91,7 @@ PATCH Performance Thresholds - Method not implemented ... Test title: PATCH Performance Thresholds - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify VNF Performance Thresholds ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.5.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -103,7 +103,7 @@ DELETE Performance Thresholds - Method not implemented ... Test title: DELETE Performance Thresholds - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to update VNF Performance Thresholds ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.5.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF performance thresholds are not deleted by the failed operation @@ -116,7 +116,7 @@ GET All Performance Thresholds as Paged Response ... Test title: GET All Performance Thresholds as Paged Response ... Test objective: The objective is to test the retrieval of all the available VNF performance thresholds as a Paged Response. ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -129,7 +129,7 @@ GET Performance Thresholds - Bad Request Response too Big ... Test title: GET Performance Thresholds - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of VNF performance thresholds fails because response is too big, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -140,67 +140,68 @@ GET Performance Thresholds - Bad Request Response too Big GET all Performance Thresholds Log Trying to get all thresholds present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} GET Performance Thresholds with attribute-based filter Log Trying to get thresholds present in the VNFM with filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_OK} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds?${FILTER_OK} ${output}= Output response Set Suite Variable ${response} ${output} GET Performance Thresholds with invalid attribute-based filter Log Trying to get thresholds present in the VNFM with invalid filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_KO} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds?${FILTER_KO} ${output}= Output response Set Suite Variable ${response} ${output} GET VNF Performance Thresholds with invalid resource endpoint Log Trying to get thresholds present in the VNFM with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/threshold + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/threshold ${output}= Output response Set Suite Variable ${response} ${output} Send Post Request Create new Performance Threshold Log Creating a new THreshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${request}= Get File jsons/CreateThresholdRequest.json - POST ${apiRoot}/${apiName}/${apiVersion}/thresholds ${request} + ${template}= Get File jsons/CreateThresholdRequest.json + ${request}= Format String ${template} objectInstanceIds=${objectInstanceIds} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${request} ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for all Performance Thresholds Log PUT THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/thresholds + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for all Performance Thresholds Log PUT THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/thresholds + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for all Performance Thresholds Log DELETE THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} @@ -211,8 +212,8 @@ Check Postcondition Thresholds Exist Check Postcondition Threshold Exists Log Checking that Threshold exists Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${response['body']['id']} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 200 diff --git a/SOL003/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot b/SOL003/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot index a7a2ac66e5cae1e1af9944f1f7b118280890a427..acdf75c4d6dabdfcc3fbd43f29fa57c86e12d2fd 100644 --- a/SOL003/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot +++ b/SOL003/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot @@ -1,7 +1,5 @@ *** Settings *** Resource environment/variables.txt -Resource environment/subscriptions.txt -Resource environment/individualSubscription.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library MockServerLibrary Library OperatingSystem @@ -11,311 +9,7 @@ Library Collections Library JSONSchemaLibrary schemas/ Library Process -*** Keywords *** -Get all VNF Performance Subscriptions - [Documentation] The client can use this method to query the list of active subscriptions to Performance management notifications - ... subscribed by the client. - ... This method shall follow the provisions specified in the tables 6.4.7.3.2-1 and 6.4.7.3.2-2 for URI query parameters, - ... request and response data structures, and response codes. - Set headers {"Accept": "application/json"} - Set headers {"Content-Type": "application/json"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions - ${output}= Output response - Set Suite Variable ${response} ${output} - # Integer response status 200 - # Log Received a 200 OK as expected - # ${contentType}= Output response headers Content-Type - # Should Contain ${contentType} application/json - # ${result}= Output response body - # Validate Json PmSubscriptions.schema.json ${result} - # Log Validated PmSubscription schema - - - Get VNF Performance Subscriptions with attribute-based filters - [Documentation] The client can use this method to query the list of active subscriptions to Performance management notifications - ... subscribed by the client. - ... This method shall follow the provisions specified in the tables 6.4.7.3.2-1 and 6.4.7.3.2-2 for URI query parameters, - ... request and response data structures, and response codes. - Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ok} - ${output}= Output response - Set Suite Variable ${response} ${output} - # Integer response status 200 - # Log Received a 200 OK as expected - # ${contentType}= Output response headers Content-Type - # Should Contain ${contentType} application/json - # ${result}= Output response body - # Validate Json PmSubscriptions.schema.json ${result} - # Log Validated PmSubscription schema - - - -Get VNF Performance Subscriptions with invalid attribute-based filters - [Documentation] The client can use this method to query the list of active subscriptions to Performance management notifications - ... subscribed by the client. - ... This method shall follow the provisions specified in the tables 6.4.7.3.2-1 and 6.4.7.3.2-2 for URI query parameters, - ... request and response data structures, and response codes. - Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ko} - ${output}= Output response - Set Suite Variable ${response} ${output} - # Integer response status 400 - # Log Received a 400 Bad Request as expected - # ${contentType}= Output response headers Content-Type - # Should Contain ${contentType} application/json - # ${result}= Output response body - # Validate Json ProblemDetails.schema.json ${result} - # Log Validated ProblemDetails schema - - -Get VNF Performance Subscriptions with invalid resource endpoint - [Documentation] The client can use this method to query the list of active subscriptions to Performance management notifications - ... subscribed by the client. - ... This method shall follow the provisions specified in the tables 6.4.7.3.2-1 and 6.4.7.3.2-2 for URI query parameters, - ... request and response data structures, and response codes. - Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscription - ${output}= Output response - Set Suite Variable ${response} ${output} - # Integer response status 404 - # Log Received a 404 Not found as expected - # ${contentType}= Output response headers Content-Type - # Should Contain ${contentType} application/json - # ${result}= Output response body - # Validate Json ProblemDetails.schema.json ${result} - # Log Validated ProblemDetails schema - - - -Send Post Request for VNF Performance Subscription - [Documentation] The POST method creates a new subscription. - ... This method shall follow the provisions specified in the tables 6.4.7.3.1-1 and 6.4.7.3.1-2 for URI query parameters, - ... request and response data structures, and response codes. - ... Creation of two subscription resources with the same callbackURI and the same filter can result in performance - ... degradation and will provide duplicates of notifications to the NFVO, and might make sense only in very rare use cases. - ... Consequently, the VNFM may either allow creating a subscription resource if another subscription resource with the - ... same filter and callbackUri already exists (in which case it shall return the "201 Created" response code), or may decide - ... to not create a duplicate subscription resource (in which case it shall return a "303 See Other" response code referencing - ... the existing subscription resource with the same filter and callbackUri). - Set headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - ${body_request}= Get File jsons/subscriptions.json - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body_request} - ${output}= Output response - Set Suite Variable ${response} ${output} - Run Keyword If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 1 - ... Check Notification Endpoint - # Integer response status 201 - # Log Received a 201 Created as expected - # ${contentType}= Output response headers Content-Type - # Should Contain ${contentType} application/json - # ${result}= Output response body - # Validate Json PmSubscription.schema.json ${result} - # Log Validated PmSubscription schema - # Log Trying to validate the Location header - # ${headers}= Output response headers - # Should Contain ${headers} Location - - -Send Post Request for Duplicated VNF Performance Subscription - [Documentation] The POST method creates a new subscription. - ... This method shall follow the provisions specified in the tables 6.4.7.3.1-1 and 6.4.7.3.1-2 for URI query parameters, - ... request and response data structures, and response codes. - ... Creation of two subscription resources with the same callbackURI and the same filter can result in performance - ... degradation and will provide duplicates of notifications to the NFVO, and might make sense only in very rare use cases. - ... Consequently, the VNFM may either allow creating a subscription resource if another subscription resource with the - ... same filter and callbackUri already exists (in which case it shall return the "201 Created" response code), or may decide - ... to not create a duplicate subscription resource (in which case it shall return a "303 See Other" response code referencing - ... the existing subscription resource with the same filter and callbackUri). - Set headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - ${body_request}= Get File jsons/subscriptions.json - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body_request} - ${output}= Output response - Set Suite Variable ${response} ${output} - # Integer response status 303 - # Log Received a 303 See other as expected - # ${contentType}= Output response headers Content-Type - # Should Contain ${contentType} application/json - # ${result}= Output response body - # Should Be Empty ${result} - # Log Body is empty - # Log Trying to validate the Location header - # ${headers}= Output response headers - # Should Contain ${headers} Location - - - -Send Put Request for VNF Performance Subscriptions - [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method - ... Not Allowed" response as defined in Clause 6.4.7.3.3. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions - ${output}= Output response - Set Suite Variable ${response} ${output} - # Integer response status 405 - # Log Received 405 Method not implemented as expected - -Send Patch Request for VNF Performance Subscriptions - [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method - ... Not Allowed" response as defined in Clause 6.4.7.3.4. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions - ${output}= Output response - Set Suite Variable ${response} ${output} - # Integer response status 405 - # Log Received 405 Method not implemented as expected - -Send Delete Request for VNF Performance Subscriptions - [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method - ... Not Allowed" response as defined in Clause 6.4.7.3.5. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions - ${output}= Output response - Set Suite Variable ${response} ${output} - # Integer response status 405 - # Log Received 405 Method not implemented as expected - -Get Individual VNF Performance Subscription - Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - ${output}= Output response - Set Suite Variable ${response} ${output} - -GET individual VNF Performance Subscription with invalid resource identifier - Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} - ${output}= Output response - Set Suite Variable ${response} ${output} - -Send Delete request for individual VNF Performance Subscription - Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - ${output}= Output response - Set Suite Variable ${response} ${output} - -Send Delete request for individual VNF Performance Subscription with invalid resource identifier - Log Trying to delete a subscription in the VNFM with invalid id - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} - ${output}= Output response - Set Suite Variable ${response} ${output} - -Send Post request for individual VNF Performance Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId} - ${output}= Output response - Set Suite Variable ${response} ${output} - -Send Put request for individual VNF Performance Threshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - ${origOutput}= Output response - Set Suite Variable ${origResponse} ${origOutput} - PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - ${output}= Output response - Set Suite Variable ${response} ${output} - -Send Patch request for individual VNF Performance Threshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - ${origOutput}= Output response - Set Suite Variable ${origResponse} ${origOutput} - PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - ${output}= Output response - Set Suite Variable ${response} ${output} - -Check Postcondition VNF Performance Subscription is Unmodified (Implicit) - Log Check postconidtion subscription not modified - GET individual VNF Performance Subscription - Log Check Response matches original VNF Threshold - ${subscription}= evaluate json.loads('''${response['body']}''') json - Should Be Equal As Strings ${origResponse['body']['id']} ${subscription.id} - Should Be Equal As Strings ${origResponse['body']['callbackUri']} ${subscription.callbackUri} - -Check Postcondition VNF Performance Subscription is not Created - Log Trying to get a new subscription - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId} - ${output}= Output response - Set Suite Variable ${response} ${output} - Check HTTP Response Status Code Is 404 - -Check Postcondition VNF Performance Subscription is Deleted - Log Check Postcondition Subscription is deleted - GET individual VNF Performance Subscription - Check HTTP Response Status Code Is 404 - -Check HTTP Response Body Subscription Identifier matches the requested Subscription - Log Trying to check response ID - Should Be Equal As Strings ${response['body']['id']} ${subscriptionId} - Log Subscription identifier as expected - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${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 - ${schema} = Catenate SEPARATOR= ${input} .schema.json - Validate Json ${schema} ${response['body']} - Log Json Schema Validation OK - - -Check HTTP Response Body Is Empty - Should Be Empty ${response['body']} - Log No json schema is provided. Validation OK - - -Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter - Log Check Response includes VNF Performance Management according to filter - Should Be Equal As Strings ${response['body']['callbackUri']} ${callbackUri_Sub} - -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 - Should Be Equal As Strings ${response['body']['callbackUri']} ${subscription['callbackUri']} - -Check Postcondition VNF Performance Subscription Is Set - Log Check Postcondition subscription exist - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${response['body']['id']} - ${output}= Output response - Set Suite Variable ${response} ${output} - Check HTTP Response Status Code Is 200 - -Check Postcondition Subscription Resource Returned in Location Header Is Available - Log Going to check postcondition - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${response['headers']['Location']} - Integer response status 200 - Log Received a 200 OK as expected - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} application/json - ${result}= Output response body - Validate Json PmSubscription.schema.json ${result} - Log Validated PmSubscription schema - -Check Postcondition VNF Performance Subscriptions Exists - Log Checking that subscriptions exists - Get all VNF Performance Subscriptions - +*** Keywords *** Check HTTP Response Header Contains [Arguments] ${CONTENT_TYPE} Should Contain ${response['headers']} ${CONTENT_TYPE} diff --git a/SOL003/VNFPerformanceManagement-API/environment/IndividualPmJob.txt b/SOL003/VNFPerformanceManagement-API/environment/IndividualPmJob.txt deleted file mode 100644 index b3616b30fa43a63e10b0a61efbaf3c1d1eaf8690..0000000000000000000000000000000000000000 --- a/SOL003/VNFPerformanceManagement-API/environment/IndividualPmJob.txt +++ /dev/null @@ -1,6 +0,0 @@ -*** Variables *** -${pmJobId} 29f4ff6a-be91-4ec8-856e-fcf1e2479e4e -${erroneousPmJobId} erroneousPmJobId -${newPmJobId} newPmJobId -${response}= httpresponse -${OrigResponse}= httpresponse \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/environment/individualSubscription.txt b/SOL003/VNFPerformanceManagement-API/environment/individualSubscription.txt deleted file mode 100644 index 921749ffd1726c7f1581a28b0b27bb85cf06c63e..0000000000000000000000000000000000000000 --- a/SOL003/VNFPerformanceManagement-API/environment/individualSubscription.txt +++ /dev/null @@ -1,6 +0,0 @@ -*** Variables *** -${subscriptionId} 17563e75-0e14-4bd7-94b4-6bbb869c79aa -${erroneousSubscriptionId} erroneousSubscriptionId -${newSubscriptionId} newSubsciptionId -${response} httpresponse -${origResponse} httpresponse \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/environment/individualThresholds.txt b/SOL003/VNFPerformanceManagement-API/environment/individualThresholds.txt deleted file mode 100644 index 1efba79c6e00a105cad4aadd6afad956a538aece..0000000000000000000000000000000000000000 --- a/SOL003/VNFPerformanceManagement-API/environment/individualThresholds.txt +++ /dev/null @@ -1,6 +0,0 @@ -*** Variables *** -${thresholdId} 1f50d68b-82e8-4deb-bd40-c934d4d1ac0a -${erroneousThresholdId} erroneousThresholdId -${newThresholdId} newThresholdId -${response}= httpresponse -${origResponse}= httpresponse \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/environment/notifications.txt b/SOL003/VNFPerformanceManagement-API/environment/notifications.txt deleted file mode 100644 index cd1193ae50b7d17b51b86c8ce7582d1fbed8db59..0000000000000000000000000000000000000000 --- a/SOL003/VNFPerformanceManagement-API/environment/notifications.txt +++ /dev/null @@ -1,12 +0,0 @@ -*** Variables *** -${callback_uri} http://localhost -${callback_port} 9091 -${callback_endpoint} /endpoint -${callback_endpoint_fwd} /endpoint/check -${callback_endpoint_error} /endpoint_404 -${sleep_interval} 20s -${total_polling_time} 2 min -${polling_interval} 10 sec - -${notification_request} [] -${notification_response} [] \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/environment/pmJobs.txt b/SOL003/VNFPerformanceManagement-API/environment/pmJobs.txt deleted file mode 100644 index 9891d3fed1ef2b09983dd918d21e21111a6e94a5..0000000000000000000000000000000000000000 --- a/SOL003/VNFPerformanceManagement-API/environment/pmJobs.txt +++ /dev/null @@ -1,6 +0,0 @@ -*** Variables *** -${POS_FILTER} objectInstanceIds=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a -${NEG_FILTER} criteriaPmJob=erroneousAttributeName -${fields} criteria,objectInstanceIds -${response} httpresponse -${SEPERATOR} = \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/environment/reports.txt b/SOL003/VNFPerformanceManagement-API/environment/reports.txt deleted file mode 100644 index 6ac5f7c0b020825db1e44161c95118d9b08b5dbd..0000000000000000000000000000000000000000 --- a/SOL003/VNFPerformanceManagement-API/environment/reports.txt +++ /dev/null @@ -1,7 +0,0 @@ -*** Variables *** -${pmJobId} 1f50d68b-82e8-4deb-bd40-c934d4d1ac0a -${reportId} 0fb4c875-e07f-46ca-a9dd-13907667a568 -${erroneousReportId} erroneousReportId -${newReportId} newReportId -${response}= httpresponse -${OrigResponse}= httpresponse diff --git a/SOL003/VNFPerformanceManagement-API/environment/subscriptions.txt b/SOL003/VNFPerformanceManagement-API/environment/subscriptions.txt deleted file mode 100644 index 46984c68ed09364e8d9f4bd38d5c274c8569cee5..0000000000000000000000000000000000000000 --- a/SOL003/VNFPerformanceManagement-API/environment/subscriptions.txt +++ /dev/null @@ -1,7 +0,0 @@ -*** Variables *** -${callbackUri_Sub} http://172.22.1.7:9091/vnfpm/subscriptions -${filter_ok} callbackUri=${callbackUri_Sub} -${filter_ko} erroneousFilter=erroneous -${total_polling_time} 2 min -${polling_interval} 10 sec -${response} httpresponse diff --git a/SOL003/VNFPerformanceManagement-API/environment/thresholds.txt b/SOL003/VNFPerformanceManagement-API/environment/thresholds.txt deleted file mode 100644 index a2b025eefe44ac943781af1d821275cfc9a5ce0b..0000000000000000000000000000000000000000 --- a/SOL003/VNFPerformanceManagement-API/environment/thresholds.txt +++ /dev/null @@ -1,4 +0,0 @@ -*** Variables *** -${FILTER_OK} objectInstanceId=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a -${FILTER_KO} criterias=erroneousFilter -${response}= httpresponse \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/environment/variables.txt b/SOL003/VNFPerformanceManagement-API/environment/variables.txt index a2794c30957c4b31d89f61c79ddedf21e5b2542e..84c9f84d4eb56da47a7fba12f8583b647a56a2e2 100644 --- a/SOL003/VNFPerformanceManagement-API/environment/variables.txt +++ b/SOL003/VNFPerformanceManagement-API/environment/variables.txt @@ -4,7 +4,8 @@ ${VNFM_PORT} 8080 # Listening port of the VNFM ${VNFM_SCHEMA} https -${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${NEG_AUTHORIZATION} Bearer negativetoken ${CONTENT_TYPE_JSON} application/json @@ -16,7 +17,7 @@ ${VNFM_CHECKS_NOTIF_ENDPOINT} 1 ## If true, during subscription, the F ${VNFM_ALLOWS_DUPLICATE_SUBS} 1 ${apiRoot} / -${apiVersion} v1 +${apiMajorVersion} v1 ${apiName} vnfpm ${callback_port} 9091 @@ -30,4 +31,39 @@ ${polling_interval} 10 sec ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar -${response} \ No newline at end of file +${objectInstanceIds} 1f50d68b-82e8-4deb-bd40-c934d4d1ac0a + + +${pmJobId} 29f4ff6a-be91-4ec8-856e-fcf1e2479e4e +${erroneousPmJobId} erroneousPmJobId +${newPmJobId} newPmJobId +${response}= httpresponse +${OrigResponse}= httpresponse + + +${thresholdId} 1f50d68b-82e8-4deb-bd40-c934d4d1ac0a +${erroneousThresholdId} erroneousThresholdId +${newThresholdId} newThresholdId + + +${callback_endpoint_fwd} /endpoint/check + + +${notification_request} [] +${notification_response} [] + + +${POS_FILTER} objectInstanceIds=${objectInstanceIds} +${NEG_FILTER} criteriaPmJob=erroneousAttributeName +${fields} criteria,objectInstanceIds +${SEPARATOR} = + + +${reportId} 0fb4c875-e07f-46ca-a9dd-13907667a568 +${erroneousReportId} erroneousReportId +${newReportId} newReportId + +${FILTER_OK} objectInstanceId=${objectInstanceIds} +${FILTER_KO} criterias=erroneousFilter + +${callbackResp} localhost \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/jsons/CreatePmJobRequest.json b/SOL003/VNFPerformanceManagement-API/jsons/CreatePmJobRequest.json index 6a21ba34fa05dab0a8d3011fe1130d7492998ab8..4dbfc7c6c2c64a53700cf453bd2c1b3232442707 100644 --- a/SOL003/VNFPerformanceManagement-API/jsons/CreatePmJobRequest.json +++ b/SOL003/VNFPerformanceManagement-API/jsons/CreatePmJobRequest.json @@ -1,9 +1,9 @@ -{ - "objectInstanceIds" : ["1f50d68b-82e8-4deb-bd40-c934d4d1ac0a"], - "criteria" : { +{{ + "objectInstanceIds" : ["{objectInstanceIds}"], + "criteria" : {{ "performanceMetric": [], "performanceMetricGroup": [], "collectionPeriod": 10, "reportingPeriod": 30 - } -} \ No newline at end of file + }} +}} \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/jsons/CreateThresholdRequest.json b/SOL003/VNFPerformanceManagement-API/jsons/CreateThresholdRequest.json index 1e58c2bac513f36d37597e8f11bbe06d68b664cc..c7cfee14f65a08a338ddccdb6f0edeb990e008b3 100644 --- a/SOL003/VNFPerformanceManagement-API/jsons/CreateThresholdRequest.json +++ b/SOL003/VNFPerformanceManagement-API/jsons/CreateThresholdRequest.json @@ -1,12 +1,12 @@ -{ - "objectInstanceIds" : "1f50d68b-82e8-4deb-bd40-c934d4d1ac0a", - "criteria" : { +{{ + "objectInstanceIds" : "{objectInstanceIds}", + "criteria" : {{ "performanceMetric": "cpu_util", "thresholdType": "SIMPLE", - "simpleThresholdDetails": { + "simpleThresholdDetails": {{ "thresholdValue": 10, "hysteresis": 50 - } + }} - } -} \ No newline at end of file + }} +}} \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/jsons/PmJobModifications.json b/SOL003/VNFPerformanceManagement-API/jsons/PmJobModifications.json new file mode 100644 index 0000000000000000000000000000000000000000..799d664bafd8d3876b17968dc3a84ad2ff6daba5 --- /dev/null +++ b/SOL003/VNFPerformanceManagement-API/jsons/PmJobModifications.json @@ -0,0 +1,3 @@ +{ + "callbackUri":"127.0.0.3" +} \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/jsons/ThresholdModifications.json b/SOL003/VNFPerformanceManagement-API/jsons/ThresholdModifications.json new file mode 100644 index 0000000000000000000000000000000000000000..b3f998b3fca56eccb6867696a5546dce23d6251b --- /dev/null +++ b/SOL003/VNFPerformanceManagement-API/jsons/ThresholdModifications.json @@ -0,0 +1,3 @@ + { + "callbackUri":"127.0.0.1" +} \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/jsons/subscriptions.json b/SOL003/VNFPerformanceManagement-API/jsons/subscriptions.json deleted file mode 100644 index 128c42e1a095783c96c4f791d8eaa9898284f345..0000000000000000000000000000000000000000 --- a/SOL003/VNFPerformanceManagement-API/jsons/subscriptions.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "callbackUri": "http://172.22.1.7:9091/vnfpm/subscriptions", - "filter": { - "notificationTypes": ["ThresholdCrossedNotification"] - } -} \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/schemas/PmJobModifications.json b/SOL003/VNFPerformanceManagement-API/schemas/PmJobModifications.json new file mode 100644 index 0000000000000000000000000000000000000000..8da79dfe086b7699fbf73082692fb8873f62268d --- /dev/null +++ b/SOL003/VNFPerformanceManagement-API/schemas/PmJobModifications.json @@ -0,0 +1,62 @@ +{ + "description": "This type represents modifications to a PM job. It shall comply with the provisions defined in table 6.5.2.12-1.\n", + "type": "object", + "properties": { + "callbackUri": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + }, + "authentication": { + "type": "object", + "required": [ + "authType" + ], + "properties": { + "authType": { + "description": "Defines the types of Authentication / Authorization which the API consumer is willing to accept when receiving a notification. Permitted values: * BASIC: In every HTTP request to the notification endpoint, use\n HTTP Basic authentication with the client credentials. \n* OAUTH2_CLIENT_CREDENTIALS: In every HTTP request to the\n notification endpoint, use an OAuth 2.0 Bearer token, obtained\n using the client credentials grant type.\n* TLS_CERT: Every HTTP request to the notification endpoint is sent\n over a mutually authenticated TLS session, i.e. not only the\n server is authenticated, but also the client is authenticated\n during the TLS tunnel setup.\n", + "type": "array", + "items": { + "type": "string", + "enum": [ + "BASIC", + "OAUTH2_CLIENT_CREDENTIALS", + "TLS_CERT" + ] + } + }, + "paramsBasic": { + "description": "Parameters for authentication/authorization using BASIC. Shall be present if authType is \"BASIC\" and the contained information has not been provisioned out of band. Shall be absent otherwise.\n", + "type": "object", + "properties": { + "userName": { + "description": "Username to be used in HTTP Basic authentication. Shall be present if it has not been provisioned out of band.\n", + "type": "string" + }, + "password": { + "description": "Password to be used in HTTP Basic authentication. Shall be present if it has not been provisioned out of band.\n", + "type": "string" + } + } + }, + "paramsOauth2ClientCredentials": { + "description": "Parameters for authentication/authorization using OAUTH2_CLIENT_CREDENTIALS. Shall be present if authType is \"OAUTH2_CLIENT_CREDENTIALS\" and the contained information has not been provisioned out of band. Shall be absent otherwise.\n", + "type": "object", + "properties": { + "clientId": { + "description": "Client identifier to be used in the access token request of the OAuth 2.0 client credentials grant type. Shall be present if it has not been provisioned out of band. The clientId and clientPassword passed in a subscription shall not be the same as the clientId and clientPassword that are used to obtain authorization for API requests. Client credentials may differ between subscriptions. The value of clientPassword should be generated by a random process.\n", + "type": "string" + }, + "clientPassword": { + "description": "Client password to be used in the access token request of the OAuth 2.0 client credentials grant type. Shall be present if it has not been provisioned out of band. The clientId and clientPassword passed in a subscription shall not be the same as the clientId and clientPassword that are used to obtain authorization for API requests. Client credentials may differ between subscriptions. The value of clientPassword should be generated by a random process.\n", + "type": "string" + }, + "tokenEndpoint": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + } + } + } + } + } \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/schemas/Subscriptions.schema.json b/SOL003/VNFPerformanceManagement-API/schemas/Subscriptions.schema.json deleted file mode 100644 index fefb142da9f905120ff32246f73e6b88062978d5..0000000000000000000000000000000000000000 --- a/SOL003/VNFPerformanceManagement-API/schemas/Subscriptions.schema.json +++ /dev/null @@ -1 +0,0 @@ -{ "type": "array", "items": { "description": "This type represents a subscription.\n", "type": "object", "required": [ "id", "callbackUri", "_links" ], "properties": { "id": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" }, "filter": { "description": "This type represents a filter that can be used to subscribe for notifications related to performance management events.\n", "type": "object", "properties": { "vnfInstanceSubscriptionFilter": { "description": "This type represents subscription filter criteria to match VNF instances.\n", "type": "object", "properties": { "vnfdIds": { "description": "If present, match VNF instances that were created based on a VNFD identified by one of the vnfdId values listed in this attribute. The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to VNF instances that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", "type": "array", "items": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" } }, "vnfProductsFromProviders": { "description": "If present, match VNF instances that belong to VNF products from certain providers. The attributes \"vnfdIds\" and \"vnfProductsFromProviders\" are alternatives to reference to VNF instances that are based on certain VNFDs in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", "type": "array", "items": { "type": "object", "required": [ "vnfProvider" ], "properties": { "vnfProvider": { "description": "Name of the VNF provider to match.\n", "type": "string" }, "vnfProducts": { "description": "If present, match VNF instances that belong to VNF products with certain product names, from one particular provider.\n", "type": "array", "items": { "type": "object", "required": [ "vnfProductName" ], "properties": { "vnfProductName": { "description": "Name of the VNF product to match.\n", "type": "string" }, "versions": { "description": "If present, match VNF instances that belong to VNF products with certain versions and a certain product name, from one particular provider.\n", "type": "array", "items": { "type": "object", "required": [ "vnfSoftwareVersion" ], "properties": { "vnfSoftwareVersion": { "description": "A version.\n", "type": "string" }, "vnfdVersions": { "description": "If present, match VNF instances that belong to VNF products with certain VNFD versions, a certain software version and a certain product name, from one particular provider.\n", "type": "array", "items": { "description": "A version.\n", "type": "string" } } } } } } } } } } }, "vnfInstanceIds": { "description": "If present, match VNF instances with an instance identifier listed in this attribute. The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to particular VNF Instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", "type": "array", "items": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" } }, "vnfInstanceNames": { "description": "If present, match VNF instances with a VNF Instance Name listed in this attribute. The attributes \"vnfInstanceIds\" and \"vnfInstanceNames\" are alternatives to reference to particular VNF Instances in a filter. They should not be used both in the same filter instance, but one alternative should be chosen.\n", "type": "array", "items": { "type": "string" } } } }, "notificationTypes": { "description": "Match particular notification types. Permitted values: * ThresholdCrossedNotification * PerformanceInformationAvailableNotification The permitted values of the \"notificationTypes\" attribute are spelled exactly as the names of the notification types to facilitate automated code generation systems.\n", "type": "string", "enum": [ "ThresholdCrossedNotification", "PerformanceInformationAvailableNotification" ] } } }, "callbackUri": { "description": "The URI of the endpoint to send the notification to.\n", "type": "string", "format": "url" }, "_links": { "description": "Links to resources related to this resource.\n", "type": "object", "required": [ "self" ], "properties": { "self": { "description": "This type represents a link to a resource.\n", "type": "object", "required": [ "href" ], "properties": { "href": { "description": "URI of the referenced resource.\n", "type": "string", "format": "url" } } } } } } }} \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/schemas/ThresholdModifications.json b/SOL003/VNFPerformanceManagement-API/schemas/ThresholdModifications.json new file mode 100644 index 0000000000000000000000000000000000000000..688bbfe8a750085ab4a6c64169fb2d8677fe67dd --- /dev/null +++ b/SOL003/VNFPerformanceManagement-API/schemas/ThresholdModifications.json @@ -0,0 +1,62 @@ +{ + "description": "This type represents modifications to a threshold. It shall comply with the provisions defined in table 6.5.2.11-1.\n", + "type": "object", + "properties": { + "callbackUri": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + }, + "authentication": { + "type": "object", + "required": [ + "authType" + ], + "properties": { + "authType": { + "description": "Defines the types of Authentication / Authorization which the API consumer is willing to accept when receiving a notification. Permitted values: * BASIC: In every HTTP request to the notification endpoint, use\n HTTP Basic authentication with the client credentials. \n* OAUTH2_CLIENT_CREDENTIALS: In every HTTP request to the\n notification endpoint, use an OAuth 2.0 Bearer token, obtained\n using the client credentials grant type.\n* TLS_CERT: Every HTTP request to the notification endpoint is sent\n over a mutually authenticated TLS session, i.e. not only the\n server is authenticated, but also the client is authenticated\n during the TLS tunnel setup.\n", + "type": "array", + "items": { + "type": "string", + "enum": [ + "BASIC", + "OAUTH2_CLIENT_CREDENTIALS", + "TLS_CERT" + ] + } + }, + "paramsBasic": { + "description": "Parameters for authentication/authorization using BASIC. Shall be present if authType is \"BASIC\" and the contained information has not been provisioned out of band. Shall be absent otherwise.\n", + "type": "object", + "properties": { + "userName": { + "description": "Username to be used in HTTP Basic authentication. Shall be present if it has not been provisioned out of band.\n", + "type": "string" + }, + "password": { + "description": "Password to be used in HTTP Basic authentication. Shall be present if it has not been provisioned out of band.\n", + "type": "string" + } + } + }, + "paramsOauth2ClientCredentials": { + "description": "Parameters for authentication/authorization using OAUTH2_CLIENT_CREDENTIALS. Shall be present if authType is \"OAUTH2_CLIENT_CREDENTIALS\" and the contained information has not been provisioned out of band. Shall be absent otherwise.\n", + "type": "object", + "properties": { + "clientId": { + "description": "Client identifier to be used in the access token request of the OAuth 2.0 client credentials grant type. Shall be present if it has not been provisioned out of band. The clientId and clientPassword passed in a subscription shall not be the same as the clientId and clientPassword that are used to obtain authorization for API requests. Client credentials may differ between subscriptions. The value of clientPassword should be generated by a random process.\n", + "type": "string" + }, + "clientPassword": { + "description": "Client password to be used in the access token request of the OAuth 2.0 client credentials grant type. Shall be present if it has not been provisioned out of band. The clientId and clientPassword passed in a subscription shall not be the same as the clientId and clientPassword that are used to obtain authorization for API requests. Client credentials may differ between subscriptions. The value of clientPassword should be generated by a random process.\n", + "type": "string" + }, + "tokenEndpoint": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + } + } + } + } + } \ No newline at end of file diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot index dfb570e1dacda38ab86b1f766a1e534396155e9e..851231ae03909dddc2d865f00b1bbf2e5e4f0cc4 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/ApiVersion.robot @@ -1,211 +1,211 @@ -*** Settings *** -Resource environment/variables.txt -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Library DependencyLibrary -Library JSONLibrary -Library JSONSchemaLibrary schemas/ - -*** Test Cases *** -POST API Version - Method not implemented - [Documentation] Test ID: 7.3.7.3.1 - ... Test title: POST API version - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version - [Documentation] Test ID: 7.3.7.3.2 - ... Test title: GET API Version - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version - Method not implemented - [Documentation] Test ID: 7.3.7.3.3 - ... Test title: PUT API Version - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version - Method not implemented - [Documentation] Test ID: 7.3.7.3.4 - ... Test title: PATCH API Version - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version - Method not implemented - [Documentation] Test ID: 7.3.7.3.5 - ... Test title: DELETE API Version - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -POST API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.7.3.6 - ... Test title: POST API version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version with apiMajorVerion - [Documentation] Test ID: 7.3.7.3.7 - ... Test title: GET API Version with apiMajorVerion - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.7.3.8 - ... Test title: PUT API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.7.3.9 - ... Test title: PATCH API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.7.3.10 - ... Test title: DELETE API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -*** Keywords *** -POST API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response['body']} +*** Settings *** +Resource environment/variables.txt +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 7.3.7.3.1 + ... Test title: POST API version - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 7.3.7.3.2 + ... Test title: GET API Version + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version - Method not implemented + [Documentation] Test ID: 7.3.7.3.3 + ... Test title: PUT API Version - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 7.3.7.3.4 + ... Test title: PATCH API Version - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 7.3.7.3.5 + ... Test title: DELETE API Version - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +POST API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.7.3.6 + ... Test title: POST API version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 7.3.7.3.7 + ... Test title: GET API Version with apiMajorVerion + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.7.3.8 + ... Test title: PUT API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.7.3.9 + ... Test title: PATCH API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.7.3.10 + ... Test title: DELETE API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/IndividualSubscription.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/IndividualSubscription.robot index a42c3215ccda8e3f3c46fe93415636e2413c486f..a7e95f99c667d0dc0cda0a3286440a5c22cfd7d0 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/IndividualSubscription.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/IndividualSubscription.robot @@ -10,12 +10,12 @@ Documentation This resource represents an individual subscription. The client Suite Setup Check Individual Subscription existence *** Test Cases *** -Create new Virtualised Resources Quota Available Notification individual subscription +Create new Virtualised Resources Quota Available Notification individual subscription - Method not implemented [Documentation] Test ID: 7.3.7.2.1 - ... Test title: Create new Virtualised Resources Quota Available Notification individual subscription + ... Test title: Create new Virtualised Resources Quota Available Notification individual subscription - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new Virtualised Resources Quota Available Notification individual subscription instance on VNF ... Pre-conditions: A VNF instance is instantiated - ... Reference: Clause 11.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -27,7 +27,7 @@ Get Information about an individual subscription ... Test title: Get Information about an individual subscription ... Test objective: The objective is to read an individual Virtualised Resources Quota Available Notification subscription subscribed by the client and perform a JSON schema and content validation of the returned individual subscription data structure ... Pre-conditions: The subscription with the given id exists - ... Reference: Clause 11.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -40,7 +40,7 @@ PUT an individual subscription - Method not implemented ... Test title: PUT an individual subscription - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update a existing Virtualised Resources Quota Available Notification individual subscription instance on VNF ... Pre-conditions: A VNF instance is instantiated - ... Reference: Clause 11.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -52,7 +52,7 @@ PATCH an individual subscription - Method not implemented ... Test title: PATCH an individual subscription - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify a existing Virtualised Resources Quota Available Notification individual subscription instance on VNF ... Pre-conditions: A VNF instance is instantiated - ... Reference: Clause 11.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -64,11 +64,23 @@ DELETE an individual subscription ... Test title: DELETE an individual subscription ... Test objective: The objective is to test that Delete method is allowed to remove a existing Virtualised Resources Quota Available Notification individual subscription instance on VNF ... Pre-conditions: The subscription with the given id exists - ... Reference: Clause 11.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Delete Virtualised Resources Quota Available Notification individual subscription Check HTTP Response Status Code Is 204 Check Postcondition VNF Virtualised Resources Quota Available Notification individual Subscriptions is Deleted - \ No newline at end of file + +Get Information about an individual subscription - Not Found + [Documentation] Test ID: 7.3.7.2.6 + ... Test title: Get Information about an individual subscription - Not Found + ... Test objective: The objective is to test that the retrieval of an individual Virtualised Resources Quota Available Notification subscription subscribed by the client fils when resource is not present + ... Pre-conditions: The subscription with the given id does not exists + ... Reference: Clause 11.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get Virtualised Resources Quota Available Notification individual subscription + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/NotificationEndpoint.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/NotificationEndpoint.robot index ae3bddf2bd6b1f4296e7830a8b93a09309a22d29..e02be2df57eb312c8a0d411da96d9b9a233e4cf7 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/NotificationEndpoint.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/NotificationEndpoint.robot @@ -1,83 +1,47 @@ *** Settings *** -Resource environment/variables.txt -Resource VRQANOperationKeywords.robot -Suite Setup Create Sessions -Suite Teardown Terminate All Processes kill=true -Library MockServerLibrary -Library Process +Library String +Resource environment/variables.txt Library OperatingSystem - -*** Variables *** - +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri *** Test Cases *** -Deliver a notification - Vr Quota Availibility - [Documentation] Test ID: 11.4.4.1 - ... Test title: Deliver a notification - Vr Quota Availibility - ... Test objective: The objective is to notify related to the availability of the virtualised resources quota. +Vr Quota Availibility Notification + [Documentation] Test ID: 7.3.7.4.1 + ... Test title: Vr Quota Availibility Notification + ... Test objective: The objective is to test that Vr Quota Availibility Notification is delivered with success to the notification consumer ... Pre-conditions: The VNF has subscribed to the Vr Quota Availibility resource - ... Reference: Clause 11.4.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: - ... Post-Conditions: - log The POST method delivers a notification from the server to the client. - ${json}= Get File schemas/VrQuotaAvailNotification.schema.json - ${BODY}= evaluate json.loads('''${json}''') json - Log Creating mock request and response to handle Vr Quota AvailibilityNotification - &{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY} - &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${req} ${rsp} - Sleep ${sleep_interval} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} - -Test a notification end point - log The GET method allows the server to test the notification endpoint - &{req}= Create Mock Request Matcher GET ${callback_endpoint} - &{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${req} ${rsp} - Sleep ${sleep_interval} - Verify Mock Expectation ${req} - Clear Requests ${callback_endpoint} - -PUT notification - Method not implemented - Log PUT Method not implemented - &{req}= Create Mock Request Matcher PUT ${callback_endpoint} - &{rsp}= Create Mock Response status_code=405 - Create Mock Expectation ${req} ${rsp} - Sleep ${sleep_interval} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} - -PATCH subscriptions - Method not implemented - Log PATCH Method not implemented - &{req}= Create Mock Request Matcher PATCH ${callback_endpoint} - &{rsp}= Create Mock Response status_code=405 - Create Mock Expectation ${req} ${rsp} - Sleep ${sleep_interval} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} - -DELETE subscriptions - Method not implemented - Log DELETE Method not implemented - &{req}= Create Mock Request Matcher DELETE ${callback_endpoint} - &{rsp}= Create Mock Response status_code=405 - Create Mock Expectation ${req} ${rsp} - Sleep ${sleep_interval} - Log Verifying results - Verify Mock Expectation ${req} - Log Cleaning the endpoint - Clear Requests ${callback_endpoint} - + ... Reference: Clause 11.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Vr Quota Avail Notification + Check HTTP Response Status Code Is 204 + *** Keywords *** -Create Sessions - Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance - Wait For Process handle=mockInstance timeout=5s on_timeout=continue - Create Mock Session ${callback_uri}:${callback_port} - +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body VrQuotaAvailSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post Vr Quota Avail Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/VrQuotaAvailNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Notifications.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Notifications.robot new file mode 100644 index 0000000000000000000000000000000000000000..d1a1a3272795a3a74d8acf51d43bb23aa36594c0 --- /dev/null +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Notifications.robot @@ -0,0 +1,63 @@ +*** Settings *** +Resource environment/variables.txt +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true +Library MockServerLibrary +Library Process +Library OperatingSystem +Library Collections + +*** Test Cases *** +Virtualised Resource Quota Available Notification + [Documentation] Test ID: 7.3.7.5.1 + ... Test title: Virtualised Resource Quota Available Notification + ... Test objective: The objective is to test the dispatch of Virtualised Resource Quota Available Notification, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A subscription for Virtualised Resource Quota Available Notification is available in the VNFM. + ... Reference: Clause 11.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Trigger a dispatch of virtualised resource quota available notification (external action) + Check Virtualised Resource Quota Available Notification Http POST Request Body Json Schema Is VrQuotaAvailNotification + Check Virtualised Resource Quota Available Notification Http POST Request Body notificationType attribute Is VrQuotaAvailNotification + +*** Keywords *** + +Trigger a dispatch of virtualised resource quota available notification (external action) + #do nothing + Log do nothing + +Check Virtualised Resource Quota Available Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + +Check Virtualised Resource Quota Available Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Virtual Quota Available Notification Handler ${callback_endpoint_fwd} ${type} + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Configure Virtual Quota Available Notification Handler + [Arguments] ${endpoint} ${type} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{notification_response}= Create Mock Response status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Configure Notification Forward + [Arguments] ${schema} ${endpoint} ${endpoint_fwd} + Log Creating mock Http POST forward to handle ${schema} + &{notification_tmp}= Create Mock Request Matcher POST ${endpoint} body_type="JSON_SCHEMA" body=${schema} + &{notification_fwd}= Create Mock Http Forward ${endpoint_fwd} + Create Mock Expectation With Http Forward ${notification_tmp} ${notification_fwd} + +Create Sessions + Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance + Wait For Process handle=mockInstance timeout=5s on_timeout=continue + Create Mock Session ${callback_uri}:${callback_port} diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot index 75c19e15820a1f3b9e33156c72af7d74d9e45d62..30d90c4f98d743ded4a0e6217e194e670720ecfa 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/Subscriptions.robot @@ -5,8 +5,9 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=fal Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ - - +Library Process +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true *** Test Cases *** Create new Virtualised Resources Quota Available Notification subscription @@ -14,7 +15,7 @@ Create new Virtualised Resources Quota Available Notification subscription ... Test title: Create new Virtualised Resources Quota Available Notification subscription ... Test objective: The objective is to create a new Virtualised Resources Quota Available Notification subscription and perform a JSON schema and content validation of the returned subscription data structure ... Pre-conditions: no subscription with the same filter and callbackUri exists - ... Reference: Clause 11.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -23,13 +24,12 @@ Create new Virtualised Resources Quota Available Notification subscription Check HTTP Response Header Contains Location Check HTTP Response Body Json Schema Is VrQuotaAvailSubscription - Create new Virtualised Resources Quota Available Notification subscription - DUPLICATION [Documentation] Test ID: 7.3.7.1.2 ... Test title: Create new Virtualised Resources Quota Available Notification subscription - DUPLICATION ... Test objective: The objective is to create a new Virtualised Resources Quota Available Notification subscription and perform a JSON schema and content validation of the returned duplicated subscription data structure ... Pre-conditions: subscription with the same filter and callbackUri exists - ... Reference: Clause 11.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: the VNFM allows creating a subscription resource if another subscription resource with the same filter and callbackUri already exists ... Post-Conditions: none @@ -43,7 +43,7 @@ Create new Virtualised Resources Quota Available Notification subscription - NO- ... Test title: Create new Virtualised Resources Quota Available Notification subscription - NO-DUPLICATION ... Test objective: The objective is to create a nduplicated Virtualised Resources Quota Available Notification subscription and verify that the VNF does not allow duplication ... Pre-conditions: subscription with the same filter and callbackUri exists - ... Reference: Clause 11.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: the VNFM decides to not create a duplicate subscription resource ... Post-Conditions: none @@ -56,7 +56,7 @@ GET Virtualised Resources Quota Available Notification Subscriptions ... Test title: GET Virtualised Resources Quota Available Notification Subscriptions ... Test objective: The objective is to retrieve the list of active Virtualised Resources Quota Available Notification subscriptions and perform a JSON schema and content validation of the returned subscriptions data structure ... Pre-conditions: none - ... Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -69,7 +69,7 @@ GET Virtualised Resources Quota Available Notification Subscriptions with attrib ... Test title: GET Virtualised Resources Quota Available Notification Subscriptions with attribute-based Filter ... Test objective: The objective is to retrieve the list of active Virtualised Resources Quota Available Notification subscriptions and perform a JSON schema and content validation of the returned subscriptions data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: none - ... Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -82,7 +82,7 @@ GET Virtualised Resources Quota Available Notification subscriptions - Bad Reque ... Test title: GET Virtualised Resources Quota Available Notification subscriptions - Bad Request Invalid attribute-based filtering parameters ... Test objective: The objective is to retrieve the list of active Virtualised Resources Quota Available Notification subscriptions with invalid attribute-based filtering parameters, and verify that problem details are returned ... Pre-conditions: none - ... Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -95,7 +95,7 @@ PUT Virtualised Resources Quota Available Notification subscriptions - Method no ... Test title: PUT Virtualised Resources Quota Available Notification subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update existing Virtualised Resources Quota Available Notification subscriptions instance on VNF ... Pre-conditions: A VNF instance is instantiated - ... Reference: Clause 11.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -107,7 +107,7 @@ PATCH Virtualised Resources Quota Available Notification subscriptions - Method ... Test title: PATCH Virtualised Resources Quota Available Notification subscriptions - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify Virtualised Resources Quota Available Notification subscriptions instance on VNF ... Pre-conditions: A VNF instance is instantiated - ... Reference: Clause 11.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -119,20 +119,19 @@ DELETE Virtualised Resources Quota Available Notification subscriptions - Method ... Test title: DELETE Virtualised Resources Quota Available Notification subscriptions - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to delete Virtualised Resources Quota Available Notification subscriptions instance on VNF ... Pre-conditions: A VNF instance is instantiated - ... Reference: Clause 11.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Send Delete request for Virtualised Resources Quota Available Notification subscription Check HTTP Response Status Code Is 405 - Check Postcondition VNF Virtualised Resources Quota Available Notification Subscriptions Exists GET Virtualised Resources Quota Available Notification Subscriptions as Paged Response [Documentation] Test ID: 7.3.7.1.10 ... Test title: GET Virtualised Resources Quota Available Notification Subscriptions as Paged Response ... Test objective: The objective is to retrieve the list of active Virtualised Resources Quota Available Notification subscriptions as a Paged Response. ... Pre-conditions: none - ... Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -145,10 +144,23 @@ GET Virtualised Resources Quota Available Notification subscriptions - Bad Reque ... Test title: GET Virtualised Resources Quota Available Notification subscriptions - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of active Virtualised Resources Quota Available Notification subscriptions list fails because response is too big, and verify that problem details are returned ... Pre-conditions: none - ... Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 11.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none GET Virtualised Resources Quota Available Notification Subscriptions Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file + Check HTTP Response Body Json Schema Is ProblemDetails + +Create new Virtualised Resources Quota Available Notification Subscription - Unprocessable Entity + [Documentation] Test ID: 7.3.7.1.12 + ... Test title: Create new Virtualised Resources Quota Available Notification Subscription - Unprocessable Entity + ... Test objective: The objective is to test that content type of the payload body is supported and the payload body of a request contains syntactically correct data but the data cannot be processed. + ... re-conditions: none + ... Reference: Clause 11.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Send Post request for new Virtualised Resources Quota Available Notification subscription + Check HTTP Response Status Code Is 422 + Check HTTP Response Body Json Schema Is ProblemDetails diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot index 20d4a9fc4d1e078eb1a4a5b414d9e500d5b108a8..8ba214350a2f3c11ea302316c219d1290ab436da 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/VRQANOperationKeywords.robot @@ -1,4 +1,5 @@ *** Settings *** +Library String Resource environment/variables.txt Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library JSONLibrary @@ -16,8 +17,8 @@ Create Sessions Check Individual Subscription existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 Check HTTP Response Status Code Is @@ -33,7 +34,7 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK @@ -42,10 +43,6 @@ Check HTTP Response Header ContentType is Log Validate content type Should Be Equal ${response['headers']['Content-Type']} ${expected_contentType} Log Content Type validated - -Check Postcondition VNF Virtualised Resources Quota Available Notification Subscriptions Exists - Log Checking that subscriptions exists - GET Virtualised Resources Quota Available Notification Subscriptions Check Postcondition VNF Virtualised Resources Quota Available Notification individual Subscriptions is Deleted Log Check Postcondition Subscription is deleted @@ -55,98 +52,119 @@ Check Postcondition VNF Virtualised Resources Quota Available Notification indiv Send Post request for Virtualised Resources Quota Available Notification Individual Subscription log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Put Virtualised Resources Quota Available Notification individual Subscription log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Patch Virtualised Resources Quota Available Notification individual subscription log Trying to perform a Patch. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get Virtualised Resources Quota Available Notification individual subscription log Trying to get information about an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Delete Virtualised Resources Quota Available Notification individual subscription log Try to delete an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Send Post request for new Virtualised Resources Quota Available Notification subscription - Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/vrQuotaAvailSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/vrQuotaAvailSubscriptionRequest.json + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_subscribe=${callback_subscribe} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} Send Post request for new Virtualised Resources Quota Available Notification subscription - DUPLICATION Log Trying to create a subscription with an already created content Pass Execution If ${NFVO_DUPLICATION} == 0 NVFO is not permitting duplication. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/vrQuotaAvailSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/vrQuotaAvailSubscriptionRequest.json + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_subscribe=${callback_subscribe} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} Send Post request for new Virtualised Resources Quota Available Notification subscription - NO-DUPLICATION Log Trying to create a subscription with an already created content Pass Execution If ${NFVO_DUPLICATION} == 1 VNFM permits duplication. Skipping the test Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/vrQuotaAvailSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/vrQuotaAvailSubscriptionRequest.json + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_subscribe=${callback_subscribe} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} GET Virtualised Resources Quota Available Notification Subscriptions Log Get the list of active subscriptions Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Virtualised Resources Quota Available Notification Subscriptions with Filter Log Get the list of active subscriptions Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get Virtualised Resources Quota Available Notification subscriptions with Bad Request Invalid attribute-based filtering parameters Log Get the list of active subscriptions using an invalid filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter_invalid} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter_invalid} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -154,8 +172,8 @@ Send Put request for Virtualised Resources Quota Available Notification subscrip log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -163,8 +181,8 @@ Send Patch request for Virtualised Resources Quota Available Notification subscr log Trying to perform a Patch. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -172,8 +190,8 @@ Send Delete request for Virtualised Resources Quota Available Notification subsc log Trying to perform a Delete. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/environment/variables.txt b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/environment/variables.txt index 87671b9f847d9fdcfee833efa5f7c4edeb3c5f39..3a90362a0278b29ff335e55839f5ff894992e7c9 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/environment/variables.txt +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/environment/variables.txt @@ -2,7 +2,8 @@ ${NFVO_HOST} localhost # Hostname of the NFVO ${NFVO_PORT} 8081 # Listening port of the NFVO ${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${CONTENT_TYPE} application/json ${AUTH_USAGE} 1 ${ACCEPT} application/json @@ -14,16 +15,22 @@ ${sub_filter} filter ${sub_filter_invalid} filter_invalid ${callback_endpoint} /notification +${callback_endpoint_fwd} /endpoint/check +${callback_subscribe} /subscribe ${callback_port} 9091 ${callback_uri} http://localhost ${sleep_interval} 20s +${notification_request} [] +${notification_response} [] ${apiRoot} / ${apiName} vrqan -${apiVersion} v1 +${apiMajorVersion} v1 ${VrQuotaAvailNotification} {} ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar -${response} {} \ No newline at end of file +${response} {} + +${callbackResp} 127.0.0.1 \ No newline at end of file diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/VrQuotaAvailNotification.json b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/VrQuotaAvailNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..7cab6f283672f91b7266dff30b7e17e53a144b61 --- /dev/null +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/VrQuotaAvailNotification.json @@ -0,0 +1,8 @@ +{{ + "id":"", + "notificationType":"VrQuotaAvailNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "resourceGroupId":"", + "_links":"" +}} \ No newline at end of file diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/vrQuotaAvailSubscriptionRequest .json b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/vrQuotaAvailSubscriptionRequest .json deleted file mode 100644 index 8d91c2b81fb2eb38ed0a7e91fdcee12630b11bca..0000000000000000000000000000000000000000 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/vrQuotaAvailSubscriptionRequest .json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "callbackUri": "http://127.0.0.1/subscribe" -} \ No newline at end of file diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/vrQuotaAvailSubscriptionRequest.json b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/vrQuotaAvailSubscriptionRequest.json index 8d91c2b81fb2eb38ed0a7e91fdcee12630b11bca..ffed99d472a34e8d5684c127d46c967aaa16b3f8 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/vrQuotaAvailSubscriptionRequest.json +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/jsons/vrQuotaAvailSubscriptionRequest.json @@ -1,3 +1,3 @@ -{ - "callbackUri": "http://127.0.0.1/subscribe" -} \ No newline at end of file +{{ + "callbackUri": "{callback_uri}{callback_subscribe}" +}} \ No newline at end of file diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/VrQuotaAvailNotification.schema.json b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/VrQuotaAvailNotification.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..31a1800bb892cd878c149690a310ac96ba0793c8 --- /dev/null +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/VrQuotaAvailNotification.schema.json @@ -0,0 +1,8 @@ +{ + "id":"", + "notificationType":"VrQuotaAvailNotification", + "subscriptionId": "", + "timeStamp":"", + "resourceGroupId":"", + "_links": "" +} \ No newline at end of file diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/VrQuotaAvailSubscription.schema.json b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/VrQuotaAvailSubscription.schema.json index aaa9c5405f04827b4e312fa8c9d4f02781f04966..8f37c51c13940fb8e3a3ac7e6c803ba621f9c9cb 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/VrQuotaAvailSubscription.schema.json +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/VrQuotaAvailSubscription.schema.json @@ -1 +1,83 @@ -{ "description": "This type represents a subscription related to notifications related to the availability of the virtualised resources quotas.\n", "type": "object", "required": [ "id", "callbackUri", "_links" ], "properties": { "id": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" }, "filter": { "description": "This type represents a subscription filter related to notifications about the availability of the virtualised resources quotas. At a particular nesting level in the filter structure, the following applies: All attributes shall match in order for the filter to match (logical \"and\" between different filter attributes). If an attribute is an array, the attribute shall match if at least one of the values in the array matches (logical \"or\" between the values of one filter attribute).\n", "type": "object", "properties": { "vimIds": { "description": "Match VIMs that were created the quota for a consumer of the virtualised resources. This attribute shall only be supported when VNF-related Resource Management in direct mode is applicable.\n", "type": "array", "items": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" } }, "resourceProviderIds": { "description": "Match the entities responsible for the management of the virtualised resources that were allocated by the NFVO. This attribute shall only be supported when VNF-related Resource Management in indirect mode is applicable. The identification scheme is outside the scope of the present document.\n", "type": "array", "items": { "description": "An identifier with the intention of being globally unique.\n", "type": "string" } }, "resourceTypes": { "description": "Match particular resource types.\n", "type": "array", "items": { "type": "string", "enum": [ "COMPUTE", "STORAGE", "NETWORK" ] } }, "resourceGroupIds": { "description": "Match the \"infrastructure resource groups\" that are logical groupings of the virtualised resources assigned to a tenant within an infrastructure Domain.\n", "type": "array", "items": { "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n", "type": "string" } } } }, "callbackUri": { "description": "String formatted according to IETF RFC 3986.\n", "type": "string" }, "_links": { "description": "Links for this resource\n", "type": "object", "required": [ "self" ], "properties": { "self": { "description": "This type represents a link to a resource.\n", "type": "object", "required": [ "href" ], "properties": { "href": { "description": "URI of the referenced resource.\n", "type": "string", "format": "url" } } } } } }} \ No newline at end of file +{ + "description": "This type represents a subscription related to notifications related to the availability of the virtualised resources quotas.\n", + "type": "object", + "required": [ + "id", + "callbackUri", + "_links" + ], + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "filter": { + "description": "This type represents a subscription filter related to notifications about the availability of the virtualised resources quotas. At a particular nesting level in the filter structure, the following applies: All attributes shall match in order for the filter to match (logical \"and\" between different filter attributes). If an attribute is an array, the attribute shall match if at least one of the values in the array matches (logical \"or\" between the values of one filter attribute).\n", + "type": "object", + "properties": { + "vimIds": { + "description": "Match VIMs that were created the quota for a consumer of the virtualised resources. This attribute shall only be supported when VNF-related Resource Management in direct mode is applicable.\n", + "type": "array", + "items": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + } + }, + "resourceProviderIds": { + "description": "Match the entities responsible for the management of the virtualised resources that were allocated by the NFVO. This attribute shall only be supported when VNF-related Resource Management in indirect mode is applicable. The identification scheme is outside the scope of the present document.\n", + "type": "array", + "items": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + } + }, + "resourceTypes": { + "description": "Match particular resource types.\n", + "type": "array", + "items": { + "type": "string", + "enum": [ + "COMPUTE", + "STORAGE", + "NETWORK" + ] + } + }, + "resourceGroupIds": { + "description": "Match the \"infrastructure resource groups\" that are logical groupings of the virtualised resources assigned to a tenant within an infrastructure Domain.\n", + "type": "array", + "items": { + "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n", + "type": "string" + } + } + } + }, + "callbackUri": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + }, + "_links": { + "description": "Links for this resource\n", + "type": "object", + "required": [ + "self" + ], + "properties": { + "self": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/VrQuotaAvailSubscriptions.schema.json b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/VrQuotaAvailSubscriptions.schema.json index 8bab3d1575abdc963c8dd8d981471d6ed43ec854..9ad57bc211fa48c9296b5ca4daba991bcb06ccb7 100644 --- a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/VrQuotaAvailSubscriptions.schema.json +++ b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/VrQuotaAvailSubscriptions.schema.json @@ -1,87 +1,87 @@ { "type": "array", - "items": { - "description": "This type represents a subscription related to notifications related to the availability of the virtualised resources quotas.\n", - "type": "object", - "required": [ - "id", - "callbackUri", - "_links" - ], - "properties": { - "id": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - }, - "filter": { - "description": "This type represents a subscription filter related to notifications about the availability of the virtualised resources quotas. At a particular nesting level in the filter structure, the following applies: All attributes shall match in order for the filter to match (logical \"and\" between different filter attributes). If an attribute is an array, the attribute shall match if at least one of the values in the array matches (logical \"or\" between the values of one filter attribute).\n", - "type": "object", - "properties": { - "vimIds": { - "description": "Match VIMs that were created the quota for a consumer of the virtualised resources. This attribute shall only be supported when VNF-related Resource Management in direct mode is applicable.\n", - "type": "array", - "items": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - } - }, - "resourceProviderIds": { - "description": "Match the entities responsible for the management of the virtualised resources that were allocated by the NFVO. This attribute shall only be supported when VNF-related Resource Management in indirect mode is applicable. The identification scheme is outside the scope of the present document.\n", - "type": "array", - "items": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - } - }, - "resourceTypes": { - "description": "Match particular resource types.\n", - "type": "array", - "items": { - "type": "string", - "enum": [ - "COMPUTE", - "STORAGE", - "NETWORK" - ] - } - }, - "resourceGroupIds": { - "description": "Match the \"infrastructure resource groups\" that are logical groupings of the virtualised resources assigned to a tenant within an infrastructure Domain.\n", - "type": "array", - "items": { - "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n", - "type": "string" - } - } - } - }, - "callbackUri": { - "description": "String formatted according to IETF RFC 3986.\n", - "type": "string" - }, - "_links": { - "description": "Links for this resource\n", - "type": "object", - "required": [ - "self" - ], - "properties": { - "self": { - "description": "This type represents a link to a resource.\n", - "type": "object", - "required": [ - "href" - ], - "properties": { - "href": { - "description": "URI of the referenced resource.\n", - "type": "string", - "format": "url" - } - } - } - } - } - } + "items": + { + "description": "This type represents a subscription related to notifications related to the availability of the virtualised resources quotas.\n", + "type": "object", + "required": [ + "id", + "callbackUri", + "_links" + ], + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "filter": { + "description": "This type represents a subscription filter related to notifications about the availability of the virtualised resources quotas. At a particular nesting level in the filter structure, the following applies: All attributes shall match in order for the filter to match (logical \"and\" between different filter attributes). If an attribute is an array, the attribute shall match if at least one of the values in the array matches (logical \"or\" between the values of one filter attribute).\n", + "type": "object", + "properties": { + "vimIds": { + "description": "Match VIMs that were created the quota for a consumer of the virtualised resources. This attribute shall only be supported when VNF-related Resource Management in direct mode is applicable.\n", + "type": "array", + "items": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + } + }, + "resourceProviderIds": { + "description": "Match the entities responsible for the management of the virtualised resources that were allocated by the NFVO. This attribute shall only be supported when VNF-related Resource Management in indirect mode is applicable. The identification scheme is outside the scope of the present document.\n", + "type": "array", + "items": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + } + }, + "resourceTypes": { + "description": "Match particular resource types.\n", + "type": "array", + "items": { + "type": "string", + "enum": [ + "COMPUTE", + "STORAGE", + "NETWORK" + ] + } + }, + "resourceGroupIds": { + "description": "Match the \"infrastructure resource groups\" that are logical groupings of the virtualised resources assigned to a tenant within an infrastructure Domain.\n", + "type": "array", + "items": { + "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance.\n", + "type": "string" + } + } + } + }, + "callbackUri": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + }, + "_links": { + "description": "Links for this resource\n", + "type": "object", + "required": [ + "self" + ], + "properties": { + "self": { + "description": "This type represents a link to a resource using an absolute URI.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string" + } + } + } + } + } + } } -} +} \ No newline at end of file diff --git a/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/vrQuotaAvailNotification.schema.json b/SOL003/VirtualisedResourcesQuotaAvailableNotification-API/schemas/vrQuotaAvailNotification.schema.json deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/SOL005/NSDManagement-API/ApiVersion.robot b/SOL005/NSDManagement-API/ApiVersion.robot index 4f632f26a50589ffe78828d2dbd99205a10a6305..483496f5b3743763103bd1d9c26a4712f7f1af9e 100644 --- a/SOL005/NSDManagement-API/ApiVersion.robot +++ b/SOL005/NSDManagement-API/ApiVersion.robot @@ -1,213 +1,213 @@ -*** Settings *** - -Resource environment/variables.txt - -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Library DependencyLibrary -Library JSONLibrary -Library JSONSchemaLibrary schemas/ - -*** Test Cases *** -POST API Version - Method not implemented - [Documentation] Test ID: 5.3.1.10.1 - ... Test title: POST API version - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version - [Documentation] Test ID: 5.3.1.10.2 - ... Test title: GET API Version - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version - Method not implemented - [Documentation] Test ID: 5.3.1.10.3 - ... Test title: PUT API Version - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version - Method not implemented - [Documentation] Test ID: 5.3.1.10.4 - ... Test title: PATCH API Version - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version - Method not implemented - [Documentation] Test ID: 5.3.1.10.5 - ... Test title: DELETE API Version - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -POST API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 5.3.1.10.6 - ... Test title: POST API version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version with apiMajorVerion - [Documentation] Test ID: 5.3.1.10.7 - ... Test title: GET API Version with apiMajorVerion - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 5.3.1.10.8 - ... Test title: PUT API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 5.3.1.10.9 - ... Test title: PATCH API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 5.3.1.10.10 - ... Test title: DELETE API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -*** Keywords *** -POST API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response['body']} +*** Settings *** + +Resource environment/variables.txt + +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 5.3.1.10.1 + ... Test title: POST API version - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 5.3.1.10.2 + ... Test title: GET API Version + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version - Method not implemented + [Documentation] Test ID: 5.3.1.10.3 + ... Test title: PUT API Version - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 5.3.1.10.4 + ... Test title: PATCH API Version - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 5.3.1.10.5 + ... Test title: DELETE API Version - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +POST API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 5.3.1.10.6 + ... Test title: POST API version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 5.3.1.10.7 + ... Test title: GET API Version with apiMajorVerion + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 5.3.1.10.8 + ... Test title: PUT API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 5.3.1.10.9 + ... Test title: PATCH API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 5.3.1.10.10 + ... Test title: DELETE API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL005/NSDManagement-API/IndividualNSDescriptor.robot b/SOL005/NSDManagement-API/IndividualNSDescriptor.robot index 2ff40359ef50c4867f8ffc10cc39ba13fab7df26..af1f0343e1cf2a7ce5eccd1b4bf213803ccb309a 100644 --- a/SOL005/NSDManagement-API/IndividualNSDescriptor.robot +++ b/SOL005/NSDManagement-API/IndividualNSDescriptor.robot @@ -2,7 +2,6 @@ Documentation This Clause defines all the resources and methods provided by the Individual NS descriptor interface. \ Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/nsDescriptors.txt # Specific nsDescriptors Parameters Resource NSDManagementKeywords.robot Library OperatingSystem Library JSONLibrary @@ -15,7 +14,7 @@ GET Individual Network Service Descriptor Information ... Test title: GET Individual Network Service Descriptor Information ... Test objective: The objective is to test the retrieval of an individual Network Service Descriptor information and perform a JSON schema validation of the collected data structure ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO. - ... Reference: Clause 5.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -23,6 +22,7 @@ GET Individual Network Service Descriptor Information Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is NsdInfo Check HTTP Response Header Contains ETag + Check HTTP Response Body NsInstance content against NS Descriptor Check HTTP Response Body NsdInfo Identifier matches the requested Network Service Descriptor Information GET Individual Network Service Descriptor Information with invalid resource identifier @@ -30,19 +30,20 @@ GET Individual Network Service Descriptor Information with invalid resource iden ... Test title: GET Individual Network Service Descriptor Information with invalid resource identifier ... Test objective: The objective is to test that the retrieval of an individual Network Service Descriptor Information fails when using an invalid resource identifier ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO. - ... Reference: Clause 5.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET Individual Network Service Descriptor Information with invalid resource identifier Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails Disable Individual Network Service Descriptor [Documentation] Test ID: 5.3.1.2.3 ... Test title: Disable Individual Network Service Descriptor ... Test objective: The objective is to test the disabling of an individual Network Service Descriptor and perform a JSON schema and content validation of the collected data structure ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO in enabled operational state. - ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The Network Service Descriptor is in operational state DISABLED and usage state is not modified @@ -58,7 +59,7 @@ Enable Individual Network Service Descriptor ... Test title: Enable Individual Network Service Descriptor ... Test objective: The objective is to test the enabling of an individual Network Service Descriptor and perform a JSON schema and content validation of the collected data structure ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO in DISABLED operational state (Test ID 5.3.1.2.3). - ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The Network Service Descriptor is in operational state ENABLED and usage state is not modified @@ -73,7 +74,7 @@ Enable Individual Network Service Descriptor with conflict due to operational st ... Test title: Enable Individual Network Service Descriptor with conflict due to operational state ENABLED ... Test objective: The objective is to test that enabling an individual Network Service Descriptor that is already in ENABLED operational state failsand perform a JSON schema validation of the failed operation HTTP response ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO in ENABLED operational state (Test ID 5.3.1.2.4). - ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -86,7 +87,7 @@ Enable Individual Network Service Descriptor with conflict due to onboarding sta ... Test title: Enable Individual Network Service Descriptor with conflict due to onboarding state ... Test objective: The objective is to test that the retrieval of an Network Service Descriptor fails due to a conflict when the Network Service Descriptor 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: One or more Network Service Descriptors are onboarded in the NFVO in ENABLED operational state. The onboarding state of the Network Service Descriptor for which the enabling is requested is different from ONBOARDED. - ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -94,24 +95,35 @@ Enable Individual Network Service Descriptor with conflict due to onboarding sta Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - Enable Individual Network Service Descriptor with HTTP Etag precondition failure +Enable Individual Network Service Descriptor with HTTP Etag precondition failure [Documentation] Test ID: 5.3.1.2.7 ... Test title: Enable Individual Network Service Descriptor with HTTP Etag precondition failure ... Test objective: The objective is to test that the retrieval of an Network Service Descriptor fails due to a precondition failure when using an uncorrect Http Etag identified. ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO in ENABLED operational state (Test ID 5.3.1.2.4). - ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Send PATCH to enable Individual Network Service Descriptor with HTTP Etag precondition failure Check HTTP Response Status Code Is 412 +Void + [Documentation] Test ID: 5.3.1.2.8 + ... Test title: Void + ... Test objective: Void + ... Pre-conditions: Void + ... Reference: Void + ... Config ID: Void + ... Applicability: Void + ... Post-Conditions: Void + Void + DELETE Individual Network Service Descriptor [Documentation] Test ID: 5.3.1.2.9 ... Test title: DELETE Individual Network Service Descriptor ... Test objective: The objective is to test the deletion of an individual Network Service Descriptor. ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO in DISABLED operational state and NOT_IN_USE usage state. - ... Reference: Clause 5.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The Network Service Descriptor is not available anymore in the NFVO @@ -124,7 +136,7 @@ DELETE Individual Network Service Descriptor in operational state ENABLED ... Test title: DELETE Individual Network Service Descriptor in operational state ENABLED ... Test objective: The objective is to test that the deletion of an individual Network Service Descriptor in operational state ENABLED fails. The test also performs a JSON schema validation of the failed operation HTTP response. ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO in ENABLED operational state (Test ID 5.3.1.2.4). - ... Reference: Clause 5.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The Network Service Descriptor is not deleted by the failed operation. @@ -138,7 +150,7 @@ POST Individual Network Service Descriptor - Method not implemented ... Test title: POST Individual Network Service Descriptor - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new Network Service Descriptor ... Pre-conditions: none - ... Reference: Clause 5.4.3.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.3.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -150,9 +162,14 @@ PUT Individual Network Service Descriptor - Method not implemented ... Test title: PUT Individual Network Service Descriptor - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify a new Network Service Descriptor ... Pre-conditions: none - ... Reference: Clause 5.4.3.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.3.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Send PUT Request for Individual Network Service Descriptor Check HTTP Response Status Code Is 405 + +*** Keywords *** + +Void + log do nothing diff --git a/SOL005/NSDManagement-API/IndividualPnfDescriptor.robot b/SOL005/NSDManagement-API/IndividualPnfDescriptor.robot index bb1e5d970628b1ae80e9ca61ce659ce251e024d5..8b88fc1fec848a46b368aeca468a7c4a4ec37519 100644 --- a/SOL005/NSDManagement-API/IndividualPnfDescriptor.robot +++ b/SOL005/NSDManagement-API/IndividualPnfDescriptor.robot @@ -2,7 +2,6 @@ Documentation This Clause defines all the resources and methods provided by the Iindividual PNF descriptor interface. \ Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/pnfDescriptors.txt # Specific nsDescriptors Parameters Resource NSDManagementKeywords.robot Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false @@ -14,7 +13,7 @@ GET Individual PNF Descriptor Information ... Test title: GET Individual PNF Descriptor Information ... Test objective: The objective is to test the retrieval of an individual PNF Descriptor information and perform a JSON schema validation of the collected data structure ... Pre-conditions: One or more PNF Descriptors are onboarded in the NFVO. - ... Reference: Clause 5.4.6.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.6.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -29,19 +28,20 @@ GET Individual PNF Descriptor Information with invalid resource identifier ... Test title: GET Individual PNF Descriptor Information with invalid resource identifier ... Test objective: The objective is to test that the retrieval of an individual PNF Descriptor Information fails when using an invalid resource identifier ... Pre-conditions: One or more PNF Descriptors are onboarded in the NFVO. - ... Reference: Clause 5.4.6.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.6.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET Individual PNF Descriptor Information with invalid resource identifier Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is problemDetails Update Individual PNF Descriptor [Documentation] Test ID: 5.3.1.5.3 ... Test title: Update Individual PNF Descriptor ... Test objective: The objective is to test the update of an individual PNF Descriptor and perform a JSON schema and content validation of the collected data structure ... Pre-conditions: One or more PNF Descriptors are onboarded in the NFVO. - ... Reference: Clause 5.4.6.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.6.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The PNF Descriptor is modified according to the update request @@ -50,13 +50,12 @@ Update Individual PNF Descriptor Check HTTP Response Body Json Schema Is PnfdInfoModification Check Postcondition PNF Descriptor is modified according to the requested update - Update Individual PNF Descriptor with HTTP Etag precondition failure [Documentation] Test ID: 5.3.1.5.4 ... Test title: Update Individual PNF Descriptor with HTTP Etag precondition failure ... Test objective: The objective is to test that the update of a PNF Descriptor fails due to a precondition failure when using an uncorrect Http Etag identified. ... Pre-conditions: One or more PNF Descriptors are onboarded in the NFVO. - ... Reference: Clause 5.4.6.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.6.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -68,7 +67,7 @@ POST Individual PNF Descriptor - Method not implemented ... Test title: POST Individual PNF Descriptor - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new PNF Descriptor ... Pre-conditions: none - ... Reference: Clause 5.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -79,8 +78,8 @@ PUT Individual PNF Descriptor - Method not implemented [Documentation] Test ID: 5.3.1.5.6 ... Test title: PUT Individual PNF Descriptor - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify a new PNF Descriptor - ... Pre-conditions: One or more PNF Descriptors are onboarded in the NFVO. - ... Reference: Clause 5.4.6.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.6.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -92,7 +91,7 @@ DELETE Individual PNF Descriptor ... Test title: DELETE Individual PNF Descriptor ... Test objective: The objective is to test the deletion of an individual PNF Descriptor. ... Pre-conditions: One or more PNF Descriptors are onboarded in the NFVO. - ... Reference: Clause 5.4.6.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.6.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The PNF Descriptor is not available anymore in the NFVO diff --git a/SOL005/NSDManagement-API/IndividualSubscription.robot b/SOL005/NSDManagement-API/IndividualSubscription.robot index cd9047ea1dcdb89a1010b53aa9e2f53f22b548f3..932e761c2764c1c03e0af4b664f7ab71c83f2515 100644 --- a/SOL005/NSDManagement-API/IndividualSubscription.robot +++ b/SOL005/NSDManagement-API/IndividualSubscription.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/individualSubscription.txt Resource NSDManagementKeywords.robot Library OperatingSystem Library JSONLibrary @@ -13,13 +12,14 @@ GET Individual NSD Management Subscription ... Test title: GET Individual NSD Management Subscription ... Test objective: The objective is to test the retrieval of individual NSD Management subscription and perform a JSON schema and content validation of the returned subscription data structure ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. - ... Reference: Clause 5.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Get Individual NSD Management Subscription Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is PkgmSubscription + Check HTTP Response Body Json Schema Is NsdmSubscription + Check HTTP Response Body NsdmSubscription content against NS Descriptor Check HTTP Response Body Subscription Identifier matches the requested Subscription GET Individual NSD Management Subscription with invalid resource identifier @@ -27,19 +27,20 @@ GET Individual NSD Management Subscription with invalid resource identifier ... Test title: GET Individual NSD Management Subscription with invalid resource identifier ... Test objective: The objective is to test that the retrieval of an individual NSD Management subscription fails when using an invalid resource identifier ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. - ... Reference: Clause 5.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET individual NSD Management Subscription with invalid resource identifier Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails DELETE Individual NSD Management Subscription with invalid resource identifier [Documentation] Test ID: 5.3.1.8.3 ... Test title: DELETE Individual NSD Management Subscription with invalid resource identifier ... Test objective: The objective is to test that the deletion of an individual NSD Management subscription fails when using an invalid resource identifier ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. - ... Reference: Clause 5.4.9.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.9.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -51,46 +52,43 @@ POST Individual NSD Management Subscription - Method not implemented ... Test title: POST Individual NSD Management Subscription - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new NSD Management Subscription ... Pre-conditions: none - ... Reference: Clause 5.4.9.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.9.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NSD Management Subscription is not created on the NFVO + ... Post-Conditions: none Send Post request for individual NSD Management Subscription Check HTTP Response Status Code Is 405 - Check Postcondition NSD Management Subscription is not Created PUT Individual NSD Management Subscription - Method not implemented [Documentation] Test ID: 5.3.1.8.5 ... Test title: PUT Individual NSD Management Subscription - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing NSD Management subscription - ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. - ... Reference: Clause 5.4.9.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.9.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NSD Management subscription is not modified by the operation + ... Post-Conditions: none Send Put request for individual NSD Management Subscription Check HTTP Response Status Code Is 405 - Check Postcondition NSD Management Subscription is Unmodified (Implicit) PATCH Individual NSD Management Subscription - Method not implemented [Documentation] Test ID: 5.3.1.8.6 ... Test title: PATCH Individual NSD Management Subscription - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing NSD Management subscription ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. - ... Reference: Clause 5.4.9.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.9.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NSD Management subscription is not modified by the operation + ... Post-Conditions: none Send Patch request for individual NSD Management Subscription Check HTTP Response Status Code Is 405 - Check Postcondition NSD Management Subscription is Unmodified (Implicit) DELETE Individual NSD Management Subscription [Documentation] Test ID: 5.3.1.8.7 ... Test title: DELETE Individual NSD Management Subscription ... Test objective: The objective is to test the deletion of an individual NSD Management subscription ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. - ... Reference: Clause 5.4.9.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.9.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The NSD Management Subscription is not available anymore in the NFVO diff --git a/SOL005/NSDManagement-API/NSD.robot b/SOL005/NSDManagement-API/NSD.robot new file mode 100644 index 0000000000000000000000000000000000000000..6bdb58d6c6ed0df387ef252992856db91656e75a --- /dev/null +++ b/SOL005/NSDManagement-API/NSD.robot @@ -0,0 +1,160 @@ +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt # Generic Parameters +Resource NSDManagementKeywords.robot +Library JSONLibrary +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library OperatingSystem + +*** Test Cases *** +Get single file NSD in Plain Format + [Documentation] Test ID: 5.3.1.11.1 + ... Test title: Get single file NSD in Plain Format + ... Test objective: The objective is to test the retrieval of the NSD in plain format within a NSD archive and perform a validation that returned content is in plain format + ... Pre-conditions: One or more NSDs are onboarded in the NFVO. + ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NSD is implemented as a single file + ... Post-Conditions: none + Get single file NSD in Plain Format + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is text/plain + +Get NSD in Zip Format + [Documentation] Test ID: 5.3.1.11.2 + ... Test title: Get NSD in Zip Format + ... Test objective: The objective is to test the retrieval of the NSD in zip format within a NSD archive and perform a validation that returned content is in zip format + ... Pre-conditions: One or more NSDs are onboarded in the NFVO. + ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NSD in Zip Format + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get single file NSD in Plain or Zip Format + [Documentation] Test ID: 5.3.1.11.3 + ... Test title: Get single file NSDin Plain or Zip Format + ... Test objective: The objective is to test the retrieval of the single file NSD within a NSD archive when requesting Plain or Zip format to NFVO by including both formats in the request, and perform a validation that response is in Plain or Zip format + ... Pre-conditions: One or more NSDs are onboarded in the NFVO. + ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NSD is implemented as a single file + ... Post-Conditions: none + Get single file NSD in Plain or Zip Format + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is Any of text/plain application/zip + +Get multi file NSD in Plain or Zip Format + [Documentation] Test ID: 5.3.1.11.4 + ... Test title: Get multi file NSD in Plain or Zip Format + ... Test objective: The objective is to test the retrieval of the multi file NSD within a NSD archive when requesting Plain or Zip format to NFVO by including both formats in the request, and perform a validation that returned content is in Zip format + ... Pre-conditions: One or more NSDs are onboarded in the NFVO. + ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NSD is implemented as a multi file + ... Post-Conditions: none + Get multi file NSD in Plain or Zip Format + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get multi file NSD in Plain Format + [Documentation] Test ID: 5.3.1.11.5 + ... Test title: Get multi file NSD in Plain Format + ... Test objective: The objective is to test that the retrieval of the multi file NSD within a NSD archive fails when requesting it in Plain format, and perform a validation of the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: One or more NSDs are onboarded in the NFVO. + ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NSD is implemented as a multi file + ... Post-Conditions: none + Get multi file NSD in Plain Format + Check HTTP Response Status Code Is 406 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get NSD Content with invalid resource identifier + [Documentation] Test ID: 5.3.1.11.6 + ... Test title: Get NSD Content with invalid resource identifier + ... Test objective: The objective is to test that the retrieval of the NSD within a NSD archive fails when using an invalid resource identifier + ... Pre-conditions: none + ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NSD with invalid resource identifier + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get NSD with conflict due to onboarding state + [Documentation] Test ID: 5.3.1.11.7 + ... Test title: Get NSD with conflict due to onboarding state + ... Test objective: The objective is to test that the retrieval of the NSD within a NSD archive fails due to a conflict when the NSD 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 NSD is different from ONBOARDED. + ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NSD with conflict due to onboarding state + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get NSD with security information + [Documentation] Test ID: 5.3.1.11.8 + ... Test title: Get NSD with security information + ... Test objective: The objective is to test the retrieval of the NSD within a NSD archive shall include in the ZIP archive the security information when requested with "include_signature" parameter + ... Pre-conditions: One or more NSDs are onboarded in the NFVO. + ... Reference: Clause 5.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NSD with security information + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +POST NSD - Method not implemented + [Documentation] Test ID: 5.3.1.11.9 + ... Test title: POST NSD - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create a new Network Service Descriptor + ... Pre-conditions: none + ... Reference: Clause 5.4.4a.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for NSD + Check HTTP Response Status Code Is 405 + +PUT NSD - Method not implemented + [Documentation] Test ID: 5.3.1.11.10 + ... Test title: PUT NSD - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor + ... Pre-conditions: none + ... Reference: Clause 5.4.4a.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for NSD + Check HTTP Response Status Code Is 405 + +PATCH NSD - Method not implemented + [Documentation] Test ID: 5.3.1.11.11 + ... Test title: PATCH NSD - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor + ... Pre-conditions: none + ... Reference: Clause 5.4.4a.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for NSD + Check HTTP Response Status Code Is 405 + +DELETE NSD - Method not implemented + [Documentation] Test ID: 5.3.1.11.12 + ... Test title: DELETE NSD - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete Network Service Descriptor + ... Pre-conditions: none + ... Reference: Clause 5.4.4a.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send DELETE Request for NSD + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NSDManagement-API/NSDContent.robot b/SOL005/NSDManagement-API/NSDArchiveContent.robot similarity index 63% rename from SOL005/NSDManagement-API/NSDContent.robot rename to SOL005/NSDManagement-API/NSDArchiveContent.robot index 5079ca2cd6c003e4373c5222259b0ade3b531be6..466390100aafbb5b2f71430a8ed0a1e444a8292e 100644 --- a/SOL005/NSDManagement-API/NSDContent.robot +++ b/SOL005/NSDManagement-API/NSDArchiveContent.robot @@ -2,32 +2,30 @@ Documentation This Clause defines the content of the individual NS descriptor, i.e. NSD content Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/nsDescriptors.txt # Specific nsDescriptors Parameters Resource NSDManagementKeywords.robot Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library OperatingSystem *** Test Cases *** -Get single file NSD Content in Plain Format - [Documentation] Test ID: 5.3.1.3.1 - ... Test title: Get single file NSD Content in Plain Format - ... Test objective: The objective is to test the retrieval of the NSD Content in plain format and perform a validation that returned content is in plain format - ... Pre-conditions: One or more NSDs are onboarded in the NFVO. - ... Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The NSD is implemented as a single file - ... Post-Conditions: none - Get single file NSD Content in Plain Format - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is text/plain + +Void + [Documentation] Test ID: 5.3.1.3.1 + ... Test title: Void + ... Test objective: Void + ... Pre-conditions: Void + ... Reference: Void + ... Config ID: Void + ... Applicability: Void + ... Post-Conditions: Void + Void Get NSD Content in Zip Format [Documentation] Test ID: 5.3.1.3.2 ... Test title: Get NSD Content in Zip Format ... Test objective: The objective is to test the retrieval of the NSD Content in zip format and perform a validation that returned content is in zip format ... Pre-conditions: One or more NSDs are onboarded in the NFVO. - ... Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -35,63 +33,58 @@ Get NSD Content in Zip Format Check HTTP Response Status Code Is 200 Check HTTP Response Header Content-Type Is application/zip -Get single file NSD Content in Plain or Zip Format - [Documentation] Test ID: 5.3.1.3.3 - ... Test title: Get single file NSD Content in Plain or Zip Format - ... Test objective: The objective is to test the retrieval of the single file NSD Content when requesting Plain or Zip format to NFVO by including both formats in the request, and perform a validation that returned content is in Plain or Zip format - ... Pre-conditions: One or more NSDs are onboarded in the NFVO. - ... Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The NSD Content is implemented as a single file - ... Post-Conditions: none - Get single file NSD Content in Plain or Zip Format - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is Any of text/plain application/zip - -Get multi file NSD Content in Plain or Zip Format - [Documentation] Test ID: 5.3.1.3.4 - ... Test title: Get multi file NSD Content in Plain or Zip Format - ... Test objective: The objective is to test the retrieval of the multi file NSD Content when requesting Plain or Zip format to NFVO by including both formats in the request, and perform a validation that returned content is in Zip format - ... Pre-conditions: One or more NSDs are onboarded in the NFVO. - ... Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The NSD is implemented as a multi file - ... Post-Conditions: none - Get multi file NSD Content in Plain or Zip Format - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip +Void + [Documentation] Test ID: 5.3.1.3.3 + ... Test title: Void + ... Test objective: Void + ... Pre-conditions: Void + ... Reference: Void + ... Config ID: Void + ... Applicability: Void + ... Post-Conditions: Void + Void -Get multi file NSD Content in Plain Format - [Documentation] Test ID: 5.3.1.3.5 - ... Test title: Get multi file NSD Content in Plain Format - ... Test objective: The objective is to test that the retrieval of the multi file NSD Content fails when requesting it in Plain format, and perform a validation of the JSON schema validation of the failed operation HTTP response - ... Pre-conditions: One or more NSDs are onboarded in the NFVO. - ... Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The NSD Content is implemented as a multi file - ... Post-Conditions: none - Get multi file NSD Content in Plain Format - Check HTTP Response Status Code Is 406 - Check HTTP Response Body Json Schema Is ProblemDetails +Void + [Documentation] Test ID: 5.3.1.3.4 + ... Test title: Void + ... Test objective: Void + ... Pre-conditions: Void + ... Reference: Void + ... Config ID: Void + ... Applicability: Void + ... Post-Conditions: Void + Void +Void + [Documentation] Test ID: 5.3.1.3.5 + ... Test title: Void + ... Test objective: Void + ... Pre-conditions: Void + ... Reference: Void + ... Config ID: Void + ... Applicability: Void + ... Post-Conditions: Void + Void + Get NSD Content with invalid resource identifier [Documentation] Test ID: 5.3.1.3.6 ... Test title: Get NSD Content with invalid resource identifier ... Test objective: The objective is to test that the retrieval of the NSD Content fails when using an invalid resource identifier ... Pre-conditions: none - ... Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Get NSD Content with invalid resource identifier Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails Get NSD Content with conflict due to onboarding state [Documentation] Test ID: 5.3.1.3.7 ... Test title: Get NSD Content with conflict due to onboarding state ... Test objective: The objective is to test that the retrieval of the NSD Content fails due to a conflict when the NSD 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 NSD for which the NSD Content is requested is different from ONBOARDED. - ... Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -104,7 +97,7 @@ GET NSD Content with Range Request and NFVO supporting Range Requests ... Test title: GET NSD Content with Range Request and NFVO supporting Range Requests ... Test objective: The objective is to test the retrieval of NSD 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 NSDs are onboarded in the NFVO. - ... Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO supports range requests to return single range of bytes from the NSD file ... Post-Conditions: none @@ -119,7 +112,7 @@ GET NSD Content with Range Request and NFVO not supporting Range Requests ... Test title: GET NSD Content with Range Request and NFVO not supporting Range Requests ... Test objective: The objective is to test that the retrieval of NSD Content, when using a range request to return single range of bytes from the file and the NFVO not supporting it, returns the full NSD file. ... Pre-conditions: One or more NSDs are onboarded in the NFVO. - ... Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO does not support range requests to return single range of bytes from the NSD file ... Post-Conditions: none @@ -132,73 +125,69 @@ GET NSD Content with invalid Range Request ... Test title: GET NSD Content with invalid Range Request ... Test objective: The objective is to test that the retrieval of NSD Content fails when using a range request that does not match any available byte range in the file. ... Pre-conditions: One or more NSDs are onboarded in the NFVO. - ... Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO supports range requests to return single range of bytes from the NSD file ... Post-Conditions: none GET NSD Content with invalid Range Request - Check HTTP Response Status Code Is 416 + Check HTTP Response Status Code Is 416 + Check HTTP Response Body Json Schema Is ProblemDetails Upload NSD Content as Zip file in asynchronous mode [Documentation] Test ID: 5.3.1.3.11 ... Test title: Upload NSD Content as Zip file in asynchronous mode ... Test objective: The objective is to test the upload of an NSD Content in Zip format when the NFVO supports the asynchronous upload mode. ... Pre-conditions: One or more NSDs are onboarded in the NFVO. - ... Reference: Clause 5.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.4.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO supports the upload of NSD contents in asynchronous mode ... Post-Conditions: NSD Uploaded Send PUT Request to upload NSD Content as zip file in asynchronous mode Check HTTP Response Status Code Is 202 Check Post Condition NSD Content has been Uploaded - - -Upload NSD Content as plain text file in asynchronous mode - [Documentation] Test ID: 5.3.1.3.12 - ... Test title: Upload NSD Content as plain text file in asynchronous mode - ... Test objective: The objective is to test the upload of an NSD Content in plain text format when the NFVO supports the asynchronous upload mode. - ... Pre-conditions: One or more NSDs are onboarded in the NFVO. - ... Reference: Clause 5.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The NFVO supports the upload of NSD contents in asynchronous mode - ... Post-Conditions: none - Send PUT Request to upload NSD Content as plain text file in asynchronous mode - Check HTTP Response Status Code Is 202 - Check Post Condition NSD Content has been Uploaded - + +Void + [Documentation] Test ID: 5.3.1.3.12 + ... Test title: Void + ... Test objective: Void + ... Pre-conditions: Void + ... Reference: Void + ... Config ID: Void + ... Applicability: Void + ... Post-Conditions: Void + Void + + Upload NSD Content as Zip file in synchronous mode [Documentation] Test ID: 5.3.1.3.13 ... Test title: Upload NSD Content as Zip file in synchronous mode ... Test objective: The objective is to test the upload of an NSD Content in Zip format when the NFVO supports the synchronous upload mode. ... Pre-conditions: One or more NSDs are onboarded in the NFVO. - ... Reference: Clause 5.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.4.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO supports the upload of NSD contents in synchronous mode ... Post-Conditions: The NSD content is successfully uploaded and available in the NFVO Send PUT Request to upload NSD Content as zip file in synchronous mode Check HTTP Response Status Code Is 204 Check Postcondition NSD Content is uploaded and available in the NFVO - -Upload NSD Content as plain text file in synchronous mode - [Documentation] Test ID: 5.3.1.3.14 - ... Test title: Upload NSD Content as plain text file in synchronous mode - ... Test objective: The objective is to test the upload of an NSD Content in plain text format when the NFVO supports the synchronous upload mode. - ... Pre-conditions: One or more NSDs are onboarded in the NFVO. - ... Reference: Clause 5.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The NFVO supports the upload of NSD contents in synchronous mode - ... Post-Conditions: The NSD content is successfully uploaded and available in the NFVO - Send PUT Request to upload NSD Content as plain text file in synchronous mode - Check HTTP Response Status Code Is 204 - Check Postcondition NSD Content is uploaded and available in the NFVO - +Void + [Documentation] Test ID: 5.3.1.3.14 + ... Test title: Void + ... Test objective: Void + ... Pre-conditions: Void + ... Reference: Void + ... Config ID: Void + ... Applicability: Void + ... Post-Conditions: Void + Void + Upload NSD Content with conflict due to onboarding state [Documentation] Test ID: 5.3.1.3.15 ... Test title: Upload NSD Content with conflict due to onboarding state ... Test objective: The objective is to test that the upload of the NSD Content fails due to a conflict when the NSD is not in onboarding state CREATED 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 NSD for which the NSD Content is requested is different from ONBOARDED. - ... Reference: Clause 5.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.4.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -211,7 +200,7 @@ POST NSD Content - Method not implemented ... Test title: POST NSD Content - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new Network Service Descriptor content ... Pre-conditions: none - ... Reference: Clause 5.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -223,7 +212,7 @@ PATCH NSD Content - Method not implemented ... Test title: PATCH NSD Content - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor content ... Pre-conditions: none - ... Reference: Clause 5.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -235,10 +224,15 @@ DELETE NSD Content - Method not implemented ... Test title: DELETE NSD Content - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete Network Service Descriptor content ... Pre-conditions: none - ... Reference: Clause 5.4.4.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.4.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NSD content is not deleted by the failed operation + ... Post-Conditions: none Send DELETE Request for NSD Content Check HTTP Response Status Code Is 405 - Check Postcondition NSD Content Exists + + +*** Keywords *** + +Void + log do nothing \ No newline at end of file diff --git a/SOL005/NSDManagement-API/NSDArchiveManifest.robot b/SOL005/NSDManagement-API/NSDArchiveManifest.robot new file mode 100644 index 0000000000000000000000000000000000000000..7a09f534f1f07f5463d5e181768dc34777132b37 --- /dev/null +++ b/SOL005/NSDManagement-API/NSDArchiveManifest.robot @@ -0,0 +1,95 @@ +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt # Generic Parameters +Resource NSDManagementKeywords.robot +Library JSONLibrary +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library OperatingSystem + +*** Test Cases *** +Get NSD Archive Manifest + [Documentation] Test ID: 5.3.1.12.1 + ... Test title: Get NSD Archive Manifest + ... Test objective: The objective is to test that GET method reads the content of the manifest file within an NSD archive + ... Pre-conditions: One or more NSDs are onboarded in the NFVO. + ... Reference: Clause 5.4.4b.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NSD Archive Manifest + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is text/plain + +Get NSD Archive Manifest with security information + [Documentation] Test ID: 5.3.1.12.2 + ... Test title: Get NSD Archive Manifest with security information + ... Test objective: The objective is to test the retrieval of content of the manifest file within an NSD archive shall include in the ZIP archive the security information when requested with "include_signature" parameter + ... Pre-conditions: One or more NSDs are onboarded in the NFVO. + ... Reference: Clause 5.4.4b.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NSD Archive Manifest with security information + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get NSD Archive Manifest with conflict due to onboarding state + [Documentation] Test ID: 5.3.1.12.3 + ... Test title: Get NSD Archive Manifest with conflict due to onboarding state + ... Test objective: The objective is to test that the retrieval of content of the manifest file within an NSD archive fails due to a conflict when the NSD 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 NSD is different from ONBOARDED. + ... Reference: Clause 5.4.4b.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NSD Archive Manifest with conflict due to onboarding state + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST NSD Archive Manifest - Method not implemented + [Documentation] Test ID: 5.3.1.12.4 + ... Test title: POST NSD Archive Manifest - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create a new Network Service Descriptor Archive Manifest + ... Pre-conditions: none + ... Reference: Clause 5.4.4b.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for NSD Archive Manifest + Check HTTP Response Status Code Is 405 + +PUT NSD Archive Manifest - Method not implemented + [Documentation] Test ID: 5.3.1.12.5 + ... Test title: PUT NSD Archive Manifest - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor Archive Manifest + ... Pre-conditions: none + ... Reference: Clause 5.4.4b.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for NSD Archive Manifest + Check HTTP Response Status Code Is 405 + +PATCH NSD Archive Manifest - Method not implemented + [Documentation] Test ID: 5.3.1.12.6 + ... Test title: PATCH NSD Archive Manifest - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor Archive Manifest + ... Pre-conditions: none + ... Reference: Clause 5.4.4b.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for NSD Archive Manifest + Check HTTP Response Status Code Is 405 + +DELETE NSD Archive Manifest - Method not implemented + [Documentation] Test ID: 5.3.1.12.7 + ... Test title: DELETE NSD Archive Manifest - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete Network Service Descriptor Archive Manifest + ... Pre-conditions: none + ... Reference: Clause 5.4.4b.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send DELETE Request for NSD Archive Manifest + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NSDManagement-API/NSDManagementKeywords.robot b/SOL005/NSDManagement-API/NSDManagementKeywords.robot index 9304e5e069b767abe1985d5eb2a73dbfc3cd0329..9eeb0abdf133493d30ca936305f2531cc75bf080 100644 --- a/SOL005/NSDManagement-API/NSDManagementKeywords.robot +++ b/SOL005/NSDManagement-API/NSDManagementKeywords.robot @@ -1,46 +1,45 @@ *** Settings *** Resource environment/variables.txt -Resource environment/subscriptions.txt -Resource environment/nsDescriptors.txt # Specific nsDescriptors Parameters -Resource environment/pnfDescriptors.txt # Specific pnfDescriptors Parameters -Resource environment/individualSubscription.txt -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library MockServerLibrary Library OperatingSystem Library BuiltIn Library JSONLibrary Library Collections Library JSONSchemaLibrary schemas/ +Library RequestsLibrary Library Process Library String +#Variables descriptors/SOL006/NSD/nsd_SOL006.yaml +#Variables descriptors/SOL001/NSD/nsd_SOL001.yaml *** Keywords *** GET all Network Service Descriptors Information Log The GET method queries multiple NS descriptors Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors ${output}= Output response Set Suite Variable ${response} ${output} GET Network Service Descriptors Information with attribute-based filter Log The GET method queries multiple NS descriptors using Attribute-based filtering parameters Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors?${NSD_NAME} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors?${NSD_NAME} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Body NsdInfos Matches the requested attribute-based filter Log Checking that attribute-based filter is matched - @{words} = Split String ${NSD_NAME} ,${SEPERATOR} + @{words} = Split String ${NSD_NAME} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['nsdName']} @{words}[1] GET Network Service Descriptors Information with invalid attribute-based filter Log The GET method queries multiple NS descriptors using Attribute-based filtering parameters. Negative case, with erroneous attribute name Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors?${NEG_FIELDS} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors?${NEG_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} @@ -48,9 +47,9 @@ Get all Network Service Descriptors Information with malformed authorization tok Pass Execution If ${AUTH_USAGE} == 0 Skipping test as NFVO is not supporting authentication Log The GET method queries using invalid token Set Headers {"Accept": "${ACCEPT_JSON}"} - Set Headers {"Authorization": "${BAD_AUTHORIZATION}"} + Set Headers {"${AUTHORIZATION_HEADER}": "${BAD_AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors + REST.Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors ${output}= Output response Set Suite Variable ${response} ${output} @@ -59,25 +58,25 @@ Get all Network Service Descriptors Information without authorization token Log The GET method queries omitting token Set Headers {"Accept": "${ACCEPT_JSON}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors ${output}= Output response Set Suite Variable ${response} ${output} Get all Network Service Descriptors Information with expired or revoked authorization token Pass Execution If ${AUTH_USAGE} == 0 Skipping test as it is not supporting authentication - Log The GET method queries using invalid token + Log The GET method queries using invalid token Set Headers {"Accept": "${ACCEPT_JSON}"} - Set Headers {"Authorization": "${NEG_AUTHORIZATION}"} + Set Headers {"${AUTHORIZATION_HEADER}": "${NEG_AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors ${output}= Output response Set Suite Variable ${response} ${output} GET all Network Service Descriptors Information with all_fields attribute selector Log The GET method queries multiple NS descriptors using Attribute-based filtering parameters "all_fields" Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors?all_fields + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors?all_fields ${output}= Output response Set Suite Variable ${response} ${output} @@ -90,8 +89,8 @@ Check HTTP Response Body NsdInfos Matches the requested all_fields selector GET all Network Service Descriptors Information with exclude_default attribute selector Log Trying to get all NSDs 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}/ns_descriptors?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -101,14 +100,21 @@ Check HTTP Response Body NsdInfos Matches the requested exclude_default selector Should Be Empty ${user} Log Reports element is empty as expected - GET all Network Service Descriptors Information with fields attribute selector Log Trying to get all NSDs present in the NFVO Catalogue, using fields filter. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors?fields=${fields} ${output}= Output response - Set Suite Variable ${response} ${output} + Set Suite Variable ${response} ${output} + +GET all Network Service Descriptors Information with exclude_default and fields attribute selector + Log Trying to get all NSDs present in the NFVO Catalogue, using fields filter. + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors?exclude_default&fields=${fields} + ${output}= Output response + Set Suite Variable ${response} ${output} Check HTTP Response Body NsdInfos Matches the requested fields selector Log Validating user defined data schema @@ -120,8 +126,8 @@ GET all Network Service Descriptors Information with exclude_fields attribute se Log Trying to get all NSD Managements present in the NFVO Catalogue, using filter params Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use exclude_fields option Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors?exclude_fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -136,16 +142,16 @@ Send Post Request to create new Network Service Descriptor Resource Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${body}= Get File jsons/createNsdInfoRequest.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors ${body} ${output}= Output response Set Suite Variable ${response} ${output} Check Postcondition NsdInfo Exists Log Checking that nsd info exists Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${response['body']['id']} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 200 @@ -155,8 +161,8 @@ Send PUT Request for all Network Service Descriptors Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. 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}/ns_descriptors + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors ${output}= Output response Set Suite Variable ${response} ${output} @@ -164,8 +170,8 @@ Send PATCH Request for all Network Service Descriptors Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. 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}/ns_descriptors + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors ${output}= Output response Set Suite Variable ${response} ${output} @@ -173,8 +179,8 @@ Send DELETE Request for all Network Service Descriptors Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. 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}/ns_descriptors + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors ${output}= Output response Set Suite Variable ${response} ${output} @@ -185,11 +191,12 @@ Check Postcondition Network Service Descriptors Exist GET Individual Network Service Descriptor Information Log The GET method reads information about an individual NS descriptor Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId} ${output}= Output response Set Suite Variable ${response} ${output} - + Set Suite Variable ${usageState} ${response['body']['nsdUsageState']} + Check HTTP Response Body NsdInfo Identifier matches the requested Network Service Descriptor Information Log Going to validate info retrieved Should Be Equal ${response['body']['id']} ${nsdInfoId} @@ -198,12 +205,11 @@ Check HTTP Response Body NsdInfo Identifier matches the requested Network Servic GET Individual Network Service Descriptor Information with invalid resource identifier Log Trying to perform a GET on an erroneous nsDescriptorInfoId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${erroneous_nsdInfoId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${erroneous_nsdInfoId} Integer response status 404 ${output}= Output response Set Suite Variable ${response} ${output} - Set Suite Variable ${usageState} ${response['body']['nsdUsageState']} Send PATCH to disable Individual Network Service Descriptor Log Trying to perform a PATCH. As prerequisite the nsdInfo shall be in enabled operational state @@ -211,8 +217,8 @@ Send PATCH to disable Individual Network Service Descriptor Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set Headers {"If-Match": "${original_etag}"} ${body}= Get File jsons/NsdInfoModificationDisable.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoId} ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -223,6 +229,7 @@ Check Postcondition Network Service Descriptor is in operational state Check Postcondition Network Service Descriptor usage state is unmodified (Implicit) Log Checking postcondition use status + Check PostCondition GET Individual Network Service Descriptor Information Should Be Equal As Strings ${response['body']['nsdUsageState']} ${usageState} Send PATCH to enable Individual Network Service Descriptor @@ -231,8 +238,8 @@ Send PATCH to enable Individual Network Service Descriptor Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set Headers {"If-Match": "${original_etag}"} ${body}= Get File jsons/NsdInfoModificationEnable.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoId} ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -242,8 +249,8 @@ Send PATCH to enable Individual Network Service Descriptor in onboarding state d Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set Headers {"If-Match": "${original_etag}"} ${body}= Get File jsons/NsdInfoModificationEnable.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${notOnboardedNsdInfoId} ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${notOnboardedNsdInfoId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -253,30 +260,30 @@ Send PATCH to enable Individual Network Service Descriptor in onboarding state d Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set Headers {"If-Match": "${wrong_etag}"} ${body}= Get File jsons/NsdInfoModificationEnable.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoId} ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for Individual Network Service Descriptor Log Trying to perform a DELETE nsdInfo. The nsdInfo should be in "NOT_USED" usageState and in "DISABLED" operationalState. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${disabledNsdInfoId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${disabledNsdInfoId} ${output}= Output response Set Suite Variable ${response} ${output} Check Postcondition Network Service Descriptor is Deleted Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${disabledNsdInfoId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${disabledNsdInfoId} Integer response status 404 Send DELETE Request for Individual Network Service Descriptor in operational state ENABLED 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": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -287,8 +294,8 @@ Send POST Request for Individual Network Service Descriptor Log Trying to perform a POST. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -296,8 +303,8 @@ Send PUT Request for Individual Network Service Descriptor Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -319,65 +326,29 @@ Check HTTP Response Header Content-Length Is Present and Matches the requested r 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 single file NSD Content in Plain Format - Log Trying to get a NSD present in the NFVO Catalogue - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdPlain}/nsd_content - ${output}= Output response - Set Suite Variable ${response} ${output} + Log Header Content-Length is present Get NSD Content in Zip Format Log Trying to get a NSD present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content - ${output}= Output response - Set Suite Variable ${response} ${output} - -Get single file NSD Content in Plain or Zip Format - Log Trying to get a NSD present in the NFVO Catalogue - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdPlain}/nsd_content - ${output}= Output response - Set Suite Variable ${response} ${output} - -Get multi file NSD Content in Plain or Zip Format - Log Trying to get a VNFD from a given NSD Management present in the NFVO Catalogue - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content - ${output}= Output response - Set Suite Variable ${response} ${output} - -Get multi file NSD Content in Plain Format - Log Trying to get a negative case performing a get on a NSD present in the NFVO Catalogue. Accept will be text/plain but NSD is composed my multiple files. - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} Get NSD Content with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID - Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${erroneous_nsdInfoId}/nsd_content + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${erroneous_nsdInfoId}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} Get NSD Content with conflict due to onboarding state Log Trying to get a VNFD from a given NSD Management present in the NFVO Catalogue - Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${notOnboardedNsdInfoId}/nsd_content + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${notOnboardedNsdInfoId}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -386,8 +357,8 @@ GET NSD Content with Range Request 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}/ns_descriptors/${nsdInfoIdZip}/nsd_content + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -396,54 +367,26 @@ GET NSD Content with invalid Range Request 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}/ns_descriptors/${nsdInfoIdZip}/nsd_content + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request to upload NSD Content as zip file in asynchronous mode - Log Trying to perform a PUT. This method upload the content of a NSD - Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File ${contentZipFile} - PUT ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content ${body} - ${response}= Output response body - Should Be Empty ${response} - ${output}= Output response - Set Suite Variable ${response} ${output} - -Send PUT Request to upload NSD Content as plain text file in asynchronous mode - Log Trying to perform a PUT. This method upload the content of a NSD - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File ${contentPlainFile} - PUT ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdPlain}/nsd_content ${body} - ${response}= Output response body - Should Be Empty ${response} - ${output}= Output response - Set Suite Variable ${response} ${output} + Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_JSON}", "Content-Type": "application/zip", "${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} verify=False + ${body}= Get Binary File ${contentZipNsd} + ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content data=${body} + Should Be Empty ${response.text} + ${response}= Create Dictionary status=${response.status_code} + Set Suite Variable ${response} ${response} Send PUT Request to upload NSD Content as zip file in synchronous mode - Log Trying to perform a PUT. This method upload the content of a NSD - Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File ${contentZipFile} - PUT ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content ${body} - ${response}= Output response body - Should Be Empty ${response} - ${output}= Output response - Set Suite Variable ${response} ${output} - -Send PUT Request to upload NSD Content as plain text file in synchronous mode - Log Trying to perform a PUT. This method upload the content of a NSD - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File ${contentPlainFile} - PUT ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdPlain}/nsd_content ${body} - ${response}= Output response body - Should Be Empty ${response} - ${output}= Output response - Set Suite Variable ${response} ${output} + Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_JSON}", "Content-Type": "application/zip", "${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} verify=False + ${body}= Get Binary File ${contentZipNsd} + ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content data=${body} + Should Be Empty ${response.text} + ${response}= Create Dictionary status=${response.status_code} + Set Suite Variable ${response} ${response} Check Post Condition NSD Content has been Uploaded Log Checking NsdOnboardingNotification Recieved @@ -456,81 +399,77 @@ Check Response is NsdOnboardingNotification Validate Json ${schema} ${response['body']} Log Json Schema Validation OK - Check Postcondition NSD Content is uploaded and available in the NFVO - Get single file NSD Content in Plain or Zip Format + Get NSD Content in Zip Format Check HTTP Response Status Code Is 200 Send PUT Request to upload NSD Content with conflict due to onboarding state Log Trying to perform a PUT. This method upload the content of a NSD - Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get Binary File ${contentZipFile} - PUT ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${creatingNsdInfoId}/nsd_content ${body} - ${output}= Output response - Set Suite Variable ${response} ${output} - + Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_ZIP}", "Content-Type": "application/zip", "${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} verify=False + ${body}= Get Binary File ${contentZipNsd} + ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content data=${body} + Log ${response} + ${response}= Create Dictionary status=${response.status_code} headers=${response.headers} body=${response.json()} + Set Suite Variable ${response} ${response} + Send POST Request for NSD Content Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a POST. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for NSD Content Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for NSD Content Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} -Check Postcondition NSD Content Exists - Get NSD Content in Zip Format - GET all PNF Descriptors Information Log The GET method queries multiple PNF descriptors Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors ${output}= Output response Set Suite Variable ${response} ${output} GET PNF Descriptors Information with attribute-based filter Log The GET method queries multiple PNF descriptors using Attribute-based filtering parameters Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors?${PNFD_NAME} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors?${PNFD_NAME} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Body PnfdInfos Matches the requested attribute-based filter Log Checking that attribute-based filter is matched - @{words} = Split String ${PNFD_NAME} ,${SEPERATOR} + @{words} = Split String ${PNFD_NAME} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['pnfdName']} @{words}[1] GET PNF Descriptors Information with invalid attribute-based filter Log The GET method queries multiple PNF descriptors using Attribute-based filtering parameters. Negative case, with erroneous attribute name Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors?${NEG_FIELDS} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors?${NEG_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} GET all PNF Descriptors Information with all_fields attribute selector Log The GET method queries multiple PNF descriptors using Attribute-based filtering parameters "all_fields" Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors?all_fields + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors?all_fields ${output}= Output response Set Suite Variable ${response} ${output} @@ -543,8 +482,8 @@ Check HTTP Response Body PnfdInfos Matches the requested all_fields selector GET all PNF Descriptors Information with exclude_default attribute selector Log Trying to get all PNFDs 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}/pnf_descriptors?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -554,14 +493,21 @@ Check HTTP Response Body PnfdInfos Matches the requested exclude_default selecto Should Be Empty ${user} Log Reports element is empty as expected - GET all PNF Descriptors Information with fields attribute selector Log Trying to get all PNFDs present in the NFVO Catalogue, using fields filter. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors?fields=${fields} ${output}= Output response - Set Suite Variable ${response} ${output} + Set Suite Variable ${response} ${output} + +GET all PNF Descriptors Information with exclude_default and fields attribute selector + Log Trying to get all PNFDs present in the NFVO Catalogue, using fields filter. + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors?exclude_default&fields=${fields} + ${output}= Output response + Set Suite Variable ${response} ${output} Check HTTP Response Body PnfdInfos Matches the requested fields selector Log Validating user defined data schema @@ -573,8 +519,8 @@ GET all PNF Descriptors Information with exclude_fields attribute selector Log Trying to get all PNF present in the NFVO Catalogue, using filter params Pass Execution If ${NFVO_FIELDS} == 0 The NFVO is not able to use exclude_fields option Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors?exclude_fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -589,16 +535,16 @@ Send Post Request to create new PNF Descriptor Resource Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${body}= Get File jsons/createPnfdInfoRequest.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors ${body} ${output}= Output response Set Suite Variable ${response} ${output} Check Postcondition PnfdInfo Exists Log Checking that nsd info exists Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${response['body']['id']} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 200 @@ -608,8 +554,8 @@ Send PUT Request for all PNF Descriptors Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. 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}/ns_descriptors + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors ${output}= Output response Set Suite Variable ${response} ${output} @@ -617,8 +563,8 @@ Send PATCH Request for all PNF Descriptors Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. 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}/pnf_descriptors + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors ${output}= Output response Set Suite Variable ${response} ${output} @@ -626,20 +572,16 @@ Send DELETE Request for all PNF Descriptors Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. 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}/pnf_descriptors + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors ${output}= Output response Set Suite Variable ${response} ${output} -Check Postcondition PNF Descriptors Exist - Log Checking that PNFD still exists - GET all PNF Descriptors Information - GET Individual PNF Descriptor Information Log The GET method reads information about an individual PNF descriptor Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -651,9 +593,8 @@ Check HTTP Response Body PnfdInfo Identifier matches the requested PNF Descripto GET Individual PNF Descriptor Information with invalid resource identifier Log Trying to perform a GET on an erroneous nsDescriptorInfoId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${erroneous_pnfdInfoId} - Integer response status 404 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${erroneous_pnfdInfoId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -663,8 +604,8 @@ Send PATCH to update Individual PNF Descriptor Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set Headers {"If-Match": "${original_etag}"} ${body}= Get File jsons/PnfdInfoModification.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId} ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} Set Suite Variable ${body["userDefinedData"]} ${userDefinedDataSet} @@ -679,31 +620,31 @@ Send PATCH to update Individual PNF Descriptor with HTTP Etag precondition failu Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set Headers {"If-Match": "${wrong_etag}"} ${body}= Get File jsons/PnfdInfoModification.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId} ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for Individual PNF Descriptor Log Trying to perform a DELETE pnfdInfo. Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId} ${output}= Output response Set Suite Variable ${response} ${output} Check Postcondition PNF Descriptor is Deleted Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId} Integer response status 404 Send POST Request for Individual PNF Descriptor Log Trying to perform a POST. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -711,76 +652,93 @@ Send PUT Request for Individual PNF Descriptor Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId} ${output}= Output response Set Suite Variable ${response} ${output} Get PNFD Content Log Trying to get a NSD present in the NFVO Catalogue - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}/pnfd_content + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/pnfd_content + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get PNFD Content with Range Request + Log Trying to get a NSD present in the NFVO Catalogue with range request + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/pnfd_content + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get PNFD Content with invalid Range Request + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/pnfd_content ${output}= Output response Set Suite Variable ${response} ${output} Get PNFD Content with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${erroneous_pnfdInfoId}/pnfd_content + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${erroneous_pnfdInfoId}/pnfd_content ${output}= Output response Set Suite Variable ${response} ${output} Get PNFD Content with conflict due to onboarding state Log Trying to get a PNFD present in the NFVO Catalogue - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${onboardingStatePnfdId}/pnfd_content + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${onboardingStatePnfdId}/pnfd_content ${output}= Output response Set Suite Variable ${response} ${output} -Send PUT Request to upload PNFD Content as plain text file +Send PUT Request to upload PNFD Content as zip file Log Trying to perform a PUT. This method upload the content of a PNFD - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File ${contentFilePnfd} - PUT ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}/pnfd_content ${body} - ${response}= Output response body - Should Be Empty ${response} - ${output}= Output response - Set Suite Variable ${response} ${output} + Create Session pnfd ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_PLAIN}", "Content-Type": "application/zip", "${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} verify=False + ${body}= Get Binary File ${contentZipPnfd} + ${response}= Put Request pnfd ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/pnfd_content data=${body} + Should Be Empty ${response.text} + ${response}= Create Dictionary status=${response.status_code} + Set Suite Variable ${response} ${response} Send PUT Request to upload PNFD Content with conflict due to onboarding state Log Trying to perform a PUT. This method upload the content of a PNFD - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get Binary File ${contentFilePnfd} - PUT ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${creatingNsdInfoId}/pnfd_content ${body} + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Set Headers {"Content-Type": "application/zip"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body}= Get Binary File ${contentZipPnfd} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${creatingPnfdInfoId}/pnfd_content ${body} ${output}= Output response Set Suite Variable ${response} ${output} Send POST Request for PNFD Content Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a POST. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}/nsd_content + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for PNFD Content Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a PATCH. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}/nsd_content + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for PNFD Content Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}/nsd_content + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pnf_descriptors/${pnfdInfoId}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -792,16 +750,16 @@ Get all NSD Management Subscriptions ... specified in the Tables 5.4.8.3.2-1 and 5.4.8.3.2-2. Log Trying to get the list of subscriptions Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} Get NSD Management Subscriptions with attribute-based filters Log Trying to get the list of subscriptions using filters Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ok} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${filter_ok} ${output}= Output response Set Suite Variable ${response} ${output} @@ -809,8 +767,8 @@ Get NSD Management Subscriptions with attribute-based filters Get NSD Management Subscriptions with invalid attribute-based filters Log Trying to get the list of subscriptions using filters with wrong attribute name Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ko} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${filter_ko} ${output}= Output response Set Suite Variable ${response} ${output} @@ -818,8 +776,8 @@ Get NSD Management Subscriptions with invalid attribute-based filters Get NSD Management Subscriptions with invalid resource endpoint Log Trying to perform a request on a Uri which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscription + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscription ${output}= Output response Set Suite Variable ${response} ${output} @@ -830,26 +788,42 @@ Send Post Request for NSD Management Subscription Log Trying to create a new 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 + Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} nsdId=${NS_DescriptorID} nsdName=${NS_Name} nsdVersion=${NS_Version} nsdDesigner=${Designer} nsdInvariantId=${NS_InvariantId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint -Send Post Request for Duplicated NSD Management Subscription +Send POST Request for Duplicated NSD Management Subscription Log Trying to create a subscription with an already created content 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 + Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} nsdId=${NS_DescriptorID} nsdName=${NS_Name} nsdVersion=${NS_Version} nsdDesigner=${Designer} nsdInvariantId=${NS_InvariantId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint @@ -857,8 +831,8 @@ Send Put Request for NSD Management Subscriptions Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. 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}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -867,8 +841,8 @@ Send Patch Request for NSD Management Subscriptions Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. 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}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -876,8 +850,8 @@ Send Delete Request for NSD Management Subscriptions Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. 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}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -889,12 +863,12 @@ Check HTTP Response Status Code Is [Arguments] ${expected_status} Should Be Equal As Strings ${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 ${schema} = Catenate SEPARATOR= ${input} .schema.json + Log ${response['body']} Validate Json ${schema} ${response['body']} Log Json Schema Validation OK @@ -905,12 +879,13 @@ Check HTTP Response Body Is Empty Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes NSD Management Management according to filter - @{words} = Split String ${filter_ok} ,${SEPERATOR} + @{words} = Split String ${filter_ok} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['callbackUri']} @{words}[1] Check HTTP Response Body NsdmSubscription Attributes Values Match the Issued Subscription Log Check Response matches subscription - ${body}= Get File jsons/subscriptions.json + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} notifCallbackUri=${notifCallbackUri} ${subscription}= evaluate json.loads('''${body}''') json Should Be Equal As Strings ${response['body']['callbackUri']} ${subscription['callbackUri']} @@ -919,8 +894,8 @@ Check Postcondition NSD Management Subscription Is Set Log Check Postcondition subscription exist Log Trying to get the subscription Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${response['body']['id']} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 200 @@ -928,8 +903,8 @@ Check Postcondition NSD Management Subscription Is Set Check Postcondition Subscription Resource Returned in Location Header Is Available Log Going to check postcondition - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${response['headers']['Location']} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${response['headers']['Location']} Integer response status 200 Log Received a 200 OK as expected ${contentType}= Output response headers Content-Type @@ -937,7 +912,8 @@ Check Postcondition Subscription Resource Returned in Location Header Is Availab ${result}= Output response body Validate Json NsdmSubscription.schema.json ${result} Log Validated NsdmSubscription schema - ${body}= Get File jsons/subscriptions.json + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} notifCallbackUri=${notifCallbackUri} ${subscription}= evaluate json.loads('''${body}''') json Should Be Equal ${result['callbackUri']} ${subscription['callbackUri']} Log Validated Issued subscription is same as original @@ -945,24 +921,24 @@ Check Postcondition Subscription Resource Returned in Location Header Is Availab Get Individual NSD Management Subscription Log Trying to get a single subscription identified by subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} GET individual NSD Management Subscription with invalid resource identifier Log Trying to perform a request on a subscriptionID which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual NSD Management Subscription Log Trying to perform a DELETE on a subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -974,51 +950,34 @@ Check Postcondition NSD Management Subscription is Deleted Send Delete request for individual NSD Management Subscription with invalid resource identifier Log Trying to perform a DELETE on a subscriptionId which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual NSD Management Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${newSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for individual NSD Management Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Patch request for individual NSD Management Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} - -Check Postcondition NSD Management Subscription is Unmodified (Implicit) - Log Check postconidtion subscription not modified - GET individual NSD Management Subscription - Log Check Response matches original VNF Threshold - ${subscription}= evaluate json.loads('''${response['body']}''') json - Should Be Equal ${origResponse['body']['id']} ${subscription.id} - Should Be Equal ${origResponse['body']['callbackUri']} ${subscription.callbackUri} - -Check Postcondition NSD Management Subscription is not Created - Log Trying to get a new subscription - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId} - ${output}= Output response - Set Suite Variable ${response} ${output} - Check HTTP Response Status Code Is 404 Check HTTP Response Body Subscription Identifier matches the requested Subscription Log Trying to check response ID @@ -1036,7 +995,6 @@ Check HTTP Response Header Contains Etag Set Suite Variable ${original_etag} ${response['headers]['ETag']} Create Sessions - Pass Execution If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 0 MockServer not started as NFVO is not checking the notification endpoint Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri} @@ -1048,12 +1006,379 @@ Check Notification Endpoint Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} -Check LINK in Header +Check HTTP Response Header Contain Link ${linkURL}= Get Value From Json ${response['headers']} $..Link Should Not Be Empty ${linkURL} Check PostCondition GET Individual Network Service Descriptor Information Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoId} - Should Be Equal As Strings ${response['status']} 200 \ No newline at end of file + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoId} + Should Be Equal As Strings ${response['status']} 200 + +Wait for individual grant successful notification + Wait Until Keyword Succeeds ${retry} ${interval} Get PNFD Content + +Get single file NSD in Plain Format + Log Trying to get a NSD present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdPlain}/nsd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get NSD in Zip Format + Log Trying to get a NSD present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get single file NSD in Plain or Zip Format + Log Trying to get a NSD present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdPlain}/nsd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get multi file NSD in Plain or Zip Format + Log Trying to get a VNFD from a given NSD Management present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get multi file NSD in Plain Format + Log Trying to get a negative case performing a get on a NSD present in the NFVO Catalogue. Accept will be text/plain but NSD is composed my multiple files. + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get NSD with invalid resource identifier + Log Trying to perform a negative get, using an erroneous package ID + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${erroneous_nsdInfoId}/nsd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get NSD with conflict due to onboarding state + Log Trying to get a VNFD from a given NSD Management present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${notOnboardedNsdInfoId}/nsd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send POST Request for NSD + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. + Log Trying to perform a POST. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PUT Request for NSD + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. + Log Trying to perform a PATCH. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PATCH Request for NSD + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. + Log Trying to perform a PATCH. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send DELETE Request for NSD + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. + Log Trying to perform a DELETE. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get NSD with security information + Log Trying to get a NSD present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/nsd/include_signatures + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get NSD Archive Manifest + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdPlain}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get NSD Archive Manifest with security information + Log Trying to get a NSD present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/manifest/include_signatures + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get NSD Archive Manifest with conflict due to onboarding state + Log Trying to get a VNFD from a given NSD Management present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${notOnboardedNsdInfoId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send POST Request for NSD Archive Manifest + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. + Log Trying to perform a POST. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PUT Request for NSD Archive Manifest + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. + Log Trying to perform a PATCH. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PATCH Request for NSD Archive Manifest + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. + Log Trying to perform a PATCH. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send DELETE Request for NSD Archive Manifest + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. + Log Trying to perform a DELETE. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${nsdInfoIdZip}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get single file PNFD in Plain Format + Log Trying to get a PNFD present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/pnfd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get PNFD in Zip Format + Log Trying to get a PNFD present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/pnfd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get single file PNFD in Plain or Zip Format + Log Trying to get a PNFD present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/pnfd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get multi file PNFD in Plain or Zip Format + Log Trying to get a VNFD from a given PNFD Management present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/pnfd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get multi file PNFD in Plain Format + Log Trying to get a negative case performing a get on a PNFD present in the NFVO Catalogue. Accept will be text/plain but PNFD is composed my multiple files. + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/pnfd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get PNFD with invalid resource identifier + Log Trying to perform a negative get, using an erroneous package ID + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${erroneous_PNFDInfoId}/pnfd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get PNFD with conflict due to onboarding state + Log Trying to get a VNFD from a given PNFD Management present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${onboardingStatePnfdId}/pnfd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get PNFD with security information + Log Trying to get a PNFD present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/pnfd/include_signatures + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send POST Request for PNFD + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. + Log Trying to perform a POST. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/pnfd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PUT Request for PNFD + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. + Log Trying to perform a PATCH. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/pnfd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PATCH Request for PNFD + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. + Log Trying to perform a PATCH. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/pnfd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send DELETE Request for PNFD + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. + Log Trying to perform a DELETE. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/pnfd + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get PNFD Archive Manifest + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get PNFD Archive Manifest with security information + Log Trying to get a PNFD present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/manifest/include_signatures + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get PNFD Archive Manifest with conflict due to onboarding state + Log Trying to get a PNFD Management present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${notOnboardedNsdInfoId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send POST Request for PNFD Archive Manifest + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. + Log Trying to perform a POST. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PUT Request for PNFD Archive Manifest + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. + Log Trying to perform a PATCH. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PATCH Request for PNFD Archive Manifest + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. + Log Trying to perform a PATCH. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send DELETE Request for PNFD Archive Manifest + Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. + Log Trying to perform a DELETE. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/ns_descriptors/${pnfdInfoId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Check HTTP Response Body NsInstance content against NS Descriptor + #${check_descriptors} flag, 1 to check descriptors + Run Keyword If ${check_descriptors} == 1 Check Individual NsdInfo Content for NSD + +Check Individual NsdInfo Content for NSD + PARSE the NS Descriptor File + Match the Response Attributes with NS Descriptors + +PARSE the NS Descriptor File + Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 NS descriptor file ELSE Fetch Information from SOL006 NS descriptor file + +Fetch Information from SOL001 NS descriptor file + Import Variables ${CURDIR}/descriptors/SOL001/NSD/nsd_SOL001.yaml + ${ns_descriptor_id}= Get Variable Value ${topology_template.node_templates.properties.descriptorId} + ${designer}= Get Variable Value ${topology_template.node_templates.properties.designer} + ${version}= Get Variable Value ${topology_template.node_templates.properties.version} + ${name}= Get Variable Value ${topology_template.node_templates.properties.name} + ${invariantId}= Get Variable Value ${topology_template.node_templates.properties.invariantId} + + Set Global Variable ${NS_DescriptorID} ${ns_descriptor_id} + Set Global Variable ${Designer} ${designer} + Set Global Variable ${NS_Version} ${version} + Set Global Variable ${NS_Name} ${name} + Set Global Variable ${NS_InvariantID} ${invariantId} + +Fetch Information from SOL006 NS descriptor file + Import Variables ${CURDIR}/descriptors/SOL006/NSD/nsd_SOL006.yaml + ${nsd_id}= Get Variable Value ${nfv.nsd[0].id} + Set Global Variable ${NS_DescriptorID} ${nsd_id} + +Match the Response Attributes with NS Descriptors + Should Be Equal As Strings ${response['body']['nsdId']} ${NSDescriptor_ID} + Run Keyword If '${descriptorType}'=='SOL001' Should Be Equal As Strings ${response['body']['nsdName']} ${NS_Name} + Run Keyword If '${descriptorType}'=='SOL001' Should Be Equal As Strings ${response['body']['nsdVersion']} ${NS_Version} + Run Keyword If '${descriptorType}'=='SOL001' Should Be Equal As Strings ${response['body']['nsdDesigner']} ${Designer} + Run Keyword If '${descriptorType}'=='SOL001' Should Be Equal As Strings ${response['body']['nsdInvariantId']} ${NS_InvariantID} + +Check HTTP Response Body NsdmSubscription content against NS Descriptor + #${check_descriptors} flag, 1 to check descriptors + Run Keyword If ${check_descriptors} == 1 Check Individual NsdmSubscription Content for NSD + +Check Individual NsdmSubscription Content for NSD + PARSE the NS Descriptor File + Match the NsdmSubscription Response Attributes with NS Descriptors + +Match the NsdmSubscription Response Attributes with NS Descriptors + Should Be Equal As Strings ${response['body']['filter']['nsdId']} ${NSDescriptor_ID} + Run Keyword If '${descriptorType}'=='SOL001' Should Be Equal As Strings ${response['body']['filter']['nsdName']} ${NS_Name} + Run Keyword If '${descriptorType}'=='SOL001' Should Be Equal As Strings ${response['body']['filter']['nsdVersion']} ${NS_Version} + Run Keyword If '${descriptorType}'=='SOL001' Should Be Equal As Strings ${response['body']['filter']['nsdDesigner']} ${Designer} + Run Keyword If '${descriptorType}'=='SOL001' Should Be Equal As Strings ${response['body']['filter']['nsdInvariantId']} ${NS_InvariantID} diff --git a/SOL005/NSDManagement-API/NSDescriptors.robot b/SOL005/NSDManagement-API/NSDescriptors.robot index 0f2be16036735f14c700d47b69f407e5f8508498..c03af8250b7336da2e66b62eb21f19a0104bfbd8 100644 --- a/SOL005/NSDManagement-API/NSDescriptors.robot +++ b/SOL005/NSDManagement-API/NSDescriptors.robot @@ -2,7 +2,6 @@ Documentation This Clause defines all the resources and methods provided by the NS descriptors interface. Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/nsDescriptors.txt # Specific nsDescriptors Parameters Resource NSDManagementKeywords.robot Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false @@ -14,7 +13,7 @@ GET all Network Service Descriptors Information ... Test title: GET all Network Service Descriptors Information ... Test objective: The objective is to test the retrieval of all the Network Service Descriptors information and perform a JSON schema and content validation of the collected data structure ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -27,7 +26,7 @@ GET Network Service Descriptors Information with attribute-based filter ... Test title: GET Network Service Descriptors Information with attribute-based filter ... Test objective: The objective is to test the retrieval of Network Service Descriptors information using attribute-based filter, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued attribute-based filter ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -41,7 +40,7 @@ GET Network Service Descriptors Information with invalid attribute-based filter ... Test title: GET Network Service Descriptors Information with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of Network Service Descriptors information fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -54,7 +53,7 @@ Get all Network Service Descriptors Information with malformed authorization tok ... Test title: Get all Network Service Descriptors Information with malformed authorization token ... Test objective: The objective is to test that the retrieval of Network Service Descriptors Information fails when using malformed authorization token ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none @@ -66,7 +65,7 @@ Get all Network Service Descriptors Information without authorization token ... Test title: Get all Network Service Descriptors Information without authorization token ... Test objective: The objective is to test that the retrieval of Network Service Descriptors Information fails when omitting the authorization token ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none @@ -78,7 +77,7 @@ GET all Network Service Descriptors Information with expired or revoked authoriz ... Test title: GET all Network Service Descriptors Information with expired or revoked authorization token ... Test objective: The objective is to test that the retrieval of Network Service Descriptors Information fails when using expired or revoked authorization token ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none @@ -90,7 +89,7 @@ GET all Network Service Descriptors Information with "all_fields" attribute sele ... Test title: GET all Network Service Descriptors Information with "all_fields" attribute selector ... Test objective: The objective is to test the retrieval of all Network Service Descriptors Information with "all_fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "all_fileds" selector ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -104,7 +103,7 @@ GET all Network Service Descriptors Information with "exclude_default" attribute ... Test title: GET all Network Service Descriptors Information with "exclude_default" attribute selector ... Test objective: The objective is to test the retrieval of all Network Service Descriptors Information with "exclude_default" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "exclude_default" selector ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -118,7 +117,7 @@ GET all Network Service Descriptors Information with "fields" attribute selector ... Test title: GET all Network Service Descriptors Information with "fields" attribute selector ... Test objective: The objective is to test the retrieval of all Network Service Descriptors Information with "fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "fields" selector ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO supports the use of "fields" attribute selector ... Post-Conditions: none @@ -132,7 +131,7 @@ GET all Network Service Descriptors Information with "exclude_fields" attribute ... Test title: GET all Network Service Descriptors Information with "exclude_fields" attribute selector ... Test objective: The objective is to test the retrieval of all Network Service Descriptors Information with "exclude_fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "exclude_fields" selector ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO supports the use of "exclude_fields" attribute selector ... Post-Conditions: none @@ -146,7 +145,7 @@ Create new Network Service Descriptor Resource ... Test title: Create new Network Service Descriptor Resource ... Test objective: The objective is to test the creation of a new Create new Network Service Descriptor resource and perform the JSON schema validation of the returned structure ... Pre-conditions: none - ... Reference: Clause 5.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The Network Service Descriptor resource is successfully created on the NFVO @@ -155,13 +154,14 @@ Create new Network Service Descriptor Resource Check HTTP Response Body Json Schema Is NsdInfo Check HTTP Response Header Contains Location Check Postcondition NsdInfo Exists + Check HTTP Response Body NsInstance content against NS Descriptor PUT all Network Service Descriptors - Method not implemented [Documentation] Test ID: 5.3.1.1.12 ... Test title: PUT all Network Service Descriptors Information - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify Network Service Descriptors Information ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO - ... Reference: Clause 5.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -173,7 +173,7 @@ PATCH all Network Service Descriptors - Method not implemented ... Test title: PATCH all Network Service Descriptors Information - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptors Information ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO - ... Reference: Clause 5.4.2.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.2.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -185,7 +185,7 @@ DELETE all Network Service Descriptors - Method not implemented ... Test title: DELETE all Network Service Descriptors Information - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete Network Service Descriptors Information ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO - ... Reference: Clause 5.4.2.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.2.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The Network Service Descriptors are not deleted by the failed operation @@ -198,23 +198,37 @@ GET all Network Service Descriptors Information as Paged Response ... Test title: GET all Network Service Descriptors Information as Paged Response ... Test objective: The objective is to test the retrieval of all the Network Service Descriptors information as a Paged Response. ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET all Network Service Descriptors Information Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link Get all Network Service Descriptors Information - Bad Request Response too Big [Documentation] Test ID: 5.3.1.1.16 ... Test title: Get all Network Service Descriptors Information - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of Network Service Descriptors Information fails because response is too big, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO - ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none GET all Network Service Descriptors Information Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file + Check HTTP Response Body Json Schema Is ProblemDetails + +GET all Network Service Descriptors Information with "exclude_default" and "fields" attribute selector + [Documentation] Test ID: 5.3.1.1.17 + ... Test title: GET all Network Service Descriptors Information with "exclude_default" and "fields" attribute selector + ... Test objective: The objective is to test the retrieval of all Network Service Descriptors Information with "exclude_default" and "fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "exclude_default" and "fields" selector + ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO + ... Reference: Clause 5.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO supports the use of "exclude_default" and "fields" attribute selector + ... Post-Conditions: none + GET all Network Service Descriptors Information with exclude_default and fields attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is NsdInfos + Check HTTP Response Body NsdInfos Matches the requested fields selector \ No newline at end of file diff --git a/SOL005/NSDManagement-API/NotificationEndpoint.robot b/SOL005/NSDManagement-API/NotificationEndpoint.robot new file mode 100644 index 0000000000000000000000000000000000000000..d769f58f136bca694990781c9c0b2052591b6cb6 --- /dev/null +++ b/SOL005/NSDManagement-API/NotificationEndpoint.robot @@ -0,0 +1,190 @@ +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Library OperatingSystem +Library JSONLibrary +Library String +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri +Resource NSDManagementKeywords.robot + +*** Test Cases *** +NSD Onboarding Notification + [Documentation] Test ID: 5.3.1.15.1 + ... Test title: NSD Onboarding Notification + ... Test objective: The objective is to test that NSD Onboarding Notification is delivered with success to the notification consumer. + ... Pre-conditions: A NSD management subscription for onboarding notification is available in the NFVO. + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post NSD Onboarding Notification + Check HTTP Response Status Code Is 204 + +NSD Onboarding Failure Notification + [Documentation] Test ID: 5.3.1.15.2 + ... Test title: NSD Onboarding Failure Notification + ... Test objective: The objective is to test that NSD Onboarding Failure Notification is delivered with success to the notification consumer. + ... Pre-conditions: A NSD management subscription for onboarding failure notification is available in the NFVO. + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post NSD Onboarding Failure Notification + Check HTTP Response Status Code Is 204 + +NSD Change Notification + [Documentation] Test ID: 5.3.1.15.3 + ... Test title: NSD Change Notification + ... Test objective: The objective is to test that NSD Change Notification is delivered with success to the notification consumer. + ... Pre-conditions: A NSD management subscription for change notification is available in the NFVO. + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post NSD Change Notification + Check HTTP Response Status Code Is 204 + +NSD Deletion Notification + [Documentation] Test ID: 5.3.1.15.4 + ... Test title: NSD Deletion Notification + ... Test objective: The objective is to test that NSD Deletion Notification is delivered with success to the notification consumer. + ... Pre-conditions: A NSD management subscription for deletion notification is available in the NFVO. + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post NSD Deletion Notification + Check HTTP Response Status Code Is 204 + +Pnfd Onboarding Notification + [Documentation] Test ID: 5.3.1.15.5 + ... Test title: Pnfd Onboarding Notification + ... Test objective: The objective is to test that Pnfd Onboarding Notification is delivered with success to the notification consumer. + ... Pre-conditions: A Pnfd management subscription for onboarding notification is available in the NFVO. + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Pnfd Onboarding Notification + Check HTTP Response Status Code Is 204 + +Pnfd Onboarding Failure Notification + [Documentation] Test ID: 5.3.1.15.6 + ... Test title: Pnfd Onboarding Failure Notification + ... Test objective: The objective is to test that Pnfd Onboarding Failure Notification is delivered with success to the notification consumer. + ... Pre-conditions: A Pnfd management subscription for onboarding failure notification is available in the NFVO. + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Pnfd Onboarding Failure Notification + Check HTTP Response Status Code Is 204 + +Pnfd Deletion Notification + [Documentation] Test ID: 5.3.1.15.7 + ... Test title: pnfd Deletion Notification + ... Test objective: The objective is to test that Pnfd Deletion Notification is delivered with success to the notification consumer. + ... Pre-conditions: A Pnfd management subscription for deletion notification is available in the NFVO. + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Pnfd Deletion Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body PkgmSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post NSD Onboarding Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File + ${template} = Get File jsons/notifications/NsdOnBoardingNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} nsdInfoId=${nsdInfoId} nsdId=${NS_DescriptorID} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post NSD Onboarding Failure Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File + ${template} = Get File jsons/notifications/NsdOnBoardingFailureNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} nsdInfoId=${nsdInfoId} nsdId=${NS_DescriptorID} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post NSD Change Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File + ${template} = Get File jsons/notifications/NsdChangeNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} nsdInfoId=${nsdInfoId} nsdId=${NS_DescriptorID} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post NSD Deletion Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File + ${template} = Get File jsons/notifications/NsdDeletionNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} nsdInfoId=${nsdInfoId} nsdId=${NS_DescriptorID} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Pnfd Onboarding Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/notifications/PnfdOnBoardingNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} pnfdInfoId=${pnfdInfoId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Pnfd Onboarding Failure Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/notifications/PnfdOnBoardingFailureNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} pnfdInfoId=${pnfdInfoId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Pnfd Deletion Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/notifications/pnfdDeletionNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} pnfdInfoId=${pnfdInfoId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL005/NSDManagement-API/NSDManagementNotification.robot b/SOL005/NSDManagement-API/Notifications.robot similarity index 87% rename from SOL005/NSDManagement-API/NSDManagementNotification.robot rename to SOL005/NSDManagement-API/Notifications.robot index de6418c750e0d322435023ecd781f93700b5f42a..df9d2d0e070b118558263f7d77ff9397e3eb06aa 100644 --- a/SOL005/NSDManagement-API/NSDManagementNotification.robot +++ b/SOL005/NSDManagement-API/Notifications.robot @@ -9,14 +9,13 @@ Library BuiltIn Library Collections Library String - *** Test Cases *** NSD Onboarding Notification [Documentation] Test ID: 5.3.1.9.1 ... Test title: NSD Onboarding Notification ... Test objective: The objective is to test the dispatch of NSD Onboarding notification when the NSD onboarding operation is successfully completed, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A NSD management subscription for onboarding notifications is available in the NFVO. - ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -29,7 +28,7 @@ NSD Onboarding Failure Notification ... Test title: NSD Onboarding Failure Notification ... Test objective: The objective is to test the dispatch of NSD Onboarding failure notification when the NSD onboarding operation fails, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A NSD management subscription for onboarding failure notifications is available in the NFVO. - ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -42,7 +41,7 @@ NSD Operational State Change Notification ... Test title: NSD Operational State Change Notification ... Test objective: The objective is to test the dispatch of NSD Operational State Change notification when the NSD operational status change in the NFVO, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A NSD management subscription for operational state change notifications is available in the NFVO. - ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -55,7 +54,7 @@ NSD Deletion Notification ... Test title: NSD Deletion Notification ... Test objective: The objective is to test the dispatch of NSD Deletion notification when the NSD is deleted from the NFVO, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A NSD management subscription for deletion notifications is available in the NFVO. - ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -68,7 +67,7 @@ PNFD Onboarding Notification ... Test title: PNFD Onboarding Notification ... Test objective: The objective is to test the dispatch of PNFD Onboarding notification when the PNFD onboarding operation is successfully completed, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A PNFD management subscription for onboarding notifications is available in the NFVO. - ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -81,7 +80,7 @@ PNFD Onboarding Failure Notification ... Test title: PNFD Onboarding Failure Notification ... Test objective: The objective is to test the dispatch of PNFD Onboarding failure notification when the PNFD onboarding operation fails, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A PNFD management subscription for onboarding failure notifications is available in the NFVO. - ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -94,7 +93,7 @@ PNFD Deletion Notification ... Test title: PNFD Deletion Notification ... Test objective: The objective is to test the dispatch of PNFD Deletion notification when the PNFD is deleted from the NFVO, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A PNFD management subscription for deletion notifications is available in the NFVO. - ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -223,8 +222,10 @@ Configure PNFD Deletion Handler set to dictionary ${json} notificationType ${type} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure NSD Deletion Handler @@ -233,8 +234,10 @@ Configure NSD Deletion Handler set to dictionary ${json} notificationType ${type} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure NSD Operational State Change Handler @@ -243,8 +246,10 @@ Configure NSD Operational State Change Handler set to dictionary ${json} notificationType ${type} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure PNFD Onboarding Handler @@ -253,8 +258,10 @@ Configure PNFD Onboarding Handler set to dictionary ${json} notificationType ${type} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification PNFD Onboarding Failure Handler @@ -263,8 +270,10 @@ Configure Notification PNFD Onboarding Failure Handler set to dictionary ${json} notificationType ${type} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure NSD Onboarding Handler @@ -273,8 +282,10 @@ Configure NSD Onboarding Handler set to dictionary ${json} notificationType ${type} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification NSD Onboarding Failure Handler @@ -283,8 +294,10 @@ Configure Notification NSD Onboarding Failure Handler set to dictionary ${json} notificationType ${type} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL005/NSDManagement-API/PNFD.robot b/SOL005/NSDManagement-API/PNFD.robot new file mode 100644 index 0000000000000000000000000000000000000000..04a83b634cad5b0425ca44435409dd2aed2553d8 --- /dev/null +++ b/SOL005/NSDManagement-API/PNFD.robot @@ -0,0 +1,161 @@ +*** Settings *** +Documentation This Clause defines the content of the individual NS descriptor, i.e. PNFD content +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt # Generic Parameters +Resource NSDManagementKeywords.robot +Library JSONLibrary +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library OperatingSystem + +*** Test Cases *** +Get single file PNFD in Plain Format + [Documentation] Test ID: 5.3.1.13.1 + ... Test title: Get single file PNFD in Plain Format + ... Test objective: The objective is to test the retrieval of the PNFD in plain format within a PNFD archive and perform a validation that returned content is in plain format + ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. + ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The PNFD is implemented as a single file + ... Post-Conditions: none + Get single file PNFD in Plain Format + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is text/plain + +Get PNFD in Zip Format + [Documentation] Test ID: 5.3.1.13.2 + ... Test title: Get PNFD in Zip Format + ... Test objective: The objective is to test the retrieval of the PNFD in zip format within a PNFD archive and perform a validation that returned content is in zip format + ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. + ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get PNFD in Zip Format + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get single file PNFD in Plain or Zip Format + [Documentation] Test ID: 5.3.1.13.3 + ... Test title: Get single file PNFDin Plain or Zip Format + ... Test objective: The objective is to test the retrieval of the single file PNFD within a PNFD archive when requesting Plain or Zip format to NFVO by including both formats in the request, and perform a validation that response is in Plain or Zip format + ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. + ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The PNFD is implemented as a single file + ... Post-Conditions: none + Get single file PNFD in Plain or Zip Format + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is Any of text/plain application/zip + +Get multi file PNFD in Plain or Zip Format + [Documentation] Test ID: 5.3.1.13.4 + ... Test title: Get multi file PNFD in Plain or Zip Format + ... Test objective: The objective is to test the retrieval of the multi file PNFD within a PNFD archive when requesting Plain or Zip format to NFVO by including both formats in the request, and perform a validation that returned content is in Zip format + ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. + ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The PNFD is implemented as a multi file + ... Post-Conditions: none + Get multi file PNFD in Plain or Zip Format + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get multi file PNFD in Plain Format + [Documentation] Test ID: 5.3.1.13.5 + ... Test title: Get multi file PNFD in Plain Format + ... Test objective: The objective is to test that the retrieval of the multi file PNFD within a PNFD archive fails when requesting it in Plain format, and perform a validation of the JSON schema validation of the failed operation HTTP response + ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. + ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The PNFD is implemented as a multi file + ... Post-Conditions: none + Get multi file PNFD in Plain Format + Check HTTP Response Status Code Is 406 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get PNFD Content with invalid resource identifier + [Documentation] Test ID: 5.3.1.13.6 + ... Test title: Get PNFD Content with invalid resource identifier + ... Test objective: The objective is to test that the retrieval of the PNFD within a PNFD archive fails when using an invalid resource identifier + ... Pre-conditions: none + ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get PNFD with invalid resource identifier + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get PNFD with conflict due to onboarding state + [Documentation] Test ID: 5.3.1.13.7 + ... Test title: Get PNFD with conflict due to onboarding state + ... Test objective: The objective is to test that the retrieval of the PNFD within a PNFD archive fails due to a conflict when the PNFD 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 PNFD is different from ONBOARDED. + ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get PNFD with conflict due to onboarding state + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get PNFD with security information + [Documentation] Test ID: 5.3.1.13.8 + ... Test title: Get PNFD with security information + ... Test objective: The objective is to test the retrieval of the PNFD within a PNFD archive shall include in the ZIP archive the security information when requested with "include_signature" parameter + ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. + ... Reference: Clause 5.4.7a.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get PNFD with security information + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +POST PNFD - Method not implemented + [Documentation] Test ID: 5.3.1.13.9 + ... Test title: POST PNFD - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create a new PNFD + ... Pre-conditions: none + ... Reference: Clause 5.4.7a.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for PNFD + Check HTTP Response Status Code Is 405 + +PUT PNFD - Method not implemented + [Documentation] Test ID: 5.3.1.13.10 + ... Test title: PUT PNFD - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update PNFD + ... Pre-conditions: none + ... Reference: Clause 5.4.7a.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for PNFD + Check HTTP Response Status Code Is 405 + +PATCH PNFD - Method not implemented + [Documentation] Test ID: 5.3.1.13.11 + ... Test title: PATCH PNFD - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update PNFD + ... Pre-conditions: none + ... Reference: Clause 5.4.7a.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for PNFD + Check HTTP Response Status Code Is 405 + +DELETE PNFD - Method not implemented + [Documentation] Test ID: 5.3.1.13.12 + ... Test title: DELETE PNFD - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete PNFD + ... Pre-conditions: none + ... Reference: Clause 5.4.7a.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send DELETE Request for PNFD + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NSDManagement-API/PNFDContent.robot b/SOL005/NSDManagement-API/PNFDArchiveContent.robot similarity index 66% rename from SOL005/NSDManagement-API/PNFDContent.robot rename to SOL005/NSDManagement-API/PNFDArchiveContent.robot index 15231b5fc1d9da8a787da89aa4990c5046e383e0..79392484aaef45f83c6dea13153323bd1e3f3c67 100644 --- a/SOL005/NSDManagement-API/PNFDContent.robot +++ b/SOL005/NSDManagement-API/PNFDArchiveContent.robot @@ -2,7 +2,6 @@ Documentation This Clause defines the content of the individual NS descriptor, i.e. PNFD content Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/pnfDescriptors.txt # Specific PNFDescriptors Parameters Resource NSDManagementKeywords.robot Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false @@ -12,34 +11,35 @@ Library OperatingSystem Get PNFD Content [Documentation] Test ID: 5.3.1.6.1 ... Test title: Get PNFD Content - ... Test objective: The objective is to test the retrieval of the PNFD Content in plain format and perform a validation that returned content is in plain format + ... Test objective: The objective is to test the retrieval of the PNFD Content in zip format and perform a validation that returned content is in plain format ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. - ... Reference: Clause 5.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Get PNFD Content Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is text/plain + Check HTTP Response Header Content-Type Is application/zip Get PNFD Content with invalid resource identifier [Documentation] Test ID: 5.3.1.6.2 ... Test title: Get PNFD Content with invalid resource identifier ... Test objective: The objective is to test that the retrieval of the PNFD Content fails when using an invalid resource identifier ... Pre-conditions: none - ... Reference: Clause 5.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Get PNFD Content with invalid resource identifier Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails Get PNFD Content with conflict due to onboarding state [Documentation] Test ID: 5.3.1.6.3 ... Test title: Get PNFD Content with conflict due to onboarding state ... Test objective: The objective is to test that the retrieval of the PNFD Content fails due to a conflict when the PNFD 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 PNFD for which the PNFD Content is requested is different from ONBOARDED. - ... Reference: Clause 5.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -47,27 +47,25 @@ Get PNFD Content with conflict due to onboarding state Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - -Upload PNFD Content as plain text file +Upload PNFD Content as zip file [Documentation] Test ID: 5.3.1.6.4 - ... Test title: Upload PNFD Content as plain text file + ... Test title: Upload PNFD Content as zip file ... Test objective: The objective is to test the upload of a PNFD Content in plain text format. ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. - ... Reference: Clause 5.4.7.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.7.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The uploaded PNFD content is available in the NFVO - Send PUT Request to upload PNFD Content as plain text file + Send PUT Request to upload PNFD Content as zip file Check HTTP Response Status Code Is 204 Check Postcondition PNFD Content Exists - Upload PNFD Content with conflict due to onboarding state [Documentation] Test ID: 5.3.1.6.5 ... Test title: Upload PNFD Content with conflict due to onboarding state ... Test objective: The objective is to test that the upload of the PNFD Content fails due to a conflict when the PNFD is not in onboarding state CREATED 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 PNFD for which the PNFD Content is requested is different from CREATED. - ... Reference: Clause 5.4.7.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.7.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -80,7 +78,7 @@ POST PNFD Content - Method not implemented ... Test title: POST PNFD Content - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new PNF Descriptor content ... Pre-conditions: none - ... Reference: Clause 5.4.7.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.7.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -92,7 +90,7 @@ PATCH PNFD Content - Method not implemented ... Test title: PATCH PNFD Content - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update PNF Descriptor content ... Pre-conditions: none - ... Reference: Clause 5.4.7.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.7.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -104,10 +102,49 @@ DELETE PNFD Content - Method not implemented ... Test title: DELETE PNFD Content - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete PNF Descriptor content ... Pre-conditions: none - ... Reference: Clause 5.4.7.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.7.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The PNFD content is not deleted by the failed operation + ... Post-Conditions: none Send DELETE Request for PNFD Content Check HTTP Response Status Code Is 405 - Check Postcondition PNFD Content Exists + +Get PNFD Content with Range Request and NFVO supporting Range Requests + [Documentation] Test ID: 5.3.1.6.9 + ... Test title: Get PNFD Content with Range Request and NFVO supporting Range Requests + ... Test objective: The objective is to test the retrieval of the PNFD Content in plain format when using a range request to return single range of bytes from the file, with the NFVO supporting it + ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. + ... Reference: Clause 5.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get PNFD 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 + +Get PNFD Content with invalid Range Request + [Documentation] Test ID: 5.3.1.6.10 + ... Test title: Get PNFD Content with invalid Range Request + ... Test objective: The objective is to test the retrieval of the PNFD Content in plain format and perform a validation that returned content is in plain format + ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. + ... Reference: Clause 5.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get PNFD Content with invalid Range Request + Check HTTP Response Status Code Is 416 + Check HTTP Response Body Json Schema Is ProblemDetails + +Upload PNFD Archive Content + [Documentation] Test ID: 5.3.1.6.11 + ... Test title: Upload PNFD Archive Content + ... Test objective: The objective is to test the PNFD archive has been accepted for uploading, but the processing has not been completed. + ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. + ... Reference: Clause 5.4.7.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request to upload PNFD Content as zip file + Check HTTP Response Status Code Is 202 + Wait for individual grant successful notification \ No newline at end of file diff --git a/SOL005/NSDManagement-API/PNFDArchiveManifest.robot b/SOL005/NSDManagement-API/PNFDArchiveManifest.robot new file mode 100644 index 0000000000000000000000000000000000000000..8ab2a18746664d966a4375016268b0f5d7ba79d0 --- /dev/null +++ b/SOL005/NSDManagement-API/PNFDArchiveManifest.robot @@ -0,0 +1,95 @@ +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt # Generic Parameters +Resource NSDManagementKeywords.robot +Library JSONLibrary +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library OperatingSystem + +*** Test Cases *** +Get PNFD Archive Manifest + [Documentation] Test ID: 5.3.1.14.1 + ... Test title: Get PNFD Archive Manifest + ... Test objective: The objective is to test that GET method reads the content of the manifest file within an PNFD archive + ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. + ... Reference: Clause 5.4.7b.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get PNFD Archive Manifest + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is text/plain + +Get PNFD Archive Manifest with security information + [Documentation] Test ID: 5.3.1.14.2 + ... Test title: Get PNFD Archive Manifest with security information + ... Test objective: The objective is to test the retrieval of content of the manifest file within an PNFD archive shall include in the ZIP archive the security information when requested with "include_signature" parameter + ... Pre-conditions: One or more PNFDs are onboarded in the NFVO. + ... Reference: Clause 5.4.7b.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get PNFD Archive Manifest with security information + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get PNFD Archive Manifest with conflict due to onboarding state + [Documentation] Test ID: 5.3.1.14.3 + ... Test title: Get PNFD Archive Manifest with conflict due to onboarding state + ... Test objective: The objective is to test that the retrieval of content of the manifest file within an PNFD archive fails due to a conflict when the PNFD 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 PNFD is different from ONBOARDED. + ... Reference: Clause 5.4.7b.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get PNFD Archive Manifest with conflict due to onboarding state + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST PNFD Archive Manifest - Method not implemented + [Documentation] Test ID: 5.3.1.14.4 + ... Test title: POST PNFD Archive Manifest - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create a new Network Service Descriptor Archive Manifest + ... Pre-conditions: none + ... Reference: Clause 5.4.7b.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for PNFD Archive Manifest + Check HTTP Response Status Code Is 405 + +PUT PNFD Archive Manifest - Method not implemented + [Documentation] Test ID: 5.3.1.14.5 + ... Test title: PUT PNFD Archive Manifest - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor Archive Manifest + ... Pre-conditions: none + ... Reference: Clause 5.4.7b.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for PNFD Archive Manifest + Check HTTP Response Status Code Is 405 + +PATCH PNFD Archive Manifest - Method not implemented + [Documentation] Test ID: 5.3.1.14.6 + ... Test title: PATCH PNFD Archive Manifest - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update Network Service Descriptor Archive Manifest + ... Pre-conditions: none + ... Reference: Clause 5.4.7b.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for PNFD Archive Manifest + Check HTTP Response Status Code Is 405 + +DELETE PNFD Archive Manifest - Method not implemented + [Documentation] Test ID: 5.3.1.14.7 + ... Test title: DELETE PNFD Archive Manifest - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete Network Service Descriptor Archive Manifest + ... Pre-conditions: none + ... Reference: Clause 5.4.7b.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send DELETE Request for PNFD Archive Manifest + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NSDManagement-API/PNFDescriptors.robot b/SOL005/NSDManagement-API/PNFDescriptors.robot index afb60a8e511a795f853c31826daa8013522eba7a..935f789be921ac4640715aab8a2b0692b7c8fd47 100644 --- a/SOL005/NSDManagement-API/PNFDescriptors.robot +++ b/SOL005/NSDManagement-API/PNFDescriptors.robot @@ -2,7 +2,6 @@ Documentation This Clause defines all the resources and methods provided by the PNF descriptors interface. \ Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/pnfDescriptors.txt # Specific nsDescriptors Parameters Resource NSDManagementKeywords.robot Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false @@ -14,7 +13,7 @@ GET all PNF Descriptors Information ... Test title: GET all PNF Descriptors Information ... Test objective: The objective is to test the retrieval of all the PNF Descriptors information and perform a JSON schema and content validation of the collected data structure ... Pre-conditions: One or more PNF Descriptors are onboarded in the NFVO. - ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -27,7 +26,7 @@ GET PNF Descriptors Information with attribute-based filter ... Test title: GET PNF Descriptors Information with attribute-based filter ... Test objective: The objective is to test the retrieval of PNF Descriptors information using attribute-based filter, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued attribute-based filter ... Pre-conditions: One or more PNF Descriptors are onboarded in the NFVO. - ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -41,7 +40,7 @@ GET PNF Descriptors Information with invalid attribute-based filter ... Test title: GET PNF Descriptors Information with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of PNF Descriptors information fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: One or more PNF Descriptors are onboarded in the NFVO. - ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -54,7 +53,7 @@ GET all PNF Descriptors Information with "all_fields" attribute selector ... Test title: GET all PNF Descriptors Information with "all_fields" attribute selector ... Test objective: The objective is to test the retrieval of all PNF Descriptors Information with "all_fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "all_fileds" selector ... Pre-conditions: One or more PNF Descriptors are onboarded in the NFVO. - ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -68,7 +67,7 @@ GET all PNF Descriptors Information with "exclude_default" attribute selector ... Test title: GET all PNF Descriptors Information with "exclude_default" attribute selector ... Test objective: The objective is to test the retrieval of all PNF Descriptors Information with "exclude_default" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "exclude_default" selector ... Pre-conditions: One or more PNF Descriptors are onboarded in the NFVO. - ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -82,7 +81,7 @@ GET all PNF Descriptors Information with "fields" attribute selector ... Test title: GET all PNF Descriptors Information with "fields" attribute selector ... Test objective: The objective is to test the retrieval of all PNF Descriptors Information with "fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "fields" selector ... Pre-conditions: One or more PNF Descriptors are onboarded in the NFVO. - ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO supports the use of "fields" attribute selector ... Post-Conditions: none @@ -96,7 +95,7 @@ GET all PNF Descriptors Information with "exclude_fields" attribute selector ... Test title: GET all PNF Descriptors Information with "exclude_fields" attribute selector ... Test objective: The objective is to test the retrieval of all PNF Descriptors Information with "exclude_fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "exclude_fields" selector ... Pre-conditions: One or more PNF Descriptors are onboarded in the NFVO. - ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO supports the use of "exclude_fields" attribute selector ... Post-Conditions: none @@ -110,7 +109,7 @@ Create new PNF Descriptor Resource ... Test title: Create new PNF Descriptor Resource ... Test objective: The objective is to test the creation of a new Create new PNF Descriptor resource and perform the JSON schema validation of the returned structure ... Pre-conditions: none - ... Reference: Clause 5.4.5.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.5.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The PNF Descriptor resource is successfully created on the NFVO @@ -124,8 +123,8 @@ PUT all PNF Descriptors - Method not implemented [Documentation] Test ID: 5.3.1.4.9 ... Test title: PUT all PNF Descriptors Information - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify PNF Descriptors Information - ... Pre-conditions: One or more PNF Descriptors are onboarded in the NFVO. - ... Reference: Clause 5.4.5.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.5.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -136,8 +135,8 @@ PATCH all PNF Descriptors - Method not implemented [Documentation] Test ID: 5.3.1.4.10 ... Test title: PATCH all PNF Descriptors Information - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update NF Descriptors Information - ... Pre-conditions: One or more PNF Descriptors are onboarded in the NFVO. - ... Reference: Clause 5.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -148,37 +147,50 @@ DELETE all PNF Descriptors - Method not implemented [Documentation] Test ID: 5.3.1.4.11 ... Test title: DELETE all PNF Descriptors Information - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete PNF Descriptors Information - ... Pre-conditions: One or more PNF Descriptors are onboarded in the NFVO. - ... Reference: Clause 5.4.5.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 5.4.5.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The PNF Descriptors are not deleted by the failed operation + ... Post-Conditions: none Send DELETE Request for all PNF Descriptors Check HTTP Response Status Code Is 405 - Check Postcondition PNF Descriptors Exist GET all PNF Descriptors Information as Paged Response [Documentation] Test ID: 5.3.1.4.12 ... Test title: GET all PNF Descriptors Information as Paged Response ... Test objective: The objective is to test the retrieval of all the PNF Descriptors information as a Paged Response. ... Pre-conditions: One or more PNF Descriptors are onboarded in the NFVO. - ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET all PNF Descriptors Information Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link GET PNF Descriptors Information - Bad Request Response too Big [Documentation] Test ID: 5.3.1.4.13 ... Test title: GET PNF Descriptors Information - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of PNF Descriptors information fails because response is too big, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: One or more PNF Descriptors are onboarded in the NFVO. - ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET all PNF Descriptors Information Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file + Check HTTP Response Body Json Schema Is ProblemDetails + +GET all PNF Descriptors Information with "exclude_default" and "fields" attribute selector + [Documentation] Test ID: 5.3.1.4.14 + ... Test title: GET all PNF Descriptors Information with "exclude_default" and "fields" attribute selector + ... Test objective: The objective is to test the retrieval of all PNF Descriptors Information with "exclude_default" and "fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "exclude_default" and "fields" selector + ... Pre-conditions: One or more PNF Descriptors are onboarded in the NFVO. + ... Reference: Clause 5.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO supports the use of "exclude_default" and "fields" attribute selector + ... Post-Conditions: none + GET all PNF Descriptors Information with exclude_default and fields attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PnfdInfos + Check HTTP Response Body PnfdInfos Matches the requested fields selector \ No newline at end of file diff --git a/SOL005/NSDManagement-API/Subscriptions.robot b/SOL005/NSDManagement-API/Subscriptions.robot index 968710bd8dec6f4f3f29bf637a1aa4e43c9f1dce..bcff75e5a0743b668dfb3e9e4d3a030095ce1211 100644 --- a/SOL005/NSDManagement-API/Subscriptions.robot +++ b/SOL005/NSDManagement-API/Subscriptions.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/subscriptions.txt Resource NSDManagementKeywords.robot Library OperatingSystem Library JSONLibrary @@ -16,7 +15,7 @@ Get All NSD Management Subscriptions ... Test title: Get All NSD Management Subscriptions ... Test objective: The objective is to test the retrieval of all NSD Management subscriptions and perform a JSON schema validation of the returned subscriptions data structure ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. - ... Reference: Clause 5.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -24,13 +23,12 @@ Get All NSD Management Subscriptions Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is NsdmSubscriptions - Get NSD Management Subscriptions with attribute-based filter [Documentation] Test ID: 5.3.1.7.2 ... Test title: Get NSD Management Subscriptions with attribute-based filter ... Test objective: The objective is to test the retrieval of NSD Management subscriptions using attribute-based filter, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. - ... Reference: Clause 5.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -39,13 +37,12 @@ Get NSD Management Subscriptions with attribute-based filter Check HTTP Response Body Json Schema Is NsdmSubscriptions Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter - Get NSD Management Subscriptions with invalid attribute-based filter [Documentation] Test ID: 5.3.1.7.3 ... Test title: Get NSD Management Subscriptions with attribute-based filters ... Test objective: The objective is to test that the retrieval of NSD Management subscriptions fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. - ... Reference: Clause 5.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -58,19 +55,20 @@ GET NSD Management Subscription with invalid resource endpoint ... Test title: GET NSD Management Subscription with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of all NSD Management subscriptions fails when using invalid resource endpoint. ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. - ... Reference: Clause 5.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Get NSD Management Subscriptions with invalid resource endpoint Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails Create new NSD Management subscription [Documentation] Test ID: 5.3.1.7.5 ... Test title: Create new NSD Management subscription ... Test objective: The objective is to test the creation of a new NSD Management subscription and perform a JSON schema and content validation of the returned subscription data structure ... Pre-conditions: none - ... Reference: Clause 5.4.8.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.8.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The NSD Management subscription is successfully set and it matches the issued subscription @@ -80,14 +78,13 @@ Create new NSD Management subscription Check HTTP Response Body NsdmSubscription Attributes Values Match the Issued Subscription Check Postcondition NSD Management Subscription Is Set - Create duplicated NSD Management subscription with NFVO not creating duplicated subscriptions [Tags] no-duplicated-subs [Documentation] Test ID: 5.3.1.7.6 ... Test title: Create duplicated NSD Management subscription with NFVO not creating duplicated subscriptions ... Test objective: The objective is to test the attempt of a creation of a duplicated NSD Management subscription and check that no new subscription is created by the NFVO and a link to the original subscription is returned ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. - ... Reference: Clause 5.4.8.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.8.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO does not support the creation of duplicated subscriptions ... Post-Conditions: The existing NSD Management subscription returned is available in the NFVO @@ -97,14 +94,13 @@ Create duplicated NSD Management subscription with NFVO not creating duplicated Check HTTP Response Header Contains Location Check Postcondition Subscription Resource Returned in Location Header Is Available - Create duplicated NSD Management subscription with NFVO creating duplicated subscriptions [Tags] duplicated-subs [Documentation] Test ID: 5.3.1.7.7 ... Test title: Create duplicated NSD Management subscription with NFVO creating duplicated subscriptions ... Test objective: The objective is to test the creation of a duplicated NSD Management subscription and perform a JSON schema and content validation of the returned duplicated subscription data structure ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. - ... Reference: Clause 5.4.8.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.8.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO supports the creation of duplicated subscriptions ... Post-Conditions: The duplicated NSD Management subscription is successfully set and it matches the issued subscription @@ -114,39 +110,36 @@ Create duplicated NSD Management subscription with NFVO creating duplicated subs Check HTTP Response Body NsdmSubscription Attributes Values Match the Issued Subscription Check Postcondition NSD Management Subscription Is Set - PUT NSD Management Subscriptions - Method not implemented [Documentation] Test ID: 5.3.1.7.8 ... Test title: PUT NSD Management Subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify NSD Management subscriptions ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. - ... Reference: Clause 5.4.8.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.8.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Send Put Request for NSD Management Subscriptions Check HTTP Response Status Code Is 405 - - + PATCH NSD Management Subscriptions - Method not implemented [Documentation] Test ID: 5.3.1.7.9 ... Test title: PATCH NSD Management Subscriptions - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update NSD Management subscriptions ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. - ... Reference: Clause 5.4.8.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.8.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Send Patch Request for NSD Management Subscriptions Check HTTP Response Status Code Is 405 - DELETE NSD Management Subscriptions - Method not implemented [Documentation] Test ID: 5.3.1.7.10 ... Test title: DELETE NSD Management Subscriptions - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete NSD Management subscriptions ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. - ... Reference: Clause 5.4.8.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.8.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The NSD Management subscriptions are not deleted by the failed operation @@ -159,23 +152,35 @@ Get All NSD Management Subscriptions as Paged Response ... Test title: Get All NSD Management Subscriptions as Paged Response ... Test objective: The objective is to test the retrieval of all NSD Management subscriptions as a Paged Response. ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. - ... Reference: Clause 5.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Get all NSD Management Subscriptions Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link Get NSD Management Subscriptions - Bad Request Response too Big [Documentation] Test ID: 5.3.1.7.12 ... Test title: Get NSD Management Subscriptions - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of NSD Management subscriptions fails because reponse is too big, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one NSD Management subscription is available in the NFVO. - ... Reference: Clause 5.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 5.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Get all NSD Management Subscriptions Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file + Check HTTP Response Body Json Schema Is ProblemDetails + +Create new NSD Management subscription - Unprocessable Entity + [Documentation] Test ID: 5.3.1.7.13 + ... Test title: Create new NSD Management subscription - Unprocessable Entity + ... Test objective: The objective is to test the creation of a new NSD Management subscription fials when content type of the payload body is supported and the payload body of a request contains syntactically correct data but the data cannot be processed + ... Pre-conditions: none + ... Reference: Clause 5.4.8.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send Post Request for NSD Management Subscription + Check HTTP Response Status Code Is 422 \ No newline at end of file diff --git a/SOL005/NSDManagement-API/descriptors/SOL001/NSD/nsd_SOL001.yaml b/SOL005/NSDManagement-API/descriptors/SOL001/NSD/nsd_SOL001.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a1c3a8d51b4cb2a5cc8b097def3d9c194dbb4dc6 --- /dev/null +++ b/SOL005/NSDManagement-API/descriptors/SOL001/NSD/nsd_SOL001.yaml @@ -0,0 +1,117 @@ +tosca_definitions_version: "tosca_simple_yaml_1_2" +tosca_default_namespace: "toscanfv" +description: "Referenxce NSD descriptor " + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v2.7.1/etsi_nfv_sol001_nsd_types.yaml + +metadata: + descriptor_id: "NSD_WITH_2_VNF" + vendor: "ETSI" + version: "1.0" +topology_template: + substitution_mappings: + node_type: "tosca.nodes.nfv.NS" + requirements: + right: [VNF_A, ext_a_right] + left: [VNF_B, ext_b_left] + mgmt_a: [VNF_A, management_vnf_a] + mgmt_b: [VNF_B, management_vnf_b] + node_templates: + VNF_A: + type: "tosca.nodes.nfv.VNF" + properties: + descriptor_id: "VNF-A" + descriptor_version: "1.0" + provider: "ETSI TST WG" + product_name: "VNF-A" + software_version: "1.0" + product_info_name: "VNF-A" + product_info_description: "TST010 reference VNF-A" + flavour_id: "VNF-A_flavor" + flavour_description: "VNF-A flavor" + vnfm_info: + - 'etsivnfm:v2.3.1' + requirements: + virtualLink: + ext_a_right: "vl_right" + management_vnf_a: "vl_mgmt" + int_a_data: "vl_data" + VNF_B: + type: "tosca.nodes.nfv.VNF" + properties: + descriptorId: "VNF-B" + descriptorVersion: "1.0" + provider: "ETSI TST WG" + productName: "VNF-B" + softwareVersion: "1.0" + productInfoName: "VNF-B" + productInfoDescription: "TST010 reference VNF-A" + defaultLocalizationLanguage: null + flavourId: "VNF-B_flavor" + flavourDescription: "VNF-B flavor" + vnfm_info: + - 'etsivnfm:v2.3.1' + requirements: + virtualLink: + ext_b_left: "vl_left" + management_vnf_b: "vl_mgmt" + int_b_data: "vl_data" + NS_with_2_VNF: + type: "tosca.nodes.nfv.NS" + properties: + descriptorId: "NS with 2 VNFs" + designer: "ETSI TST WG" + version: "1.0" + name: "ns_with_2_vnfs" + invariantId: "ns_with_2_vnfs" + requirements: + virtualLink: + - "vl_left" + - "vl_right" + - "vl_mgmt" + - "vl_data" + vl_left: + type: "tosca.nodes.nfv.NsVirtualLink" + properties: + description: "VNF-B external connetivity" + vlProfile: + max_bitrate_requirements: + root: 1000 + min_bitrate_requirements: + root: 1000 + connectivityType: + layer_protocols: [ipv4] + vl_right: + type: "tosca.nodes.nfv.NsVirtualLink" + properties: + description: "VNF-A external connectivity" + vlProfile: + max_bitrate_requirements: + root: 1000 + min_bitrate_requirements: + root: 1000 + connectivityType: + layer_protocols: [ipv4] + vl_mgmt: + type: "tosca.nodes.nfv.NsVirtualLink" + properties: + description: "Management network" + vlProfile: + max_bitrate_requirements: + root: 1000 + min_bitrate_requirements: + root: 1000 + connectivityType: + layer_protocols: [ipv4] + vl_data: + type: "tosca.nodes.nfv.NsVirtualLink" + properties: + description: "Internal network that interconnect VNF-A and VNF-B" + vlProfile: + max_bitrate_requirements: + root: 1000 + min_bitrate_requirements: + root: 1000 + connectivityType: + layer_protocols: [ipv4] diff --git a/SOL005/NSDManagement-API/descriptors/SOL006/NSD/nsd_SOL006.yaml b/SOL005/NSDManagement-API/descriptors/SOL006/NSD/nsd_SOL006.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b29b2dfc7b51cbe02c1f879e7f163eede7011b04 --- /dev/null +++ b/SOL005/NSDManagement-API/descriptors/SOL006/NSD/nsd_SOL006.yaml @@ -0,0 +1,284 @@ +nfv: + vnfd: + - id: VNF-A + provider: ETSI TST WG + product-name: TST010 reference VNF-A + software-version: '1.0' + version: '1.0' + vnfm-info: ETSI VNFM + vdu: + - id: vdu-a-1 + name: VNF A VDU 1 + int-cpd: + - id: right + layer-protocol: ethernet + - id: management + layer-protocol: ethernet + - id: left + layer-protocol: ethernet + virtual-compute-desc: vdu-a-1-vcd + virtual-storage-desc: vdu-a-1-vsd + sw-image-desc: asa-image + virtual-compute-desc: + id: vdu-a-1-vcd + virtual-memory: + size: '4.0' + virtual-cpu: + num-virtual-cpu: '2' + virtual-storage-desc: + id: vdu-a-1-vsd + type-of-storage: root-storage + size-of-storage: '0' + sw-image-desc: + id: vdu-a-1-image + name: vdu-a-1 image + version: '1.1' + checksum: + algorithm: sha-224 + hash: somehashfortst010 + container-format: bare + disk-format: qcow2 + min-disk: '1' + min-ram: '2.0' + size: '1' + image: 'http://someurl.com/vnf-a.qcow2' + int-virtual-link-desc: + - id: right-vl + flavour: + id: right-vl-flavour + qos: + latency: '1' + packet-delay-variation: '1' + packet-loss-ratio: '0.02' + connectivity-type: + layer-protocol: ethernet + ext-cpd: + - id: ext-a-right + int-virtual-link-desc: right-vl + layer-protocol: ethernet + - id: management + int-cpd: + vdu-id: vdu-a-1 + cpd: management + layer-protocol: ethernet + - id: ext-a-left + int-cpd: + vdu-id: vdu-a-1 + cpd: left + layer-protocol: ethernet + df: + id: normal + vdu-profile: + id: vdu-a-1 + min-number-of-instances: '1' + max-number-of-instances: '2' + virtual-link-profile: + id: right-vl + flavour: right-vl-flavour + max-bit-rate-requirements: + root: '10' + min-bit-rate-requirements: + root: '1' + virtual-link-protocol-data: + associated-layer-protocol: ipv4 + l3-protocol-data: + name: right-network + ip-version: ipv4 + cidr: 10.10.10.0/32 + gateway-ip: 10.10.10.1 + dhcp-enabled: 'true' + instantiation-level: + - id: double + vdu-level: + vdu-id: vdu-a-1 + number-of-instances: '2' + - id: single + vdu-level: + vdu-id: vdu-a-1 + number-of-instances: '1' + default-instantiation-level: single + lcm-operations-configuration: + scale-vnf-to-level-op-config: + arbitrary-target-levels-supported: 'true' + terminate-vnf-op-config: + min-graceful-termination: '1' + operate-vnf-op-config: + min-graceful-stop-timeout: '1' + - id: VNF-B + provider: ETSI TST WG + product-name: TST010 reference VNF-B + software-version: '2.0' + version: '2.0' + vnfm-info: ETSI VNFM + vdu: + - id: vdu-b-1 + name: VNF-B VDU 1 + int-cpd: + - id: left + layer-protocol: ethernet + - id: management + layer-protocol: ethernet + - id: right + layer-protocol: ethernet + virtual-compute-desc: vdu-b-1-vcd + virtual-storage-desc: vdu-b-1-vsd + sw-image-desc: vdu-b-1-image + virtual-compute-desc: + id: vdu-b-1-vcd + virtual-memory: + size: '4.0' + virtual-cpu: + num-virtual-cpu: '2' + virtual-storage-desc: + id: vdu-b-1-vsd + type-of-storage: root-storage + size-of-storage: '0' + sw-image-desc: + id: vdu-b-1-image + name: VNF-B image + version: '1.1' + checksum: + algorithm: sha-224 + hash: somehashfortst010 + container-format: bare + disk-format: qcow2 + min-disk: '1' + min-ram: '2.0' + size: '1' + image: 'http://someurl.com/VNF-B.qcow2' + ext-cpd: + - id: ext-b-left + int-cpd: + vdu-id: vdu-b-1 + cpd: left + layer-protocol: ethernet + - id: management + int-cpd: + vdu-id: vdu-b-1 + cpd: management + layer-protocol: ethernet + - id: ext-b-right + int-cpd: + vdu-id: vdu-b-1 + cpd: right + layer-protocol: ethernet + df: + id: normal + vdu-profile: + id: vdu-b-1 + min-number-of-instances: '1' + max-number-of-instances: '2' + instantiation-level: + - id: double + vdu-level: + vdu-id: vdu-b-1 + number-of-instances: '2' + - id: single + vdu-level: + vdu-id: vdu-b-1 + number-of-instances: '1' + default-instantiation-level: single + lcm-operations-configuration: + scale-vnf-to-level-op-config: + arbitrary-target-levels-supported: 'true' + terminate-vnf-op-config: + min-graceful-termination: '1' + operate-vnf-op-config: + min-graceful-stop-timeout: '1' + nsd: + - id: tst010-nsd + vnfd-id: + - VNF-A + - VNF-B + sapd: + - id: right-sap + vnf: + vnfd-id: VNF-A + ext-cpd-id: ext-a-right + - id: management-sap + virtual-link-desc: mgmt + - id: left-sap + vnf: + vnfd-id: VNF-B + ext-cpd-id: ext-b-left + virtual-link-desc: + - id: mgmt + connectivity-type: + layer-protocol: ipv4 + df: + id: normal + qos: + latency: '0' + packet-delay-variation: '0' + - id: A-to-B + connectivity-type: + layer-protocol: ethernet + df: + id: normal + qos: + latency: '0' + packet-delay-variation: '0' + df: + - id: normal + vnf-profile: + - id: vnf-a-profile + vnfd-id: VNF-A + flavour-id: normal + instantiation-level: single + min-number-of-instances: '1' + max-number-of-instances: '1' + virtual-link-connectivity: + - virtual-link-profile-id: mgmt + constituent-cpd-id: + constituent-base-element-id: vdu-a-1 + constituent-cpd-id: management + - virtual-link-profile-id: A-to-B + constituent-cpd-id: + constituent-base-element-id: vdu-a-1 + constituent-cpd-id: left + - id: vnf-b-profile + vnfd-id: VNF-B + flavour-id: normal + instantiation-level: single + min-number-of-instances: '1' + max-number-of-instances: '1' + virtual-link-connectivity: + - virtual-link-profile-id: mgmt + constituent-cpd-id: + constituent-base-element-id: vdu-b-1 + constituent-cpd-id: management + - virtual-link-profile-id: A-to-B + constituent-cpd-id: + constituent-base-element-id: vdu-b-1 + constituent-cpd-id: right + virtual-link-profile: + - id: mgmt + virtual-link-desc-id: mgmt + flavour-id: normal + max-bitrate-requirements: + root: '1000' + min-bitrate-requirements: + root: '0' + - id: A-to-B + virtual-link-desc-id: A-to-B + flavour-id: normal + max-bitrate-requirements: + root: '10000000' + min-bitrate-requirements: + root: '0' + ns-instantiation-level: + - id: normal + description: Single VNF-A and VNF-B + vnf-to-level-mapping: + - vnf-profile-id: vnf-a-profile + number-of-instances: '1' + - vnf-profile-id: vnf-b-profile + number-of-instances: '1' + - id: double-A + description: Single VNF-B and Double VNF-A + vnf-to-level-mapping: + - vnf-profile-id: vnf-a-profile + number-of-instances: '2' + - vnf-profile-id: vnf-b-profile + number-of-instances: '1' + default-instantiation-level: normal diff --git a/SOL005/NSDManagement-API/environment/individualSubscription.txt b/SOL005/NSDManagement-API/environment/individualSubscription.txt deleted file mode 100644 index caf1c582e27a28d0e6af0d90e9e9561a2746c177..0000000000000000000000000000000000000000 --- a/SOL005/NSDManagement-API/environment/individualSubscription.txt +++ /dev/null @@ -1,6 +0,0 @@ -*** Variables *** -${subscriptionId} f3ae6df7-07e1-47c9-8924-9ebe10343586 -${erroneousSubscriptionId} 442e3ee5-0499-4849-9b31-eb91ce1638f1 # Not existing ID on the subscriptions -${newSubscriptionId} newSubsciptionId -${response} httpresponse -${origResponse} httpresponse diff --git a/SOL005/NSDManagement-API/environment/nsDescriptors.txt b/SOL005/NSDManagement-API/environment/nsDescriptors.txt deleted file mode 100644 index b16e19ee9d6f66bc9c2da0e885b399b15737addb..0000000000000000000000000000000000000000 --- a/SOL005/NSDManagement-API/environment/nsDescriptors.txt +++ /dev/null @@ -1,34 +0,0 @@ -*** Variables *** -${POS_FIELDS} name=nsdOnboardingState -${NEG_FIELDS} wrongName=any_value -${nsdInfoId} 5a569e1d-4ffe-4e9a-8cf6-c24226651e56 -${nsdInfoIdPlain} 5a569e1d-4ffe-4e9a-8cf6-c24226651e56 -${nsdInfoIdZip} 5a569e1d-4ffe-4e9a-8cf6-c24226651e56 -${erroneous_nsdInfoId} erroneous_nsdInfoId -${disabledNsdInfoId} 5a569e1d-4ffe-4e9a-8cf6-c24226651e56 -${fields} _links -${NFVO_FIELDS} 1 -${Etag}= an etag -${modifiedNsdInfoId} f27200b1-1d8b-48c2-9d98-a993b8ab117f -${notOnboardedNsdInfoId} b992a851-08b1-45a8-9282-a5f7a7df04a6 -${ACCEPT_ZIP} application/zip -${ACCEPT_PLAIN} text/plain -${CONTENT_TYPE_ZIP} application/zip -${CONTENT_TYPE_PLAIN} text/plain -${NFVO_RANGE_OK} 1 -${range} bytes=0-1023 -${erroneousRange} bytes=100000-1000000 # Requesting a out of range number of bytes -${onboardingStateNsdInfoId} b992a851-08b1-45a8-9282-a5f7a7df04a6 -${contentZipFile} files/nsdContent.zip -${contentPlainFile} files/nsdContent.yaml -${creatingNsdInfoId} 71241932-994a-46e2-ad6c-1740674dda44 -${NEG_AUTHORIZATION} Bearer negativetoken -${BAD_AUTHORIZATION} Bear sometoken -${original_etag} 1234 -${wrong_etag} abcd -${usageState} state -${length} 1024 -${createdNsdInfoId} f27200b1-1d8b-48c2-9d98-a993b8ab117f -${NSD_NAME} nsdName=onBoardedNSD -${PNFD_NAME} pnfdName=onBoardedPNFD -${SEPERATOR} = \ No newline at end of file diff --git a/SOL005/NSDManagement-API/environment/pnfDescriptors.txt b/SOL005/NSDManagement-API/environment/pnfDescriptors.txt deleted file mode 100644 index c3bf1896b6bff7e232e8f6e2b877f6e3547b62a0..0000000000000000000000000000000000000000 --- a/SOL005/NSDManagement-API/environment/pnfDescriptors.txt +++ /dev/null @@ -1,15 +0,0 @@ -*** Variables *** -${POS_FIELDS} name=pnfdOnboardingState -${NEG_FIELDS} wrongName=any_value -${pnfdInfoId} 40853bda-8a8f-4f63-9130-cef439f65348 -${erroneous_pnfdInfoId} erroneous_pnfdInfoId -${enabledPnfdInfoId} 40853bda-8a8f-4f63-9130-cef439f65348 -${NFVO_FIELDS} 1 -${fields} _links -${ACCEPT_PLAIN} text/plain -${CONTENT_TYPE_PLAIN} text/plain -${erroneous_pnfdId} erroneousPnfdId -${onboardingStatePnfdId} 8ed2bf1f-f6ae-4d18-b478-bfab02fd4cd2 -${contentFilePnfd} files/pnfdContent.zip -${creatingPnfdId} 2e4ce0ef-3ea8-49f9-92dd-8771866015bb -${userDefinedDataSet} some \ No newline at end of file diff --git a/SOL005/NSDManagement-API/environment/subscriptions.txt b/SOL005/NSDManagement-API/environment/subscriptions.txt deleted file mode 100644 index d8c0411021732e5676a5aa65e2dc168a37e48d82..0000000000000000000000000000000000000000 --- a/SOL005/NSDManagement-API/environment/subscriptions.txt +++ /dev/null @@ -1,4 +0,0 @@ -*** Variables *** -${filter_ok} callbackUri=http://172.22.1.7:9091/nsd/subscriptions -${filter_ko} nfvId=f9f130e4-05eb-4082-a676-4c97d13a883d # Not existant filter attribute-based -${SEPERATOR} = \ No newline at end of file diff --git a/SOL005/NSDManagement-API/environment/variables.txt b/SOL005/NSDManagement-API/environment/variables.txt index 9de189269667ca498646849674ee0e05086a72e0..38f419fdb1ca2b66bacad62dfb2a0633f076f67d 100644 --- a/SOL005/NSDManagement-API/environment/variables.txt +++ b/SOL005/NSDManagement-API/environment/variables.txt @@ -2,13 +2,14 @@ ${NFVO_HOST} localhost # Hostname of the NFVO ${NFVO_PORT} 8081 # Listening port of the NFVO ${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${CONTENT_TYPE_JSON} application/json ${ACCEPT_JSON} application/json ${apiRoot} / ${AUTH_USAGE} 1 -${NEG_AUTHORIZATION} Bearer negativetoken -${apiVersion} v1 +${NEG_AUTHORIZATION_TOKEN} Bearer negativetoken +${apiMajorVersion} v1 ${apiName} nsd ${FIELD_USAGE} 1 ${NFVO_AUTHENTICATION} Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 @@ -17,14 +18,11 @@ ${NFVO_AUTH_USAGE} 1 ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar ${callback_port} 9091 -${callback_uri} http://172.22.1.7:${callback_port} +${callback_uri} http://172.21.248.145 ${callback_endpoint} /nsd/subscriptions ${callback_endpoint_error} /subs_404 ${callback_endpoint_fwd} /endpoint/check -${callback_endpoint_error} /endpoint_404 ${sleep_interval} 20s -${total_polling_time} 2 min -${polling_interval} 10 sec ${notification_request} [] ${notification_response} [] @@ -36,6 +34,73 @@ ${NFVO_CHECKS_NOTIF_ENDPOINT} 1 ## If true, during subscription, the F ${NFVO_ALLOWS_DUPLICATE_SUBS} 1 ${total_polling_time} 2 min ${polling_interval} 10 sec -${response} +${response} httpresponse ${retry} 5x -${interval} 5 sec \ No newline at end of file +${interval} 5 sec + + +${subscriptionId} f3ae6df7-07e1-47c9-8924-9ebe10343586 +${erroneousSubscriptionId} 442e3ee5-0499-4849-9b31-eb91ce1638f1 # Not existing ID on the subscriptions +${newSubscriptionId} newSubsciptionId +${origResponse} httpresponse + + +${POS_FIELDS} nsdOnboardingState=ONBOARDED +${NEG_FIELDS} wrongName=any_value +${nsdInfoId} 5a569e1d-4ffe-4e9a-8cf6-c24226651e56 +${nsdInfoIdPlain} 5a569e1d-4ffe-4e9a-8cf6-c24226651e56 +${nsdInfoIdZip} 5a569e1d-4ffe-4e9a-8cf6-c24226651e56 +${erroneous_nsdInfoId} erroneous_nsdInfoId +${disabledNsdInfoId} 5a569e1d-4ffe-4e9a-8cf6-c24226651e56 +${fields} _links +${NFVO_FIELDS} 1 +${Etag}= an etag +${modifiedNsdInfoId} f27200b1-1d8b-48c2-9d98-a993b8ab117f +${notOnboardedNsdInfoId} b992a851-08b1-45a8-9282-a5f7a7df04a6 +${ACCEPT_ZIP} application/zip +${ACCEPT_PLAIN} text/plain +${CONTENT_TYPE_ZIP} application/zip +${CONTENT_TYPE_PLAIN} text/plain +${NFVO_RANGE_OK} 1 +${range} bytes=0-1023 +${erroneousRange} bytes=100000-1000000 # Requesting a out of range number of bytes +${onboardingStateNsdInfoId} b992a851-08b1-45a8-9282-a5f7a7df04a6 +${contentZipNsd} files/nsd.zip +${contentFileNsd} files/nsd.yml +${creatingNsdInfoId} 71241932-994a-46e2-ad6c-1740674dda44 +${BAD_AUTHORIZATION_TOKEN} Bear sometoken +${original_etag} 1234 +${wrong_etag} abcd +${usageState} state +${length} 1024 +${createdNsdInfoId} f27200b1-1d8b-48c2-9d98-a993b8ab117f +${NSD_NAME} nsdName=onBoardedNSD +${PNFD_NAME} pnfdName=onBoardedPNFD +${SEPARATOR} = + + +${pnfdInfoId} 40853bda-8a8f-4f63-9130-cef439f65348 +${creatingPnfdInfoId} 71241932-994a-46e2-ad6c-1740674dda44 +${erroneous_pnfdInfoId} erroneous_pnfdInfoId +${enabledPnfdInfoId} 40853bda-8a8f-4f63-9130-cef439f65348 +${erroneous_pnfdId} erroneousPnfdId +${onboardingStatePnfdId} 8ed2bf1f-f6ae-4d18-b478-bfab02fd4cd2 +${contentZipPnfd} files/pnfd.zip +${contentFilePnfd} files/pnfd.yml +${creatingPnfdId} 2e4ce0ef-3ea8-49f9-92dd-8771866015bb +${userDefinedDataSet} some + +${notifCallbackUri} http://172.22.1.7:9091/nsd/subscriptions +${filter_ok} callbackUri=${notifCallbackUri} +${filter_ko} nfvId=f9f130e4-05eb-4082-a676-4c97d13a883d # Not existant filter attribute-based + +${callbackResp} 127.0.0.1 + +${check_descriptors} 1 +${descriptorType} SOL001 + +${NS_DescriptorID} +${Designer} +${NS_Name} +${NS_Version} +${NS_InvariantId} diff --git a/SOL005/NSDManagement-API/files/nsd.zip b/SOL005/NSDManagement-API/files/nsd.zip new file mode 100644 index 0000000000000000000000000000000000000000..3da59324d05257bf196313ef7c3fddcb70eebdd8 Binary files /dev/null and b/SOL005/NSDManagement-API/files/nsd.zip differ diff --git a/SOL005/NSDManagement-API/files/pnfd.zip b/SOL005/NSDManagement-API/files/pnfd.zip new file mode 100644 index 0000000000000000000000000000000000000000..b7c575541e64bd2f2b3d9fa979c7e6ef4d877139 Binary files /dev/null and b/SOL005/NSDManagement-API/files/pnfd.zip differ diff --git a/SOL005/NSDManagement-API/jsons/notifications/NsdChangeNotification.json b/SOL005/NSDManagement-API/jsons/notifications/NsdChangeNotification.json index 9e26dfeeb6e641a33dae4961196235bdb965b21b..302e0852130efc1897bf0b73282757b7886321ab 100644 --- a/SOL005/NSDManagement-API/jsons/notifications/NsdChangeNotification.json +++ b/SOL005/NSDManagement-API/jsons/notifications/NsdChangeNotification.json @@ -1 +1,10 @@ -{} \ No newline at end of file +{{ + "id":"", + "notificationType":"NsdChangeNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "nsdInfoId":"{nsdInfoId}", + "nsdId":"{nsdId}", + "nsdOperationalState":"ENABLED", + "_links":"" +}} \ No newline at end of file diff --git a/SOL005/NSDManagement-API/jsons/notifications/NsdDeletionNotification.json b/SOL005/NSDManagement-API/jsons/notifications/NsdDeletionNotification.json index 9e26dfeeb6e641a33dae4961196235bdb965b21b..a96e0dd3c40bd79cfb76180825307fb95c7edd84 100644 --- a/SOL005/NSDManagement-API/jsons/notifications/NsdDeletionNotification.json +++ b/SOL005/NSDManagement-API/jsons/notifications/NsdDeletionNotification.json @@ -1 +1,9 @@ -{} \ No newline at end of file +{{ + "id":"", + "notificationType":"NsdDeletionNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "nsdInfoId":"{nsdInfoId}", + "nsdId":"{nsdId}", + "_links":"" +}} \ No newline at end of file diff --git a/SOL005/NSDManagement-API/jsons/notifications/NsdOnBoardingFailureNotification.json b/SOL005/NSDManagement-API/jsons/notifications/NsdOnBoardingFailureNotification.json index 9e26dfeeb6e641a33dae4961196235bdb965b21b..23a4e52aedfef8ff75260b7497aa0750ad8611dc 100644 --- a/SOL005/NSDManagement-API/jsons/notifications/NsdOnBoardingFailureNotification.json +++ b/SOL005/NSDManagement-API/jsons/notifications/NsdOnBoardingFailureNotification.json @@ -1 +1,10 @@ -{} \ No newline at end of file +{{ + "id":"", + "notificationType":"NsdOnboardingFailureNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "nsdInfoId":"{nsdInfoId}", + "onboardingFailureDetails":"", + "nsdId": "{nsdId}", + "_links":"" +}} \ No newline at end of file diff --git a/SOL005/NSDManagement-API/jsons/notifications/NsdOnBoardingNotification.json b/SOL005/NSDManagement-API/jsons/notifications/NsdOnBoardingNotification.json index 7266cf06dadcded77e80709ab0c287922fb6184d..9c04811009a1b168cf461a66df7da38ea4f4f398 100644 --- a/SOL005/NSDManagement-API/jsons/notifications/NsdOnBoardingNotification.json +++ b/SOL005/NSDManagement-API/jsons/notifications/NsdOnBoardingNotification.json @@ -1,8 +1,9 @@ -{ -"_links": "", -"id": "", -"notificationType": "", -"nsdId": "", -"nsdInfoId": "", -"timeStamp": "" -} +{{ + "id":"", + "notificationType":"NsdOnboardingNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "nsdInfoId":"{nsdInfoId}", + "nsdId": "{nsdId}", + "_links":"" +}} \ No newline at end of file diff --git a/SOL005/NSDManagement-API/jsons/notifications/PnfdDeletionNotification.json b/SOL005/NSDManagement-API/jsons/notifications/PnfdDeletionNotification.json index 9e26dfeeb6e641a33dae4961196235bdb965b21b..c357d55276154e27d7acd8ae14d1c0e71652610d 100644 --- a/SOL005/NSDManagement-API/jsons/notifications/PnfdDeletionNotification.json +++ b/SOL005/NSDManagement-API/jsons/notifications/PnfdDeletionNotification.json @@ -1 +1,9 @@ -{} \ No newline at end of file +{{ + "id":"", + "notificationType":"PnfdDeletionNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "pnfdInfoId":"{pnfdInfoId}", + "pnfdId":"", + "_links":"" +}} \ No newline at end of file diff --git a/SOL005/NSDManagement-API/jsons/notifications/PnfdOnBoardingFailureNotification.json b/SOL005/NSDManagement-API/jsons/notifications/PnfdOnBoardingFailureNotification.json index 9e26dfeeb6e641a33dae4961196235bdb965b21b..57f5fc7757fbbbdc69516d9e898b0e2123927a84 100644 --- a/SOL005/NSDManagement-API/jsons/notifications/PnfdOnBoardingFailureNotification.json +++ b/SOL005/NSDManagement-API/jsons/notifications/PnfdOnBoardingFailureNotification.json @@ -1 +1,10 @@ -{} \ No newline at end of file +{{ + "id":"", + "notificationType":"PnfdOnboardingFailureNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "pnfdInfoId":"{pnfdInfoId}", + "pnfdId":"", + "onboardingFailureDetails":"", + "_links":"" +}} \ No newline at end of file diff --git a/SOL005/NSDManagement-API/jsons/notifications/PnfdOnBoardingNotification.json b/SOL005/NSDManagement-API/jsons/notifications/PnfdOnBoardingNotification.json index 9e26dfeeb6e641a33dae4961196235bdb965b21b..4c2fbbb8b7167f400dca5ecbb63945a479af2052 100644 --- a/SOL005/NSDManagement-API/jsons/notifications/PnfdOnBoardingNotification.json +++ b/SOL005/NSDManagement-API/jsons/notifications/PnfdOnBoardingNotification.json @@ -1 +1,9 @@ -{} \ No newline at end of file +{{ + "id":"", + "notificationType":"PnfdOnboardingNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "pnfdInfoId":"{pnfdInfoId}", + "pnfdId":"", + "_links":"" +}} \ No newline at end of file diff --git a/SOL005/NSDManagement-API/jsons/subscriptions.json b/SOL005/NSDManagement-API/jsons/subscriptions.json index c77b51999214233c08d34136b13b83f06821654a..b94f3efea9967fe38bebc25174d9ac74881bea59 100644 --- a/SOL005/NSDManagement-API/jsons/subscriptions.json +++ b/SOL005/NSDManagement-API/jsons/subscriptions.json @@ -1,3 +1,10 @@ -{ - "callbackUri": "http://172.22.1.7:9091/nsd/subscriptions" -} \ No newline at end of file +{{ + "callbackUri": "{callback_uri}{callback_endpoint}", + "filter": {{ + "nsdId": "{nsdId}", + "nsdName": "{nsdName}", + "nsdVersion": "{nsdVersion}", + "nsdDesigner": "{nsdDesigner}", + "nsdInvariantId": "{nsdInvariantId}" + }} +}} \ No newline at end of file diff --git a/SOL005/NSDManagement-API/schemas/NsdInfoModification.schema.json b/SOL005/NSDManagement-API/schemas/NsdInfoModification.schema.json index c3af950e49aff1d545514e9f71b1c67c41d3957d..01296fd74d7ee8221084f33bfd6a6c9d13981dee 100644 --- a/SOL005/NSDManagement-API/schemas/NsdInfoModification.schema.json +++ b/SOL005/NSDManagement-API/schemas/NsdInfoModification.schema.json @@ -11,12 +11,8 @@ ] }, "userDefinedData": { - "description": "Modifications of the userDefinedData attribute in NsdInfo data type. See note. If present, these modifications shall be applied according to the rules of JSON Merge PATCH (see IETF RFC 7396 [25]). NOTE- At least one of the attributes - nsdOperationalState and userDefinedData - shall be present.\n", - "type": "array", - "items": { - "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159. \n", - "type": "object" - } + "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159. \n", + "type": "object" } } } \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/Alarms.robot b/SOL005/NSFaultManagement-API/Alarms.robot index 6b2f028e011abea1a885357ff89753cd1f0e4939..439ef8a276b761fa0097e619bad72377ff538b48 100644 --- a/SOL005/NSFaultManagement-API/Alarms.robot +++ b/SOL005/NSFaultManagement-API/Alarms.robot @@ -12,10 +12,10 @@ POST Alarms - Method not implemented ... Test title:POST Alarms - Method not implemented ... Test objective: The objective is to test that Post method is not allowed to create Fault management alarms on NFV ... Pre-conditions: none - ... Reference: Clause 8.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: alarm not created + ... Post-Conditions: none POST Alarms Check HTTP Response Status Code Is 405 @@ -24,7 +24,7 @@ GET information about multiple alarms ... Test title: GET information about multiple alarms ... Test objective: The objective is to retrieve information about the alarm list and perform a JSON schema and content validation of the returned alarms data structure ... Pre-conditions: none - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -37,7 +37,7 @@ GET information about multiple alarms with filters ... Test title: GET information about multiple alarms with filters ... Test objective: The objective is to retrieve information about the alarm list and perform a JSON schema and content validation of the returned alarms data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: none - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -50,7 +50,7 @@ GET information about multiple alarms Bad Request Invalid attribute-based filter ... Test title: GET information about multiple alarms Bad Request Invalid attribute-based filtering parameters ... Test objective: The objective is to try to retrieve information about the alarm list with invalid filters and perform a JSON schema and content validation of the returned problem details data structure ... Pre-conditions: none - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -62,11 +62,11 @@ GET information about multiple alarms with "all_fields" attribute selector [Documentation] Test ID: 5.3.3.1.5 ... Test title: GET information about multiple alarms with "all_fields" attribute selector ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: Clause 8.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Alarms Task with all_fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is alarms @@ -75,11 +75,11 @@ GET information about multiple alarms with exclude_default attribute selector [Documentation] Test ID: 5.3.3.1.6 ... Test title: GET information about multiple alarms with "exclude_default" attribute selector ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: Clause 8.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Alarms Task with exclude_default attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is alarms @@ -89,11 +89,11 @@ GET information about multiple alarms with fields attribute selector [Documentation] Test ID: 5.3.3.1.7 ... Test title: GET information about multiple alarms with fields attribute selector ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: Clause 8.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none GET Alarms Task with fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is alarms @@ -102,34 +102,33 @@ GET information about multiple alarms with "exclude_fields" attribute selector [Documentation] Test ID: 5.3.3.1.8 ... Test title: GET information about multiple alarms with "exclude_fields" attribute selector ... Test objective: The objective is to retrieve information about the alarm list - ... Pre-conditions: - ... Reference: Clause 8.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: + ... Applicability: none ... Post-Conditions: none GET Alarms Task with exclude_fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is alarms PUT Alarms - Method not implemented - [Documentation] Test ID: 5.3.3.1.5 + [Documentation] Test ID: 5.3.3.1.9 ... Test title: PUT Alarms - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed for Fault management alarms on NFV ... Pre-conditions: none - ... Reference: Clause 8.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none PUT Alarms Check HTTP Response Status Code Is 405 - PATCH Alarms - Method not implemented - [Documentation] Test ID: 5.3.3.1.6 + [Documentation] Test ID: 5.3.3.1.10 ... Test title: PATCH Alarms - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed for Fault management alarms on NFV ... Pre-conditions: none - ... Reference: Clause 8.4.2.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.2.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -137,36 +136,36 @@ PATCH Alarms - Method not implemented Check HTTP Response Status Code Is 405 DELETE Alarms - Method not implemented - [Documentation] Test ID: 5.3.3.1.7 + [Documentation] Test ID: 5.3.3.1.11 ... Test title: DELETE Alarms - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed for Fault management alarms on NFV ... Pre-conditions: none - ... Reference: Clause 8.4.2.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.2.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: alarm not deleted + ... Post-Conditions: none DELETE Alarms Check HTTP Response Status Code Is 405 GET information about multiple alarms as Paged Response - [Documentation] Test ID: 5.3.3.1.8 + [Documentation] Test ID: 5.3.3.1.12 ... Test title: GET information about multiple alarms as Paged Response ... Test objective: The objective is to retrieve information about the alarm list as paged response. ... Pre-conditions: none - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET Alarms Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contains Location GET information about multiple alarms - Bad Request Response too Big - [Documentation] Test ID: 5.3.3.1.9 + [Documentation] Test ID: 5.3.3.1.13 ... Test title: GET information about multiple alarms - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of information about the alarm list fails because response is too big, and perform a JSON schema and content validation of the returned problem details data structure ... Pre-conditions: none - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -175,11 +174,11 @@ GET information about multiple alarms - Bad Request Response too Big Check HTTP Response Body Json Schema Is ProblemDetails GET information about multiple alarms with filter "id" - [Documentation] Test ID: 5.3.3.1.10 + [Documentation] Test ID: 5.3.3.1.14 ... Test title: GET information about multiple alarms with filter "id" ... Test objective: The objective is to retrieve information about the alarm list with filter "id" and perform a JSON schema and content validation of the returned alarms data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: none - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -189,11 +188,11 @@ GET information about multiple alarms with filter "id" Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "id" GET information about multiple alarms with filter "rootCauseFaultyComponent.faultyNestedNsInstanceId" - [Documentation] Test ID: 5.3.3.1.11 + [Documentation] Test ID: 5.3.3.1.15 ... Test title: GET information about multiple alarms with filter "rootCauseFaultyComponent.faultyNestedNsInstanceId" ... Test objective: The objective is to retrieve information about the alarm list with filter "rootCauseFaultyComponent.faultyNestedNsInstanceId" and perform a JSON schema and content validation of the returned alarms data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: none - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -203,11 +202,11 @@ GET information about multiple alarms with filter "rootCauseFaultyComponent.faul Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "rootCauseFaultyComponent_faultyNestedNsInstanceId" GET information about multiple alarms with filter "rootCauseFaultyComponent.faultyNsVirtualLinkInstanceId" - [Documentation] Test ID: 5.3.3.1.12 + [Documentation] Test ID: 5.3.3.1.16 ... Test title: GET information about multiple alarms with filter "rootCauseFaultyComponent.faultyNsVirtualLinkInstanceId" ... Test objective: The objective is to retrieve information about the alarm list with filter "rootCauseFaultyComponent.faultyNsVirtualLinkInstanceId" and perform a JSON schema and content validation of the returned alarms data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: none - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -217,11 +216,11 @@ GET information about multiple alarms with filter "rootCauseFaultyComponent.faul Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "faultyNsVirtualLinkInstanceId" GET information about multiple alarms with filter "rootCauseFaultyComponent.faultyVnfInstanceId" - [Documentation] Test ID: 5.3.3.1.13 + [Documentation] Test ID: 5.3.3.1.17 ... Test title: GET information about multiple alarms with filter "rootCauseFaultyComponent.faultyVnfInstanceId" ... Test objective: The objective is to retrieve information about the alarm list with filter "rootCauseFaultyComponent.faultyVnfInstanceId" and perform a JSON schema and content validation of the returned alarms data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: none - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -230,13 +229,12 @@ GET information about multiple alarms with filter "rootCauseFaultyComponent.faul Check HTTP Response Body Json Schema Is alarms Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "faultyVnfInstanceId" - GET information about multiple alarms with filter "rootCauseFaultyResource.faultyResourceType" - [Documentation] Test ID: 5.3.3.1.14 + [Documentation] Test ID: 5.3.3.1.18 ... Test title: GET information about multiple alarms with filter "rootCauseFaultyResource.faultyResourceType" ... Test objective: The objective is to retrieve information about the alarm list with filter "rootCauseFaultyResource.faultyResourceType" and perform a JSON schema and content validation of the returned alarms data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: none - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -246,11 +244,11 @@ GET information about multiple alarms with filter "rootCauseFaultyResource.fault Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "faultyResourceType" GET information about multiple alarms with filter "eventType" - [Documentation] Test ID: 5.3.3.1.15 + [Documentation] Test ID: 5.3.3.1.19 ... Test title: GET information about multiple alarms with filter "eventType" ... Test objective: The objective is to retrieve information about the alarm list with filter "eventType" and perform a JSON schema and content validation of the returned alarms data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: none - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -260,11 +258,11 @@ GET information about multiple alarms with filter "eventType" Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "eventType" GET information about multiple alarms with filter "perceivedSeverity" - [Documentation] Test ID: 5.3.3.1.16 + [Documentation] Test ID: 5.3.3.1.20 ... Test title: GET information about multiple alarms with filter "perceivedSeverity" ... Test objective: The objective is to retrieve information about the alarm list with filter "perceivedSeverity" and perform a JSON schema and content validation of the returned alarms data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: none - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -274,16 +272,15 @@ GET information about multiple alarms with filter "perceivedSeverity" Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "perceivedSeverity" GET information about multiple alarms with filter "probableCause" - [Documentation] Test ID: 5.3.3.1.17 + [Documentation] Test ID: 5.3.3.1.21 ... Test title: GET information about multiple alarms with filter "probableCause" ... Test objective: The objective is to retrieve information about the alarm list with filter "probableCause" and perform a JSON schema and content validation of the returned alarms data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: none - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET Alarms with filter "probableCause" Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is alarms - Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "probableCause" - \ No newline at end of file + Check PostCondition HTTP Response Body alarms Matches the requested attribute-based filter "probableCause" \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/ApiVersion.robot b/SOL005/NSFaultManagement-API/ApiVersion.robot index ed17827d7699818f633835e03cb8df198b699445..663f8b96d950f0761d0074cb0fc7f0a6c9add238 100644 --- a/SOL005/NSFaultManagement-API/ApiVersion.robot +++ b/SOL005/NSFaultManagement-API/ApiVersion.robot @@ -1,213 +1,213 @@ -*** Settings *** - -Resource environment/variables.txt - -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Library DependencyLibrary -Library JSONLibrary -Library JSONSchemaLibrary schemas/ - -*** Test Cases *** -POST API Version - Method not implemented - [Documentation] Test ID: 5.3.3.6.1 - ... Test title: POST API version - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version - [Documentation] Test ID: 5.3.3.6.2 - ... Test title: GET API Version - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version - Method not implemented - [Documentation] Test ID: 5.3.3.6.3 - ... Test title: PUT API Version - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version - Method not implemented - [Documentation] Test ID: 5.3.3.6.4 - ... Test title: PATCH API Version - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version - Method not implemented - [Documentation] Test ID: 5.3.3.6.5 - ... Test title: DELETE API Version - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -POST API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 5.3.3.6.6 - ... Test title: POST API version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version with apiMajorVerion - [Documentation] Test ID: 5.3.3.6.7 - ... Test title: GET API Version with apiMajorVerion - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 5.3.3.6.8 - ... Test title: PUT API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 5.3.3.6.9 - ... Test title: PATCH API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 5.3.3.6.10 - ... Test title: DELETE API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -*** Keywords *** -POST API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response['body']} +*** Settings *** + +Resource environment/variables.txt + +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 5.3.3.6.1 + ... Test title: POST API version - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 5.3.3.6.2 + ... Test title: GET API Version + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version - Method not implemented + [Documentation] Test ID: 5.3.3.6.3 + ... Test title: PUT API Version - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 5.3.3.6.4 + ... Test title: PATCH API Version - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 5.3.3.6.5 + ... Test title: DELETE API Version - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +POST API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 5.3.3.6.6 + ... Test title: POST API version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 5.3.3.6.7 + ... Test title: GET API Version with apiMajorVerion + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 5.3.3.6.8 + ... Test title: PUT API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 5.3.3.6.9 + ... Test title: PATCH API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 5.3.3.6.10 + ... Test title: DELETE API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/IndividualAlarm.robot b/SOL005/NSFaultManagement-API/IndividualAlarm.robot index 50583cd9ebe857f875253f0b647139f1eb8350a0..d0b5dafe4c7e9e9f8c319022e995e960ae8a5ae3 100644 --- a/SOL005/NSFaultManagement-API/IndividualAlarm.robot +++ b/SOL005/NSFaultManagement-API/IndividualAlarm.robot @@ -14,10 +14,10 @@ POST Individual Alarm - Method not implemented ... Test title:POST Individual Alarm - Method not implemented ... Test objective: The objective is to test that POST method is not allowed for Fault management individual alarm on NFV ... Pre-conditions: none - ... Reference: Clause 8.4.3.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.3.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: alarm is not created + ... Post-Conditions: none POST Individual Alarm Check HTTP Response Status Code Is 405 @@ -26,7 +26,7 @@ GET information about Individual Alarm ... Test title: GET information about Individual Alarm ... Test objective: The objective is to retrieve information about individual alarm and perform a JSON schema and content validation of the returned alarm data structure ... Pre-conditions: The related alarm exists - ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -39,20 +39,20 @@ GET information about Invalid Individual Alarm ... Test title: GET information about Invalid Individual Alarm ... Test objective: The objective is to try to read an Invalid individual alarm and get 404 not found response code ... Pre-conditions: The related alarm does not exists - ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET Invalid Individual Alarm Check HTTP Response Status Code Is 404 - + Check HTTP Response Body Json Schema Is ProblemDetails PUT Individual Alarm - Method not implemented [Documentation] Test ID: 5.3.3.2.4 ... Test title:PUT Individual Alarm - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed for Fault management individual alarm on NFV ... Pre-conditions: none - ... Reference: Clause 8.4.3.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.3.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -64,7 +64,7 @@ PATCH Alarm ... Test title: Modify an individual alarm resource ... Test objective: The objective is to Modify an individual alarm resource and perform a JSON schema and content validation of the returned alarm modifications data structure ... Pre-conditions: The related alarm exists - ... Reference: Clause 8.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -77,7 +77,7 @@ PATCH Alarm - Conflict ... Test title: Modify an individual alarm resource - Conflict ... Test objective: The objective is to test that an individual alarm resource cannot be modified if the alarm is already in the state that is requested to be set ... Pre-conditions: The related alarm exists - ... Reference: Clause 8.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -85,13 +85,12 @@ PATCH Alarm - Conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - PATCH Alarm - Precondition failed [Documentation] Test ID: 5.3.3.2.7 ... Test title: Modify an individual alarm resource - Precondition failed ... Test objective: The objective is to test that an individual alarm resource cannot be modifed if the resource was modified by another entity ... Pre-conditions: The related alarm exists - ... Reference: Clause 8.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: @@ -104,9 +103,9 @@ DELETE Individual Alarm - Method not implemented ... Test title:DELETE Individual Alarm - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed for Fault management individual alarm on NFV ... Pre-conditions: none - ... Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: alarm not deleted + ... Post-Conditions: none DELETE Individual Alarm - Check HTTP Response Status Code Is 405 + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/IndividualSubscription.robot b/SOL005/NSFaultManagement-API/IndividualSubscription.robot index bada3922c4de2d9519b24cd57fa30ee1a3d64fcf..b89a6501219fc297e4dcf4322c27b2d2fe667344 100644 --- a/SOL005/NSFaultManagement-API/IndividualSubscription.robot +++ b/SOL005/NSFaultManagement-API/IndividualSubscription.robot @@ -11,10 +11,10 @@ Post Individual Subscription - Method not implemented ... Test title:Post Individual Subscription - Method not implemented ... Test objective: The objective is to test that POST method is not allowed for Fault management subscription on NFV ... Pre-conditions:none - ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: subscription is not created + ... Post-Conditions: none POST Individual Subscription Check HTTP Response Status Code Is 405 @@ -23,7 +23,7 @@ Get Information about an individual subscription ... Test title: Get Information about an individual subscription ... Test objective: The objective is to read an individual subscription for NFVO alarms subscribed by the client and perform a JSON schema and content validation of the returned fault management individual subscription data structure ... Pre-conditions: The subscription with the given id exists - ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -36,7 +36,7 @@ PUT an individual subscription - Method not implemented ... Test title:PUT an individual subscription - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed for Fault management subscription on NFV ... Pre-conditions: none - ... Reference: Clause 8.4.5.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.5.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -48,7 +48,7 @@ PATCH an individual subscription - Method not implemented ... Test title:PATCH an individual subscription - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed for Fault management subscription on NFV ... Pre-conditions: none - ... Reference: Clause 8.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -60,10 +60,9 @@ DELETE an individual subscription ... Test title:DELETE an individual subscription ... Test objective: The objective is to DELETE an individual subscription ... Pre-conditions: The Subsbcription already exists - ... Reference: Clause 8.4.5.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.5.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: subscription is not deleted DELETE Individual Subscription - Check HTTP Response Status Code Is 204 - \ No newline at end of file + Check HTTP Response Status Code Is 204 \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot b/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot index a1c10db6a5c0504d3e697641b594b19db5dccdf0..406c95fc11580ef9468885581f6c19fe037b3269 100644 --- a/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot +++ b/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot @@ -7,7 +7,8 @@ Library OperatingSystem #Suite Teardown Terminate All Processes kill=true Library MockServerLibrary Library Process -Library Collections +Library Collections +Library String *** Keywords *** Create Sessions @@ -17,8 +18,8 @@ Create Sessions Check Individual Subscription existence Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 Check HTTP Response Status Code Is @@ -34,7 +35,7 @@ Check HTTP Response Header Contains Check HTTP Response Body Json Schema Is [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json + ${schema} = Catenate SEPARATOR= ${input} .schema.json Validate Json ${schema} ${response['body']} Log Json Schema Validation OK @@ -59,110 +60,110 @@ Check Operation Occurrence Id POST Alarms log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/alarms + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Alarms log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/alarms + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse} = Output response Set Global Variable ${response} ${outputResponse} PUT Alarms log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/alarms + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Alarms log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/alarms + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Alarms Log Query NFVO The GET method queries information about multiple alarms. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query - Get ${apiRoot}/${apiName}/${apiVersion}/alarms + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Alarms With Filters Log Query NFVO The GET method queries information about multiple alarms with filters. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?${alarm_filter}=${nsInstanceId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${alarm_filter}=${nsInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Alarms With Invalid Filters Log Query NFVO The GET method queries information about multiple alarms with filters. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?${invalid_alarm_filter}=${nsInstanceId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?${invalid_alarm_filter}=${nsInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Alarms Task with all_fields attribute selector Log Query VNF The GET method queries information about multiple alarms, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/alarms?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET Alarms Task with exclude_default attribute selector Log Query VNF The GET method queries information about multiple alarms, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/alarms?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET Alarms Task with fields attribute selector Log Query VNF The GET method queries information about multiple alarms, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/alarms?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} GET Alarms Task with exclude_fields attribute selector Log Query VNF The GET method queries information about multiple alarms, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/alarms?exclude_fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} POST Individual Alarm log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Individual Alarm log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Individual Alarm log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -170,9 +171,9 @@ GET Individual Alarm Log Query NFVO The GET method queries information about an alarm. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query - Get ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -180,9 +181,9 @@ GET Invalid Individual Alarm Log Query NFVO The GET method queries information about an invalid alarm. Should return does not exist Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query - Get ${apiRoot}/${apiName}/${apiVersion}/alarms/${invalidAlarmId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${invalidAlarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -190,9 +191,9 @@ PATCH Individual Alarm log Trying to perform a PATCH. This method modifies an individual alarm resource Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/alarmModifications.json - Patch ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} ${body} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -201,157 +202,168 @@ PATCH Individual Alarm Conflict Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} Set Headers {"If-Match": "${Etag}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/alarmModifications.json - Patch ${apiRoot}/${apiName}/${apiVersion}/alarms/${alarmId} ${body} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST Subscription - Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/fmSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/fmSubscriptionRequest.json + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint -Post Create subscription - DUPLICATION - Log Trying to create a subscription with an already created content - Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0 NVFO is not permitting duplication. Skipping the test - Set Headers {"Accept": "${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/fmSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} +# Post Create subscription - DUPLICATION + # Log Trying to create a subscription with an already created content + # Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0 NVFO is not permitting duplication. Skipping the test + # Set Headers {"Accept": "${ACCEPT}"} + # Set Headers {"Content-Type": "${CONTENT_TYPE}"} + # Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + # ${template}= Get File jsons/fmSubscriptionRequest.json + # ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + # Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + # ${outputResponse}= Output response + # Set Global Variable ${response} ${outputResponse} -Post Create subscription - NO-DUPLICATION - Log Trying to create a subscription with an already created content - Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 NVFO permits duplication. Skipping the test - Set Headers {"Accept": "${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/fmSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} +# Post Create subscription - NO-DUPLICATION + # Log Trying to create a subscription with an already created content + # Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 1 NVFO permits duplication. Skipping the test + # Set Headers {"Accept": "${ACCEPT}"} + # Set Headers {"Content-Type": "${CONTENT_TYPE}"} + # Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + # ${template}= Get File jsons/fmSubscriptionRequest.json + # ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + # Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + # ${outputResponse}= Output response + # Set Global Variable ${response} ${outputResponse} GET Subscriptions Log Get the list of active subscriptions Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Subscriptions with filter Log Get the list of active subscriptions using a filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Subscriptions with Invalid filter Log Get the list of active subscriptions using an invalid filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter_invalid} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter_invalid} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get subscriptions with all_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_default attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?exclude_fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} PUT Subscriptions log Trying to perform a PUT Subscriptions. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Subscriptions log Trying to perform a PATCH Subscriptions. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Subscriptions log Trying to perform a DELETE Subscriptions. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST Individual Subscription log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Individual Subscription log Trying to get information about an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Individual Subscription log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Individual Subscription log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Individual Subscription log Trying to perform a DELETE. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -424,16 +436,16 @@ Do DELETE Notification Log Verifying results Verify Mock Expectation ${req} -Check LINK in Header +Check HTTP Response Header Contains Location ${linkURL}= Get Value From Json ${response['headers']} $..Link Should Not Be Empty ${linkURL} GET Alarm With Filter "id" Log Query NFVO The GET method queries information about multiple alarms with filter "id". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?id=${alarmId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?id=${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -443,9 +455,9 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms With Filter "rootCauseFaultyComponent_faultyNestedNsInstanceId" Log Query NFVO The GET method queries information about multiple alarms with filter "rootCauseFaultyComponent.faultyNestedNsInstanceId". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?rootCauseFaultyComponent.faultyNestedNsInstanceId=${faultyNestedNsInstanceId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?rootCauseFaultyComponent.faultyNestedNsInstanceId=${faultyNestedNsInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -457,9 +469,9 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms With Filter "rootCauseFaultyComponent_faultyNsVirtualLinkInstanceId" Log Query NFVO The GET method queries information about multiple alarms with filter "rootCauseFaultyComponent.faultyNsVirtualLinkInstanceId". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?rootCauseFaultyComponent.faultyNsVirtualLinkInstanceId=${faultyNsVirtualLinkInstanceId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?rootCauseFaultyComponent.faultyNsVirtualLinkInstanceId=${faultyNsVirtualLinkInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -471,9 +483,9 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms With Filter "rootCauseFaultyComponent_faultyVnfInstanceId" Log Query NFVO The GET method queries information about multiple alarms with filter "rootCauseFaultyComponent.faultyVnfInstanceId". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?rootCauseFaultyComponent.faultyVnfInstanceId=${faultyVnfInstanceId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?rootCauseFaultyComponent.faultyVnfInstanceId=${faultyVnfInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -485,9 +497,9 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms With Filter "rootCauseFaultyResource_faultyResourceType" Log Query NFVO The GET method queries information about multiple alarms with filter "rootCauseFaultyResource.faultyResourceType". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?rootCauseFaultyResource.faultyResourceType=${faultyResourceType} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?rootCauseFaultyResource.faultyResourceType=${faultyResourceType} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -499,9 +511,9 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms with filter "eventType" Log Query VNF The GET method queries information about multiple alarms with filters "eventType". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?eventType=${eventType} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?eventType=${eventType} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -513,9 +525,9 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms with filter "perceivedSeverity" Log Query VNF The GET method queries information about multiple alarms with filters "perceivedSeverity". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?perceivedSeverity=${perceivedSeverity} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?perceivedSeverity=${perceivedSeverity} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -527,9 +539,9 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba GET Alarms with filter "probableCause" Log Query VNF The GET method queries information about multiple alarms with filters "probableCause". Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/alarms?probableCause=${probableCause} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?probableCause=${probableCause} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -541,8 +553,8 @@ Check PostCondition HTTP Response Body alarms Matches the requested attribute-ba Get subscriptions with filter "id" Log Get the list of active subscriptions using a filter "id" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?id=${subscription_id} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?id=${subscription_id} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -552,8 +564,8 @@ Check PostCondition HTTP Response Body Subscription Matches the requested attrib Get subscriptions with filter "filter_notificationTypes" Log Get the list of active subscriptions using a filter "filter.notificationTypes" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?filter.notificationTypes=${notification_type} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.notificationTypes=${notification_type} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -565,8 +577,8 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_faultyResourceTypes" Log Get the list of active subscriptions using a filter "filter.faultyResourceTypes" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?filter.faultyResourceTypes=${faultyResourceType} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.faultyResourceTypes=${faultyResourceType} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -578,8 +590,8 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_perceivedSeverities" Log Get the list of active subscriptions using a filter "filter.perceivedSeverities" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?filter.perceivedSeverities=${perceivedSeverity} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.perceivedSeverities=${perceivedSeverity} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -591,8 +603,8 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_eventTypes" Log Get the list of active subscriptions using a filter "filter.eventTypes" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?filter.eventTypes=${eventType} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.eventTypes=${eventType} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -604,8 +616,8 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri Get subscriptions with filter "filter_probableCauses" Log Get the list of active subscriptions using a filter "filter.probableCauses" Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?filter.probableCauses=${probableCause} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.probableCauses=${probableCause} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -613,3 +625,8 @@ Check PostCondition HTTP Response Body Subscriptions Matches the requested attri :FOR ${item} IN @{response['body']} Should Contain Match ${item['filter']['probableCauses']} ${probableCause} case_insensitive=True END + +Check Response for duplicated subscription + Run Keyword If ${NFVO_ALLOWS_DUPLICATE_SUBS} == 1 Check HTTP Response Status Code Is 201 + Run Keyword If ${NFVO_ALLOWS_DUPLICATE_SUBS} == 1 Check HTTP Response Body Json Schema Is FmSubscription + Run Keyword If ${NFVO_ALLOWS_DUPLICATE_SUBS} == 0 Check HTTP Response Status Code Is 303 diff --git a/SOL005/NSFaultManagement-API/NotificationEndpoint.robot b/SOL005/NSFaultManagement-API/NotificationEndpoint.robot index 650bb2a7a631d04b9e0e05515800f3b1de972161..5964b816e632d1942a5e71e41d284db73bd19c2a 100644 --- a/SOL005/NSFaultManagement-API/NotificationEndpoint.robot +++ b/SOL005/NSFaultManagement-API/NotificationEndpoint.robot @@ -1,146 +1,93 @@ *** Settings *** -Resource environment/variables.txt -Resource NSFMOperationKeywords.robot - -Library MockServerLibrary -Library Process +Library String Library OperatingSystem -Library Collections - -Suite Setup Create Sessions -Suite Teardown Terminate All Processes kill=true +Resource environment/variables.txt +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri *** Test Cases *** NS Fault Alarm Notification - [Documentation] Test ID: 5.3.3.5.1 + [Documentation] Test ID: 5.3.3.7.1 ... Test title: NS Fault Alarm Notification - ... Test objective: The objective is to test the dispatch of NS Fault Alarm Notification when a virtualised resource within an NS instance fails, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Test objective: The objective is to test that NS Fault Alarm Notification is delivered with success to the notification consumer ... Pre-conditions: A NS instance is instantiated, and a subscription for fault alarm notifications is available in the NFVO. - ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO + ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none - Trigger the fault of a virtualised resource in the NS instance (external action) - Check Alarm Notification Http POST Request Body Json Schema Is alarmNotification - Check Alarm Notification Http POST Request Body notificationType attribute Is alarmNotification - + Post Alarm Notification + Check HTTP Response Status Code Is 204 + NS Fault Alarm Cleared Notification - [Documentation] Test ID: 5.3.3.5.2 + [Documentation] Test ID: 5.3.3.7.2 ... Test title: NS Fault Alarm Cleared Notification - ... Test objective: The objective is to test the dispatch of NS Fault Alarm Cleared Notification when a faulty virtualised resource within an NS instance is cleared, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. - ... Pre-conditions: A NS instance is instantiated, a virtualised resource is in faulty state, and a subscription for fault alarm cleared notifications is available in the NFVO. - ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO + ... Test objective: The objective is to test that NS Fault Alarm Cleared Notification is delivered with success to the notification consumer + ... Pre-conditions: A NS instance is instantiated, and a subscription for fault alarm cleared notifications is available in the NFVO. + ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none - Trigger the fault cleared of a virtualised resource in the NS instance (external action) - Check Alarm cleared Notification Http POST Request Body Json Schema Is alarmClearedNotification - Check Alarm cleared Notification Http POST Request Body notificationType attribute Is alarmClearedNotification - -NS Fault Alarm List Rebuilt Notification - [Documentation] Test ID: 5.3.3.5.3 - ... Test title: NS Fault Alarm List Rebuilt Notification - ... Test objective: The objective is to test the dispatch of NS Fault Alarm List Rebuilt Notification when the NFVO decides to rebuild the list of its NS alarms, e.g. due to a corruption in the alarm storage, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. - ... Pre-conditions: A NS instance is instantiated, one or more virtualised resource are in faulty state, and a subscription for fault alarm list rebuilt notifications is available in the NFVO. - ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO + Post Alarm Cleared Notification + Check HTTP Response Status Code Is 204 + +NS Fault Alarm List Rebuilt Notification + [Documentation] Test ID: 5.3.3.7.3 + ... Test title: NS Fault Alarm List Rebuilt Notification + ... Test objective: The objective is to test that NS Fault Alarm List Rebuilt Notification is delivered with success to the notification consumer + ... Pre-conditions: A NS instance is instantiated, and a subscription for fault alarm list rebuilt notifications is available in the NFVO. + ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none - Trigger the NS fault alarm list rebuild in the NFVO (external action) - Check Alarm list rebuilt Notification Http POST Request Body Json Schema Is alarmListRebuiltNotification - Check Alarm list rebuilt Notification Http POST Request Body notificationType attribute Is alarmListRebuiltNotification - - -*** Keywords *** -Trigger the fault of a virtualised resource in the NS instance (external action) - #do nothing - Log do nothing - -Trigger the fault cleared of a virtualised resource in the NS instance (external action) - #do nothing - Log do nothing - -Trigger the NS fault alarm list rebuild in the NFVO (external action) - #do nothing - Log do nothing - -Check Alarm List Rebuilt Notification Http POST Request Body Json Schema Is - [Arguments] ${element} - ${schema}= Get File schemas/${element}.schema.json - Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} - -Check Alarm List Rebuilt Notification Http POST Request Body notificationType attribute Is - [Arguments] ${type} - Configure Notification Alarm List Rebuilt Handler ${callback_endpoint_fwd} ${type} - Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} - Clear Requests ${callback_endpoint} - Clear Requests ${callback_endpoint_fwd} - -Check Alarm Notification Http POST Request Body Json Schema Is - [Arguments] ${element} - ${schema}= Get File schemas/${element}.schema.json - Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} - -Check Alarm Notification Http POST Request Body notificationType attribute Is - [Arguments] ${type} - Configure Notification Alarm Handler ${callback_endpoint_fwd} ${type} - Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} - Clear Requests ${callback_endpoint} - Clear Requests ${callback_endpoint_fwd} - -Check Alarm cleared Notification Http POST Request Body Json Schema Is - [Arguments] ${element} - ${schema}= Get File schemas/${element}.schema.json - Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} - - -Check Alarm cleared Notification Http POST Request Body notificationType attribute Is - [Arguments] ${type} - Configure Notification Alarm Cleareance Handler ${callback_endpoint_fwd} ${type} - Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} - Clear Requests ${callback_endpoint} - Clear Requests ${callback_endpoint_fwd} + Post Alarm List Rebuilt Notification + Check HTTP Response Status Code Is 204 +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body FmSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated -Check Alarm Clerance Notification Http POST Request Body changeType attribute Is - [Arguments] ${type} - #do nothing - Log do nothing - - -Configure Notification Alarm List Rebuilt Handler - [Arguments] ${endpoint} ${type} - ${json}= evaluate {} - set to dictionary ${json} notificationType ${type} - ${BODY}= evaluate json.dumps(${json}) json - Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${notification_request} ${notification_response} - -Configure Notification Alarm Handler - [Arguments] ${endpoint} ${type} - ${json}= evaluate {} - set to dictionary ${json} notificationType ${type} - ${BODY}= evaluate json.dumps(${json}) json - Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${notification_request} ${notification_response} - -Configure Notification Alarm Cleareance Handler - [Arguments] ${endpoint} ${type} - ${json}= evaluate {} - set to dictionary ${json} notificationType ${type} - ${BODY}= evaluate json.dumps(${json}) json - Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${notification_request} ${notification_response} - -Configure Notification Forward - [Arguments] ${schema} ${endpoint} ${endpoint_fwd} - Log Creating mock Http POST forward to handle ${schema} - &{notification_tmp}= Create Mock Request Matcher POST ${endpoint} body_type="JSON_SCHEMA" body=${schema} - &{notification_fwd}= Create Mock Http Forward ${endpoint_fwd} - Create Mock Expectation With Http Forward ${notification_tmp} ${notification_fwd} +Post Alarm Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/AlarmNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Alarm Cleared Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/AlarmClearedNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} alarmId=${alarmId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Alarm List Rebuilt Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/AlarmListRebuiltNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/Notifications.robot b/SOL005/NSFaultManagement-API/Notifications.robot new file mode 100644 index 0000000000000000000000000000000000000000..90910ca8db0316fe176c0b58662beee516b520c5 --- /dev/null +++ b/SOL005/NSFaultManagement-API/Notifications.robot @@ -0,0 +1,152 @@ +*** Settings *** +Resource environment/variables.txt +Resource NSFMOperationKeywords.robot + +Library MockServerLibrary +Library Process +Library OperatingSystem +Library Collections + +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true + +*** Test Cases *** +NS Fault Alarm Notification + [Documentation] Test ID: 5.3.3.5.1 + ... Test title: NS Fault Alarm Notification + ... Test objective: The objective is to test the dispatch of NS Fault Alarm Notification when a virtualised resource within an NS instance fails, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A NS instance is instantiated, and a subscription for fault alarm notifications is available in the NFVO. + ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Trigger the fault of a virtualised resource in the NS instance (external action) + Check Alarm Notification Http POST Request Body Json Schema Is alarmNotification + Check Alarm Notification Http POST Request Body notificationType attribute Is alarmNotification + +NS Fault Alarm Cleared Notification + [Documentation] Test ID: 5.3.3.5.2 + ... Test title: NS Fault Alarm Cleared Notification + ... Test objective: The objective is to test the dispatch of NS Fault Alarm Cleared Notification when a faulty virtualised resource within an NS instance is cleared, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A NS instance is instantiated, a virtualised resource is in faulty state, and a subscription for fault alarm cleared notifications is available in the NFVO. + ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Trigger the fault cleared of a virtualised resource in the NS instance (external action) + Check Alarm cleared Notification Http POST Request Body Json Schema Is alarmClearedNotification + Check Alarm cleared Notification Http POST Request Body notificationType attribute Is alarmClearedNotification + +NS Fault Alarm List Rebuilt Notification + [Documentation] Test ID: 5.3.3.5.3 + ... Test title: NS Fault Alarm List Rebuilt Notification + ... Test objective: The objective is to test the dispatch of NS Fault Alarm List Rebuilt Notification when the NFVO decides to rebuild the list of its NS alarms, e.g. due to a corruption in the alarm storage, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A NS instance is instantiated, one or more virtualised resource are in faulty state, and a subscription for fault alarm list rebuilt notifications is available in the NFVO. + ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Trigger the NS fault alarm list rebuild in the NFVO (external action) + Check Alarm list rebuilt Notification Http POST Request Body Json Schema Is alarmListRebuiltNotification + Check Alarm list rebuilt Notification Http POST Request Body notificationType attribute Is alarmListRebuiltNotification + + +*** Keywords *** +Trigger the fault of a virtualised resource in the NS instance (external action) + #do nothing + Log do nothing + +Trigger the fault cleared of a virtualised resource in the NS instance (external action) + #do nothing + Log do nothing + +Trigger the NS fault alarm list rebuild in the NFVO (external action) + #do nothing + Log do nothing + +Check Alarm List Rebuilt Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + +Check Alarm List Rebuilt Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification Alarm List Rebuilt Handler ${callback_endpoint_fwd} ${type} + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Check Alarm Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + +Check Alarm Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification Alarm Handler ${callback_endpoint_fwd} ${type} + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Check Alarm cleared Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + + +Check Alarm cleared Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification Alarm Cleareance Handler ${callback_endpoint_fwd} ${type} + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + + +Check Alarm Clerance Notification Http POST Request Body changeType attribute Is + [Arguments] ${type} + #do nothing + Log do nothing + + +Configure Notification Alarm List Rebuilt Handler + [Arguments] ${endpoint} ${type} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Configure Notification Alarm Handler + [Arguments] ${endpoint} ${type} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Configure Notification Alarm Cleareance Handler + [Arguments] ${endpoint} ${type} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Configure Notification Forward + [Arguments] ${schema} ${endpoint} ${endpoint_fwd} + Log Creating mock Http POST forward to handle ${schema} + &{notification_tmp}= Create Mock Request Matcher POST ${endpoint} body_type="JSON_SCHEMA" body=${schema} + &{notification_fwd}= Create Mock Http Forward ${endpoint_fwd} + Create Mock Expectation With Http Forward ${notification_tmp} ${notification_fwd} diff --git a/SOL005/NSFaultManagement-API/Subscriptions.robot b/SOL005/NSFaultManagement-API/Subscriptions.robot index 0fb8ac8ce425cbfce51b1b0e277ed8204950b691..d5d1a1f795527dd4e25c31087dd1aa713a14c6ab 100644 --- a/SOL005/NSFaultManagement-API/Subscriptions.robot +++ b/SOL005/NSFaultManagement-API/Subscriptions.robot @@ -6,6 +6,9 @@ Library OperatingSystem Library DependencyLibrary Library JSONLibrary Library JSONSchemaLibrary schemas/ +Library Process +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true *** Test Cases *** Create a new alarm subscription @@ -13,7 +16,7 @@ Create a new alarm subscription ... Test title: Create a new alarm subscription ... Test objective: The objective is to create a new Fault management alarm subscriptions and perform a JSON schema and content validation of the returned fault management alarms subscription data structure ... Pre-conditions: no subscription with the same filter and callbackUri exists - ... Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -21,41 +24,39 @@ Create a new alarm subscription Check HTTP Response Status Code Is 201 Check Operation Occurrence Id Check HTTP Response Body Json Schema Is FmSubscription - -Create a new alarm subscription - DUPLICATION +Create a duplicated Subscription [Documentation] Test ID: 5.3.3.3.2 - ... Test title: Create a new alarm subscription - DUPLICATION + ... Test title: Create a duplicated alarm subscription ... Test objective: The objective is to create a new subscription with the NFV allowing duplication and perform a JSON schema and content validation of the returned fault management alarms subscription data structure.. ... Pre-conditions: subscription with the same filter and callbackUri exists - ... Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: the NFVO allows creating a subscription resource if another subscription resource with the same filter and callbackUri already exists + ... Applicability: ... Post-Conditions: none - Post Create subscription - DUPLICATION - Check HTTP Response Status Code Is 201 + POST Subscription + Check Response for duplicated subscription Check Operation Occurrence Id - Check HTTP Response Body Json Schema Is FmSubscription + + +Void + [Documentation] Test ID: 5.3.3.3.3 + ... Test title: Void + ... Test objective: Void + ... Pre-conditions: Void + ... Reference: Void + ... Config ID: Void + ... Applicability: Void + ... Post-Conditions: Void + Void -Create a new alarm subscription - NO DUPLICATION - [Documentation] Test ID: 5.3.3.3.3 - ... Test title: Create a new alarm subscription - NO DUPLICATION - ... Test objective: The objective is to create a new subscription with the NFV not allowing duplication and perform a JSON schema and content validation of the returned fault management alarms subscription data structure. - ... Pre-conditions: subscription with the same filter and callbackUri exists - ... Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: the NFVO decides to not create a duplicate subscription resource - ... Post-Conditions: none - Post Create subscription - NO-DUPLICATION - Check HTTP Response Status Code Is 303 - Check Operation Occurrence Id Retrieve a list of alarm subscriptions [Documentation] Test ID: 5.3.3.3.4 ... Test title: Retrieve a list of alarm subscriptions ... Test objective: The objective is to retrieve the list of active subscriptions and perform a JSON schema and content validation of the returned fault management alarms subscription data structure. ... Pre-conditions: none - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -68,7 +69,7 @@ Retrieve a list of alarm subscriptions - Filter ... Test title: Retrieve a list of alarm subscriptions - Filter ... Test objective: The objective is to retrieve the list of active subscriptions with filter and perform a JSON schema and content validation of the returned fault management alarms subscription data structure. ... Pre-conditions: none - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -81,7 +82,7 @@ GET subscriptions - Bad Request Invalid attribute-based filtering parameters ... Test title: GET subscriptions - Bad Request Invalid attribute-based filtering parameters ... Test objective:The objective is to retrieve the list of active subscriptions with Invalid attribute-based filtering parameters and perform a JSON schema and content validation of the returned problem details data structure. ... Pre-conditions: none - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -94,7 +95,7 @@ GET subscriptions with "all_fields" attribute selector ... Test title: GET subscriptions with "all_fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector ... Pre-conditions: - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: ... Post-Conditions: @@ -106,11 +107,11 @@ GET subscriptions with "exclude_default" attribute selector [Documentation] Test ID: 5.3.3.3.8 ... Test title: GET subscriptions with "exclude_default" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector - ... Pre-conditions: - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get subscriptions with exclude_default attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is FmSubscriptions @@ -119,11 +120,11 @@ GET subscriptions with "fields" attribute selector [Documentation] Test ID: 5.3.3.3.9 ... Test title: GET subscriptions with "fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector - ... Pre-conditions: - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get subscriptions with fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is FmSubscriptions @@ -132,11 +133,11 @@ GET subscriptions with "exclude_fields" attribute selector [Documentation] Test ID: 5.3.3.3.10 ... Test title: GET subscriptions with "exclude_fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector - ... Pre-conditions: - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get subscriptions with exclude_fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is FmSubscriptions @@ -146,7 +147,7 @@ PUT subscriptions - Method not implemented ... Test title:PUT subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to for Fault management subscriptions on NFV ... Pre-conditions: none - ... Reference: Clause 8.4.4.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.4.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -158,7 +159,7 @@ PATCH subscriptions - Method not implemented ... Test title:PATCH subscriptions - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to for Fault management subscriptions on NFV ... Pre-conditions: none - ... Reference: Clause 8.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -170,10 +171,10 @@ DELETE subscriptions - Method not implemented ... Test title: DELETE subscriptions - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to for Fault management subscriptions on NFV ... Pre-conditions: none - ... Reference: Clause 8.4.4.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.4.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: subscription is not deleted + ... Post-Conditions: none DELETE Subscriptions Check HTTP Response Status Code Is 405 @@ -182,20 +183,20 @@ Retrieve a list of alarm subscriptions as Paged Response ... Test title: Retrieve a list of alarm subscriptions as Paged Response ... Test objective: The objective is to retrieve the list of active subscriptions as paged response. ... Pre-conditions: none - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET Subscriptions Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contains Location GET subscriptions - Bad Request Response too Big [Documentation] Test ID: 5.3.3.3.15 ... Test title: GET subscriptions - Bad Request Response too Big ... Test objective:The objective is test that the retrieval of active subscriptions list fails because response is too big, and perform a JSON schema and content validation of the returned problem details data structure. ... Pre-conditions: none - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -208,7 +209,7 @@ Retrieve a list of alarm subscriptions with filter "id" ... Test title: Retrieve a list of alarm subscriptions with filter "id" ... Test objective: The objective is to retrieve the list of active subscriptions with filter "id" and perform a JSON schema and content validation of the returned fault management alarms subscription data structure. ... Pre-conditions: none - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -222,7 +223,7 @@ Retrieve a list of alarm subscriptions with filter "filter.notificationTypes" ... Test title: Retrieve a list of alarm subscriptions with filter "filter.notificationTypes" ... Test objective: The objective is to retrieve the list of active subscriptions with filter "filter.notificationTypes" and perform a JSON schema and content validation of the returned fault management alarms subscription data structure. ... Pre-conditions: none - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -236,7 +237,7 @@ Retrieve a list of alarm subscriptions with filter "filter.faultyResourceTypes" ... Test title: Retrieve a list of alarm subscriptions with filter "filter.faultyResourceTypes" ... Test objective: The objective is to retrieve the list of active subscriptions with filter "filter.faultyResourceTypes" and perform a JSON schema and content validation of the returned fault management alarms subscription data structure. ... Pre-conditions: none - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -250,7 +251,7 @@ Retrieve a list of alarm subscriptions with filter "filter.perceivedSeverities" ... Test title: Retrieve a list of alarm subscriptions with filter "filter.perceivedSeverities" ... Test objective: The objective is to retrieve the list of active subscriptions with filter "filter.perceivedSeverities" and perform a JSON schema and content validation of the returned fault management alarms subscription data structure. ... Pre-conditions: none - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -264,7 +265,7 @@ Retrieve a list of alarm subscriptions with filter "filter.eventTypes" ... Test title: Retrieve a list of alarm subscriptions with filter "filter.eventTypes" ... Test objective: The objective is to retrieve the list of active subscriptions with filter "filter.eventTypes" and perform a JSON schema and content validation of the returned fault management alarms subscription data structure. ... Pre-conditions: none - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -278,11 +279,29 @@ Retrieve a list of alarm subscriptions with filter "filter.probableCauses" ... Test title: Retrieve a list of alarm subscriptions with filter "filter.probableCauses" ... Test objective: The objective is to retrieve the list of active subscriptions with filter "filter.probableCauses" and perform a JSON schema and content validation of the returned fault management alarms subscription data structure. ... Pre-conditions: none - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Get subscriptions with filter "filter_probableCauses" Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is FmSubscriptions - Check PostCondition HTTP Response Body Subscriptions Matches the requested attribute-based filter "filter_probableCauses" \ No newline at end of file + Check PostCondition HTTP Response Body Subscriptions Matches the requested attribute-based filter "filter_probableCauses" + +Create a new alarm subscription - Unprocessable Entity + [Documentation] Test ID: 5.3.3.3.22 + ... Test title: Create a new alarm subscription- Unprocessable Entity + ... Test objective: The objective is to test that creation of a new Fault management alarm subscriptions fials when content type of the payload body is supported and the payload body of a request contains syntactically correct data but the data cannot be processed. + ... Pre-conditions: + ... Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + POST Subscription + Check HTTP Response Status Code Is 422 + Check HTTP Response Body Json Schema Is ProblemDetails + +*** Keywords *** + +Void + log do nothing \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/environment/variables.txt b/SOL005/NSFaultManagement-API/environment/variables.txt index 7f86938c5d15e5aeb5f9385cd0968651d1e99286..2214bef51b62be6207947a4dac22cfbafee75597 100644 --- a/SOL005/NSFaultManagement-API/environment/variables.txt +++ b/SOL005/NSFaultManagement-API/environment/variables.txt @@ -2,7 +2,8 @@ ${NFVO_HOST} localhost # Hostname of the VNFM ${NFVO_PORT} 8080 # Listening port of the VNFM ${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${ACCEPT} application/json ${ACCEPT_JSON} application/json ${AUTH_USAGE} 1 @@ -11,15 +12,13 @@ ${nsInstanceId} 007c111c-38a1-42c0-a666-7475ecb1567c ${invalid_alarm_filter} badFilter ${apiRoot} / ${apiName} nsfm -${apiVersion} v1 +${apiMajorVersion} v1 ${CONTENT_TYPE} application/json ${NFVO_ALLOWS_DUPLICATE_SUBS} 0 ${fields} criteria,objectInstanceIds -${VNFM_ALLOWS_DUPLICATE_SUBS} 0 - ${alarmId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d ${faultyNestedNsInstanceId} faultyNestedNsInstanceId ${faultyNsVirtualLinkInstanceId} faultyNsVirtualLinkInstanceId @@ -62,3 +61,5 @@ ${polling_interval} 10 sec ${notification_request} [] ${notification_response} [] + +${callbackResp} 127.0.0.1 diff --git a/SOL005/NSFaultManagement-API/jsons/AlarmClearedNotification.json b/SOL005/NSFaultManagement-API/jsons/AlarmClearedNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..3ac4bfcce32f1fd61705b7f6d66c10f806b82fbf --- /dev/null +++ b/SOL005/NSFaultManagement-API/jsons/AlarmClearedNotification.json @@ -0,0 +1,12 @@ +{{ + "id":"", + "notificationType":"AlarmClearedNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "alarmId":"{alarmId}", + "alarmClearedTime":"", + "_links":{{ + "subscription":"", + "alarm":"" + }} +}} diff --git a/SOL005/NSFaultManagement-API/jsons/AlarmListRebuiltNotification.json b/SOL005/NSFaultManagement-API/jsons/AlarmListRebuiltNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..5babd116614dd77f98cb132e17b1e413096c852c --- /dev/null +++ b/SOL005/NSFaultManagement-API/jsons/AlarmListRebuiltNotification.json @@ -0,0 +1,10 @@ +{{ + "id":"", + "notificationType":"AlarmListRebuiltNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "_links":{{ + "subscription":"", + "alarm":"" + }} +}} \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/jsons/AlarmNotification.json b/SOL005/NSFaultManagement-API/jsons/AlarmNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..2a8e86425bac0e428e5eabff99767ed67665121d --- /dev/null +++ b/SOL005/NSFaultManagement-API/jsons/AlarmNotification.json @@ -0,0 +1,13 @@ +{{ + "id":"", + "notificationType":"AlarmNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "alarm":{{ + "id":"", + "managedObjectId":"" + }}, + "_links":{{ + "subscription":"" + }} +}} diff --git a/SOL005/NSFaultManagement-API/jsons/fmSubscriptionRequest.json b/SOL005/NSFaultManagement-API/jsons/fmSubscriptionRequest.json index 0f22fd8bbfc47a3584d8fa0ab6fdea372ebd79c7..e9a8b3b0120b63ec56eaa8e2330b2f9f14f8c08d 100644 --- a/SOL005/NSFaultManagement-API/jsons/fmSubscriptionRequest.json +++ b/SOL005/NSFaultManagement-API/jsons/fmSubscriptionRequest.json @@ -1,10 +1,10 @@ -{ - "filter": { - "nsInstanceSubscriptionFilter": { +{{ + "filter": {{ + "nsInstanceSubscriptionFilter": {{ "notificationTypes": [ "AlarmNotification" ] - } - }, - "callbackUri": "http://127.0.0.1/subscribe" -} \ No newline at end of file + }} + }}, + "callbackUri": "{callback_uri}{callback_endpoint}" +}} \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/schemas/alarm.schema.json b/SOL005/NSFaultManagement-API/schemas/alarm.schema.json index b51ab8c36db47adcb5a58d724571d4c0d62398b3..76fc395048b4f6a0b7d4a5ad2e7bfc127f7be059 100644 --- a/SOL005/NSFaultManagement-API/schemas/alarm.schema.json +++ b/SOL005/NSFaultManagement-API/schemas/alarm.schema.json @@ -1,183 +1,186 @@ { - "description": "The alarm data type encapsulates information about an alarm. It shall comply with the provisions defined in Table 8.5.2.4-1\n", - "type": "object", - "required": [ - "id", - "managedObjectId", - "alarmRaisedTime", - "rootCauseFaultyComponent", - "ackState", - "perceivedSeverity", - "eventTime", - "eventType", - "probableCause", - "isRootCause", - "_links" - ], - "properties": { - "id": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - }, - "managedObjectId": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - }, - "rootCauseFaultyComponent": { - "description": "This type represents the faulty component that has a negative impact on an NS. It shall comply with the provisions defined in Table 8.5.3.4-1.\n", - "type": "object", - "properties": { - "faultyNestedNsInstanceId": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - }, - "faultyResourceType": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - }, - "faultyNsVirtualLinkInstanceId": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" + "description": "The alarm data type encapsulates information about an alarm. It shall comply with the provisions defined in Table 8.5.2.4-1\n", + "type": "object", + "required": [ + "id", + "managedObjectId", + "alarmRaisedTime", + "ackState", + "perceivedSeverity", + "eventTime", + "eventType", + "probableCause", + "isRootCause", + "_links" + ], + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "managedObjectId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "rootCauseFaultyComponent": { + "description": "This type represents the faulty component that has a negative impact on an NS. It shall comply with the provisions defined in Table 8.5.3.4-1.\n", + "type": "object", + "properties": { + "faultyNestedNsInstanceId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "faultyResourceType": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "faultyNsVirtualLinkInstanceId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + } } - } - }, - "rootCauseFaultyResource": { - "description": "This type represents the faulty virtual resources that have a negative impact on a NS.\n", - "type": "object", - "required": [ - "faultyResource", - "faultyResourceType" - ], - "properties": { - "faultyResource": { - "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance or by an NS instance. Information about the resource is available from the VIM.\n", - "type": "object", - "required": [ - "resourceId" - ], - "properties": { - "vimId": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - }, - "resourceProviderId": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - }, - "resourceId": { - "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance. Representation: string of variable length.\n", - "type": "string" - }, - "vimLevelResourceType": { - "description": "Type of the resource in the scope of the VIM or the resource provider. The value set of the \"vimLevelResourceType\" attribute is within the scope of the VIM or the resource provider and can be used as information that complements the ResourceHandle.\n", - "type": "string" + }, + "rootCauseFaultyResource": { + "description": "This type represents the faulty virtual resources that have a negative impact on a NS.\n", + "type": "object", + "required": [ + "faultyResource", + "faultyResourceType" + ], + "properties": { + "faultyResource": { + "description": "This type represents the information that allows addressing a virtualised resource that is used by a VNF instance or by an NS instance. Information about the resource is available from the VIM.\n", + "type": "object", + "required": [ + "resourceId" + ], + "properties": { + "vimId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "resourceProviderId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "resourceId": { + "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance. Representation: string of variable length.\n", + "type": "string" + }, + "vimLevelResourceType": { + "description": "Type of the resource in the scope of the VIM or the resource provider. The value set of the \"vimLevelResourceType\" attribute is within the scope of the VIM or the resource provider and can be used as information that complements the ResourceHandle.\n", + "type": "string" + } } + }, + "faultyResourceType": { + "description": "The enumeration FaultyResourceType represents those types of faulty resource. Acceptable values are: - COMPUTE - Virtual compute resource. - STORAGE - Virtual storage resource. - NETWORK - Virtual network resource.\n", + "type": "string", + "enum": [ + "COMPUTE", + "STORAGE", + "NETWORK" + ] } - }, - "faultyResourceType": { - "description": "The enumeration FaultyResourceType represents those types of faulty resource. Acceptable values are: - COMPUTE - Virtual compute resource. - STORAGE - Virtual storage resource. - NETWORK - Virtual network resource.\n", - "type": "string", - "enum": [ - "COMPUTE", - "STORAGE", - "NETWORK" - ] } - } - }, - "alarmRaisedTime": { - "description": "Date-time stamp. Representation: String formatted according toas defined by the date-time production in IETF RFC 3339.\n", - "format": "date-time" - }, - "alarmChangedTime": { - "description": "Date-time stamp. Representation: String formatted according toas defined by the date-time production in IETF RFC 3339.\n", - "format": "date-time" - }, - "alarmClearedTime": { - "description": "Date-time stamp. Representation: String formatted according toas defined by the date-time production in IETF RFC 3339.\n", - "format": "date-time" - }, - "ackState": { - "description": "Acknowledgment state of the alarm. Permitted values: UNACKNOWLEDGED ACKNOWLEDGED\n", - "type": "string", - "enum": [ - "UNACKNOWLEDGED", - "ACKNOWLEDGED" - ] - }, - "perceivedSeverity": { - "description": "Indicates the relative level of urgency for operator attention. * CRITICAL: The Critical severity level indicates that a service\n affecting condition has occurred and an immediate corrective action\n is required. Such a severity can be reported, for example, when a\n managed object becomes totally out of service and its capability needs\n to be restored (ITU-T Recommendation X.733).\n* MAJOR: The Major severity level indicates that a service affecting\n condition has developed and an urgent corrective action is required.\n Such a severity can be reported, for example, when there is a severe\n degradation in the capability of the managed object and its full\n capability needs to be restored (ITU-T Recommendation X.733).\n* MINOR: The Minor severity level indicates the existence of a\n non-service affecting fault condition and that corrective action\n should be taken in order to prevent a more serious (for example,\n service affecting) fault. Such a severity can be reported, for\n example, when the detected alarm condition is not currently degrading\n the capacity of the managed object (ITU-T Recommendation X.733).\n* WARNING: The Warning severity level indicates the detection of a\n potential or impending service affecting fault, before any significant\n effects have been felt. Action should be taken to further diagnose (if\n necessary) and correct the problem in order to prevent it from\n becoming a more serious service affecting fault (ITU-T Recommendation\n X.733).\n* INDETERMINATE: The Indeterminate severity level indicates that the\n severity level cannot be determined (ITU-T Recommendation X.733).\n* CLEARED: The Cleared severity level indicates the clearing of one or\n more previously reported alarms. This alarm clears all alarms for this\n managed object that have the same Alarm type, Probable cause and\n Specific problems (if given) (ITU-T Recommendation X.733).\n", - "type": "string", - "enum": [ - "CRITICAL", - "MAJOR", - "MINOR", - "WARNING", - "INDETERMINATE", - "CLEARED" - ] - }, - "eventTime": { - "description": "Date-time stamp. Representation: String formatted according toas defined by the date-time production in IETF RFC 3339.\n", - "format": "date-time" - }, - "eventType": { - "description": "The enumeration EventType represents those types of events that trigger an alarm. - COMMUNICATIONS_ALARM: An alarm of this type is associated with the\n procedure and/or process required conveying information from one point\n to another (ITU-T Recommendation X.733).\n- PROCESSING_ERROR_ALARM: An alarm of this type is associated with a\n software or processing fault (ITU-T Recommendation X.733).\n- ENVIRONMENTAL_ALARM: An alarm of this type is associated with a\n condition related to an enclosure in which the equipment resides\n (ITU-T Recommendation X.733).\n- QOS_ALARM: An alarm of this type is associated with degradation in the\n quality of a service (ITU-T Recommendation X.733).\n- EQUIPMENT_ALARM: An alarm of this type is associated with an equipment\n fault (ITU-T Recommendation X.733).\n", - "type": "string", - "enum": [ - "COMMUNICATIONS_ALARM", - "PROCESSING_ERROR_ALARM", - "ENVIRONMENTAL_ALARM", - "QOS_ALARM", - "EQUIPMENT_ALARM" - ] - }, - "faultType": { - "description": "Additional information to clarify the type of the fault.\n", - "type": "string" - }, - "probableCause": { - "description": "Information about the probable cause of the fault.\n", - "type": "string" - }, - "isRootCause": { - "description": "Attribute indicating if this fault is the root for other correlated alarms. If TRUE, then the alarms listed in the attribute CorrelatedAlarmId are caused by this fault.\n", - "type": "boolean" - }, - "correlatedAlarmIds": { - "description": "List of identifiers of other alarms correlated to this fault.\n", - "type": "array", - "items": { - "description": "An identifier with the intention of being globally unique.\n", + }, + "alarmRaisedTime": { + "description": "Date-time stamp. Representation: String formatted according toas defined by the date-time production in IETF RFC 3339.\n", + "format": "date-time" + }, + "alarmChangedTime": { + "description": "Date-time stamp. Representation: String formatted according toas defined by the date-time production in IETF RFC 3339.\n", + "format": "date-time" + }, + "alarmClearedTime": { + "description": "Date-time stamp. Representation: String formatted according toas defined by the date-time production in IETF RFC 3339.\n", + "format": "date-time" + }, + "alarmAcknowledgedTime": { + "description": "Date-time stamp. Representation: String formatted according toas defined by the date-time production in IETF RFC 3339.\n", + "format": "date-time" + }, + "ackState": { + "description": "Acknowledgment state of the alarm. Permitted values: UNACKNOWLEDGED ACKNOWLEDGED\n", + "type": "string", + "enum": [ + "UNACKNOWLEDGED", + "ACKNOWLEDGED" + ] + }, + "perceivedSeverity": { + "description": "Indicates the relative level of urgency for operator attention. * CRITICAL: The Critical severity level indicates that a service\n affecting condition has occurred and an immediate corrective action\n is required. Such a severity can be reported, for example, when a\n managed object becomes totally out of service and its capability needs\n to be restored (ITU-T Recommendation X.733).\n* MAJOR: The Major severity level indicates that a service affecting\n condition has developed and an urgent corrective action is required.\n Such a severity can be reported, for example, when there is a severe\n degradation in the capability of the managed object and its full\n capability needs to be restored (ITU-T Recommendation X.733).\n* MINOR: The Minor severity level indicates the existence of a\n non-service affecting fault condition and that corrective action\n should be taken in order to prevent a more serious (for example,\n service affecting) fault. Such a severity can be reported, for\n example, when the detected alarm condition is not currently degrading\n the capacity of the managed object (ITU-T Recommendation X.733).\n* WARNING: The Warning severity level indicates the detection of a\n potential or impending service affecting fault, before any significant\n effects have been felt. Action should be taken to further diagnose (if\n necessary) and correct the problem in order to prevent it from\n becoming a more serious service affecting fault (ITU-T Recommendation\n X.733).\n* INDETERMINATE: The Indeterminate severity level indicates that the\n severity level cannot be determined (ITU-T Recommendation X.733).\n* CLEARED: The Cleared severity level indicates the clearing of one or\n more previously reported alarms. This alarm clears all alarms for this\n managed object that have the same Alarm type, Probable cause and\n Specific problems (if given) (ITU-T Recommendation X.733).\n", + "type": "string", + "enum": [ + "CRITICAL", + "MAJOR", + "MINOR", + "WARNING", + "INDETERMINATE", + "CLEARED" + ] + }, + "eventTime": { + "description": "Date-time stamp. Representation: String formatted according toas defined by the date-time production in IETF RFC 3339.\n", + "format": "date-time" + }, + "eventType": { + "description": "The enumeration EventType represents those types of events that trigger an alarm. - COMMUNICATIONS_ALARM: An alarm of this type is associated with the\n procedure and/or process required conveying information from one point\n to another (ITU-T Recommendation X.733).\n- PROCESSING_ERROR_ALARM: An alarm of this type is associated with a\n software or processing fault (ITU-T Recommendation X.733).\n- ENVIRONMENTAL_ALARM: An alarm of this type is associated with a\n condition related to an enclosure in which the equipment resides\n (ITU-T Recommendation X.733).\n- QOS_ALARM: An alarm of this type is associated with degradation in the\n quality of a service (ITU-T Recommendation X.733).\n- EQUIPMENT_ALARM: An alarm of this type is associated with an equipment\n fault (ITU-T Recommendation X.733).\n", + "type": "string", + "enum": [ + "COMMUNICATIONS_ALARM", + "PROCESSING_ERROR_ALARM", + "ENVIRONMENTAL_ALARM", + "QOS_ALARM", + "EQUIPMENT_ALARM" + ] + }, + "faultType": { + "description": "Additional information to clarify the type of the fault.\n", "type": "string" - } - }, - "faultDetails": { - "description": "Provides additional information about the fault..\n", - "type": "string" - }, - "_links": { - "description": "Links for this resource.\n", - "type": "object", - "required": [ - "self" - ], - "properties": { - "self": { - "description": "This type represents a link to a resource.\n", - "type": "object", - "required": [ - "href" - ], - "properties": { - "href": { - "description": "URI of a resource referenced from a notification. Should be an absolute URI (i.e. a URI that contains {apiRoot}), however, may be a relative URI (i.e. a URI where the {apiRoot} part is omitted) if the {apiRoot} information is not available.\n", - "type": "string", - "format": "url" + }, + "probableCause": { + "description": "Information about the probable cause of the fault.\n", + "type": "string" + }, + "isRootCause": { + "description": "Attribute indicating if this fault is the root for other correlated alarms. If TRUE, then the alarms listed in the attribute CorrelatedAlarmId are caused by this fault.\n", + "type": "boolean" + }, + "correlatedAlarmIds": { + "description": "List of identifiers of other alarms correlated to this fault.\n", + "type": "array", + "items": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + } + }, + "faultDetails": { + "description": "Provides additional information about the fault..\n", + "type": "string" + }, + "_links": { + "description": "Links for this resource.\n", + "type": "object", + "required": [ + "self" + ], + "properties": { + "self": { + "description": "This type represents a link to a resource.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "URI of a resource referenced from a notification. Should be an absolute URI (i.e. a URI that contains {apiRoot}), however, may be a relative URI (i.e. a URI where the {apiRoot} part is omitted) if the {apiRoot} information is not available.\n", + "type": "string", + "format": "url" + } } } } } } - } -} \ No newline at end of file + } \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/schemas/alarms.schema.json b/SOL005/NSFaultManagement-API/schemas/alarms.schema.json index 284a1fa1c95e4dadef4b13c480234e41199410fa..716025e5775725df1c3b92c4213841ac67ee3fdf 100644 --- a/SOL005/NSFaultManagement-API/schemas/alarms.schema.json +++ b/SOL005/NSFaultManagement-API/schemas/alarms.schema.json @@ -7,7 +7,6 @@ "id", "managedObjectId", "alarmRaisedTime", - "rootCauseFaultyComponent", "ackState", "perceivedSeverity", "eventTime", @@ -99,6 +98,10 @@ "description": "Date-time stamp. Representation: String formatted according toas defined by the date-time production in IETF RFC 3339.\n", "format": "date-time" }, + "alarmAcknowledgedTime": { + "description": "Date-time stamp. Representation: String formatted according toas defined by the date-time production in IETF RFC 3339.\n", + "format": "date-time" + }, "ackState": { "description": "Acknowledgment state of the alarm. Permitted values: UNACKNOWLEDGED ACKNOWLEDGED\n", "type": "string", diff --git a/SOL005/NSLifecycleManagement-API/ApiVersion.robot b/SOL005/NSLifecycleManagement-API/ApiVersion.robot index 77e6bc6bf7f1ad6a69b2c1b734085de3a4665acc..d21b76e5e84a122fec09c32d23b7523b53dd5058 100644 --- a/SOL005/NSLifecycleManagement-API/ApiVersion.robot +++ b/SOL005/NSLifecycleManagement-API/ApiVersion.robot @@ -1,213 +1,213 @@ -*** Settings *** - -Resource environment/variables.txt - -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Library DependencyLibrary -Library JSONLibrary -Library JSONSchemaLibrary schemas/ - -*** Test Cases *** -POST API Version - Method not implemented - [Documentation] Test ID: 5.3.2.25.1 - ... Test title: POST API version - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version - [Documentation] Test ID: 5.3.2.25.2 - ... Test title: GET API Version - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version - Method not implemented - [Documentation] Test ID: 5.3.2.25.3 - ... Test title: PUT API Version - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version - Method not implemented - [Documentation] Test ID: 5.3.2.25.4 - ... Test title: PATCH API Version - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version - Method not implemented - [Documentation] Test ID: 5.3.2.25.5 - ... Test title: DELETE API Version - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -POST API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 5.3.2.25.6 - ... Test title: POST API version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version with apiMajorVerion - [Documentation] Test ID: 5.3.2.25.7 - ... Test title: GET API Version with apiMajorVerion - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 5.3.2.25.8 - ... Test title: PUT API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 5.3.2.25.9 - ... Test title: PATCH API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 5.3.2.25.10 - ... Test title: DELETE API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -*** Keywords *** -POST API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response['body']} - Log Json Schema Validation OK +*** Settings *** + +Resource environment/variables.txt + +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 5.3.2.25.1 + ... Test title: POST API version - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 5.3.2.25.2 + ... Test title: GET API Version + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version - Method not implemented + [Documentation] Test ID: 5.3.2.25.3 + ... Test title: PUT API Version - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 5.3.2.25.4 + ... Test title: PATCH API Version - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 5.3.2.25.5 + ... Test title: DELETE API Version - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +POST API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 5.3.2.25.6 + ... Test title: POST API version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 5.3.2.25.7 + ... Test title: GET API Version with apiMajorVerion + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 5.3.2.25.8 + ... Test title: PUT API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 5.3.2.25.9 + ... Test title: PATCH API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 5.3.2.25.10 + ... Test title: DELETE API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} + Log Json Schema Validation OK diff --git a/SOL005/NSLifecycleManagement-API/CancelOperationTask.robot b/SOL005/NSLifecycleManagement-API/CancelOperationTask.robot index 26407a2d284b4b24ff67a2f3add146f48d063b62..e50e2fcf603e478a142a7a8fe7b54a9269de98e0 100644 --- a/SOL005/NSLifecycleManagement-API/CancelOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/CancelOperationTask.robot @@ -13,7 +13,7 @@ POST Cancel operation task ... Test title: POST Cancel operation task ... Test objective: The objective is to test that POST method cancel the NS LCM operation ... Pre-conditions: NS instance status equal to STARTING, PROCESSING or ROLLING_BACK - ... Reference: Clause 6.4.15.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.15.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: NS instance status equal to FAILED_TEMP @@ -26,7 +26,7 @@ POST Cancel operation task Not Found ... Test title: POST Cancel operation task Not Found ... Test objective: The objective is to test that POST method fail completing the Cancel NS LCM operation if the resource is not found ... Pre-conditions: none - ... Reference: Clause 6.4.15.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.15.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -39,7 +39,7 @@ POST Cancel operation task Conflict ... Test title: POST Cancel operation task Conflict ... Test objective: The objective is to test that POST method fail if a status conflict exist on the NS LCM operation. (i.e. NS instance status not equal to STARTING, PROCESSING or ROLLING_BACK) ... Pre-conditions: NS instance status not equal to STARTING, PROCESSING or ROLLING_BACK - ... Reference: Clause 6.4.15.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.15.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -52,7 +52,7 @@ GET Cancel operation task - Method not implemented ... Test title: GET Cancel operation task - Method not implemented ... Test objective: The objective is to test that GET method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.15.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.15.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -64,7 +64,7 @@ PUT Cancel operation task - Method not implemented ... Test title: PUT Cancel operation task - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.15.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.15.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -76,7 +76,7 @@ PATCH Cancel operation task - Method not implemented ... Test title: PATCH Cancel operation task - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.15.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.15.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -88,11 +88,9 @@ DELETE Cancel operation task - Method not implemented ... Test title: DELETE Cancel operation task - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.15.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.15.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none DELETE Cancel operation task - Check HTTP Response Status Code Is 405 - - \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/ContinueOperationTask.robot b/SOL005/NSLifecycleManagement-API/ContinueOperationTask.robot index 54b22eae5838c2aca8d1ad6ecbcaa352f2a2521d..ff24ffbe0a054c6a6a236f8f94b6b3340dd69841 100644 --- a/SOL005/NSLifecycleManagement-API/ContinueOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/ContinueOperationTask.robot @@ -13,7 +13,7 @@ POST Continue operation task ... Test title: POST Continue operation task ... Test objective: The objective is to test that POST method trigger a continue on the LCM operation ... Pre-conditions: NS instance status equal to FAILED_TEMP - ... Reference: Clause 6.4.13.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.13.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: NS instance status not equal to FAILED_TEMP @@ -26,7 +26,7 @@ POST Continue operation task Not Found ... Test title: POST Continue operation task Not Found ... Test objective: The objective is to test that POST method cannot perform a continue operation task because the resource is not found ... Pre-conditions: none - ... Reference: Clause 6.4.13.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.13.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -39,7 +39,7 @@ POST Continue operation task Conflict ... Test title: POST Continue operation task Conflict ... Test objective: The objective is to test that POST method fail in case of operation status conflict (i.e. NS instance status not equal to FAILED_TEMP ) ... Pre-conditions: NS instance status not equal to FAILED_TEMP - ... Reference: Clause 6.4.13.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.13.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -52,7 +52,7 @@ GET Continue operation task - Method not implemented ... Test title: GET Continue operation task - Method not implemented ... Test objective: The objective is to test that GET method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.13.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.13.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -64,7 +64,7 @@ PUT Continue operation task - Method not implemented ... Test title: PUT Continue operation task - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.13.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.13.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -76,7 +76,7 @@ PATCH Continue operation task - Method not implemented ... Test title: PATCH Continue operation task - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.14.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.14.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -88,7 +88,7 @@ DELETE Continue operation task - Method not implemented ... Test title: DELETE Continue operation task - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.14.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.14.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none diff --git a/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot b/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot index 9092991e18f3d77c9af4d5c115d96e77bf383ecd..9ae07218f74a7807e61ee683f73d739e5d142983 100644 --- a/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot @@ -5,23 +5,36 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=fal Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ - +Library Process +Suite Setup Initialize System +Suite Teardown Terminate All Processes kill=true *** Test Cases *** - NS Instance Creation [Documentation] Test ID: 5.3.2.18.1 ... Test title: NS Instance Creation ... Test objective: The objective is to test the workflow for Creating a NS instance ... Pre-conditions: none - ... Reference: Clause 6.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS lifecycle management operation occurrence is in NOT_ISTANTIATED state + ... Post-Conditions: The NS resource is in NOT_ISTANTIATED state POST New nsInstance Check HTTP Response Status Code Is 201 Check HTTP Response Header Contains Location - Check HTTP Response Body Json Schema Is NsIdentifierCreationNotification + Check HTTP Response Body Json Schema Is NsInstance + Check Notification Http POST Request Body Json Schema Is NsIdentifierCreationNotification + Check Notification Http POST Request Body notificationType attribute Is NsIdentifierCreationNotification Check resource not_instantiated - \ No newline at end of file +NS Instance Creation with DISABLED Network Service Descriptor + [Documentation] Test ID: 5.3.2.18.2 + ... Test title: NS Instance Creation with DISABLED Network Service Descriptor + ... Test objective: The objective is to test the workflow for Creating a NS instance with a disabled NSD + ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO in disabled operational state. + ... Reference: Clauses 6.4.2.3.1 and 5.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + POST New nsInstance with DISABLED nsd + Check HTTP Response Status Code Is 409 \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/DeleteNSInstanceWorkflow.robot b/SOL005/NSLifecycleManagement-API/DeleteNSInstanceWorkflow.robot index 480600cca790a8577baa6e5f49fb261f2baac2d6..f700f388fcbe2c41f1b2383ebeba6fcade072178 100644 --- a/SOL005/NSLifecycleManagement-API/DeleteNSInstanceWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/DeleteNSInstanceWorkflow.robot @@ -5,6 +5,10 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=fal Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Library Process +Suite Setup Initialize System +Suite Teardown Terminate All Processes kill=true + *** Test Cases *** NS Instance Deletion @@ -12,12 +16,12 @@ NS Instance Deletion ... Test title: NS Instance Deletion ... Test objective: The objective is to test the workflow for Deleting a NS instance ... Pre-conditions: the resource is in NOT_INSTANTIATED state - ... Reference: Clause 6.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: NS Instance resource is deleted - Check resource not_instantiated DELETE IndividualNSInstance Check HTTP Response Status Code Is 204 - Check HTTP Response Body Json Schema Is NsIdentifierDeletionNotification - Check Instance Deleted \ No newline at end of file + Check Notification Http POST Request Body Json Schema Is NsIdentifierDeletionNotification + Check Notification Http POST Request Body notificationType attribute Is NsIdentifierDeletionNotification + Check Postcondition NS instance is deleted diff --git a/SOL005/NSLifecycleManagement-API/FailOperationTask.robot b/SOL005/NSLifecycleManagement-API/FailOperationTask.robot index 5ad6c92e51a286aab88fc97e17dd0a2d833e62b1..b87ddc4d8feb0589ff4627c4dc01ea83ac36596e 100644 --- a/SOL005/NSLifecycleManagement-API/FailOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/FailOperationTask.robot @@ -13,7 +13,7 @@ POST Fail operation task ... Test title: POST Fail operation task ... Test objective: The objective is to test that POST method trigger a state change to "finally failed" on the NS LCM operation ... Pre-conditions: NS instance status equal to FAILED_TEMP - ... Reference: Clause 6.4.14.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.14.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -21,13 +21,12 @@ POST Fail operation task Check HTTP Response Status Code Is 202 Check resource is finally failed - POST Fail operation task Not Found [Documentation] Test ID: 5.3.2.13.2 ... Test title: POST Fail operation task Not Found ... Test objective: The objective is to test that POST method fail if the NS LCM resource is not found ... Pre-conditions: none - ... Reference: Clause 6.4.14.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.14.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -40,7 +39,7 @@ POST Fail operation task Conflict ... Test title: POST Fail operation task Conflict ... Test objective: The objective is to test that POST method fail in case of status conflict on the NS LCM operation (i.e NS instance status not equal to FAILED_TEMP) ... Pre-conditions: NS instance status not equal to FAILED_TEMP - ... Reference: Clause 6.4.14.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.14.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -53,7 +52,7 @@ GET Fail operation task - Method not implemented ... Test title: GET Fail operation task - Method not implemented ... Test objective: The objective is to test that GET method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.14.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.14.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -65,7 +64,7 @@ PUT Fail operation task - Method not implemented ... Test title: PUT Fail operation task - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.14.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.14.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -77,7 +76,7 @@ PATCH Fail operation task - Method not implemented ... Test title: PATCH Fail operation task - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.14.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.14.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -89,7 +88,7 @@ DELETE Fail operation task - Method not implemented ... Test title: DELETE Fail operation task - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.14.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.14.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none diff --git a/SOL005/NSLifecycleManagement-API/HealNSTask.robot b/SOL005/NSLifecycleManagement-API/HealNSTask.robot index 379ed397b0ea9cf71738ca02773a241366936df7..7d95b0e1682487af65897c40cb5077478ea66c21 100644 --- a/SOL005/NSLifecycleManagement-API/HealNSTask.robot +++ b/SOL005/NSLifecycleManagement-API/HealNSTask.robot @@ -12,24 +12,24 @@ POST Heal a NSInstance [Documentation] Test ID: 5.3.2.6.1 ... Test title: POST Heal a NSInstance ... Test objective: The objective is to test that POST method trigger a Heal NS instance - ... Pre-conditions: resource status is not in NOT_INSTANTIATED state - ... Reference: Clause 6.4.7.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: NS Instance is in INSTANTIATED state. + ... Reference: Clause 6.4.7.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none + ... Post-Conditions: NS instance is still in INSTANTIATED state. POST Heal NSInstance Check HTTP Response Status Code Is 202 Check HTTP Response Header Contains Location -POST Heal a NSInstance Conflict +POST Heal a NSInstance - Conflict (Not Instantited) [Documentation] Test ID: 5.3.2.6.2 - ... Test title: POST Heal a NSInstance Conflict - ... Test objective: The objective is to test that POST method fail if NS instance is not in NOT_INSTANTIATE state - ... Pre-conditions: resource status is in NOT_INSTANTIATED state - ... Reference: Clause 6.4.7.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Test title: POST Heal a NSInstance - Conflict (Not Instantited) + ... Test objective: The objective is to test that POST method fail if NS instance is in NOT_INSTANTIATE state + ... Pre-conditions: NS Instance is in NOT_INSTANTIATED state + ... Reference: Clause 6.4.7.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none + ... Post-Conditions: NS Instance is still in NOT_INSTANTIATED state POST Heal NSInstance Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails @@ -39,7 +39,7 @@ GET Heal NSInstance- Method not implemented ... Test title: GET Heal NSInstance- Method not implemented ... Test objective: The objective is to test that GET method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -51,7 +51,7 @@ PUT Heal NSInstance - Method not implemented ... Test title: PUT Heal NSInstance - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.7.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.7.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -63,7 +63,7 @@ PATCH Heal NSInstance - Method not implemented ... Test title: PATCH Heal NSInstance - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.7.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.7.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -75,7 +75,7 @@ DELETE Heal NSInstance - Method not implemented ... Test title: DELETE Heal NSInstance - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.7.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.7.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none diff --git a/SOL005/NSLifecycleManagement-API/HealNSTaskWorkflow.robot b/SOL005/NSLifecycleManagement-API/HealNSTaskWorkflow.robot index 0663a9f2b16e31dcc394a51a63da61536a30734b..4ab717c411793a05e1d598fd5fa15ca8d9874e10 100644 --- a/SOL005/NSLifecycleManagement-API/HealNSTaskWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/HealNSTaskWorkflow.robot @@ -5,6 +5,7 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=fal Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Library Process Suite Setup Initialize System Suite Teardown Terminate All Processes kill=true @@ -14,13 +15,13 @@ Heal Flow of NS lifecycle management operations ... Test title: Heal Flow of NS lifecycle management operations ... Test objective: The objective is to test the workflow for Healing a NS instance ... Pre-conditions: the resource is in INSTANTIATED state - ... Reference: Clause 6.4.7 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.7 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: NS Instance still in INSTANTIATED state - Check resource instantiated + ... Post-Conditions: The NS Instance is still in INSTANTIATED state POST Heal NSInstance Check HTTP Response Status Code Is 202 + Check HTTP Response Header Contains Location Check Operation Occurrence Id Check Operation Notification Status is START Check Operation Notification Status is RESULT diff --git a/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot b/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot index bcc46e91bdf18b70b65b3a2f6e1421274b12a360..e168b373e8af774531fd3331b8b01751becc38f6 100644 --- a/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot +++ b/SOL005/NSLifecycleManagement-API/IndividualNSInstance.robot @@ -13,59 +13,58 @@ POST Individual NSInstance - Method not implemented ... Test title: POST Individual NSInstance - Method not implemented ... Test objective: The objective is to test that POST method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.3.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.3.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: Check Postcondition NS Instance is not created + ... Post-Conditions: none POST IndividualNSInstance Check HTTP Response Status Code Is 405 - Check Postcondition NS Instance is not created GET Information about an individual NS Instance [Documentation] Test ID: 5.3.2.2.2 ... Test title: GET Information about an individual NS Instance ... Test objective: The objective is to test that GET method returns an individual NS instance ... Pre-conditions: none - ... Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET IndividualNSInstance Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is NsInstance + Check HTTP Response Body NsInstance content against NS Descriptor + Check HTTP Response Body NsInstance content against VNF Descriptor PUT Individual NSInstance - Method not implemented [Documentation] Test ID: 5.3.2.2.3 ... Test title: PUT Individual NSInstance - Method not implemented ... Test objective: TThe objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.3.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.3.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: Check Postcondition NS Instance is not modified + ... Post-Conditions: none PUT IndividualNSInstance Check HTTP Response Status Code Is 405 - Check Postcondition NS Instance is not modified PATCH Individual NSInstance - Method not implemented [Documentation] Test ID: 5.3.2.2.4 ... Test title: PATCH Individual NSInstance - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: Check Postcondition NS Instance is not modified + ... Post-Conditions: none PATCH IndividualNSInstance Check HTTP Response Status Code Is 405 - Check Postcondition NS Instance is not modified DELETE Individual NSInstance [Documentation] Test ID: 5.3.2.2.5 ... Test title: DELETE Individual NSInstance ... Test objective: The objective is to test that DELETE method delete a not INSTANTIATED NS instance ... Pre-conditions: NS instance is not INSTANTIATED . - ... Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: Check Postcondition NS Instance is deleted @@ -78,11 +77,11 @@ DELETE Individual NSInstance Conflict ... Test title: DELETE Individual NSInstance Conflict ... Test objective: The objective is to test that DELETE method cannot delete an INSTANTIATED NS instance ... Pre-conditions: one instance of a NS in INSTANTIATED state - ... Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: Check Postcondition NS Instance is not deleted - DELETE IndividualNSInstance + DELETE IndividualNSInstance Conflict Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - Check Postcondition NS Instance is not deleted + Check Postcondition NS Conflict Instance is not deleted \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/IndividualNSLCMOccurences.robot b/SOL005/NSLifecycleManagement-API/IndividualNSLCMOccurences.robot index 17046cc9ab2781d2e74a6323af0dc73cd069cfdb..f08fced4392e9b0f8ac776998175d82dbb73b261 100644 --- a/SOL005/NSLifecycleManagement-API/IndividualNSLCMOccurences.robot +++ b/SOL005/NSLifecycleManagement-API/IndividualNSLCMOccurences.robot @@ -12,10 +12,10 @@ Post Individual NS LCM occurrences - Method not implemented ... Test title: Post Individual NS LCM occurrences - Method not implemented ... Test objective: The objective is to test that POST method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not created in the NFVO + ... Post-Conditions: none POST Individual NS LCM OP Occurrence Check HTTP Response Status Code Is 405 @@ -24,23 +24,24 @@ Get status information about Individual NS LCM occurrences ... Test title: Get status information about Individual NS LCM occurrences ... Test objective: The objective is to test that GET method returns the LCM occurrence of the NS ... Pre-conditions: none - ... Reference: Clause 6.4.10.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.10.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET Individual NS LCM OP Occurrence Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is NsLcmOpOcc + Check NsLcmOpOcc content against NS Descriptor PUT status information about Individual NS LCM occurrences - Method not implemented [Documentation] Test ID: 5.3.2.9.3 ... Test title: PUT status information about Individual NS LCM occurrences - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.10.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.10.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not modified from the NFVO + ... Post-Conditions: none PUT Individual NS LCM OP Occurrence Check HTTP Response Status Code Is 405 @@ -49,10 +50,10 @@ PATCH status information about Individual NS LCM occurrences - Method not implem ... Test title: PATCH status information about Individual NS LCM occurrences - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.10.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.10.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not modified from the NFVO + ... Post-Conditions: none PATCH Individual NS LCM OP Occurrence Check HTTP Response Status Code Is 405 @@ -61,14 +62,9 @@ DELETE status information about Individual NS LCM occurrences - Method not imple ... Test title: DELETE status information about Individual NS LCM occurrences - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.10.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.10.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not deleted from the NFVO + ... Post-Conditions: none DELETE Individual NS LCM OP Occurrence - Check HTTP Response Status Code Is 405 - - - - - \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/IndividualSubscription.robot b/SOL005/NSLifecycleManagement-API/IndividualSubscription.robot index 9d5a165b36eee094d742860bf1049d5ab5668581..44191a80ee244c6a108379369a77380937cd2829 100644 --- a/SOL005/NSLifecycleManagement-API/IndividualSubscription.robot +++ b/SOL005/NSLifecycleManagement-API/IndividualSubscription.robot @@ -14,10 +14,10 @@ POST Individual Subscription - Method not implemented ... Test title: POST Individual Subscription - Method not implemented ... Test objective: The objective is to test that POST method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.17.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.17.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS lifecycle management subscription is not created on the NFVO + ... Post-Conditions: none POST Individual Subscription Check HTTP Response Status Code Is 405 @@ -26,7 +26,7 @@ GET Information about an individual subscription ... Test title: GET Information about an individual subscription ... Test objective: The objective is to test the retrieval of NS lifecycle management subscription and perform a JSON schema validation of the returned subscription data structure ... Pre-conditions: none - ... Reference: Clause 6.4.17.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.17.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -39,10 +39,10 @@ PUT an individual subscription - Method not implemented ... Test title: PUT an individual subscription - Method not implemented ... Test objective: TThe objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.17.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.17.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS lifecycle management subscription is not modified by the operation + ... Post-Conditions: none PUT Individual Subscription Check HTTP Response Status Code Is 405 @@ -51,10 +51,10 @@ PATCH an individual subscription - Method not implemented ... Test title: PATCH an individual subscription - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.17.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.17.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS lifecycle management subscription is not modified by the operation + ... Post-Conditions: none PATCH Individual Subscription Check HTTP Response Status Code Is 405 @@ -63,7 +63,7 @@ DELETE an individual subscription ... Test title: DELETE an individual subscription ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: At least one lifecycle management subscription is available in the NFVO - ... Reference: Clause 6.4.17.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.17.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The NS lifecycle management subscription is not available anymore on NFVO diff --git a/SOL005/NSLifecycleManagement-API/InstantiateNSTask.robot b/SOL005/NSLifecycleManagement-API/InstantiateNSTask.robot index 0fa8de84e57673b4aa76252481a8710db28b51a8..7b55d6235580b5c647d639106dc8d30a52e20945 100644 --- a/SOL005/NSLifecycleManagement-API/InstantiateNSTask.robot +++ b/SOL005/NSLifecycleManagement-API/InstantiateNSTask.robot @@ -12,8 +12,8 @@ POST Instantiate a nsInstance [Documentation] Test ID: 5.3.2.3.1 ... Test title: POST Instantiate a nsInstance ... Test objective: The objective is to test that POST method instantiate a new NS instance - ... Pre-conditions: none - ... Reference: Clause 6.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: An NS instance created and it is in NOT_INSTANTIATED state + ... Reference: Clause 6.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The NS instance is instantiated on the NFVO @@ -27,7 +27,7 @@ POST Instantiate a nsInstance Conflict ... Test title: POST Instantiate a nsInstance Conflict ... Test objective: The objective is to test that the operation cannot be performed due to a conflict with the state of resource (i.e. the resource is in INSTANTIATED state) ... Pre-conditions: resource is in INSTANTIATED state - ... Reference: Clause 6.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The NS instance is not instantiated on the NFVO @@ -41,7 +41,7 @@ GET Instantiate NSInstance - Method not implemented ... Test title: GET Instantiate NSInstance - Method not implemented ... Test objective: The objective is to test that the operation cannot be performed due because method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none. @@ -53,7 +53,7 @@ PUT Instantiate NSInstance - Method not implemented ... Test title: PUT Instantiate NSInstance - Method not implemented ... Test objective: The objective is to test that the operation cannot be performed due because method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.4.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.4.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none. @@ -65,7 +65,7 @@ PATCH Instantiate NSInstance - Method not implemented ... Test title: PATCH Instantiate NSInstance - Method not implemented ... Test objective: The objective is to test that the operation cannot be performed due because method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none. @@ -77,7 +77,7 @@ DELETE Instantiate NSInstance - Method not implemented ... Test title: DELETE Instantiate NSInstance - Method not implemented ... Test objective: The objective is to test that the operation cannot be performed due because method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.4.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.4.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none. diff --git a/SOL005/NSLifecycleManagement-API/InstanciateNSTaskWorkflow.robot b/SOL005/NSLifecycleManagement-API/InstantiateNSTaskWorkflow.robot similarity index 83% rename from SOL005/NSLifecycleManagement-API/InstanciateNSTaskWorkflow.robot rename to SOL005/NSLifecycleManagement-API/InstantiateNSTaskWorkflow.robot index f3357abb4b7970fb036680886c786acf3451d948..da479341cd0eb14f025f8912e227e04324e2278c 100644 --- a/SOL005/NSLifecycleManagement-API/InstanciateNSTaskWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/InstantiateNSTaskWorkflow.robot @@ -5,6 +5,7 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=fal Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Library Process Suite Setup Initialize System Suite Teardown Terminate All Processes kill=true @@ -13,15 +14,14 @@ Instantiate Flow of NS lifecycle management operations [Documentation] Test ID: 5.3.2.21.1 ... Test title: Instantiate Flow of NS lifecycle management operations ... Test objective: The objective is to test the workflow for Instantiate a NS instance - ... Pre-conditions: the resource is in NOT_INSTANTIATED state - ... Reference: Clause 6.4.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: The resource is in NOT_INSTANTIATED state + ... Reference: Clause 6.4.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: the resource is in INSTANTIATED state - Check resource existence - Check resource not_instantiated + ... Post-Conditions: The resource is in INSTANTIATED state POST Instantiate nsInstance Check HTTP Response Status Code Is 202 + Check HTTP Response Header Contains Location Check Operation Occurrence Id Check Operation Notification Status is START Check Operation Notification Status is RESULT diff --git a/SOL005/NSLifecycleManagement-API/NSInstances.robot b/SOL005/NSLifecycleManagement-API/NSInstances.robot index 3d579f4ccf09335dcd3d5e96c74ca4b1df05c37d..40dcf4efdd95795f47866dea5ed41975ff28b0ca 100644 --- a/SOL005/NSLifecycleManagement-API/NSInstances.robot +++ b/SOL005/NSLifecycleManagement-API/NSInstances.robot @@ -11,8 +11,8 @@ POST Create a new NsInstance [Documentation] Test ID: 5.3.2.1.1 ... Test title: POST Create a new NsInstance ... Test objective: The objective is to test the creation of a new Ns Instances and perform a JSON schema validation of the collected instance data structure - ... Pre-conditions: None. - ... Reference: Clause 6.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none. + ... Reference: Clause 6.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none. ... Post-Conditions: A Ns instance is instantiated. @@ -20,13 +20,14 @@ POST Create a new NsInstance Check HTTP Response Status Code Is 201 Check HTTP Response Header Contains Location Check HTTP Response Body Json Schema Is NsInstance + Check HTTP Response Body NsInstance content against NS Descriptor GET information about multiple NS instances [Documentation] Test ID: 5.3.2.1.2 ... Test title: GET information about multiple NS instances ... Test objective: The objective is to test the retrieval of all the available NS Instances and perform a JSON schema and content validation of the collected instance data structure ... Pre-conditions: An existing Ns instance. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none. ... Post-Conditions: none. @@ -38,8 +39,8 @@ GET information about multiple NS instances Bad Request Invalid attribute-based [Documentation] Test ID: 5.3.2.1.3 ... Test title: GET information about multiple NS instances Bad Request Invalid attribute-based filtering parameters ... Test objective: The objective is to test the retrieval of all the available NS Instances using attribute-based filter and perform a JSON schema and content validation of the collected instance data structure - ... Pre-conditions: A Ns instance is instantiated, a bad filter parameter (filter parameters are listed in Table 6.4.2.3.2-1 - ETSI GS NFV-SOL 005 [3] v2.6.1). - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: A Ns instance is instantiated, a bad filter parameter (filter parameters are listed in Table 6.4.2.3.2-1 - ETSI GS NFV-SOL 005 [3] v2.7.1). + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none. ... Post-Conditions: none. @@ -51,23 +52,24 @@ GET information about multiple NS instances Bad Request Invalid attribute select [Documentation] Test ID: 5.3.2.1.4 ... Test title: GET information about multiple NS instances Bad Request Invalid attribute selector ... Test objective: The objective is to test the retrieval of all the available NS Instances using attribute-based filter and perform a JSON schema and content validation of the collected instance data structure - ... Pre-conditions: A Ns instance is instantiated, a bad attribute selector (attribute selectors are listed in Table 6.4.2.3.2-1 - ETSI GS NFV-SOL 005 [3] v2.6.1). - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: A Ns instance is instantiated, a bad attribute selector (attribute selectors are listed in Table 6.4.2.3.2-1 - ETSI GS NFV-SOL 005 [3] v2.7.1). + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none. ... Post-Conditions: none. GET NsInstance Invalid Attribute Selector Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails + GET NSInstances with "all_fields" attribute selector [Documentation] Test ID: 5.3.2.1.5 ... Test title: GET NSInstances with "all_fields" attribute selector ... Test objective: The objective is to retrieve the list of active NSInstances with attribute selector - ... Pre-conditions: - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get NSInstances with all_fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is NsInstances @@ -76,11 +78,11 @@ GET NSInstances with "exclude_default" attribute selector [Documentation] Test ID: 5.3.2.1.6 ... Test title: GET NSInstances with "exclude_default" attribute selector ... Test objective: The objective is to retrieve the list of active NSInstances with attribute selector - ... Pre-conditions: - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get NSInstances with exclude_default attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is NsInstances @@ -89,11 +91,11 @@ GET NSInstances with "fields" attribute selector [Documentation] Test ID: 5.3.2.1.7 ... Test title: GET NSInstances with "fields" attribute selector ... Test objective: The objective is to retrieve the list of active NSInstances with attribute selector - ... Pre-conditions: - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get NSInstances with fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is NsInstances @@ -102,11 +104,11 @@ GET NSInstances with "exclude_fields" attribute selector [Documentation] Test ID: 5.3.2.1.8 ... Test title: GET NSInstances with "exclude_fields" attribute selector ... Test objective: The objective is to retrieve the list of active NSInstances with attribute selector - ... Pre-conditions: - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: - ... Post-Conditions: + ... Applicability: none + ... Post-Conditions: none Get NSInstances with exclude_fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is NsInstances @@ -116,10 +118,10 @@ PUT NSInstances - Method not implemented ... Test title: PUT Individual NS instance - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not modified by the operation + ... Post-Conditions: none PUT NSInstances Check HTTP Response Status Code Is 405 @@ -128,10 +130,10 @@ PATCH NSInstances - Method not implemented ... Test title: PATCH NSInstances - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.2.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.2.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not modified by the operation + ... Post-Conditions: none PATCH NSInstances Check HTTP Response Status Code Is 405 @@ -140,10 +142,10 @@ DELETE NSInstances - Method not implemented ... Test title: DELETE NSInstances - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.2.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.2.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not deleted by the operation + ... Post-Conditions: none DELETE NSInstances Check HTTP Response Status Code Is 405 @@ -152,23 +154,36 @@ GET information about multiple NS instances as Paged Response ... Test title: GET information about multiple NS instances as Paged Response ... Test objective: The objective is to test the retrieval of all the available NS Instances as a Paged Response. ... Pre-conditions: An existing Ns instance. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none. ... Post-Conditions: none. GET NsInstances Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contains Location GET information about multiple NS instances - Bad Request Response too Big [Documentation] Test ID: 5.3.2.1.13 ... Test title: GET information about multiple NS instances - Bad Request Response too Big ... Test objective: The objective is to test the retrieval of all the available NS Instances fails because reponse is too big, and perform a JSON schema and content validation of the collected instance data structure - ... Pre-conditions: A Ns instance is instantiated, a bad attribute selector (attribute selectors are listed in Table 6.4.2.3.2-1 - ETSI GS NFV-SOL 005 [3] v2.6.1). - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: A Ns instance is instantiated, a bad attribute selector (attribute selectors are listed in Table 6.4.2.3.2-1 - ETSI GS NFV-SOL 005 [3] v2.7.1). + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none. ... Post-Conditions: none. GET NsInstances Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file + Check HTTP Response Body Json Schema Is ProblemDetails + +GET NSInstances with "fields" and "exclude_default" attribute selector + [Documentation] Test ID: 5.3.2.1.14 + ... Test title: GET NSInstances with "fields" and "exclude_default" attribute selector + ... Test objective: The objective is to retrieve the list of active NSInstances with attribute selector list and exclude_default + ... Pre-conditions: none + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NSInstances with fields and exclude_default attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is NsInstances \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOccurences.robot b/SOL005/NSLifecycleManagement-API/NSLCMOccurences.robot index 7256db753ca26dd9a597184a7fc04f9b116865e3..2ba76b8f0260fa7cb460788fd10f55609232052b 100644 --- a/SOL005/NSLifecycleManagement-API/NSLCMOccurences.robot +++ b/SOL005/NSLifecycleManagement-API/NSLCMOccurences.robot @@ -12,7 +12,7 @@ POST NS LCM occurrences - Method not implemented ... Test title: POST NS LCM occurrences - Method not implemented ... Test objective: The objective is to test that POST method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -24,7 +24,7 @@ GET status information about multiple NS LCM occurrences ... Test title: GET status information about multiple NS LCM occurrences ... Test objective: The objective is to test that GET method returns a list of LCM occurrences of the NS ... Pre-conditions: At least one LCM occurrences available in the NFVO - ... Reference: Clause 6.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -37,7 +37,7 @@ GET status information about multiple NS LCM occurrences Bad Request Invalid att ... Test title: GET status information about multiple NS LCM occurrences Bad Request Invalid attribute-based filtering parameters ... Test objective: The objective is to test that GET method fail because of wrong query parameter ... Pre-conditions: At least one LCM occurrences available in the NFVO, Invalid filter parameter - ... Reference: Clause 6.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -50,7 +50,7 @@ GET status information about multiple NS LCM occurrences Bad Request Invalid att ... Test title: GET status information about multiple NS LCM occurrences Bad Request Invalid attribute selector ... Test objective: The objective is to test that GET method fail because of wrong attributes selector ... Pre-conditions: At least one LCM occurrences available in the NFVO, Invalid attribute selector - ... Reference: Clause 6.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -63,7 +63,7 @@ GET status information about multiple NS LCM occurrences with "all_fields" ... Test title: GET status information about multiple NS LCM occurrences with "all_fields" ... Test objective: The objective is to test that GET method returns a list of LCM occurrences of the NS ... Pre-conditions: At least one LCM occurrences available in the NFVO - ... Reference: Clause 6.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -76,7 +76,7 @@ GET status information about multiple NS LCM occurrences with "exclude_default" ... Test title: GET status information about multiple NS LCM occurrences with "exclude_default" ... Test objective: The objective is to test that GET method returns a list of LCM occurrences of the NS ... Pre-conditions: At least one LCM occurrences available in the NFVO - ... Reference: Clause 6.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -89,7 +89,7 @@ GET status information about multiple NS LCM occurrences with "fields" ... Test title: GET status information about multiple NS LCM occurrences with "fields" ... Test objective: The objective is to test that GET method returns a list of LCM occurrences of the NS ... Pre-conditions: At least one LCM occurrences available in the NFVO - ... Reference: Clause 6.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -102,7 +102,7 @@ GET status information about multiple NS LCM occurrences with "exclude_fields" ... Test title: GET status information about multiple NS LCM occurrences with "exclude_fields" ... Test objective: The objective is to test that GET method returns a list of LCM occurrences of the NS ... Pre-conditions: At least one LCM occurrences available in the NFVO - ... Reference: Clause 6.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -115,7 +115,7 @@ PUT status information about multiple NS LCM occurrences - Method not implemente ... Test title: PUT status information about multiple NS LCM occurrences - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.9.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.9.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -127,7 +127,7 @@ PATCH status information about multiple NS LCM occurrences - Method not implemen ... Test title: PATCH status information about multiple NS LCM occurrences - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.9.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.9.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -139,7 +139,7 @@ DELETE status information about multiple NS LCM occurrences - Method not impleme ... Test title: DELETE status information about multiple NS LCM occurrences - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.9.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.9.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -151,23 +151,36 @@ GET status information about multiple NS LCM occurrences as Paged Response ... Test title: GET status information about multiple NS LCM occurrences as Paged Reponse ... Test objective: The objective is to test that GET method returns a list of LCM occurrences of the NS as paged response. ... Pre-conditions: At least one LCM occurrences available in the NFVO - ... Reference: Clause 6.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET NS LCM OP Occurrences Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contains Location GET status information about multiple NS LCM occurrences - Bad Request Response too Big [Documentation] Test ID: 5.3.2.8.13 ... Test title: GET status information about multiple NS LCM occurrences - Bad Request Response too Big ... Test objective: The objective is to test that GET method fail because response is too big, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one LCM occurrences available in the NFVO, Invalid filter parameter - ... Reference: Clause 6.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET NS LCM OP Occurrences Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file + Check HTTP Response Body Json Schema Is ProblemDetails + +GET status information about multiple NS LCM occurrences with "fields" and "exclude_default" + [Documentation] Test ID: 5.3.2.8.14 + ... Test title: GET status information about multiple NS LCM occurrences with "fields" and "exclude_default" + ... Test objective: The objective is to test that GET method returns a list of LCM occurrences of the NS + ... Pre-conditions: At least one LCM occurrences available in the NFVO + ... Reference: Clause 6.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get NS LCM OP Occurrences with fields and exclude_default attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is NsLcmOpOccs \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot index a11b0047ca9246ff98ed24e72cd80bfc0d1f37b4..1e4f02baf3e1ec4485ad450379c0026ac5d1e584 100644 --- a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot +++ b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot @@ -7,6 +7,11 @@ Library JSONSchemaLibrary schemas/ Library OperatingSystem Library MockServerLibrary Library Collections +Library String +#Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml +#Variables descriptors/SOL006/NSD/nsd_SOL006.yaml +#Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml +#Variables descriptors/SOL001/NSD/nsd_SOL001.yaml *** Keywords *** Initialize System @@ -15,8 +20,7 @@ Initialize System Create Mock Session ${callback_uri}:${callback_port} Check Operation Occurrence Id - ${occid}= Get Value From Json ${response['headers']['Location']} ${response} - Set Global Variable @{nsLcmOpOccId} ${occid} + Set Global Variable @{nsLcmOpOccId} ${response['headers']['Location']} Should Not Be Empty ${nsLcmOpOccId} Create Sessions @@ -27,51 +31,51 @@ Create Sessions Check subscription existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 200 Check Instance Deleted Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId} Integer response status 404 Check Fail not supported - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} # how to check if Fail is not supported? Also In Sol002 Check Cancel not supported - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} # how to check if Cancel is not supported? Also In Sol002 Check Continue not supported - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} # how to check if Continue is not supported? Also In Sol002 Check retry not supported - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} # how to check if retry is not supported? Also In Sol002 Check Rollback not supported - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} # how to check if rollback is not supported? Also In Sol002 Check resource FAILED_TEMP - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} String response body operationState FAILED_TEMP Check resource not [Arguments] ${status} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} Should Not Be Equal As Strings response body operationState ${status} Check Operation Notification Status is @@ -83,7 +87,9 @@ Check Operation Notification ${json}= Get File schemas/${element}.schema.json Configure Notification Forward ${element} ${callback_endpoint} ${callback_endpoint_fwd} Configure Notification Status Handler ${callback_endpoint_fwd} ${status} - Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + ${BODY}= evaluate json.dumps(${json}) json + &{notification_request}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON" body=${BODY} + Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} Clear Requests ${callback_endpoint_fwd} @@ -97,75 +103,97 @@ Configure Notification Forward Configure Notification Status Handler [Arguments] ${endpoint} ${status}="" - Run Keyword If ${status}!="" set to dictionary ${json["notificationStatus"]} dp=${status} + ${json}= evaluate {"notificationStatus": {}} + Run Keyword If '${status}' != "" set to dictionary ${json["notificationStatus"]} dp=${status} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle ${endpoint} - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check resource operationState is [Arguments] ${state} String ${response['body']['operationState']} ${state} - -Check resource instantiated + +Check resource Instantiated + Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Probe resource Instantiated + +Probe resource Instantiated Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${response['headers']['Location']} + ${opocc}= Output response + Should Be Equal as Strings ${opocc['status']} 200 + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${opocc['body']['nsInstanceId']} String response body nsState INSTANTIATED - + Check resource not_instantiated Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${response['body']['id']} + String response body nsState NOT_INSTANTIATED + +Check NS resource not_instantiated + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${response['headers']['Location']} + ${opocc}= Output response + Should Be Equal as Strings ${opocc['status']} 200 + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${opocc['body']['nsInstanceId']} String response body nsState NOT_INSTANTIATED Check operation resource state is FAILED_TEMP Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${response['headers']['Location']} + ${opocc}= Output response + Should Be Equal as Strings ${opocc['status']} 200 + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${opocc['body']['nsInstanceId']} String response body instantiationState FAILED_TEMP Check operation resource state is not FAILED_TEMP Check operation resource state is FAILED_TEMP Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${response['headers']['Location']} + ${opocc}= Output response + Should Be Equal as Strings ${opocc['status']} 200 + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${opocc['body']['nsInstanceId']} String response body instantiationState not FAILED_TEMP Check resource is finally failed Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${response['headers']['Location']} + ${opocc}= Output response + Should Be Equal as Strings ${opocc['status']} 200 + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${opocc['body']['nsInstanceId']} String response body instantiationState FINALLY_FAILED Launch another LCM operation Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleNsToLevelRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/scale_to_level ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/scaleNsToLevelRequest.json + ${body}= Format String ${template} instantiationLevelId=${instantiationLevelId} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/scale_to_level ${body} Integer response status 202 Check resource existence Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId} Integer response status 200 -Check Postcondition NS Instance is not created - Set Headers {"Accept":"${ACCEPT}"} - Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} - Integer response status 404 - Check HTTP Response Status Code Is [Arguments] ${expected_status} Log Validate Status code @@ -175,20 +203,14 @@ Check HTTP Response Status Code Is Check Postcondition NS Instance is deleted Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${disabledNsdId} Integer response status 404 -Check Postcondition NS Instance is not modified - GET IndividualNSInstance - ${resp_dict}= evaluate json.loads('''${response['body']}''') json - ${body}= Get File jsons/CreateNsRequest.json - Dictionaries Should Be Equal ${resp_dict} ${body} values=True - Check HTTP Response Header Contains [Arguments] ${HEADER_TOCHECK} Should Contain ${response['headers']} ${HEADER_TOCHECK} - Log Header is present + Log Header is present Check HTTP Response Body Json Schema Is [Arguments] ${input} @@ -199,10 +221,17 @@ Check HTTP Response Body Json Schema Is Check Postcondition NS Instance is not deleted Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId} Integer response status 200 - + +Check Postcondition NS Conflict Instance is not deleted + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${ConflictNsInstanceId} + Integer response status 200 + Check HTTP Response Header ContentType is [Arguments] ${expected_contentType} Log Validate content type @@ -210,21 +239,181 @@ Check HTTP Response Header ContentType is Log Content Type validated POST New nsInstance - Log Create NS instance by POST to ${apiRoot}/${apiName}/${apiVersion}/ns_instances + Log Create NS instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/CreateNsRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File + ${template}= Get File jsons/CreateNsRequest.json + ${body}= Format String ${template} nsdId=${NS_DescriptorID} nsInstanceName=${nsInstanceName} vimAccountId=${vimAccountId} nsInstanceDescription=${nsInstanceDescription} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} +Check HTTP Response Body NsInstance content against VNF Descriptor + #${check_descriptors} flag, 1 to check descriptors + Run Keyword If ${check_descriptors} == 1 Check Individual NsInstance Content + +Check Individual NsInstance Content + PARSE the Descriptor File + Match the Response Attributes with Descriptors + +PARSE the Descriptor File + Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file + +Fetch Information from SOL001 descriptor file + Import Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml + @{VDU_labels}= Create List + @{VNF_labels}= Create List + @{VirtualLink_labels}= Create List + @{CP_labels}= Create List + @{Storage_labels}= Create List + FOR ${key} IN @{topology_template.node_templates.keys()} + ${key_type}= Get Variable Value ${topology_template.node_templates.${key}.type} + ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VDU_compute} + ${VNF_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VNF} + ${Link_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_virtual_link} + ${VDUcp_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_VDU_cp} + ${Storage_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_storage} + Run Keyword If ${VDU_check} Append To List ${VDU_labels} ${key} + Run Keyword If ${VNF_check} Append To List ${VNF_labels} ${key} + Run Keyword If ${VNF_check} Get VNF Attributes from SOL001 ${key} + Run Keyword If ${Link_check} Append To List ${VirtualLink_labels} ${key} + Run Keyword If ${VDUcp_check} Append To List ${CP_labels} ${key} + Run Keyword If ${Storage_check} Append To List ${Storage_labels} ${key} + END + Set Global Variable @{VDU_IDs} @{VDU_labels} + Set Global Variable @{VNF_IDs} @{VNF_labels} + Set Global Variable @{VirtualLink_IDs} @{VirtualLink_labels} + Set Global Variable @{CP_IDs} @{CP_labels} + Set Global Variable @{Storage_IDs} @{Storage_labels} + +Get VNF Attributes from SOL001 + [Arguments] ${VNF_label} + Import Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml + ${descriptor_id}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.descriptor_id} + ${provider}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.provider} + ${product_name}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.product_name} + ${software_version}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.software_version} + ${descriptor_version}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.descriptor_version} + ${flavour_id}= Get Variable Value ${topology_template.node_templates.${VNF_label}.properties.flavour_id} + + Set Global Variable ${Descriptor_ID} ${descriptor_id} + Set Global Variable ${Provider} ${provider} + Set Global Variable ${Product_Name} ${product_name} + Set Global Variable ${Software_Version} ${software_version} + Set Global Variable ${Descriptor_Version} ${descriptor_version} + Set Global Variable ${Flavour_ID} ${flavour_id} + +Fetch Information from SOL006 descriptor file + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id} + ${provider}= Get Variable Value ${nfv.vnfd[0].provider} + ${product_name}= Get Variable Value ${nfv.vnfd[0]['product-name']} + ${software_version}= Get Variable Value ${nfv.vnfd[0]['software-version']} + ${descriptor_version}= Get Variable Value ${nfv.vnfd[0].version} + ${VDUcount}= Get Length ${nfv.vnfd[0].vdu} + ${extCP_count}= Get Length ${nfv.vnfd[0]['ext-cpd']} + ${virtualLink_count}= Get length ${nfv.vnfd[0]['int-virtual-link-desc']} + ${instantiation_levels}= Get Length ${nfv.vnfd[0].df['instantiation-level']} + FOR ${key} IN @{nfv.vnfd[0].keys()} + ${VDU_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} vdu + Run Keyword If ${VDU_check} Get VDU IDs ${VDUcount} + ${extCP_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} ext-cpd + Run Keyword If ${extCP_check} Get External CP IDs ${extCP_count} + ${virtualLink_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} int-virtual-link-desc + Run Keyword If ${virtualLink_check} Get Virtual Link IDs ${virtualLink_count} + ${DF_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} df + Run Keyword If ${DF_check} Get Instantiation Levels ${instantiation_levels} + END + Set Global Variable ${Descriptor_ID} ${descriptor_id} + Set Global Variable ${Provider} ${provider} + Set Global Variable ${Product_Name} ${product_name} + Set Global Variable ${Software_Version} ${software_version} + Set Global Variable ${Descriptor_Version} ${descriptor_version} + +Get VDU IDs + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{VDU_labels}= Create List + ${Storage_labels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${VDU_labels} ${nfv.vnfd[0].vdu[${i}]['id']} + Append To List ${Storage_labels} ${nfv.vnfd[0].vdu[${i}]['virtual-storage-desc']} + Get Internal CPs for each VDU ${i} + END + Set Global Variable ${VDU_IDs} ${VDU_labels} + Set Global Variable ${Storage_IDs} ${Storage_labels} + +Get Internal CPs for each VDU + [Arguments] ${vdu} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${count}= Get Length ${nfv.vnfd[0].vdu[${vdu}]['int-cpd']} + ${internal_CPs}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${internal_CPs} ${nfv.vnfd[0].vdu[${vdu}]['int-cpd'][${i}]['id']} + END + Set Global Variable ${internalCP_IDs} ${internal_CPs} + +Get External CP IDs + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{external_CPs}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${external_CPs} ${nfv.vnfd[0]['ext-cpd'][${i}]['id']} + END + Set Global Variable ${externalCP_IDs} ${external_CPs} + +Get Virtual Link IDs + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{VirtualLink_labels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${VirtualLink_labels} ${nfv.vnfd[0]['int-virtual-link-desc'][${i}]['id']} + END + Set Global Variable ${VirtualLink_IDs} ${VirtualLink_labels} + +Get Instantiation Levels + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + @{Instantiation_Levels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${Instantiation_Levels} ${nfv.vnfd[0].df['instantiation-level'][${i}]['id']} + END + Set Global Variable ${InstantiationLevel_IDs} ${Instantiation_Levels} + +Match the Response Attributes with Descriptors + #Checking Response attributes with VNF Descriptors + Should Be Equal As Strings ${response['body']['vnfInstance'][0]['vnfdId']} ${Descriptor_ID} + Should Be Equal As Strings ${response['body']['vnfInstance'][0]['vnfProvider']} ${Provider} + Should Be Equal As Strings ${response['body']['vnfInstance'][0]['vnfProductName']} ${Product_Name} + Should Be Equal As Strings ${response['body']['vnfInstance'][0]['vnfSoftwareVersion']} ${Software_Version} + Should Be Equal As Strings ${response['body']['vnfInstance'][0]['vnfdVersion']} ${Descriptor_Version} + Should Be Equal As Strings ${response['body']['vnfInstance'][0]['instantiatedVnfInfo']['flavourId']} ${Flavour_ID} + List Should Contain Value ${VDU_IDs} ${response['body']['vnfInstance'][0]['instantiatedVnfInfo']['vnfcResourceInfo']['vduId']} + Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${externalCP_IDs} ${response['body']['vnfInstance'][0]['instantiatedVnfInfo']['extCpInfo'][0]['cpdId']} + Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${internalCP_IDs} ${response['body']['vnfInstance'][0]['instantiatedVnfInfo']['extCpInfo'][0]['cpdId']} + Run Keyword If '${descriptorType}'=='SOL001' List Should Contain Value ${CP_IDs} ${response['body']['vnfInstance'][0]['instantiatedVnfInfo']['extCpInfo'][0]['cpdId']} + List Should Contain value ${Storage_IDs} ${response['body']['vnfInstance'][0]['instantiatedVnfInfo']['virtualStorageResourceInfo'][0]['virtualStorageDescId']} + List Should Contain Value ${VirtualLink_IDs} ${response['body']['vnfInstance'][0]['instantiatedVnfInfo']['extManagedVirtualLinkInfo'][0]['vnfVirtualLinkDescId']} + +POST New nsInstance with DISABLED nsd + Log Create NS instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/CreateNsRequest.json + ${body}= Format String ${template} nsdId=${disabledNsdId} nsInstanceName=${nsInstanceName} vimAccountId=${vimAccountId} nsInstanceDescription=${nsInstanceDescription} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + GET NsInstances Log Query NS The GET method queries information about multiple NS instances. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -233,8 +422,8 @@ GET NsInstance Invalid Attribute-Based filtering parameter Log Query NS The GET method queries information about multiple NS instances. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances?attribute_not_exist=some_value + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances?attribute_not_exist=some_value ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -242,37 +431,44 @@ GET NsInstance Invalid Attribute Selector Log Query NS The GET method queries information about multiple NS instances. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances?fields=wrong_field + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances?fields=wrong_field ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get NSInstances with all_fields attribute selector Log Get the list of NSInstances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_instances?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get NSInstances with exclude_default attribute selector Log Get the list of NSInstances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_instances?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get NSInstances with fields attribute selector Log Get the list of NSInstances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_instances?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances?fields=${fields} + ${output}= Output response + Set Suite Variable ${response} ${output} +Get NSInstances with fields and exclude_default attribute selector + Log Get the list of NSInstances, using fields + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances?fields=${fields}&exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get NSInstances with exclude_fields attribute selector Log Get the list of NSInstances, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_instances?exclude_fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -280,8 +476,8 @@ PUT NSInstances log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/ns_instances + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -289,8 +485,8 @@ PATCH NSInstances log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/ns_instances + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -298,8 +494,8 @@ DELETE NSInstances log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/ns_instances + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -307,8 +503,8 @@ POST IndividualNSInstance Log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nonExistentNsId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -316,8 +512,8 @@ GET IndividualNSInstance Log Trying to get information about an individual NS instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId} ${Etag}= Output response headers ETag ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -327,8 +523,8 @@ PUT IndividualNSInstance Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -336,31 +532,31 @@ PATCH IndividualNSInstance Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE IndividualNSInstance log Trying to delete an individual VNF instance - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} 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} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${ConflictNsInstanceId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Instantiate NSInstance log Trying to delete an instantiate NS instance. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/instantiate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -368,8 +564,8 @@ DELETE Instantiate NSInstance log Trying to patch an instantiate NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/instantiate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -377,8 +573,8 @@ PUT Instantiate NSInstance log Trying to put an instantiate NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/instantiate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -386,8 +582,8 @@ GET Instantiate NSInstance log Trying to get an instantiate NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/instantiate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/instantiate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -395,16 +591,18 @@ GET Instantiate NSInstance Log Trying to Instantiate a ns Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/InstantiateNsRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/instantiate ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File + ${template}= Get File jsons/InstantiateNs.json + ${body}= Format String ${template} nsFlavourId=${nsFlavourId} vimAccountId=${vimAccountId} nsdId=${nsdId} sapdId=${SAP_IDs[0]} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/instantiate ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Scale NSInstance log Trying to delete an Scale NS instance. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/scale + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/scale ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -412,8 +610,8 @@ DELETE Scale NSInstance log Trying to patch an Scale NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/scale + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/scale ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -421,8 +619,8 @@ PUT Scale NSInstance log Trying to put an Scale NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/scale + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/scale ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -430,8 +628,8 @@ GET Scale NSInstance log Trying to get an Scale NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/scale + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/scale ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -439,16 +637,18 @@ POST scale nsInstance Log Trying to Instantiate a scale NS Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/ScaleNsRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/scale ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File + ${template}= Get File jsons/ScaleNs.json + ${body}= Format String ${template} scaleType=${scaleType} scaleTimeout=${scaleTimeout} scaleVnfType=${scaleVnfType} scaleGroupDescriptor=${scaleGroupDescriptor} scaleMemberVnfIndex=${scaleMemberVnfIndex} vnfInstantiationLevelId=${InstantiationLevel_IDs[0]} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/scale ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Update NSInstance log Trying to delete an Update NS instance. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/update + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/update ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -456,8 +656,8 @@ DELETE Update NSInstance log Trying to patch an Update NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/update + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/update ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -465,8 +665,8 @@ PUT Update NSInstance log Trying to put an Update NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/update + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/update ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -474,8 +674,8 @@ GET Update NSInstance log Trying to get an Update NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/update + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/update ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -483,16 +683,19 @@ POST Update NSInstance Log Trying to Instantiate a Update NS Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/UpdateNsRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/update ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File + Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File + ${template} = Get File jsons/UpdateNsRequest.json + ${body}= Format String ${template} vnfdId=${descriptor_id} vnfFlavourId=${Flavour_ID} newFlavourId=${Flavour_ID} vnfVirtualLinkDescId=${VirtualLink_IDs[0]} instantiationLevelId=${InstantiationLevel_IDs[1]} vnfInstantiationLevelId=${InstantiationLevel_IDs[0]} newNsdId=${NS_DescriptorID} sapdId=${SAP_IDs[0]} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/update ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} - + DELETE Heal NSInstance log Trying to Delete an Heal NS instance. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/heal + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -500,8 +703,8 @@ DELETE Heal NSInstance log Trying to patch an Heal NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/heal + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -509,8 +712,8 @@ PUT Heal NSInstance log Trying to put an Heal NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/heal + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -518,8 +721,8 @@ GET Heal NSInstance log Trying to get an Heal NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/heal + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/heal ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -527,16 +730,17 @@ POST Heal NSInstance Log Trying to Instantiate a Heal NS Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/HealNsRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/heal ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/HealNsRequest.json + ${body}= Format String ${template} nsDegreeHealing=${nsDegreeHealing} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/heal ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Terminate NSInstance log Trying to Delete an Terminate NS instance. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/terminate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -544,8 +748,8 @@ PATCH Terminate NSInstance log Trying to patch an Terminate NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/terminate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -553,8 +757,8 @@ PUT Terminate NSInstance log Trying to put an Terminate NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/terminate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -562,8 +766,8 @@ GET Terminate NSInstance log Trying to Get an Terminate NS instance. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/terminate + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/terminate ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -571,315 +775,322 @@ POST Terminate NSInstance Log Trying to Instantiate a Terminate NS Instance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${body}= Get File jsons/TerminateNsRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/terminate ${body} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_instances/${nsInstanceId}/terminate ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST NS LCM OP Occurrences log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT NS LCM OP Occurrences log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH NS LCM OP Occurrences log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE NS LCM OP Occurrences log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET NS LCM OP Occurrences Log Query status information about multiple NS lifecycle management operation occurrences. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET NS LCM OP Occurrences Invalid attribute-based filtering parameters Log Query status information about multiple NS lifecycle management operation occurrences. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs?${NEG_FILTER} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs?${NEG_FILTER} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET NS LCM OP Occurrences Invalid attribute selector Log Query status information about multiple NS lifecycle management operation occurrences. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs?${NEG_SELECTOR} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs?${NEG_SELECTOR} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get NS LCM OP Occurrences with all_fields attribute selector Log Query status information about multiple NS lifecycle management operation occurrences, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get NS LCM OP Occurrences with exclude_default attribute selector Log Query status information about multiple NS lifecycle management operation occurrences using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get NS LCM OP Occurrences with fields attribute selector Log Query status information about multiple NS lifecycle management operation occurrences, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs?fields=${fields} + ${output}= Output response + Set Suite Variable ${response} ${output} +Get NS LCM OP Occurrences with fields and exclude_default attribute selector + Log Query status information about multiple NS lifecycle management operation occurrences, using fields + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs?fields=${fields}&exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get NS LCM OP Occurrences with exclude_fields attribute selector Log Query status information about multiple NS lifecycle management operation occurrences, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs?exclude_fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} POST Individual NS LCM OP Occurrence log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Individual NS LCM OP Occurrence log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Individual NS LCM OP Occurrence log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Individual NS LCM OP Occurrence log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Individual NS LCM OP Occurrence Log Query status information about individual NS lifecycle management operation occurrence. Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Retry operation task log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/retry + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Retry operation task log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/retry + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Retry operation task log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/retry + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Retry operation task log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/retry + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST Retry operation task Log Retry a NS lifecycle operation if that operation has experienced a temporary failure - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Post ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/retry + Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/retry ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Rollback operation task log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/rollback + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Rollback operation task log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/rollback + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Rollback operation task log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/rollback + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Rollback operation task log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/rollback + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST Rollback operation task Log Rollback a NS lifecycle operation task - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Post ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/rollback + Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/rollback ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Continue operation task log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/continue + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/continue ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Continue operation task log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/continue + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/continue ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Continue operation task log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/continue + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/continue ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Continue operation task log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/continue + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/continue ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST Continue operation task Log Continue a NS lifecycle operation task - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Post ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/continue + Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/continue ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Fail operation task log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/fail + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Fail operation task log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/fail + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Fail operation task log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/fail + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Fail operation task log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/fail + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST Fail operation task Log Fail a NS lifecycle operation task - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Post ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/fail + Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/fail ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Cancel operation task log Trying to perform a GET. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/cancel + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Cancel operation task log Trying to perform a PUT. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/cancel + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH Cancel operation task Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/cancel + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Cancel operation task Log Trying to perform a DELETE. This method should not be implemented - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/cancel + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST Cancel operation task Log Cancel a NS lifecycle operation task - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Post ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/cancel + Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/cancel ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -887,8 +1098,8 @@ PUT subscriptions Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -896,8 +1107,8 @@ PATCH subscriptions Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -905,96 +1116,119 @@ DELETE subscriptions Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} POST subscriptions - Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/LccnSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File + ${template}= Get File jsons/LccnSubscriptionRequest.json + ${body}= Format String ${template} callbackUri=${callback_uri} callbackEndpoint=${callback_endpoint} callbackPort=${callback_port} nsdId=${NS_DescriptorID} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} - + Clear Requests ${callback_endpoint} + POST subscriptions DUPLICATION 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 Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/LccnSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File + ${template}= Get File jsons/LccnSubscriptionRequest.json + ${body}= Format String ${template} callbackUri=${callback_uri} callbackEndpoint=${callback_endpoint} callbackPort=${callback_port} nsdId=${NS_DescriptorID} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + Clear Requests ${callback_endpoint} POST subscriptions NO DUPLICATION Log Trying to create a subscription with an already created content Pass Execution If ${NFVO_DUPLICATION} == 1 NFVO is permitting duplication. Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/LccnSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File + ${template}= Get File jsons/LccnSubscriptionRequest.json + ${body}= Format String ${template} callbackUri=${callback_uri} callbackEndpoint=${callback_endpoint} callbackPort=${callback_port} nsdId=${NS_DescriptorID} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} - + Clear Requests ${callback_endpoint} GET Subscriptions Log Get the list of active subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get subscriptions with all_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?all_fields + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?all_fields ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_default attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} Get subscriptions with exclude_fields attribute selector Log Get the list of active subscriptions, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?exclude_fields=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} GET subscriptions with filter Log Get the list of active subscriptions using a filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} Get subscriptions - invalid filter Log Get the list of active subscriptions using an invalid filter Set Headers {"Accept": "${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${sub_filter_invalid} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter_invalid} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1002,8 +1236,8 @@ POST Individual Subscription log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1011,8 +1245,8 @@ PUT Individual Subscription log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1020,24 +1254,24 @@ PATCH Individual Subscription log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Individual subscription log Trying to get information about an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE Individual subscription log Try to delete an individual subscription Set Headers {"Accept":"${ACCEPT}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -1103,6 +1337,120 @@ PUT notification Log Cleaning the endpoint Clear Requests ${callback_endpoint} -Check LINK in Header +Check HTTP Response Header Contains Location ${linkURL}= Get Value From Json ${response['headers']} $..Link Should Not Be Empty ${linkURL} + +PARSE the NS Descriptor File + Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 NS descriptor file ELSE Fetch Information from SOL006 NS descriptor file + +Fetch Information from SOL001 NS descriptor file + Import Variables ${CURDIR}/descriptors/SOL001/NSD/nsd_SOL001.yaml + @{NsVirtualLink_labels}= Create List + @{NsCP_labels}= Create List + FOR ${key} IN @{topology_template.node_templates.keys()} + ${key_type}= Get Variable Value ${topology_template.node_templates.${key}.type} + ${NS_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_NS} + ${NSLink_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_NsVirtualLink} + ${NsCP_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_NsCP} + Run Keyword If ${NS_check} Get NS Attributes from SOL001 ${key} + Run Keyword If ${NSLink_check} Append To List ${Ns_VirtualLink_labels} ${key} + Run Keyword If ${NsCP_check} Append To List ${NsCp_labels} ${key} + END + Set Global Variable @{NS_VirtualLink_IDs} @{NsVirtualLink_labels} + Set Global Variable @{NsCP_IDs} @{NsCP_labels} + +Get NS Attributes from SOL001 + [Arguments] ${NS_label} + Import Variables ${CURDIR}/descriptors/SOL001/NSD/nsd_SOL001.yaml + ${ns_descriptor_id}= Get Variable Value ${topology_template.node_templates.${NS_label}.properties.descriptorId} + ${designer}= Get Variable Value ${topology_template.node_templates.${NS_label}.properties.designer} + ${version}= Get Variable Value ${topology_template.node_templates.${NS_label}.properties.version} + ${name}= Get Variable Value ${topology_template.node_templates.${NS_label}.properties.name} + ${invariantId}= Get Variable Value ${topology_template.node_templates.${NS_label}.properties.invariantId} + + Set Global Variable ${NS_DescriptorID} ${ns_descriptor_id} + Set Global Variable ${Designer} ${designer} + Set Global Variable ${NS_Version} ${version} + Set Global Variable ${NS_Name} ${name} + Set Global Variable ${NS_InvariantID} ${invariantId} + +Fetch Information from SOL006 NS descriptor file + Import Variables ${CURDIR}/descriptors/SOL006/NSD/nsd_SOL006.yaml + ${nsd_id}= Get Variable Value ${nfv.nsd[0].id} + ${VNFcount}= Get Length ${nfv.vnfd} + ${SAPcount}= Get Length ${nfv.nsd[0].sapd} + ${NSvirtualLinkCount}= Get Length ${nfv.nsd[0]['virtual-link-desc']} + FOR ${key} IN @{nfv.keys()} + ${VNFD_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} vnfd + ${NSD_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} nsd + Run Keyword If ${VNFD_check} Fetch Information from SOL006 descriptor file + Run Keyword If ${NSD_check} Get SAP IDs ${SAPcount} + Run Keyword If ${NSD_check} Get NS Virtual Link IDs ${NSvirtualLinkCount} + + END + Set Global Variable ${NS_DescriptorID} ${nsd_id} + +Get SAP IDs + [Arguments] ${count} + Import Variables ${CURDIR}/descriptors/SOL006/NSD/nsd_SOL006.yaml + @{SAPlabels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${SAPlabels} ${nfv.nsd[0].sapd[${i}]['id']} + END + Set Global Variable ${SAP_IDs} ${SAPlabels} + +Get NS Virtual Link IDs + Import Variables ${CURDIR}/descriptors/SOL006/NSD/nsd_SOL006.yaml + [Arguments] ${count} + @{NsVirtualLink_labels}= Create List + FOR ${i} IN RANGE ${count} + Append To List ${NsVirtualLink_labels} ${nfv.nsd[0]['virtual-link-desc'][${i}]['id']} + END + Set Global Variable ${NS_VirtualLink_IDs} ${NsVirtualLink_labels} + +Check HTTP Response Body NsInstance content against NS Descriptor + #${check_descriptors} flag, 1 to check descriptors + Run Keyword If ${check_descriptors} == 1 Check Individual NsInstance Content for NSD + +Check Individual NsInstance Content for NSD + PARSE the NS Descriptor File + Match the Response Attributes with NS Descriptors + +Match the Response Attributes with NS Descriptors + Should Be Equal As Strings ${response['body']['nsdId']} ${NSDescriptor_ID} + List Should Contain Value ${NS_VirtualLink_IDs} ${response['body']['virtualLinkInfo'][0]['nsVirtualLinkDescId']} + Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${SAP_IDs} ${response['body']['sapInfo'][0]['sapdId']} + +Check NsLcmOpOcc content against NS Descriptor + PARSE the NS Descriptor File + Match the NsLcmOpOcc Response Attributes with NS Descriptors + +Match the NsLcmOpOcc Response Attributes with NS Descriptors + Should Be Equal As Strings ${response['body']['affectedNss'][0]['nsdId']} ${NSDescriptor_ID} + Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${SAP_IDs} ${response['body']['affectedSaps'][0]['sapdId']} + +Check Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + +Check Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification NS Creation Deletion Handler ${callback_endpoint_fwd} ${type} + Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Configure Notification NS Creation Deletion Handler + [Arguments] ${endpoint} ${type} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + diff --git a/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot b/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot index 628bbdf57b3a0af9dea8a04bb1dd1ad3541b44c5..09fc94e3e97d9a65d0f5de4f9b5f37228884adc6 100644 --- a/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot +++ b/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot @@ -1,190 +1,97 @@ *** Settings *** -Suite Setup Create Sessions -Suite Teardown Terminate All Processes kill=true -Resource environment/variables.txt -Library MockServerLibrary -Library Process +Library String +Resource environment/variables.txt +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library OperatingSystem -Library Collections +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Resource NSLCMOperationKeywords.robot + +Suite Setup Check resource existence and get CallbackUri *** Test Cases *** -NS LCM Operation Occurrence Start Notification - [Documentation] Test ID: 5.3.2.17.1 - ... Test title: NS LCM Operation Occurrence Start Notification - ... Test objective: The objective is to test the dispatch of NS LCM Operation Occurrence Start Notification when a new NS LCM operation is started in the NFVO, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. +Ns Lcm Operation Occurrence Notification + [Documentation] Test ID: 5.3.2.26.1 + ... Test title: Ns Lcm Operation Occurrence Notification + ... Test objective: The objective is to test that Ns Lcm Operation Occurrence Notification is delivered with success to the notification consumer. ... Pre-conditions: A subscription for NS LCM Operation Occurrence notifications is available in the NFVO. - ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO + ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none - Trigger a NS LCM operation (external action) - Check NS LCM Operation Occurrence Start Notification Http POST Request Body Json Schema Is NsLcmOperationOccurrenceNotification - Check NS LCM Operation Occurrence Start Notification Http POST Request Body notificationType attribute Is NsLcmOperationOccurrenceNotification - Check NS LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is START + Post Ns Lcm Operation Occurrence Notification + Check HTTP Response Status Code Is 204 -NS LCM Operation Occurrence Result Notification - [Documentation] Test ID: 5.3.2.17.2 - ... Test title: NS LCM Operation Occurrence Result Notification - ... Test objective: The objective is to test the dispatch of NS LCM Operation Occurrence Result Notification when a NS LCM operation is completed in the NFVO, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. - ... Pre-conditions: An NS LCM operation is in progress, and a subscription for NS LCM Operation Occurrence notifications is available in the NFVO. - ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO +Ns Identifier Creation Notification + [Documentation] Test ID: 5.3.2.26.2 + ... Test title: Ns Identifier Creation Notification + ... Test objective: The objective is to test that Ns Identifier Creation Notification is delivered with success to the notification consumer. + ... Pre-conditions: A subscription for Ns Identifier Creation notification is available in the NFVO. + ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none - Trigger the completion of an NS LCM operation (external action) - Check NS LCM Operation Occurrence Result Notification Http POST Request Body Json Schema Is NsLcmOperationOccurrenceNotification - Check NS LCM Operation Occurrence Result Notification Http POST Request Body notificationType attribute Is NsLcmOperationOccurrenceNotification - Check NS LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is RESULT + Post Ns Identifier Creation Notification + Check HTTP Response Status Code Is 204 -NS Identifier Creation Notification - [Documentation] Test ID: 5.3.2.17.3 - ... Test title: NS Identifier Creation Notification - ... Test objective: The objective is to test the dispatch of NS Identifier Creation Notification when a new NS instance resource is created in the NFVO, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. - ... Pre-conditions: A subscription for NS identifier creation notifications is available in the NFVO. - ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO +Ns Identifier Deletion Notification + [Documentation] Test ID: 5.3.2.26.3 + ... Test title: Ns Identifier Deletion Notification + ... Test objective: The objective is to test that Ns Identifier Deletion Notification is delivered with success to the notification consumer. + ... Pre-conditions: A subscription for Ns Identifier Deletion notification is available in the NFVO. + ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none - Trigger the creation of a NS instance resource (external action) - Check NS Identifier Creation Notification Http POST Request Body Json Schema Is NsIdentifierDeletionNotification - Check NS Identifier Creation Notification Http POST Request Body notificationType attribute Is NsIdentifierDeletionNotification - -NS Identifier Deletion Notification - [Documentation] Test ID: 5.3.2.17.4 - ... Test title: NS Identifier Deletion Notification - ... Test objective: The objective is to test the dispatch of NS Identifier Deletion Notification when a NS instance resource is deleted in the NFVO, and perform a JSON schema and content validation of the delivered notification.The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. - ... Pre-conditions: A NS instance resource is created, and a subscription for NS identifier creation notifications is available in the NFVO. - ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Trigger the deletion of a NS instance resource (external action) - Check NS Identifier Deletion Notification Http POST Request Body Json Schema Is NsIdentifierCreationNotification - Check NS Identifier Deletion Notification Http POST Request Body notificationType attribute Is NsIdentifierCreationNotification + Post Ns Identifier Deletion Notification + Check HTTP Response Status Code Is 204 *** Keywords *** -Trigger a NS LCM operation (external action) - #do nothing - Log do nothing - -Trigger the completion of an NS LCM operation (external action) - #do nothing - Log do nothing - -Trigger the creation of a NS instance resource (external action) - #do nothing - Log do nothing - -Trigger the deletion of a NS instance resource (external action) - #do nothing - Log do nothing - -Check NS LCM Operation Occurrence Start Notification Http POST Request Body Json Schema Is - [Arguments] ${element} - ${schema}= Get File schemas/${element}.schema.json - Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} - -Check NS LCM Operation Occurrence Start Notification Http POST Request Body notificationType attribute Is - [Arguments] ${type} - Configure Notification NS LCM Operation Occurrence Start Handler ${callback_endpoint_fwd} ${type} START - Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} - Clear Requests ${callback_endpoint} - Clear Requests ${callback_endpoint_fwd} - -Configure Notification NS LCM Operation Occurrence Start Handler - [Arguments] ${endpoint} ${type} ${status} - ${json}= evaluate {} - set to dictionary ${json} notificationType ${type} changeType ${status} - ${BODY}= evaluate json.dumps(${json}) json - Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${notification_request} ${notification_response} - -Check NS LCM Operation Occurrence Result Notification Http POST Request Body Json Schema Is - [Arguments] ${element} - ${schema}= Get File schemas/${element}.schema.json - Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body subscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri -Check NS LCM Operation Occurrence Result Notification Http POST Request Body notificationType attribute Is - [Arguments] ${type} - Configure Notification NS LCM Operation Occurrence Result Handler ${callback_endpoint_fwd} ${type} RESULT - Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} - Clear Requests ${callback_endpoint} - Clear Requests ${callback_endpoint_fwd} +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated -Configure Notification NS LCM Operation Occurrence Result Handler - [Arguments] ${endpoint} ${type} ${status} - ${json}= evaluate {} - set to dictionary ${json} notificationType ${type} changeType ${status} - ${BODY}= evaluate json.dumps(${json}) json - Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${notification_request} ${notification_response} - -Check NS Identifier Creation Notification Http POST Request Body Json Schema Is - [Arguments] ${element} - ${schema}= Get File schemas/${element}.schema.json - Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} - -Check NS Identifier Creation Notification Http POST Request Body notificationType attribute Is - [Arguments] ${type} - Configure Notification NS Identifier Creation Handler ${callback_endpoint_fwd} ${type} - Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} - Clear Requests ${callback_endpoint} - Clear Requests ${callback_endpoint_fwd} - -Configure Notification NS Identifier Creation Handler - [Arguments] ${endpoint} ${type} - ${json}= evaluate {} - set to dictionary ${json} notificationType ${type} - ${BODY}= evaluate json.dumps(${json}) json - Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${notification_request} ${notification_response} - -Check NS Identifier Deletion Notification Http POST Request Body Json Schema Is - [Arguments] ${element} - ${schema}= Get File schemas/${element}.schema.json - Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} - -Check NS Identifier Deletion Notification Http POST Request Body notificationType attribute Is - [Arguments] ${type} - Configure Notification NS Identifier Deletion Handler ${callback_endpoint_fwd} ${type} - Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} - Clear Requests ${callback_endpoint} - Clear Requests ${callback_endpoint_fwd} - -Configure Notification NS Identifier Deletion Handler - [Arguments] ${endpoint} ${type} - ${json}= evaluate {} - set to dictionary ${json} notificationType ${type} - ${BODY}= evaluate json.dumps(${json}) json - Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 - Create Mock Expectation ${notification_request} ${notification_response} - -Check NS LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is - [Arguments] ${type} - #do nothing - Log do nothing - -Check NS LCM Operation Occurrence Result Notification Http POST Request Body notificationStatus attribute Is - [Arguments] ${type} - #do nothing - Log do nothing - -Configure Notification Forward - [Arguments] ${schema} ${endpoint} ${endpoint_fwd} - Log Creating mock Http POST forward to handle ${schema} - &{notification_tmp}= Create Mock Request Matcher POST ${endpoint} body_type="JSON_SCHEMA" body=${schema} - &{notification_fwd}= Create Mock Http Forward ${endpoint_fwd} - Create Mock Expectation With Http Forward ${notification_tmp} ${notification_fwd} - -Create Sessions - Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance - Wait For Process handle=mockInstance timeout=5s on_timeout=continue - Create Mock Session ${callback_uri}:${callback_port} \ No newline at end of file +Post Ns Lcm Operation Occurrence Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File + Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File + ${template} = Get File jsons/NsLcmOperationOccurrenceNotification.json + ${body}= Format String ${template} nsInstanceId=${nsInstanceId} nsLcmOpOccId=${nsLcmOpOccId} subscriptionId=${subscriptionId} vnfdId=${Descriptor_ID} nsdId=${NS_DescriptorID} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Ns Identifier Creation Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/NsIdentifierCreationNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} nsInstanceId=${nsInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post Ns Identifier Deletion Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/NsIdentifierDeletionNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} nsInstanceId=${nsInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} diff --git a/SOL005/NSLifecycleManagement-API/Notifications.robot b/SOL005/NSLifecycleManagement-API/Notifications.robot new file mode 100644 index 0000000000000000000000000000000000000000..fee4daecd4081e6d90644dc9e329eee1ac0c9ef0 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/Notifications.robot @@ -0,0 +1,198 @@ +*** Settings *** +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true +Resource environment/variables.txt +Library MockServerLibrary +Library Process +Library OperatingSystem +Library Collections + +*** Test Cases *** +NS LCM Operation Occurrence Start Notification + [Documentation] Test ID: 5.3.2.17.1 + ... Test title: NS LCM Operation Occurrence Start Notification + ... Test objective: The objective is to test the dispatch of NS LCM Operation Occurrence Start Notification when a new NS LCM operation is started in the NFVO, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A subscription for NS LCM Operation Occurrence notifications is available in the NFVO. + ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Trigger a NS LCM operation (external action) + Check NS LCM Operation Occurrence Start Notification Http POST Request Body Json Schema Is NsLcmOperationOccurrenceNotification + Check NS LCM Operation Occurrence Start Notification Http POST Request Body notificationType attribute Is NsLcmOperationOccurrenceNotification + Check NS LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is START + +NS LCM Operation Occurrence Result Notification + [Documentation] Test ID: 5.3.2.17.2 + ... Test title: NS LCM Operation Occurrence Result Notification + ... Test objective: The objective is to test the dispatch of NS LCM Operation Occurrence Result Notification when a NS LCM operation is completed in the NFVO, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: An NS LCM operation is in progress, and a subscription for NS LCM Operation Occurrence notifications is available in the NFVO. + ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Trigger the completion of an NS LCM operation (external action) + Check NS LCM Operation Occurrence Result Notification Http POST Request Body Json Schema Is NsLcmOperationOccurrenceNotification + Check NS LCM Operation Occurrence Result Notification Http POST Request Body notificationType attribute Is NsLcmOperationOccurrenceNotification + Check NS LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is RESULT + +NS Identifier Creation Notification + [Documentation] Test ID: 5.3.2.17.3 + ... Test title: NS Identifier Creation Notification + ... Test objective: The objective is to test the dispatch of NS Identifier Creation Notification when a new NS instance resource is created in the NFVO, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A subscription for NS identifier creation notifications is available in the NFVO. + ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Trigger the creation of a NS instance resource (external action) + Check NS Identifier Creation Notification Http POST Request Body Json Schema Is NsIdentifierCreationNotification + Check NS Identifier Creation Notification Http POST Request Body notificationType attribute Is NsIdentifierCreationNotification + +NS Identifier Deletion Notification + [Documentation] Test ID: 5.3.2.17.4 + ... Test title: NS Identifier Deletion Notification + ... Test objective: The objective is to test the dispatch of NS Identifier Deletion Notification when a NS instance resource is deleted in the NFVO, and perform a JSON schema and content validation of the delivered notification.The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. + ... Pre-conditions: A NS instance resource is created, and a subscription for NS identifier creation notifications is available in the NFVO. + ... Reference: Clause 6.4.18.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Trigger the deletion of a NS instance resource (external action) + Check NS Identifier Deletion Notification Http POST Request Body Json Schema Is NsIdentifierDeletionNotification + Check NS Identifier Deletion Notification Http POST Request Body notificationType attribute Is NsIdentifierDeletionNotification + +*** Keywords *** +Trigger a NS LCM operation (external action) + #do nothing + Log do nothing + +Trigger the completion of an NS LCM operation (external action) + #do nothing + Log do nothing + +Trigger the creation of a NS instance resource (external action) + #do nothing + Log do nothing + +Trigger the deletion of a NS instance resource (external action) + #do nothing + Log do nothing + +Check NS LCM Operation Occurrence Start Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + +Check NS LCM Operation Occurrence Start Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification NS LCM Operation Occurrence Start Handler ${callback_endpoint_fwd} ${type} START + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Configure Notification NS LCM Operation Occurrence Start Handler + [Arguments] ${endpoint} ${type} ${status} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} changeType ${status} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Check NS LCM Operation Occurrence Result Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + +Check NS LCM Operation Occurrence Result Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification NS LCM Operation Occurrence Result Handler ${callback_endpoint_fwd} ${type} RESULT + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Configure Notification NS LCM Operation Occurrence Result Handler + [Arguments] ${endpoint} ${type} ${status} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} changeType ${status} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Check NS Identifier Creation Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + +Check NS Identifier Creation Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification NS Identifier Creation Handler ${callback_endpoint_fwd} ${type} + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Configure Notification NS Identifier Creation Handler + [Arguments] ${endpoint} ${type} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Check NS Identifier Deletion Notification Http POST Request Body Json Schema Is + [Arguments] ${element} + ${schema}= Get File schemas/${element}.schema.json + Configure Notification Forward ${schema} ${callback_endpoint} ${callback_endpoint_fwd} + +Check NS Identifier Deletion Notification Http POST Request Body notificationType attribute Is + [Arguments] ${type} + Configure Notification NS Identifier Deletion Handler ${callback_endpoint_fwd} ${type} + Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Configure Notification NS Identifier Deletion Handler + [Arguments] ${endpoint} ${type} + ${json}= evaluate {} + set to dictionary ${json} notificationType ${type} + ${BODY}= evaluate json.dumps(${json}) json + Log Creating mock request and response to handle status notification + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 + Create Mock Expectation ${notification_request} ${notification_response} + +Check NS LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is + [Arguments] ${type} + #do nothing + Log do nothing + +Check NS LCM Operation Occurrence Result Notification Http POST Request Body notificationStatus attribute Is + [Arguments] ${type} + #do nothing + Log do nothing + +Configure Notification Forward + [Arguments] ${schema} ${endpoint} ${endpoint_fwd} + Log Creating mock Http POST forward to handle ${schema} + &{notification_tmp}= Create Mock Request Matcher POST ${endpoint} body_type="JSON_SCHEMA" body=${schema} + &{notification_fwd}= Create Mock Http Forward ${endpoint_fwd} + Create Mock Expectation With Http Forward ${notification_tmp} ${notification_fwd} + +Create Sessions + Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance + Wait For Process handle=mockInstance timeout=5s on_timeout=continue + Create Mock Session ${callback_uri}:${callback_port} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/RetryOperationTask.robot b/SOL005/NSLifecycleManagement-API/RetryOperationTask.robot index c25513fbcea1a868bbd95a0cc65437a6776821b5..df82b33f3958a870e7a17a307931a4f4f3cdd9e7 100644 --- a/SOL005/NSLifecycleManagement-API/RetryOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/RetryOperationTask.robot @@ -13,7 +13,7 @@ Post Retry operation task ... Test title: Post Retry operation task ... Test objective: The objective is to test that POST method trigger a retry of NS lifecycle operation in case of temporary failure ... Pre-conditions: NS instance status equal to FAILED_TEMP - ... Reference: Clause 6.4.11.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.11.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: NS instance status not equal to FAILED_TEMP @@ -27,7 +27,7 @@ Post Retry operation task Not Found ... Test title: Post Retry operation task Not Found ... Test objective: The objective is to test that POST method fail in case of NS lifecycle operation not found ... Pre-conditions: none - ... Reference: Clause 6.4.11.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.11.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -40,7 +40,7 @@ Post Retry operation task Conflict ... Test title: Post Retry operation task Conflict ... Test objective: The objective is to test that POST method fail in case of NS lifecycle operation status conflict (i.e. NS instance status not equal to FAILED_TEMP) ... Pre-conditions: NS instance status not equal to FAILED_TEMP - ... Reference: Clause 6.4.11.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.11.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -53,7 +53,7 @@ GET Retry operation task - Method not implemented ... Test title: GET Retry operation task - Method not implemented ... Test objective: The objective is to test that GET method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.11.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.11.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -65,7 +65,7 @@ PUT Retry operation task - Method not implemented ... Test title: PUT Retry operation task - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.11.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.11.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -77,7 +77,7 @@ PATCH Retry operation task - Method not implemented ... Test title: PATCH Retry operation task - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.11.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.11.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -89,7 +89,7 @@ DELETE Retry operation task - Method not implemented ... Test title: DELETE Retry operation task - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.11.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.11.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none diff --git a/SOL005/NSLifecycleManagement-API/RollbackOperationTask.robot b/SOL005/NSLifecycleManagement-API/RollbackOperationTask.robot index 3b09699e0d551b3fff1a3f8d9b7ca575cb748ae2..9fbbcfeb2740146e66ad3abaa0d81508c5d3c437 100644 --- a/SOL005/NSLifecycleManagement-API/RollbackOperationTask.robot +++ b/SOL005/NSLifecycleManagement-API/RollbackOperationTask.robot @@ -13,7 +13,7 @@ POST Rollback operation task ... Test title: POST Rollback operation task ... Test objective: The objective is to test that POST method triggers a rollback on the NS LCM operation ... Pre-conditions: NS instance status equal to FAILED_TEMP - ... Reference: Clause 6.4.12.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.12.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: NS instance status not equal to FAILED_TEMP @@ -26,7 +26,7 @@ POST Rollback operation task Not Found ... Test title: POST Rollback operation task Not Found ... Test objective: The objective is to test that POST method fails if NS LCM operation is not found ... Pre-conditions: none - ... Reference: Clause 6.4.12.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.12.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -39,7 +39,7 @@ POST Rollback operation task Conflict ... Test title: POST Rollback operation task Conflict ... Test objective: The objective is to test that POST method fail in case of NS LCM operation status conflict (i.e. NS instance status not equal to FAILED_TEMP) ... Pre-conditions: NS instance status not equal to FAILED_TEMP - ... Reference: Clause 6.4.12.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.12.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -52,7 +52,7 @@ GET Rollback operation task - Method not implemented ... Test title: GET Rollback operation task - Method not implemented ... Test objective: The objective is to test that GET method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.12.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.12.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -64,7 +64,7 @@ PUT Rollback operation task - Method not implemented ... Test title: PUT Rollback operation task - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.12.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.12.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -76,7 +76,7 @@ PATCH Rollback operation task - Method not implemented ... Test title: PATCH Rollback operation task - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.12.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.12.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -88,7 +88,7 @@ DELETE Rollback operation task - Method not implemented ... Test title: DELETE Rollback operation task - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.12.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.12.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none diff --git a/SOL005/NSLifecycleManagement-API/ScaleNSTask.robot b/SOL005/NSLifecycleManagement-API/ScaleNSTask.robot index 034f7af8e2d3013e6a6663c09944c60c33ed85f0..03d2459e47eb0857f9912be0791573dbfb062879 100644 --- a/SOL005/NSLifecycleManagement-API/ScaleNSTask.robot +++ b/SOL005/NSLifecycleManagement-API/ScaleNSTask.robot @@ -12,22 +12,22 @@ POST Scale a nsInstance [Documentation] Test ID: 5.3.2.4.1 ... Test title: POST Scale a nsInstance ... Test objective: The objective is to test that POST method scales NS instance - ... Pre-conditions: the resource is in NOT_INSTANTIATED state - ... Reference: Clause 6.4.5.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: NS instance is INSTANTIATED state + ... Reference: Clause 6.4.5.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none + ... Post-Conditions: NS instance is INSTANTIATED state and NS has been scaled POST scale nsInstance Check HTTP Response Status Code Is 202 Check HTTP Response Header Contains Location Check resource existence -POST Instantiate a nsInstance Conflict +POST Scale a nsInstance - Conflict (Not Instantited) [Documentation] Test ID: 5.3.2.4.2 - ... Test title: POST Instantiate a nsInstance Conflict - ... Test objective: The objective is to test that POST method cannot scale NS instance because of conflict in resource status (i.e. because the resource is in not in NOT_INSTANTIATED state) - ... Pre-conditions: the resource is in not in NOT_INSTANTIATED state - ... Reference: Clause 6.4.5.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Test title: POST Scale a nsInstance - Conflict (Not Instantited) + ... Test objective: The objective is to test that POST method cannot scale NS instance because of conflict in resource status (i.e. because the resource is in NOT_INSTANTIATED state) + ... Pre-conditions: NS instance is in NOT_INSTANTIATED state. + ... Reference: Clause 6.4.5.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The Scale NS operation is not triggered on the NFVO @@ -40,7 +40,7 @@ GET Scale NSInstance- Method not implemented ... Test title: GET Scale NSInstance- Method not implemented ... Test objective: The objective is to test that GET method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -52,7 +52,7 @@ PUT Scale NSInstance - Method not implemented ... Test title: PUT Scale NSInstance - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.5.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.5.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -64,7 +64,7 @@ PATCH Scale NSInstance - Method not implemented ... Test title: PATCH Scale NSInstance - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -76,7 +76,7 @@ DELETE Scale NSInstance - Method not implemented ... Test title: DELETE Scale NSInstance - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.5.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.5.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none diff --git a/SOL005/NSLifecycleManagement-API/ScaleNSTaskWorkflow.robot b/SOL005/NSLifecycleManagement-API/ScaleNSTaskWorkflow.robot index bdcf5e86a26979d6d83b69371ece4b5b9e8d485d..49ea4c5fe615c49f873f29c09b5801a4ddf35cc0 100644 --- a/SOL005/NSLifecycleManagement-API/ScaleNSTaskWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/ScaleNSTaskWorkflow.robot @@ -5,6 +5,7 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=fal Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Library Process Suite Setup Initialize System Suite Teardown Terminate All Processes kill=true @@ -13,15 +14,14 @@ Scale Flow of NS lifecycle management operations [Documentation] Test ID: 5.3.2.22.1 ... Test title: Instantiate Flow of NS lifecycle management operations ... Test objective: The objective is to test the workflow for Instantiate a NS instance - ... Pre-conditions: the resource is in NOT_INSTANTIATED state - ... Reference: Clause 6.4.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: The resource is in INSTANTIATED state + ... Reference: Clause 6.4.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: the resource is in INSTANTIATED state - Check resource existence - Check resource instantiated + ... Post-Conditions: The resource is in INSTANTIATED state POST scale nsInstance Check HTTP Response Status Code Is 202 + Check HTTP Response Header Contains Location Check Operation Occurrence Id Check Operation Notification Status is START Check Operation Notification Status is RESULT diff --git a/SOL005/NSLifecycleManagement-API/Subscriptions.robot b/SOL005/NSLifecycleManagement-API/Subscriptions.robot index 5b4916c93703e7e225df6e05ba4fccfc025747d8..bce367fd3ec983d30f6e1d72b45eef2c37402e0e 100644 --- a/SOL005/NSLifecycleManagement-API/Subscriptions.robot +++ b/SOL005/NSLifecycleManagement-API/Subscriptions.robot @@ -5,6 +5,9 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=fal Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Library Process +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true *** Test Cases *** POST Create a new subscription @@ -12,7 +15,7 @@ POST Create a new subscription ... Test title: POST Create a new subscription ... Test objective: The objective is to test that POST method create a subscription ... Pre-conditions: none - ... Reference: Clause 6.4.16.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.16.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: subscription is created in the NFVO @@ -21,13 +24,12 @@ POST Create a new subscription Check HTTP Response Header Contains Location Check HTTP Response Body Json Schema Is subscription - POST Create a new Subscription - DUPLICATION [Documentation] Test ID: 5.3.2.15.2 ... Test title: POST Create a new subscription - DUPLICATION ... Test objective: The objective is to test that POST method create a duplicate subscription ... Pre-conditions: a subscription shall already exist - ... Reference: Clause 6.4.16.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.16.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: duplication supported by NFVO ... Post-Conditions: duplicate subscription is created in the NFVO @@ -41,7 +43,7 @@ POST Create a new Subscription - NO-DUPLICATION ... Test title: POST Create a new subscription - NO-DUPLICATION ... Test objective: The objective is to test that POST method cannot create a duplicate subscription ... Pre-conditions: a subscription shall already exist - ... Reference: Clause 6.4.16.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.16.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: duplication NOT supported by NFVO ... Post-Conditions: duplicate subscription is not created in the NFVO @@ -54,7 +56,7 @@ GET Subscriptions ... Test title: GET Subscriptions ... Test objective: The objective is to test that GET method retrieve the list of existing subscriptions ... Pre-conditions: none - ... Reference: Clause 6.4.16.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.16.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -67,7 +69,7 @@ GET Subscription - Filter ... Test title: GET Subscription - Filter ... Test objective: The objective is Get the list of active subscriptions using a filter ... Pre-conditions: none - ... Reference: Clause 6.4.16.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.16.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -80,7 +82,7 @@ GET subscriptions - Bad Request Invalid attribute-based filtering parameters ... Test title: GET subscriptions - Bad Request Invalid attribute-based filtering parameters ... Test objective: The objective is Get the list of active subscriptions using an invalid filter ... Pre-conditions: none - ... Reference: Clause 6.4.16.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.16.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -93,7 +95,7 @@ GET subscriptions with "all_fields" attribute selector ... Test title: GET subscriptions with "all_fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector ... Pre-conditions: - ... Reference: Clause 6.4.16.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.16.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: ... Post-Conditions: @@ -106,7 +108,7 @@ GET subscriptions with "exclude_default" attribute selector ... Test title: GET subscriptions with "exclude_default" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector ... Pre-conditions: - ... Reference: Clause 6.4.16.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.16.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: ... Post-Conditions: @@ -119,7 +121,7 @@ GET subscriptions with "fields" attribute selector ... Test title: GET subscriptions with "fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector ... Pre-conditions: - ... Reference: Clause 6.4.16.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.16.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: ... Post-Conditions: @@ -132,7 +134,7 @@ GET subscriptions with "exclude_fields" attribute selector ... Test title: GET subscriptions with "exclude_fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector ... Pre-conditions: - ... Reference: Clause 6.4.16.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.16.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: ... Post-Conditions: @@ -145,7 +147,7 @@ PUT subscriptions - Method not implemented ... Test title: PUT subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method cannot modify a NS lifecycle management subscription ... Pre-conditions: none - ... Reference: Clause 6.4.16.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.16.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -157,7 +159,7 @@ PATCH subscriptions - Method not implemented ... Test title: PATCH subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method cannot modify a NS lifecycle management subscription ... Pre-conditions: none - ... Reference: Clause 6.4.16.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.16.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -169,10 +171,10 @@ DELETE subscriptions - Method not implemented ... Test title: DELETE subscriptions - Method not implemented ... Test objective: The objective is to test that DELETE method cannot modify a NS lifecycle management subscription ... Pre-conditions: none - ... Reference: Clause 6.4.16.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.16.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: Subscription is not deleted + ... Post-Conditions: none DELETE subscriptions Check HTTP Response Status Code Is 405 @@ -181,23 +183,35 @@ GET Subscriptions as Paged Response ... Test title: GET Subscriptions as Paged Response ... Test objective: The objective is to test that GET method retrieve the list of existing subscriptions as paged response. ... Pre-conditions: none - ... Reference: Clause 6.4.16.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.16.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET Subscriptions Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contains Location GET subscriptions - Bad Request Response too Big [Documentation] Test ID: 5.3.2.15.15 ... Test title: GET subscriptions - Bad Request Response too Big ... Test objective: The objective is test that the retrieval of active subscriptions list fails because response is too big, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: none - ... Reference: Clause 6.4.16.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.16.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none - GET Subscriptions + GET Subscriptions Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file + Check HTTP Response Body Json Schema Is ProblemDetails + +POST Create a new subscription - Unprocessable Entity + [Documentation] Test ID: 5.3.2.15.16 + ... Test title: POST Create a new subscription - Unprocessable Entity + ... Test objective: The objective is to test the creation of a new lifecycle management subscription fials when content type of the payload body is supported and the payload body of a request contains syntactically correct data but the data cannot be processed + ... Pre-conditions: none + ... Reference: Clause 6.4.16.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + POST subscriptions + Check HTTP Response Status Code Is 422 \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/TerminateNSTask.robot b/SOL005/NSLifecycleManagement-API/TerminateNSTask.robot index 9e9870149c4e7ad783e24e75edb5665f09a6ca23..3f7c9bb0b5e77b508e5d903973a136a5b1b5e47d 100644 --- a/SOL005/NSLifecycleManagement-API/TerminateNSTask.robot +++ b/SOL005/NSLifecycleManagement-API/TerminateNSTask.robot @@ -12,7 +12,7 @@ POST Terminate a NSInstance ... Test title: POST Terminate a NSInstance ... Test objective: The objective is to test that POST method terminate the NS ... Pre-conditions: NS instance in INSTANTIATED state - ... Reference: Clause 6.4.8.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.8.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: NS instance has NOT_INSTANTIATED state @@ -21,12 +21,12 @@ POST Terminate a NSInstance Check HTTP Response Header Contains Location Check resource not_instantiated -POST Terminate a NSInstance Conflict +POST Terminate a NSInstance - Conflict (Not Instantited) [Documentation] Test ID: 5.3.2.7.2 - ... Test title: POST Terminate a NSInstance Conflict + ... Test title: POST Terminate a NSInstance - Conflict (Not Instantited) ... Test objective: The objective is to test that POST method cannot terminate the NS because of conflict in resource status (i.e. the resource is not in INSTANTIATED state) ... Pre-conditions: NS instance is in NOT_INSTANTIATED state - ... Reference: Clause 6.4.8.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.8.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: NS instance is in NOT_INSTANTIATED state @@ -40,7 +40,7 @@ GET Terminate NSInstance- Method not implemented ... Test title: GET Terminate NSInstance- Method not implemented ... Test objective: The objective is to test that GET method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -52,10 +52,10 @@ PUT Terminate NSInstance - Method not implemented ... Test title: PUT Terminate NSInstance - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.8.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.8.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: resource state not modified + ... Post-Conditions: none PUT Terminate NSInstance Check HTTP Response Status Code Is 405 @@ -64,23 +64,21 @@ PATCH Terminate NSInstance - Method not implemented ... Test title: PATCH Terminate NSInstance - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.8.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.8.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: resource state not modified + ... Post-Conditions: none PATCH Terminate NSInstance Check HTTP Response Status Code Is 405 DELETE Terminate NSInstance - Method not implemented - [Documentation] Test ID: 5.3.2.7.5 + [Documentation] Test ID: 5.3.2.7.6 ... Test title: DELETE Terminate NSInstance - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.8.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.8.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: resource state not modified + ... Post-Conditions: none DELETE Terminate NSInstance - Check HTTP Response Status Code Is 405 - - \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/TerminateNSTaskWorkflow.robot b/SOL005/NSLifecycleManagement-API/TerminateNSTaskWorkflow.robot index fe25b1042876f5a15f2951f4a666fe8d755570fd..1ff34c64ca1864859acbc072630157a3e548876a 100644 --- a/SOL005/NSLifecycleManagement-API/TerminateNSTaskWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/TerminateNSTaskWorkflow.robot @@ -5,6 +5,7 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=fal Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Library Process Suite Setup Initialize System Suite Teardown Terminate All Processes kill=true @@ -14,18 +15,18 @@ Terminate Flow of NS lifecycle management operations ... Test title: Terminate Flow of NS lifecycle management operations ... Test objective: The objective is to test the workflow for Terminate a NS instance ... Pre-conditions: the resource is in INSTANTIATED state - ... Reference: Clause 6.4.8 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.8 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: the resource is in NOT_INSTANTIATED state - Check resource existence - Check resource instantiated + ... Post-Conditions: The NS resource is in NOT_INSTANTIATED state POST Terminate NSInstance Check HTTP Response Status Code Is 202 + Check HTTP Response Header Contains Location Check Operation Occurrence Id Check Operation Notification Status is START Check Operation Notification Status is RESULT - Check resource not_instantiated + Check NS resource not_instantiated + diff --git a/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot b/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot index b0f3f3569c01a774cc59bb0f1ed6301de20ace7d..eafae6ae153e680dfb4a6931d6fddccaece06cc5 100644 --- a/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot +++ b/SOL005/NSLifecycleManagement-API/UpdateNSTask.robot @@ -12,21 +12,21 @@ POST Update a NSInstance [Documentation] Test ID: 5.3.2.5.1 ... Test title: POST Update a NSInstance ... Test objective: The objective is to test that POST method update a NS instance - ... Pre-conditions: an existing NS Instance - ... Reference: Clause 6.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: An NS instance is in INSTANTIATED state + ... Reference: Clause 6.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is updated on the NFVO + ... Post-Conditions: The NS instance is still INSTANTIATED and updated on the NFVO POST Update NSInstance Check HTTP Response Status Code Is 202 Check HTTP Response Header Contains Location -POST Update a NSInstance Conflict +POST Update a NSInstance - Conflict (Not Instantited) [Documentation] Test ID: 5.3.2.5.2 - ... Test title: POST Update a NSInstance Conflict - ... Test objective: The objective is to test that POST method fail if a NS Instance is not existing or is not in NOT_INSTANTIATED state - ... Pre-conditions: an existing NS Instance - ... Reference: Clause 6.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Test title: POST Update a NSInstance - Conflict (Not Instantited) + ... Test objective: The objective is to test that POST method fail if a NS Instance is not existing or is in NOT_INSTANTIATED state + ... Pre-conditions: An NS instance is in INSTANTIATED state + ... Reference: Clause 6.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The NS instance is not updated on the NFVO @@ -39,7 +39,7 @@ GET Update NSInstance- Method not implemented ... Test title: GET Update NSInstance- Method not implemented ... Test objective: The objective is to test that GET method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -51,10 +51,10 @@ PUT Update NSInstance - Method not implemented ... Test title: PUT Update NSInstance - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.6.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.6.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not updated on the NFVO + ... Post-Conditions: none PUT Update NSInstance Check HTTP Response Status Code Is 405 @@ -63,10 +63,10 @@ PATCH Update NSInstance - Method not implemented ... Test title: PATCH Update NSInstance - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not updated on the NFVO + ... Post-Conditions: none PATCH Update NSInstance Check HTTP Response Status Code Is 405 @@ -75,11 +75,9 @@ DELETE Update NSInstance - Method not implemented ... Test title: DELETE Update NSInstance - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 6.4.6.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.6.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS instance is not deleted on the NFVO + ... Post-Conditions: none DELETE Update NSInstance - Check HTTP Response Status Code Is 405 - - \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/UpdateNSTaskWorkflow.robot b/SOL005/NSLifecycleManagement-API/UpdateNSTaskWorkflow.robot index 053c7b382dc85459547e28fb85d72cbd2d335052..61b7aa8ae54a57a75758d9e1d3639e6b6b1e553a 100644 --- a/SOL005/NSLifecycleManagement-API/UpdateNSTaskWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/UpdateNSTaskWorkflow.robot @@ -5,6 +5,7 @@ Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=fal Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Library Process Suite Setup Initialize System Suite Teardown Terminate All Processes kill=true @@ -13,15 +14,14 @@ Update Flow of NS lifecycle management operations [Documentation] Test ID: 5.3.2.24.1 ... Test title: Update Flow of NS lifecycle management operations ... Test objective: The objective is to test the workflow for Update a NS instance - ... Pre-conditions: the resource is in INSTANTIATED state - ... Reference: Clause 6.4.6 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: The resource is in INSTANTIATED state + ... Reference: Clause 6.4.6 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: the resource is in INSTANTIATED state - Check resource existence - Check resource instantiated + ... Post-Conditions: The resource is in INSTANTIATED state POST Update NSInstance Check HTTP Response Status Code Is 202 + Check HTTP Response Header Contains Location Check Operation Occurrence Id Check Operation Notification Status is START Check Operation Notification Status is RESULT diff --git a/SOL005/NSLifecycleManagement-API/descriptors/SOL001/NSD/nsd_SOL001.yaml b/SOL005/NSLifecycleManagement-API/descriptors/SOL001/NSD/nsd_SOL001.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ee6a14946a2b390db8afae5e87ed9125f864a491 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/descriptors/SOL001/NSD/nsd_SOL001.yaml @@ -0,0 +1,85 @@ +tosca_definitions_version: "tosca_simple_yaml_1_2" +tosca_default_namespace: "toscanfv" +description: "Referenxce NSD descriptor " + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v2.7.1/etsi_nfv_sol001_nsd_types.yaml + +metadata: + descriptor_id: "NSD_WITH_1_VNF" + vendor: "ETSI" + version: "1.0" +topology_template: + substitution_mappings: + node_type: "tosca.nodes.nfv.NS" + requirements: + right: [VNF_A, ext_b_right] + left: [VNF_B, ext_b_left] + mgmt_b: [VNF_B, management_vnf_b] + node_templates: + VNF_B: + type: "tosca.nodes.nfv.VNF" + properties: + descriptorId: "VNF-B" + descriptorVersion: "1.0" + provider: "ETSI TST WG" + productName: "VNF-B" + softwareVersion: "1.0" + productInfoName: "VNF-B" + productInfoDescription: "TST010 reference VNF-A" + defaultLocalizationLanguage: null + flavourId: "VNF-B_flavor" + flavourDescription: "VNF-B flavor" + vnfm_info: + - 'etsivnfm:v2.3.1' + requirements: + virtualLink: + ext_b_right: "vl_right" + ext_b_left: "vl_left" + management_vnf_b: "vl_mgmt" + NS_with_1_VNF: + type: "tosca.nodes.nfv.NS" + properties: + descriptorId: "NS with 1 VNF" + designer: "ETSI TST WG" + version: "1.0" + name: "ns_with_1_vnfs" + invariantId: "ns_with_1_vnfs" + requirements: + virtualLink: + - "vl_left" + - "vl_right" + - "vl_mgmt" + vl_left: + type: "tosca.nodes.nfv.NsVirtualLink" + properties: + description: "VNF-B external connetivity" + vlProfile: + max_bitrate_requirements: + root: 1000 + min_bitrate_requirements: + root: 1000 + connectivityType: + layer_protocols: [ipv4] + vl_right: + type: "tosca.nodes.nfv.NsVirtualLink" + properties: + description: "VNF-B external connectivity" + vlProfile: + max_bitrate_requirements: + root: 1000 + min_bitrate_requirements: + root: 1000 + connectivityType: + layer_protocols: [ipv4] + vl_mgmt: + type: "tosca.nodes.nfv.NsVirtualLink" + properties: + description: "Management network" + vlProfile: + max_bitrate_requirements: + root: 1000 + min_bitrate_requirements: + root: 1000 + connectivityType: + layer_protocols: [ipv4] \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL005/NSLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml new file mode 100644 index 0000000000000000000000000000000000000000..413d76def0e50c64c1890a8476fa7bdb22981ae3 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -0,0 +1,167 @@ +tosca_definitions_version: tosca_simple_yaml_1_2 +description: "TST010 reference VNF-B" + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v2.7.1/etsi_nfv_sol001_vnfd_types.yaml + +metadata: + descriptor_id: "VNF-B" + vendor: "ETSI TST WG" + version: "2.0" + +node_types: + tst010.vnf.simple: + derived_from: tosca.nodes.nfv.VNF + properties: + descriptor_id: + type: string + default: VNF-B + descriptor_version: + type: string + default: '1.0' + provider: + type: string + default: ETSI TST WG + product_name: + type: string + default: VNF-B + software_version: + type: string + default: '1.0' + product_info_name: + type: string + default: VNF-B + product_info_description: + type: string + default: TST010 reference VNF-B + flavour_id: + type: string + default: VNF-B_flavor + flavour_description: + type: string + default: "VNF-B flavor" + vnfm_info: + type: list + entry_schema: + type: string + default: [ 'etsivnfm:v2.3.1' ] + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + description: Invoked upon receipt of a Scale VNF request + terminate: + description: Invoked upon receipt Terminate VNF request + operate: + description: Invoked upon receipt of an Operate VNF request + requirements: + - virtual_link_right: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_left: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_management: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 0] + +topology_template: + substitution_mappings: + node_type: "tst010.vnf.simple" + requirements: + virtual_link_right: + [right, virtual_link_right] + virtual_link_management: + [management, virtual_link_management] + virtual_link_left: + [left, virtual_link_left] + node_templates: + right: + type: "tosca.nodes.nfv.VduCp" + properties: + layer_protocols: [ ipv4 ] + order: 1 + requirements: + - virtual_binding: VDU-B + vdu-b-1-vsd: + management: + type: "tosca.nodes.nfv.VduCp" + properties: + layer_protocols: [ ipv4 ] + order: 0 + requirements: + - virtual_binding: VDU-B + vdu-b-1-vsd: + left: + type: "tosca.nodes.nfv.VduCp" + properties: + layer_protocols: [ ipv4 ] + order: 2 + requirements: + - virtual_binding: VDU-B + vdu-b-1-vsd: + type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" + properties: + virtual_block_storage_data: + size_of_storage: 20 GB + rdma_enabled: false + sw_image_data: + name: "vdu-b-1 image" + version: "1.1" + checksum: + algorithm: "sha-224" + hash: "somehashfortst010" + container_format: "bare" + disk_format: qcow2 + min_disk: '1' + min_ram: '2' + size: '1' + VDU-B: + type: "tosca.nodes.nfv.Vdu.Compute" + properties: + name: "vdu-b-1-vcd" + description: "Description of VDU-B-1" + vdu_profile: + min_number_of_instances: 1 + max_number_of_instances: 2 + capabilities: + virtual_compute: + properties: + virtual_memory: + virtual_mem_size: 4096 MB + numa_enabled: false + virtual_cpu: + num_virtual_cpu: 2 + requirements: + - virtual_storage: vdu-b-1-vsd + + vnf-b-1_VNF: + type: "tst010.vnf.simple" + properties: + descriptor_id: "VNF-B" + descriptor_version: "2.0" + provider: "ETSI TST WG" + product_name: "VDU_VNF-B" + software_version: "2.0" + product_info_name: "VDU_VNF-B" + product_info_description: "TST010 reference VNF-A" + flavour_id: "VNF-B_flavor" + flavour_description: "VNF-B flavor" + vnfm_info: + - etsivnfm:v2.3.1 + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + implementation: scale-example.yaml + terminate: + implementation: terminate-example.yaml + operate: + implementation: operate-example.yaml \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/descriptors/SOL006/NSD/nsd_SOL006.yaml b/SOL005/NSLifecycleManagement-API/descriptors/SOL006/NSD/nsd_SOL006.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c0a6f9242bb18c5d7deddceecd352a38710bcb5d --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/descriptors/SOL006/NSD/nsd_SOL006.yaml @@ -0,0 +1,58 @@ +nfv: + nsd: + - id: tst010-nsd + vnfd-id: + - VNF-B + sapd: + - id: right-sap + vnf: + vnfd-id: VNF-B + ext-cpd-id: ext-b-right + - id: management-sap + virtual-link-desc: mgmt + - id: left-sap + vnf: + vnfd-id: VNF-B + ext-cpd-id: ext-b-left + virtual-link-desc: + - id: mgmt + connectivity-type: + layer-protocol: ipv4 + df: + id: normal + qos: + latency: '0' + packet-delay-variation: '0' + df: + - id: normal + vnf-profile: + - id: vnf-b-profile + vnfd-id: VNF-B + flavour-id: normal + instantiation-level: single + min-number-of-instances: '1' + max-number-of-instances: '1' + virtual-link-connectivity: + - virtual-link-profile-id: mgmt + constituent-cpd-id: + constituent-base-element-id: vdu-b-1 + constituent-cpd-id: management + virtual-link-profile: + - id: mgmt + virtual-link-desc-id: mgmt + flavour-id: normal + max-bitrate-requirements: + root: '1000' + min-bitrate-requirements: + root: '0' + ns-instantiation-level: + - id: normal + description: Single VNF-B + vnf-to-level-mapping: + - vnf-profile-id: vnf-b-profile + number-of-instances: '1' + - id: double-B + description: Double VNF-B + vnf-to-level-mapping: + - vnf-profile-id: vnf-b-profile + number-of-instances: '2' \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/descriptors/SOL006/VNFD/vnfd_SOL006.yaml b/SOL005/NSLifecycleManagement-API/descriptors/SOL006/VNFD/vnfd_SOL006.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e0b812b4f1a7f2675f55bc2492da7a582c38cf04 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/descriptors/SOL006/VNFD/vnfd_SOL006.yaml @@ -0,0 +1,138 @@ +nfv: + vnfd: + - id: VNF-B + provider: ETSI TST WG + product-name: TST010 reference VNF-B with 2 VDUs + software-version: '2.2' + version: '2.2' + vnfm-info: ETSI VNFM + vdu: + id: vdu-b-1 + name: VNF-B VDU 1 + int-cpd: + - id: left + layer-protocol: ethernet + - id: management + layer-protocol: ethernet + - id: internal + layer-protocol: ethernet + int-virtual-link-desc: internal-vl + virtual-compute-desc: vdu-b-1-vcd + virtual-storage-desc: vdu-b-1-vsd + sw-image-desc: vdu-b-1-image + vdu: + id: vdu-b-2 + name: VNF-B VDU 2 + int-cpd: + - id: right + layer-protocol: ethernet + - id: management + layer-protocol: ethernet + - id: internal + layer-protocol: ethernet + int-virtual-link-desc: internal-vl + virtual-compute-desc: vdu-b-2-vcd + virtual-storage-desc: vdu-b-2-vsd + sw-image-desc: vdu-b-2-image + virtual-compute-desc: + id: vdu-b-1-vcd + virtual-memory: + size: '4.0' + virtual-cpu: + num-virtual-cpu: '2' + virtual-storage-desc: + id: vdu-b-1-vsd + type-of-storage: root-storage + size-of-storage: '0' + sw-image-desc: + id: vdu-b-1-image + name: VNF-B image + version: '1.1' + checksum: + algorithm: sha-224 + hash: somehashfortst010 + container-format: bare + disk-format: qcow2 + min-disk: '1' + min-ram: '2.0' + size: '1' + image: 'http://someurl.com/VNF-B.qcow2' + virtual-compute-desc: + id: vdu-b-2-vcd + virtual-memory: + size: '6.0' + virtual-cpu: + num-virtual-cpu: '2' + virtual-storage-desc: + id: vdu-b-2-vsd + type-of-storage: root-storage + size-of-storage: '0' + sw-image-desc: + id: vdu-b-2-image + name: VNF-B-2 image + version: '1.1' + checksum: + algorithm: sha-224 + hash: somehashfortst010 + container-format: bare + disk-format: qcow2 + min-disk: '1' + min-ram: '2.0' + size: '1' + image: 'http://someurl.com/VNF-B-2.qcow2' + int-virtual-link-desc: + - id: internal-vl + flavour: + id: internal-vl-flavour + qos: + latency: '1' + packet-delay-variation: '1' + packet-loss-ratio: '0.05' + connectivity-type: + layer-protocol: ethernet + ext-cpd: + - id: ext-b-left + int-cpd: + vdu-id: vdu-b-1 + cpd: left + layer-protocol: ethernet + - id: management + int-cpd: + vdu-id: vdu-b-1 + cpd: management + layer-protocol: ethernet + - id: ext-b-right + int-cpd: + vdu-id: vdu-b-2 + cpd: right + layer-protocol: ethernet + df: + id: normal + vdu-profile: + - id: vdu-b-1 + min-number-of-instances: '1' + max-number-of-instances: '2' + - id: vdu-b-2 + min-number-of-instances: '1' + max-number-of-instances: '4' + instantiation-level: + - id: double + vdu-level: + - vdu-id: vdu-b-1 + number-of-instances: '2' + - vdu-id: vdu-b-2 + number-of-instances: '2' + - id: single + vdu-level: + - vdu-id: vdu-b-1 + number-of-instances: '1' + - vdu-id: vdu-b-2 + number-of-instances: '1' + default-instantiation-level: single + lcm-operations-configuration: + scale-vnf-to-level-op-config: + arbitrary-target-levels-supported: 'true' + terminate-vnf-op-config: + min-graceful-termination: '1' + operate-vnf-op-config: + min-graceful-stop-timeout: '1' \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/environment/variables.txt b/SOL005/NSLifecycleManagement-API/environment/variables.txt index 94a133ae40765be6092abcd73f89f7db450a59b9..6cb07cd188cb691189a83afd42cc22296cb0c19a 100644 --- a/SOL005/NSLifecycleManagement-API/environment/variables.txt +++ b/SOL005/NSLifecycleManagement-API/environment/variables.txt @@ -6,21 +6,28 @@ ${NFVO_PORT} 8081 # Listening port of the NFVO ${VNFM_SCHEMA} https ${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${CONTENT_TYPE} application/json ${CONTENT_TYPE_PATCH} application/merge-patch+json ${ACCEPT_JSON} application/json ${ACCEPT} application/json ${apiRoot} / ${apiName} nslcm -${apiVersion} v1 +${apiMajorVersion} v1 ${AUTH_USAGE} 1 ${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX ${nsInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${nsdId} 58a7beb6-aa89-405e-bd90-7d276b967c03 +${disabledNsdId} fca7c896-a7d0-4ff8-865e-f5c8ee2fd1c3 +${nonExistentNsId} nonExistent ${ConflictNsInstanceId} 007c111c-e602-4afa-8e13-962fb5a7d81d ${nsInstanceName} Test-nsInstance ${nsInstanceDescription} description ns ${nsInstanceDescription_Update} Updated description ns +${nsFlavourId} 0 +${nsDegreeHealing} HEAL_RESTORE +${vimAccountId} 931f6a4d-6a97-43f3-a6f0-13853ef577ea ${SINGLE_FILE_VNFD} 1 # If VNFD is PLAIN TEXT ${ACCEPT_PLAIN} text/plain ${ACCEPT_ZIP} application/zip @@ -38,9 +45,17 @@ ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${VnfLcmOperationOccurrenceNotification} {} ${VnfIdentifierCreationNotification} {} ${VnfIdentifierDeletionNotification} {} +${vnfUpdateType} ADD_VNF +${instantiationLevelId} myNextLevel + +${scaleType} SCALE_VNF +${scaleTimeout} 1 +${scaleVnfType} SCALE_IN +${scaleGroupDescriptor} myScalingGroup +${scaleMemberVnfIndex} 1 -${callback_uri} http://localhost ${callback_port} 9091 +${callback_uri} http://localhost:${callback_port} ${callback_endpoint} /endpoint ${callback_endpoint_fwd} /endpoint/check ${callback_endpoint_error} /endpoint_404 @@ -48,8 +63,8 @@ ${sleep_interval} 20s ${total_polling_time} 2 min ${polling_interval} 10 sec -${notification_request} [] -${notification_response} [] +${notification_request} {} +${notification_response} {} ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar @@ -60,4 +75,46 @@ ${Etag_modified}= a modified etag ${NEG_FILTER} attribute_not_exist=some_value ${NEG_SELECTOR} fields=wrong_field -${json} {} \ No newline at end of file +${json} {"notificationStatus": ""} + +${callbackResp} 127.0.0.1 + +${check_descriptors} 1 +${descriptorType} SOL006 + +${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute +${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder +${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink +${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp +${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage + +${tosca_type_NS} tosca.nodes.nfv.NS +${tosca_type_NsVirtualLink} tosca.nodes.nfv.NsVirtualLink +${tosca_type_NsCP} tosca.nodes.nfv.Cp + +@{VDU_IDs} +@{VNF_IDs} +@{virtualLink_IDs} +@{CP_IDs} +@{Storage_IDs} +@{internalCP_IDs} +@{externalCP_IDs} +@{InstantiationLevel_IDs} + +@{NS_VirtualLink_IDs} +@{NsCP_IDs} +@{SAP_IDs} + +${NS_DescriptorID} +${Designer} +${NS_Name} +${NS_Version} +${NS_InvariantId} + + +${Descriptor_ID} +${Provider} +${Product_Name} +${Software_Version} +${Descriptor_Version} +${Flavour_ID} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/CreateNsRequest.json b/SOL005/NSLifecycleManagement-API/jsons/CreateNsRequest.json index eb879873a2ec8a5686bc32f29c4c76ef5233ef84..2367086716f45d628e3219cb7a25edb971138e8c 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/CreateNsRequest.json +++ b/SOL005/NSLifecycleManagement-API/jsons/CreateNsRequest.json @@ -1,24 +1,6 @@ { -"CreateNsRequest": { - "type": "object", - "required": [ - "nsdId", - "nsName", - "nsDescription" - ], - "properties": { - "nsdId": { - "description": "Identifier of the NSD that defines the NS instance to be created.\n", - "$ref": "SOL005_def.yaml#/definitions/Identifier" - }, - "nsName": { - "description": "Human-readable name of the NS instance to be created.\n", - "type": "string" - }, - "nsDescription": { - "description": "Human-readable description of the NS instance to be created.\n", - "type": "string" - } - } - } + "nsdId": "{nsdId}", + "nsName": "{nsInstanceName}", + "vimAccountId": "{vimAccountId}", + "nsDescription": "{nsInstanceDescription}" } \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/HealNsRequest.json b/SOL005/NSLifecycleManagement-API/jsons/HealNsRequest.json index 2922dc4a1b0749186d777ae1735226a9196dcb56..b8fa38ecbc2d25eb246284ccf08446a2dc9a68a3 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/HealNsRequest.json +++ b/SOL005/NSLifecycleManagement-API/jsons/HealNsRequest.json @@ -1,3 +1,3 @@ -{ - "degreeHealing": "HEAL_RESTORE" -} \ No newline at end of file +{{ + "degreeHealing": "{nsDegreeHealing}" +}} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/InstantiateNs.json b/SOL005/NSLifecycleManagement-API/jsons/InstantiateNs.json new file mode 100644 index 0000000000000000000000000000000000000000..cd352b53aea790ae550c2bd44facee8d805cdd0e --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/jsons/InstantiateNs.json @@ -0,0 +1,5 @@ +{{ + "nsdId": "{nsdId}", + "nsName": "postmanNS", + "vimAccountId": "{vimAccountId}" +}} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/InstantiateNsRequest.json b/SOL005/NSLifecycleManagement-API/jsons/InstantiateNsRequest.json index e19b6afbb67af87e6d82d9bb913064acacca9083..b89a44d19ef6417f8d024aa4acb203e87d240d6f 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/InstantiateNsRequest.json +++ b/SOL005/NSLifecycleManagement-API/jsons/InstantiateNsRequest.json @@ -1,6 +1,8 @@ { - "nsFlavourId": "floavour_id", - "sapData":[], + "nsFlavourId": "flavour_id", + "sapData":[ + "{sapdId}" + ], "addpnfData":[], "vnfInstanceData":[], "nestedNsInstanceData":[], diff --git a/SOL005/NSLifecycleManagement-API/jsons/LccnSubscriptionRequest.json b/SOL005/NSLifecycleManagement-API/jsons/LccnSubscriptionRequest.json index 091cc0cdb4c87e448f4ff5862a7db94009c328f7..d655f7ff4a155dbc00c1b038d89b07025a9e54b8 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/LccnSubscriptionRequest.json +++ b/SOL005/NSLifecycleManagement-API/jsons/LccnSubscriptionRequest.json @@ -1,10 +1,10 @@ -{ - "filter": { - "nsInstanceSubscriptionFilter": { +{{ + "filter": {{ + "nsInstanceSubscriptionFilter": {{ "nsdIds": [ - "6fc3539c-e602-4afa-8e13-962fb5a7d81f" + "{nsdId}" ] - } - }, - "callbackUri": "http://127.0.0.1/subscribe" -} \ No newline at end of file + }} + }}, + "callbackUri": "{callbackUri}:{callbackPort}{callbackEndpoint}" +}} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/NsIdentifierCreationNotification.json b/SOL005/NSLifecycleManagement-API/jsons/NsIdentifierCreationNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..152d85523d8a39e28c76ebdce9f327df2d722a92 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/jsons/NsIdentifierCreationNotification.json @@ -0,0 +1,8 @@ +{{ + "id":"", + "notificationType":"NsIdentifierCreationNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "nsInstanceId":"{nsInstanceId}", + "_links":"" +}} diff --git a/SOL005/NSLifecycleManagement-API/jsons/NsIdentifierDeletionNotification.json b/SOL005/NSLifecycleManagement-API/jsons/NsIdentifierDeletionNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..320d5ee3b4a29d2ac652bc75930f2b3cb4da2fd4 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/jsons/NsIdentifierDeletionNotification.json @@ -0,0 +1,8 @@ +{{ + "id":"", + "notificationType":"NsIdentifierDeletionNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "nsInstanceId":"{nsInstanceId}", + "_links":"" +}} diff --git a/SOL005/NSLifecycleManagement-API/jsons/NsLcmOperationOccurrenceNotification.json b/SOL005/NSLifecycleManagement-API/jsons/NsLcmOperationOccurrenceNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..706957a30261be69c7b903c8dde972510534ff29 --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/jsons/NsLcmOperationOccurrenceNotification.json @@ -0,0 +1,19 @@ +{{ + "id":"", + "nsInstanceId":"{nsInstanceId}", + "nsLcmOpOccId":"{nsLcmOpOccId}" + "operation":"INSTANTIATE", + "notificationType":"NsLcmOperationOccurrenceNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "notificationStatus":"START", + "operationState":"PROCESSING", + "isAutomaticInvocation":"True", + "affectedVnf": {{ + "vnfdId": "{vnfdId}" + }}, + "affectedNs": {{ + "nsdId": "{nsdId}" + }}, + "_links":"" +}} diff --git a/SOL005/NSLifecycleManagement-API/jsons/ScaleNs.json b/SOL005/NSLifecycleManagement-API/jsons/ScaleNs.json new file mode 100644 index 0000000000000000000000000000000000000000..2aa88d663bd3bbc2e817ad739b407bbc98a3ccbf --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/jsons/ScaleNs.json @@ -0,0 +1,15 @@ +{{ + "scaleType": "{scaleType}", + "timeout_ns_scale": {scaleTimeout}, + "scaleVnfData": {{ + "vnfInstanceid": {}, + "scaleVnfType": "{scaleVnfType}", + "scaleToLevelData": {{ + "vnfInstantiationLevelId": "{vnfInstantiationLevelId}" + }}, + "scaleByStepData": {{ + "scaling-group-descriptor": "{scaleGroupDescriptor}", + "member-vnf-index": "{scaleMemberVnfIndex}" + }} + }} +}} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/ScaleNsRequest.json b/SOL005/NSLifecycleManagement-API/jsons/ScaleNsRequest.json index f9a87c851a55ba002ae586b7d5e1e43db37b2159..12204fe2bac4987ba78f2fa91d16976e6a1cda8c 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/ScaleNsRequest.json +++ b/SOL005/NSLifecycleManagement-API/jsons/ScaleNsRequest.json @@ -1,32 +1,3 @@ { - "description": "This type represents a request for the scale NS operation.\n", - "type": "object", - "required": [ - "scaleType" - ], - "properties": { - "scaleType": { - "description": "Indicates the type of scaling to be performed. Possible values: - SCALE_NS - SCALE_VNF\n", - "type": "string", - "enum": [ - "SCALE_NS", - "SCALE_VNF" - ] - }, - "scaleNsData": { - "description": "The necessary information to scale the referenced NS instance. It shall be present when scaleType = SCALE_NS.\n", - "$ref": "#/definitions/ScaleNsData" - }, - "scaleVnfData": { - "description": "The necessary information to scale the referenced NS instance. It shall be present when scaleType = SCALE_VNF.\n", - "type": "array", - "items": { - "$ref": "#/definitions/ScaleVnfData" - } - }, - "scaleTime": { - "description": "Timestamp indicating the scale time of the NS, i.e. the NS will be scaled at this timestamp. Cardinality \"0\" indicates the NS scaling takes place immediately\".\n", - "$ref": "SOL005_def.yaml#/definitions/DateTime" - } - } + "scaleType": "SCALE_NS" } \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/TerminateNsRequest.json b/SOL005/NSLifecycleManagement-API/jsons/TerminateNsRequest.json index a65d7d3b024c779688898bec5213ae81e4664ea7..65e326002f3be2d7c61ece501943eb87c7496400 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/TerminateNsRequest.json +++ b/SOL005/NSLifecycleManagement-API/jsons/TerminateNsRequest.json @@ -1,3 +1,4 @@ { - "terminationTime": "2021-04-12T23:20:50.52Z" + "timeout_ns_terminate": 1, + "autoremove": false } \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/UpdateNsRequest.json b/SOL005/NSLifecycleManagement-API/jsons/UpdateNsRequest.json index 64a2c0f4c92a484b3509044a5d4298a701effedd..4d34491038c0d258d78bfe49af91a21bdfdce8d4 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/UpdateNsRequest.json +++ b/SOL005/NSLifecycleManagement-API/jsons/UpdateNsRequest.json @@ -1,3 +1,22 @@ { - "updateType": "ADD_VNF" -} \ No newline at end of file + "updateType": "{vnfUpdateType}", + "instantiateVnfData": { + "vnfdId": "{vnfdId}", + "vnfFlavourId": "{vnfFlavourId}", + "vnfInstantiationLevelId": "{vnfInstantiationLevelId}", + "extManagedVirtualLinks": { + "vnfVirtualLinkDescId": "{vnfVirtualLinkDescId}" + }, + "changeVnfFlavourData": { + "vnfInstanceId": {}, + "newFlavourId": "{newFlavourId}", + "instantiationLevelId": "{instantiationLevelId}" + }, + "assocNewNsdVersionData": { + "newNsdId": "{newNsdId}" + }, + "addSap": { + "sapdId": "{sapdId}" + } + } +} diff --git a/SOL005/NSLifecycleManagement-API/jsons/scaleNsToLevelRequest.json b/SOL005/NSLifecycleManagement-API/jsons/scaleNsToLevelRequest.json index 1c39a7bb51571dfc2af274795d0bc9d932eccafd..ca0ea8d3fea407220ef2b6537ab9be062994a73b 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/scaleNsToLevelRequest.json +++ b/SOL005/NSLifecycleManagement-API/jsons/scaleNsToLevelRequest.json @@ -1,3 +1,3 @@ -{ - "instantiationLevelId": "myNextLevel" -} \ No newline at end of file +{{ + "instantiationLevelId": "{instantiationLevelId}" +}} \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/ApiVersion.robot b/SOL005/NSPerformanceManagement-API/ApiVersion.robot index 17bbc85f4e76f257888ca2d84096f8285e51278e..e9fba6908d5940b1436b772c8c08daf91e407a1f 100644 --- a/SOL005/NSPerformanceManagement-API/ApiVersion.robot +++ b/SOL005/NSPerformanceManagement-API/ApiVersion.robot @@ -1,213 +1,213 @@ -*** Settings *** - -Resource environment/variables.txt - -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Library DependencyLibrary -Library JSONLibrary -Library JSONSchemaLibrary schemas/ - -*** Test Cases *** -POST API Version - Method not implemented - [Documentation] Test ID: 5.3.4.9.1 - ... Test title: POST API version - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version - [Documentation] Test ID: 5.3.4.9.2 - ... Test title: GET API Version - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version - Method not implemented - [Documentation] Test ID: 5.3.4.9.3 - ... Test title: PUT API Version - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version - Method not implemented - [Documentation] Test ID: 5.3.4.9.4 - ... Test title: PATCH API Version - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version - Method not implemented - [Documentation] Test ID: 5.3.4.9.5 - ... Test title: DELETE API Version - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -POST API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 5.3.4.9.6 - ... Test title: POST API version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version with apiMajorVerion - [Documentation] Test ID: 5.3.4.9.7 - ... Test title: GET API Version with apiMajorVerion - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 5.3.4.9.8 - ... Test title: PUT API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 5.3.4.9.9 - ... Test title: PATCH API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 5.3.4.9.10 - ... Test title: DELETE API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -*** Keywords *** -POST API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response['body']} +*** Settings *** + +Resource environment/variables.txt + +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 5.3.4.9.1 + ... Test title: POST API version - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 5.3.4.9.2 + ... Test title: GET API Version + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version - Method not implemented + [Documentation] Test ID: 5.3.4.9.3 + ... Test title: PUT API Version - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 5.3.4.9.4 + ... Test title: PATCH API Version - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 5.3.4.9.5 + ... Test title: DELETE API Version - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +POST API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 5.3.4.9.6 + ... Test title: POST API version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 5.3.4.9.7 + ... Test title: GET API Version with apiMajorVerion + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 5.3.4.9.8 + ... Test title: PUT API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 5.3.4.9.9 + ... Test title: PATCH API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 5.3.4.9.10 + ... Test title: DELETE API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/IndividualPmJob.robot b/SOL005/NSPerformanceManagement-API/IndividualPmJob.robot index 818dc1368c70ba9bbc96f52093a8726cc95f12d6..18afc44ca423bbf1ac48a18f501fd3f0fdb4734d 100644 --- a/SOL005/NSPerformanceManagement-API/IndividualPmJob.robot +++ b/SOL005/NSPerformanceManagement-API/IndividualPmJob.robot @@ -2,7 +2,6 @@ Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters Library JSONLibrary -Resource environment/IndividualPmJob.txt Resource NSPerformanceManagementKeywords.robot Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false @@ -12,7 +11,7 @@ GET individual NS Performance Job ... Test title: Get individual NS Performance Job ... Test objective: The objective is to test the retrieval of an individual NS Performance monitoring job and perform a JSON schema and content validation of the collected job data structure ... Pre-conditions: A NS instance is instantiated. One or more NS Performance jobs are set in the NFVO. - ... Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -26,7 +25,7 @@ GET individual NS Performance Job with invalid resource identifier ... Test title: Get individual NS Performance Job with invalid resource identifier ... Test objective: The objective is to test that the retrieval of an individual NS Performance monitoring job fails when using an invalid resource identifier, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A NS instance is instantiated. One or more NS Performance jobs are set in the NFVO. - ... Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -39,7 +38,7 @@ DELETE Individual NS Performance Job with invalid resource identifier ... Test title: Delete individual NS Performance Job with invalid resource identifier ... Test objective: The objective is to test that the deletion of an individual NS Performance monitoring job fails when using an invalid resource identifier ... Pre-conditions: A NS instance is instantiated. One or more NS Performance jobs are set in the NFVO. - ... Reference: Clause 7.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -50,8 +49,8 @@ POST Individual NS Performance Job - Method not implemented [Documentation] Test ID: 5.3.4.2.4 ... Test title: POST Individual NS Performance Job - method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new NS Performance Monitoring Job - ... Pre-conditions: A NS instance is instantiated - ... Reference: Clause 7.4.3.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.3.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -62,35 +61,49 @@ PUT Individual NS Performance Job - Method not implemented [Documentation] Test ID: 5.3.4.2.5 ... Test title: PUT Individual NS Performance Job - method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing NS Performance Monitoring Job - ... Pre-conditions: A NS instance is instantiated. One or more NS Performance jobs are set in the NFVO. - ... Reference: Clause 7.4.3.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.3.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Send Put request for individual NS Performance Job Check HTTP Response Status Code Is 405 -PATCH Individual NS Performance Job - Method not implemented +PATCH Individual NS Performance Job [Documentation] Test ID: 5.3.4.2.6 - ... Test title: PATCH Individual NS Performance Job - method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing new NS Performance Monitoring Job + ... Test title: PATCH Individual NS Performance Job + ... Test objective: The objective is to test that PATCH method modify an existing new NS Performance Monitoring Job ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. - ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none + ... Post-Conditions: Resource modified Send Patch request for individual NS Performance Job - Check HTTP Response Status Code Is 405 + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJobModifications DELETE Individual NS Performance Job [Documentation] Test ID: 5.3.4.2.7 ... Test title: Delete Individual NS Performance Job ... Test objective: The objective is to test the deletion of an individual NS Performance monitoring job ... Pre-conditions: A NS instance is instantiated. One or more NS Performance jobs are set in the NFVO. - ... Reference: Clause 7.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The NS Performance Job is no more available in the NFVO Send Delete request for individual NS Performance Job Check HTTP Response Status Code Is 204 - Check Postcondition NS Pm Job is Deleted \ No newline at end of file + Check Postcondition NS Pm Job is Deleted + +PATCH Individual NS Performance Job - Precondition failed + [Documentation] Test ID: 5.3.4.2.8 + ... Test title: PATCH Individual NS Performance Job - Precondition failed + ... Test objective: The objective is to attempt to Modify an individual NS Performance job fails, where the precondition was not met + ... Pre-conditions: The related job already exsisit + ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The resource is not modified + Send Patch request for individual NS Performance Job + Check HTTP Response Status Code Is 412 + Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/IndividualReport.robot b/SOL005/NSPerformanceManagement-API/IndividualReport.robot index 53926a22682e09883f16285548c056b02a91d60d..c27242894ed879256e0ccc3103a6b5e27cd04624 100644 --- a/SOL005/NSPerformanceManagement-API/IndividualReport.robot +++ b/SOL005/NSPerformanceManagement-API/IndividualReport.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/reports.txt Resource NSPerformanceManagementKeywords.robot Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false @@ -12,7 +11,7 @@ Get Individual Performance Report ... Test title: Get Individual Performance Report ... Test objective: The objective is to test the retrieval of an individual NS performance report associated to a monitoring job and perform a JSON schema validation of the collected report data structure ... Pre-conditions: A NS instance is instantiated. One or more NS performance reports are set for a monitoring job in the NFVO. - ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -25,62 +24,59 @@ Get Individual Performance Report with invalid resource endpoint ... Test title: Get Individual Performance Report with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of an individual NS performance report associated to a monitoring job fails when using an invalid resource endpoint ... Pre-conditions: A NS instance is instantiated. One or more NS performance reports are set for a monitoring job in the NFVO. - ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Get Individual Performance Report with invalid resource endpoint Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails POST Individual Performance Report - Method not implemented [Documentation] Test ID: 5.3.4.3.3 ... Test title: POST Individual Performance Report - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new NS performance report within a monitoring job - ... Pre-conditions: A NS instance is instantiated. - ... Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS performance report is not created on the NFVO + ... Post-Conditions: none Send Post request for Individual Performance Report Check HTTP Response Status Code Is 405 - Check Postcondition NS Individual Performance Report is not Created PUT Individual Performance Report - Method not implemented [Documentation] Test ID: 5.3.4.3.4 ... Test title: PUT Individual Performance Report - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing NS performance report within a monitoring job - ... Pre-conditions: A NS instance is instantiated. One or more NS performance reports are set for a monitoring job in the NFVO. - ... Reference: Clause 7.4.4.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.4.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS performance report is not modified by the operation + ... Post-Conditions: none Send Put request for Individual Performance Report Check HTTP Response Status Code Is 405 - Check Postcondition NS Individual Performance Report is Unmodified (Implicit) PATCH Individual Performance Report - Method not implemented [Documentation] Test ID: 5.3.4.3.5 ... Test title: PATCH Individual Performance Report - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing NS performance report within a monitoring job - ... Pre-conditions: A NS instance is instantiated. One or more NS performance reports are set for a monitoring job in the NFVO. - ... Reference: Clause 7.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS performance report is not modified by the operation + ... Post-Conditions: none Send Patch request for Individual Performance Report Check HTTP Response Status Code Is 405 - Check Postcondition NS Individual Performance Report is Unmodified (Implicit) DELETE Individual Performance Report - Method not implemented [Documentation] Test ID: 5.3.4.3.6 ... Test title: DELETE Individual Performance Report - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete an existing NS performance report within a monitoring job - ... Pre-conditions: A NS instance is instantiated. One or more NS performance reports are set for a monitoring job in the NFVO. - ... Reference: Clause 7.4.4.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Pre-conditions: none + ... Reference: Clause 7.4.4.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS performance report is not deleted by the operation + ... Post-Conditions: none Send Delete request for Individual Performance Report Check HTTP Response Status Code Is 405 - Check Postcondition NS Individual Performance Report Exists diff --git a/SOL005/NSPerformanceManagement-API/IndividualSubscription.robot b/SOL005/NSPerformanceManagement-API/IndividualSubscription.robot deleted file mode 100644 index 1ceeaea2207002265ea7f6b8207d7fd602748f97..0000000000000000000000000000000000000000 --- a/SOL005/NSPerformanceManagement-API/IndividualSubscription.robot +++ /dev/null @@ -1,102 +0,0 @@ -*** Settings *** -Documentation This resource represents an individual subscription for notifications about performance management related events. -... The client can use this resource to read and to terminate a subscription to notifications related to NS performance -... management. -Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt # Generic Parameters -Resource NSPerformanceManagementKeywords.robot -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Library OperatingSystem -Library JSONLibrary -Resource environment/individualSubscription.txt - -*** Test Cases *** -GET Individual NS Performance Subscription - [Documentation] Test ID: 5.3.4.7.1 - ... Test title: GET Individual NS Performance Subscription - ... Test objective: The objective is to test the retrieval of individual NS Performance subscription and perform a JSON schema and content validation of the returned subscription data structure - ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. - ... Reference: Clause 7.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get Individual NS Performance Subscription - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is PkgmSubscription - Check HTTP Response Body Subscription Identifier matches the requested Subscription - -GET Individual NS Performance Subscription with invalid resource identifier - [Documentation] Test ID: 5.3.4.7.2 - ... Test title: GET Individual NS Performance Subscription with invalid resource identifier - ... Test objective: The objective is to test that the retrieval of an individual NS Performance subscription fails when using an invalid resource identifier - ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. - ... Reference: Clause 7.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - GET individual NS Performance Subscription with invalid resource identifier - Check HTTP Response Status Code Is 404 - -DELETE Individual NS Performance Subscription with invalid resource identifier - [Documentation] Test ID: 5.3.4.7.3 - ... Test title: DELETE Individual NS Performance Subscription with invalid resource identifier - ... Test objective: The objective is to test that the deletion of an individual NS Performance subscription fails when using an invalid resource identifier - ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. - ... Reference: Clause 7.4.8.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send Delete request for individual NS Performance Subscription with invalid resource identifier - Check HTTP Response Status Code Is 404 - -POST Individual NS Performance Subscription - Method not implemented - [Documentation] Test ID: 5.3.4.7.4 - ... Test title: POST Individual NS Performance Subscription - Method not implemented - ... Test objective: The objective is to test that POST method is not allowed to create a new NS Performance Subscription - ... Pre-conditions: none - ... Reference: Clause 7.4.8.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: The NS Performance Subscription is not created on the NFVO - Send Post request for individual NS Performance Subscription - Check HTTP Response Status Code Is 405 - Check Postcondition NS Performance Subscription is not Created - -PUT Individual NS Performance Subscription - Method not implemented - [Documentation] Test ID: 5.3.4.7.5 - ... Test title: PUT Individual NS Performance Subscription - Method not implemented - ... Test objective: The objective is to test that PUT method is not allowed to update an existing NS Performance subscription - ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. - ... Reference: Clause 7.4.8.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: The NS Performance subscription is not modified by the operation - Send Put request for individual NS Performance Subscription - Check HTTP Response Status Code Is 405 - Check Postcondition NS Performance Subscription is Unmodified (Implicit) - -PATCH Individual NS Performance Subscription - Method not implemented - [Documentation] Test ID: 5.3.4.7.6 - ... Test title: PATCH Individual NS Performance Subscription - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing NS Performance subscription - ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. - ... Reference: Clause 7.4.8.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: The NS Performance subscription is not modified by the operation - Send Patch request for individual NS Performance Subscription - Check HTTP Response Status Code Is 405 - Check Postcondition NS Performance Subscription is Unmodified (Implicit) - -DELETE Individual NS Performance Subscription - [Documentation] Test ID: 5.3.4.7.7 - ... Test title: DELETE Individual NS Performance Subscription - ... Test objective: The objective is to test the deletion of an individual NS Performance subscription - ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. - ... Reference: Clause 7.4.8.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: The NS Performance Subscription is not available anymore in the NFVO - Send Delete request for individual NS Performance Subscription - Check HTTP Response Status Code Is 204 - Check Postcondition NS Performance Subscription is Deleted \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/IndividualThreshold.robot b/SOL005/NSPerformanceManagement-API/IndividualThreshold.robot index 6b3a5c245d99745c9f8a7f59cf5f9a8215207ea8..9c19fbf189fee1f95537e069542298a575c32cb3 100644 --- a/SOL005/NSPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL005/NSPerformanceManagement-API/IndividualThreshold.robot @@ -6,7 +6,6 @@ Resource NSPerformanceManagementKeywords.robot Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library OperatingSystem -Resource environment/individualThresholds.txt *** Test Cases *** GET Individual Threshold @@ -14,7 +13,7 @@ GET Individual Threshold ... Test title: GET Individual Threshold ... Test objective: The objective is to test the retrieval of an individual NS performance threshold and perform a JSON schema and content validation of the collected threshold data structure ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. - ... Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -28,19 +27,20 @@ GET Individual Threshold with invalid resource identifier ... Test title: GET Individual Threshold with invalid resource identifier ... Test objective: The objective is to test that the retrieval of an individual NS performance threshold fails when using an invalid resource identifier ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. - ... Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET individual NS performance Threshold with invalid resource identifier Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails DELETE Individual Threshold with invalid resource identifier [Documentation] Test ID: 5.3.4.5.3 ... Test title: DELETE Individual Threshold with invalid resource identifier ... Test objective: The objective is to test the deletion of an individual NS performance threshold ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. - ... Reference: Clause 7.4.6.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.6.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -52,38 +52,37 @@ POST Individual Threshold - Method not implemented ... Test title: POST Individual Threshold - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new NS performance Threshold ... Pre-conditions: A NS instance is instantiated - ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS performance Threshold is not created on the NFVO + ... Post-Conditions: none Send Post request for individual NS performance Threshold Check HTTP Response Status Code Is 405 - Check Postcondition NS performance Threshold is not Created PUT Individual Threshold - Method not implemented [Documentation] Test ID: 5.3.4.5.5 ... Test title: PUT Individual Threshold - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing NS performance threshold ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. - ... Reference: Clause 7.4.6.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.6.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS performance Threshold is not modified by the operation + ... Post-Conditions: none Send Put request for individual NS performance Threshold Check HTTP Response Status Code Is 405 - Check Postcondition NS performance Threshold is Unmodified (Implicit) -PATCH Individual Threshold - Method not implemented +PATCH Individual Threshold [Documentation] Test ID: 5.3.4.5.6 - ... Test title: PATCH Individual Threshold - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing NS performance threshold + ... Test title: PATCH Individual Threshold + ... Test objective: The objective is to test that PATCH method modify an existing NS performance threshold ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. - ... Reference: Clause 7.4.6.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.6.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS performance Threshold is not modified by the operation + ... Post-Conditions: The NS performance Threshold is modified by the operation Send Patch request for individual NS performance Threshold - Check HTTP Response Status Code Is 405 + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ThresholdModifications Check Postcondition NS performance Threshold is Unmodified (Implicit) DELETE Individual Threshold @@ -91,7 +90,7 @@ DELETE Individual Threshold ... Test title: DELETE Individual Threshold ... Test objective: The objective is to test the deletion of an individual NS performance threshold ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. - ... Reference: Clause 7.4.6.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.6.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The NS performance Threshold is not available anymore in the NFVO @@ -99,3 +98,16 @@ DELETE Individual Threshold Check HTTP Response Status Code Is 204 Check Postcondition NS performance Threshold is Deleted +PATCH Individual Threshold - Precondition failed + [Documentation] Test ID: 5.3.4.5.8 + ... Test title: PATCH Individual Threshold - Precondition failed + ... Test objective: The objective is to attempt to Modify an individual NS Performance threshold fails, where the precondition was not met + ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. + ... Reference: Clause 7.4.6.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: The NS performance Threshold is not modified by the operation + Send Patch request for individual NS performance Threshold + Check HTTP Response Status Code Is 412 + Check HTTP Response Body Json Schema Is ProblemDetails + Check Postcondition NS performance Threshold is Unmodified (Implicit) \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot b/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot index fd2302fac9211f4673b259cd6a8ca50c1d3c57b6..e5d045cc9bec8f2e582b267acf96e0e5c5ca8ca4 100644 --- a/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot +++ b/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot @@ -1,12 +1,5 @@ *** Settings *** Resource environment/variables.txt -Resource environment/subscriptions.txt -Resource environment/pmJobs.txt -Resource environment/IndividualPmJob.txt -Resource environment/reports.txt -Resource environment/thresholds.txt -Resource environment/individualThresholds.txt -Resource environment/individualSubscription.txt Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library MockServerLibrary Library OperatingSystem @@ -21,41 +14,50 @@ Library String GET all NS Performance Monitoring Jobs Log Trying to get all PM Jobs present in the NFVO Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} GET NS Performance Monitoring Jobs with attribute-based filter Log Trying to get all PM Jobs present in the NFVO, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?${POS_FILTER} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?${POS_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} GET NS Performance Monitoring Jobs with all_fields attribute selector Log Trying to get all PM Jobs present in the NFVO, using 'all_fields' filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?all_fields + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?all_fields ${output}= Output response Set Suite Variable ${response} ${output} GET NS Performance Monitoring Jobs with exclude_default attribute selector Log Trying to get all NS Packages present in the NFVO, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?exclude_default + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} -GET NS Performance Monitoring Jobs with include attribute selector +GET NS Performance Monitoring Jobs with fields attribute selector Log Trying to get all NS Packages present in the NFVO, using filter params Pass Execution If ${FIELD_USAGE} == 0 Skipping test as NFVO is not supporting 'fields' Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?include=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?fields=${fields} + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NS Performance Monitoring Jobs with fields and exclude_default attribute selector + Log Trying to get all NS Packages present in the NFVO, using filter params + Pass Execution If ${FIELD_USAGE} == 0 Skipping test as NFVO is not supporting 'fields' + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?fields=${fields}&exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -63,24 +65,24 @@ GET NS Performance Monitoring Jobs with exclude attribute selector Log Trying to get all NS Packages present in the NFVO, using filter params Pass Execution If ${FIELD_USAGE} == 0 Skipping test as NFVO is not supporting 'fields' Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?exclude=${fields} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?exclude=${fields} ${output}= Output response Set Suite Variable ${response} ${output} GET NS Performance Monitoring Jobs with invalid attribute-based filter Log Trying to get all PM Jobs present in the NFVO, using an erroneous filter param Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs?${NEG_FILTER} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?${NEG_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} GET NS Performance Monitoring Jobs 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}/pm_job # wrong URI /pm_job instead of /pm_jobs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_job # wrong URI /pm_job instead of /pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} @@ -88,45 +90,43 @@ Send Post Request Create new NS Performance Monitoring Job Log Creating a new PM Job Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/CreatePmJobRequest.json - POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/CreatePmJobRequest.json + ${body}= Format String ${template} pmJobId=${pmJobId} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${body} ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for all NS Performance Monitoring Jobs 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}/pm_jobs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for all NS Performance Monitoring Jobs 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}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for all NS Performance Monitoring Jobs 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}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response Set Suite Variable ${response} ${output} -Check Postcondition NS Performance Monitoring Jobs Exist - Log Checking that Pm Job still exists - GET all NS Performance Monitoring Jobs Check Postcondition PmJob Exists Log Checking that Pm Job exists Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${response['body']['id']} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 200 @@ -141,7 +141,7 @@ Check HTTP Response Body PmJobs Matches the requested exclude selector Should Be Empty ${criteria} Log Reports element is empty as expected -Check HTTP Response Body PmJobs Matches the requested include selector +Check HTTP Response Body PmJobs Matches the requested selector Log Trying to validate criteria schema ${criteria}= Get Value From Json ${response['body']} $..criteria Validate Json criteria.schema.json ${criteria} @@ -186,67 +186,69 @@ Check HTTP Response Body PmJobs Do Not Contain reports GET individual NS Performance Job Log Trying to get a Pm Job present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${output}= Output response Set Suite Variable ${response} ${output} GET individual NS Performance Job with invalid resource identifier Log Trying to perform a negative get, using erroneous PM Job identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${erroneousPmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${erroneousPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual NS Performance Job Log Trying to delete an existing PM Job Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual NS Performance Job with invalid resource identifier Log Trying to perform a negative delete, using erroneous PM Job identifier Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${erroneousPmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${erroneousPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual NS Performance Job 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}/pm_jobs/${newPmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${newPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for individual NS Performance Job 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}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PUT ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${output}= Output response Set Suite Variable ${response} ${output} Send Patch request for individual NS Performance Job - Log Trying to perform a PATCH (method should not be implemented) + Log Trying to perform a PATCH Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body}= Get File jsons/PmJobModifications.json + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} Check Postcondition NS Performance Job is not Created Log Trying to get a new Pm Job Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${newPmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${newPmJobId} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 404 @@ -273,149 +275,126 @@ Check HTTP Response Body Pm Job Identifier matches the requested Pm Job Get Individual Performance Report Log Trying to get a performance report present in the NFVO Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} Get Individual Performance Report with invalid resource endpoint Log Trying to get a performance report with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${erroneousReportId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${erroneousReportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for Individual Performance Report Log Trying to create new performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${newReportId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${newReportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for Individual Performance Report Log Trying to update performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PUT ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Patch request for Individual Performance Report Log Trying to update performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PATCH ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for Individual Performance Report Log Trying to delete performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} -Check Postcondition NS Individual Performance Report Exists - Log Checking that report still exists - Get Individual Performance Report - -Check Postcondition NS Individual Performance Report is not Created - Log Trying to get a new report - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${newReportId} - ${output}= Output response - Set Suite Variable ${response} ${output} - Check HTTP Response Status Code Is 404 - -Check Postcondition NS Individual Performance Report is Unmodified (Implicit) - Log Check Postcondition VNF PM job is not modified - Get Individual Performance Report - Log Check Response matches original VNF report - ${report}= evaluate json.loads('''${response['body']}''') json - Should Be Equal ${origResponse['body']['entries'][0]['objectInstanceId']} ${report['entries'][0]['objectInstanceId']} - GET all Performance Thresholds Log Trying to get all thresholds present in the NFVO Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} GET Performance Thresholds with attribute-based filter Log Trying to get thresholds present in the NFVO with filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_OK_Threshold} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds?${FILTER_OK_Threshold} ${output}= Output response Set Suite Variable ${response} ${output} GET Performance Thresholds with invalid attribute-based filter Log Trying to get thresholds present in the NFVO with invalid filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_KO} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds?${FILTER_KO} ${output}= Output response Set Suite Variable ${response} ${output} GET NS performance Thresholds with invalid resource endpoint Log Trying to get thresholds present in the NFVO with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/threshold + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/threshold ${output}= Output response Set Suite Variable ${response} ${output} Send Post Request Create new Performance Threshold Log Creating a new THreshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${request}= Get File jsons/CreateThresholdRequest.json - POST ${apiRoot}/${apiName}/${apiVersion}/thresholds ${request} + ${template}= Get File jsons/CreateThresholdRequest.json + ${body}= Format String ${template} pmJobId=${pmJobId} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${body} ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for all Performance Thresholds Log PUT THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/thresholds + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for all Performance Thresholds Log PUT THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/thresholds + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for all Performance Thresholds Log DELETE THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} - -Check Postcondition Thresholds Exist - Log Checking that Thresholds still exists - GET all Performance Thresholds Check Postcondition Threshold Exists Log Checking that Threshold exists Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${response['body']['id']} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 200 @@ -423,66 +402,65 @@ Check Postcondition Threshold Exists Check HTTP Response Body Thresholds match the requested attribute-based filter Log Checking that attribute-based filter is matched - @{words} = Split String ${FILTER_OK_Threshold} ,${SEPERATOR} + @{words} = Split String ${FILTER_OK_Threshold} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['objectInstanceId']} @{words}[1] GET Individual NS performance Threshold Log Trying to get a Threhsold present in the NFVO Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} GET individual NS performance Threshold with invalid resource identifier Log Trying to get a Threhsold with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${erroneousThresholdId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${erroneousThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual NS performance Threshold Log Trying to delete a Threhsold in the NFVO - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual NS performance Threshold with invalid resource identifier Log Trying to delete a Threhsold in the NFVO with invalid id - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds/${erroneousThresholdId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${erroneousThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual NS performance Threshold Log Trying to create new threshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/thresholds/${newThresholdId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${newThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for individual NS performance Threshold Log Trying to PUT threshold Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PUT ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Patch request for individual NS performance Threshold Log Trying to PUT threshold Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} - ${origOutput}= Output response - Set Suite Variable ${origResponse} ${origOutput} - PATCH ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} + Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body}= Get File jsons/ThresholdModifications.json + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -493,15 +471,6 @@ Check Postcondition NS performance Threshold is Unmodified (Implicit) ${threshold}= evaluate json.loads('''${response['body']}''') json Should Be Equal ${origresponse['body']['id']} ${threshold.id} Should Be Equal ${origresponse['body']['criteria']} ${threshold.criteria} - -Check Postcondition NS performance Threshold is not Created - Log Trying to get a new Threshold - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${newThresholdId} - ${output}= Output response - Set Suite Variable ${response} ${output} - Check HTTP Response Status Code Is 404 Check Postcondition NS performance Threshold is Deleted Log Check Postcondition Threshold is deleted @@ -513,136 +482,11 @@ Check HTTP Response Body Threshold Identifier matches the requested Threshold Should Be Equal ${response['body']['id']} ${thresholdId} Log Pm Job identifier as expected - - -Get all NS Performance Subscriptions - [Documentation] The client can use this method to query the list of active subscriptions to Performance management notifications - ... subscribed by the client. - ... This method shall follow the provisions specified in the Tables 7.4.7.3.2-1 and 7.4.7.3.2-2 for URI query parameters, - ... request and response data structures, and response codes. - Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions - ${output}= Output response - Set Suite Variable ${response} ${output} - - -Get NS Performance Subscriptions with attribute-based filters - [Documentation] The client can use this method to query the list of active subscriptions to Performance management notifications - ... subscribed by the client. - ... This method shall follow the provisions specified in the Tables 7.4.7.3.2-1 and 7.4.7.3.2-2 for URI query parameters, - ... request and response data structures, and response codes. - Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ok} - ${output}= Output response - Set Suite Variable ${response} ${output} - - -Get NS Performance Subscriptions with invalid attribute-based filters - [Documentation] The client can use this method to query the list of active subscriptions to Performance management notifications - ... subscribed by the client. - ... This method shall follow the provisions specified in the Tables 7.4.7.3.2-1 and 7.4.7.3.2-2 for URI query parameters, - ... request and response data structures, and response codes. - Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ko} - ${output}= Output response - Set Suite Variable ${response} ${output} - - -Get NS Performance Subscriptions with invalid resource endpoint - [Documentation] The client can use this method to query the list of active subscriptions to Performance management notifications - ... subscribed by the client. - ... This method shall follow the provisions specified in the Tables 7.4.7.3.2-1 and 7.4.7.3.2-2 for URI query parameters, - ... request and response data structures, and response codes. - Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscription - ${output}= Output response - Set Suite Variable ${response} ${output} - - -Send Post Request for NS Performance Subscription - [Documentation] The POST method creates a new subscription - ... This method shall follow the provisions specified in the Tables 7.4.7.3.1-1 and 7.4.7.3.1-2 for URI query parameters, - ... request and response data structures, and response codes. - ... Creation of two subscription resources with the same callbackURI and the same filter can result in performance - ... degradation and will provide duplicates of notifications to the OSS, and might make sense only in very rare use cases. - ... Consequently, the NFVO may either allow creating a subscription resource if another subscription resource with the - ... same filter and callbackUri already exists (in which case it shall return the "201 Created" response code), or may decide - ... to not create a duplicate subscription resource (in which case it shall return a "303 See Other" response code referencing - ... the existing subscription resource with the same filter and callbackUri). - Set headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body_request}= Get File jsons/subscriptions.json - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body_request} - ${output}= Output response - Set Suite Variable ${response} ${output} - Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 - ... Check Notification Endpoint - - -Send Post Request for Duplicated NS Performance Subscription - [Documentation] The POST method creates a new subscription - ... This method shall follow the provisions specified in the Tables 7.4.7.3.1-1 and 7.4.7.3.1-2 for URI query parameters, - ... request and response data structures, and response codes. - ... Creation of two subscription resources with the same callbackURI and the same filter can result in performance - ... degradation and will provide duplicates of notifications to the OSS, and might make sense only in very rare use cases. - ... Consequently, the NFVO may either allow creating a subscription resource if another subscription resource with the - ... same filter and callbackUri already exists (in which case it shall return the "201 Created" response code), or may decide - ... to not create a duplicate subscription resource (in which case it shall return a "303 See Other" response code referencing - ... the existing subscription resource with the same filter and callbackUri). - Set headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body_request}= Get File jsons/subscriptions.json - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body_request} - ${output}= Output response - Set Suite Variable ${response} ${output} - Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} - ... Check Notification Endpoint - - - -Send Put Request for NS Performance Subscriptions - [Documentation] This method is not supported. When this method is requested on this resource, the NFVO shall return a "405 Method - ... Not Allowed" response as defined in Clause 4.3.5.4. - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions - ${output}= Output response - Set Suite Variable ${response} ${output} - - -Send Patch Request for NS Performance Subscriptions - [Documentation] This method is not supported. When this method is requested on this resource, the NFVO shall return a "405 Method - ... Not Allowed" response as defined in Clause 4.3.5.4. - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions - ${output}= Output response - Set Suite Variable ${response} ${output} - - -Send Delete Request for NS Performance Subscriptions - [Documentation] This method is not supported. When this method is requested on this resource, the NFVO shall return a "405 Method - ... Not Allowed" response as defined in Clause 4.3.5.4. - Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions - ${output}= Output response - Set Suite Variable ${response} ${output} - - Check HTTP Response Status Code Is [Arguments] ${expected_status} Should Be Equal As Strings ${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 @@ -654,151 +498,26 @@ Check HTTP Response Body Json Schema Is Check HTTP Response Body Is Empty Should Be Empty ${response['body']} Log No json schema is provided. Validation OK - - -Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter - Log Check Response includes NS Package Management according to filter - @{words} = Split String ${filter_ok} ,${SEPERATOR} - Should Be Equal As Strings ${response['body'][0]['callbackUri']} @{words}[1] - -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 - Should Be Equal ${response['body']['callbackUri']} ${subscription['callbackUri']} - - -Check Postcondition NS Performance Subscription Is Set - Log Check Postcondition subscription exist - Log Trying to get the subscription - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${response['body']['id']} - ${output}= Output response - Set Suite Variable ${response} ${output} - Check HTTP Response Status Code Is 200 - - -Check Postcondition Subscription Resource URI Returned in Location Header Is Available - Log Going to check postcondition - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${response['headers']['Location']} - Integer response status 200 - Log Received a 200 OK as expected - ${contentType}= Output response headers Content-Type - Should Contain ${contentType} application/json - ${result}= Output response body - Validate Json PmSubscriptions.schema.json ${result} - Log Validated PmSubscriptions schema - ${body}= Get File jsons/subscriptions.json - ${subscription}= evaluate json.loads('''${body}''') json - Should Be Equal ${result['callbackUri']} ${subscription['callbackUri']} - Log Validated Issued subscription is same as original - -Get Individual NS Performance Subscription - Log Trying to get a single subscription identified by subscriptionId - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - ${output}= Output response - Set Suite Variable ${response} ${output} - -GET individual NS Performance Subscription with invalid resource identifier - Log Trying to perform a request on a subscriptionID which doesn't exist - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} - ${output}= Output response - Set Suite Variable ${response} ${output} - -Send Delete request for individual NS Performance Subscription - Log Trying to perform a DELETE on a subscriptionId - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - ${output}= Output response - Set Suite Variable ${response} ${output} - -Check Postcondition NS Performance Subscription is Deleted - Log Check Postcondition Subscription is deleted - GET individual NS Performance Subscription - Check HTTP Response Status Code Is 404 - -Send Delete request for individual NS Performance Subscription with invalid resource identifier - Log Trying to perform a DELETE on a subscriptionId which doesn't exist - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} - ${output}= Output response - Set Suite Variable ${response} ${output} - -Send Post request for individual NS Performance Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId} - ${output}= Output response - Set Suite Variable ${response} ${output} - -Send Put request for individual NS Performance Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - ${origOutput}= Output response - Set Suite Variable ${origResponse} ${origOutput} - PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - ${output}= Output response - Set Suite Variable ${response} ${output} - -Send Patch request for individual NS Performance Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - ${origOutput}= Output response - Set Suite Variable ${origResponse} ${origOutput} - PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} - ${output}= Output response - Set Suite Variable ${response} ${output} - -Check Postcondition NS Performance Subscription is Unmodified (Implicit) - Log Check postconidtion subscription not modified - GET individual NS Performance Subscription - Log Check Response matches original VNF Threshold - ${subscription}= evaluate json.loads('''${response['body']}''') json - Should Be Equal ${origResponse['body']['id']} ${subscription.id} - Should Be Equal ${origResponse['body']['callbackUri']} ${subscription.callbackUri} - -Check Postcondition NS Performance Subscription is not Created - Log Trying to get a new subscription - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId} - ${output}= Output response - Set Suite Variable ${response} ${output} - Check HTTP Response Status Code Is 404 - -Check HTTP Response Body Subscription Identifier matches the requested Subscription - Log Trying to check response ID - Should Be Equal ${response['body']['id']} ${subscriptionId} - Log Subscription identifier as expected - + Check HTTP Response Header Contains [Arguments] ${CONTENT_TYPE} Should Contain ${response['headers']} ${CONTENT_TYPE} Log Header is present - Create Sessions Pass Execution If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 0 MockServer not started as NFVO is not checking the notification endpoint Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue - Create Mock Session ${callback_uri} - - + Create Mock Session ${callback_uri}:${callback_port} + Check Notification Endpoint - &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} -Check LINK in Header +Check HTTP Response Header Contains Location ${linkURL}= Get Value From Json ${response['headers']} $..Link - Should Not Be Empty ${linkURL} - + Should Not Be Empty ${linkURL} \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/NotificationEndpoint.robot b/SOL005/NSPerformanceManagement-API/NotificationEndpoint.robot new file mode 100644 index 0000000000000000000000000000000000000000..3f7aca72452a73afa84e6aed5fdb24901c5c6560 --- /dev/null +++ b/SOL005/NSPerformanceManagement-API/NotificationEndpoint.robot @@ -0,0 +1,68 @@ +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Library JSONLibrary +Library OperatingSystem +Library String +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +NS Performance Information Availability Notification + [Documentation] Test ID: 5.3.4.10.1 + ... Test title: NS Performance Information Availability Notification + ... Test objective: The objective is to test that NS Performance Information Availability Notification is delivered with success to the notification consumer + ... Pre-conditions: A NS performance job is created, and information availability notifications is available in the NFVO. + ... Reference: Clause 7.4.9.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post NS Performance Information Availability Notification + Check HTTP Response Status Code Is 204 + +NS Threshold Crossed Notification + [Documentation] Test ID: 5.3.4.10.2 + ... Test title: NS Threshold Crossed Notification + ... Test objective: The objective is to test that NS Threshold Crossed Notification is delivered with success to the notification consumer + ... Pre-conditions: A NS performance job is created, and threshold crossed notifications is available in the NFVO. + ... Reference: Clause 7.4.9.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post NS Threshold Crossed Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} + Integer response status 200 + Validate Json response body PmJob.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post NS Performance Information Availability Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body} = Get File jsons/PerformanceInformationAvailableNotification.json + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post NS Threshold Crossed Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body} = Get File jsons/ThresholdCrossedNotification.json + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/Notifications.robot b/SOL005/NSPerformanceManagement-API/Notifications.robot index fcc032436e9e733cee6bddd93e7f7a47acbd82b2..b973b2c6e0a6692f6ab8947ae2961500f87fd949 100644 --- a/SOL005/NSPerformanceManagement-API/Notifications.robot +++ b/SOL005/NSPerformanceManagement-API/Notifications.robot @@ -1,5 +1,4 @@ *** Setting *** -Resource environment/notifications.txt Resource environment/variables.txt Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true @@ -17,7 +16,7 @@ NS Performance Information Availability Notification ... Test title: NS Performance Information Availability Notification ... Test objective: The objective is to test the dispatch of NS Performance Information Availability Notification when new NS performance information is available in the NFVO, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A NS performance job is created, and a subscription for information availability notifications is available in the NFVO. - ... Reference: Clause 7.4.9.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.9.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -30,7 +29,7 @@ NS Threshold Crossed Notification ... Test title: NS Threshold Crossed Notification ... Test objective: The objective is to test the dispatch of NS Threshold Crossed Notification when a previously set NS performance metric threshold is crossed, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A NS performance job is created, and a threshold subscription is available in the NFVO. - ... Reference: Clause 7.4.9.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.9.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -86,8 +85,10 @@ Configure Notification Performance Information Available Handler set to dictionary ${json} notificationType ${type} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Threshold Crossed Handler @@ -96,8 +97,10 @@ Configure Notification Threshold Crossed Handler set to dictionary ${json} notificationType ${type} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL005/NSPerformanceManagement-API/PMJobs.robot b/SOL005/NSPerformanceManagement-API/PMJobs.robot index 2fcdc9a57d43e4107656a8b47bdf853fad1b6b37..2d21210a73b2db45e21bbf7a4eff0363cc1f0f23 100644 --- a/SOL005/NSPerformanceManagement-API/PMJobs.robot +++ b/SOL005/NSPerformanceManagement-API/PMJobs.robot @@ -4,7 +4,6 @@ Resource environment/variables.txt # Generic Parameters Resource NSPerformanceManagementKeywords.robot Library JSONLibrary Library OperatingSystem -Resource environment/pmJobs.txt Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library MockServerLibrary @@ -14,7 +13,7 @@ GET all NS Performance Monitoring Jobs ... Test title: GET all NS Performance Monitoring Jobs ... Test objective: The objective is to test the retrieval of all the available NS performance monitoring jobs and perform a JSON schema and content validation of the collected jobs data structure ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -28,7 +27,7 @@ GET NS Performance Monitoring Jobs with attribute-based filter ... Test title: GET all NS Performance Monitoring Jobs with attribute-based filter ... Test objective: The objective is to test the retrieval of NS performance monitoring jobs using attribute-based filter, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued attribute-based filter ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -42,7 +41,7 @@ GET all NS Performance Monitoring Jobs with "all_fields" attribute selector ... Test title: GET all NS Performance Monitoring Jobs with "all_fields" attribute selector ... Test objective: The objective is to test the retrieval of all NS performance monitoring jobs "all_fields" attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued "all_fileds" selector ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. - ... Reference: Clause 4.3.3.2.1, 7.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 4.3.3.2.1, 7.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -56,7 +55,7 @@ GET all NS Performance Monitoring Jobs with "exclude_default" attribute selector ... Test title: GET all NS Performance Monitoring Jobs with "exclude_default" attribute selector ... Test objective: The objective is to test the retrieval of all NS performance monitoring jobs "exclude_default" attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued "exclude_default" selector ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. - ... Reference: Clause 4.3.3.2.1, 7.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 4.3.3.2.1, 7.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -65,26 +64,26 @@ GET all NS Performance Monitoring Jobs with "exclude_default" attribute selector Check HTTP Response Body Json Schema Is PmJobs Check HTTP Response Body PmJobs Matches the requested exclude_default selector -GET all NS Performance Monitoring Jobs with "include" attribute selector +GET all NS Performance Monitoring Jobs with "fields" attribute selector [Documentation] Test ID: 5.3.4.1.5 - ... Test title: GET all NS Performance Monitoring Jobs with "include" attribute selector - ... Test objective: The objective is to test the retrieval of all NS performance monitoring jobs "include" attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued "include" selector + ... Test title: GET all NS Performance Monitoring Jobs with "fields" attribute selector + ... Test objective: The objective is to test the retrieval of all NS performance monitoring jobs "fields" attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued "include" selector ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. - ... Reference: Clause 4.3.3.2.1, 7.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 4.3.3.2.1, 7.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO supports the use of "include" attribute selector ... Post-Conditions: none - GET NS Performance Monitoring Jobs with include attribute selector + GET NS Performance Monitoring Jobs with fields attribute selector Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is PmJobs - Check HTTP Response Body PmJobs Matches the requested include selector + Check HTTP Response Body PmJobs Matches the requested selector GET all NS Performance Monitoring Jobs with "exclude" attribute selector [Documentation] Test ID: 5.3.4.1.6 ... Test title: GET all NS Performance Monitoring Jobs with exclude_fields attribute selector ... Test objective: The objective is to test the retrieval of all NS performance monitoring jobs "exclude" attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued "exclude" selector ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. - ... Reference: Clause 4.3.3.2.1, 7.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 4.3.3.2.1, 7.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO supports the use of "exclude" attribute selector ... Post-Conditions: none @@ -98,7 +97,7 @@ GET NS Performance Monitoring Jobs with invalid attribute-based filter ... Test title: GET NS Performance Monitoring Jobs with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of NS performance monitoring jobs fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -111,19 +110,20 @@ GET NS Performance Monitoring Jobs with invalid resource endpoint ... Test title: GET NS Performance Monitoring Jobs with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of NS performance monitoring jobs fails when using invalid resource endpoint ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET NS Performance Monitoring Jobs with invalid resource endpoint Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails Create new NS Performance Monitoring Job [Documentation] Test ID: 5.3.4.1.9 ... Test title: Create a new NS Performance Monitoring Job ... Test objective: The objective is to test the creation of a new NS performance monitoring job and perform the JSON schema validation of the returned job data structure ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. - ... Reference: Clause 7.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The NS Performance Job is successfully created on the NFVO @@ -137,7 +137,7 @@ PUT all NS Performance Monitoring Jobs - Method not implemented ... Test title: PUT all NS Performance Monitoring Jobs - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify NS Performance Monitoring Jobs ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. - ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -149,7 +149,7 @@ PATCH all NS Performance Monitoring Jobs - Method not implemented ... Test title: PATCH all NS Performance Monitoring Jobs - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update NS Performance Monitoring Jobs ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. - ... Reference: Clause 7.4.2.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.2.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -161,36 +161,49 @@ DELETE all NS Performance Monitoring Jobs - Method not implemented ... Test title: DELETE all NS Performance Monitoring Jobs - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete NS Performance Monitoring Jobs ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. - ... Reference: Clause 7.4.2.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.2.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS Performance Monitoring Jobs are not deleted by the failed operation + ... Post-Conditions: none Send PATCH Request for all NS Performance Monitoring Jobs Check HTTP Response Status Code Is 405 - Check Postcondition NS Performance Monitoring Jobs Exist GET all NS Performance Monitoring Jobs as Paged Response [Documentation] Test ID: 5.3.4.1.13 ... Test title: GET all NS Performance Monitoring Jobs as Paged Response ... Test objective: The objective is to test the retrieval of all the available NS performance monitoring jobs as paged response. ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET all NS Performance Monitoring Jobs Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contains Location GET NS Performance Monitoring Jobs - Bad Request Response too Big [Documentation] Test ID: 5.3.4.1.14 ... Test title: GET NS Performance Monitoring Jobs - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of NS performance monitoring jobs fails because reponse is too big, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET all NS Performance Monitoring Jobs Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file + Check HTTP Response Body Json Schema Is ProblemDetails + +GET all NS Performance Monitoring Jobs with "fields" and "exclude_default" attribute selector + [Documentation] Test ID: 5.3.4.1.15 + ... Test title: GET all NS Performance Monitoring Jobs with "fields" and "exclude_default" attribute selector + ... Test objective: The objective is to test the retrieval of all NS performance monitoring jobs "fields" and "exclude_default" attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued selector + ... Pre-conditions: A NS instance is instantiated. One or more NS performance jobs are set in the NFVO. + ... Reference: Clause 4.3.3.2.1, 7.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO supports the use of "include" attribute selector + ... Post-Conditions: none + GET NS Performance Monitoring Jobs with fields and exclude_default attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJobs + Check HTTP Response Body PmJobs Matches the requested selector \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/Subscriptions.robot b/SOL005/NSPerformanceManagement-API/Subscriptions.robot deleted file mode 100644 index 7bfa09b4fe2df68bde3d0f7910ad551a28ad0fc9..0000000000000000000000000000000000000000 --- a/SOL005/NSPerformanceManagement-API/Subscriptions.robot +++ /dev/null @@ -1,182 +0,0 @@ -*** Settings *** -Resource environment/variables.txt # Generic Parameters -Resource environment/subscriptions.txt -Resource NSPerformanceManagementKeywords.robot -Library OperatingSystem -Library JSONSchemaLibrary schemas/ -Library JSONLibrary -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Library MockServerLibrary -Library Process -Suite Setup Create Sessions -Suite Teardown Terminate All Processes kill=true - -*** Test Cases *** -Get All NS Performance Subscriptions - [Documentation] Test ID: 5.3.4.6.1 - ... Test title: Get All NS Performance Subscriptions - ... Test objective: The objective is to test the retrieval of all NS Performance subscriptions and perform a JSON schema validation of the returned subscriptions data structure - ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. - ... Reference: Clause 7.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get all NS Performance Subscriptions - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is PmSubscriptions - - -Get NS Performance Subscriptions with attribute-based filter - [Documentation] Test ID: 5.3.4.6.2 - ... Test title: Get NS Performance Subscriptions with attribute-based filter - ... Test objective: The objective is to test the retrieval of NS Performance subscriptions using attribute-based filter, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued attribute-based filters - ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. - ... Reference: Clause 7.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get NS Performance Subscriptions with attribute-based filters - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is PmSubscriptions - Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter - - -Get NS Performance Subscriptions with invalid attribute-based filter - [Documentation] Test ID: 5.3.4.6.3 - ... Test title: Get NS Performance Subscriptions with attribute-based filters - ... Test objective: The objective is to test that the retrieval of NS Performance subscriptions fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response. - ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. - ... Reference: Clause 7.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get NS Performance Subscriptions with invalid attribute-based filters - Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails - - -GET NS Performance Subscription with invalid resource endpoint - [Documentation] Test ID: 5.3.4.6.4 - ... Test title: GET NS Performance Subscription with invalid resource endpoint - ... Test objective: The objective is to test that the retrieval of all NS Performance subscriptions fails when using invalid resource endpoint. - ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. - ... Reference: Clause 7.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get NS Performance Subscriptions with invalid resource endpoint - Check HTTP Response Status Code Is 404 - - -Create new NS Performance subscription - [Documentation] Test ID: 5.3.4.6.5 - ... Test title: Create new NS Performance subscription - ... Test objective: The objective is to test the creation of a new NS Performance subscription and perform a JSON schema and content validation of the returned subscription data structure - ... Pre-conditions: none - ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: The NS Performance subscription is successfully set and it matches the issued subscription - Send Post Request for NS Performance Subscription - Check HTTP Response Status Code Is 201 - Check HTTP Response Body Json Schema Is PmSubscription - Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription - Check Postcondition NS Performance Subscription Is Set - - -Create duplicated NS Performance subscription with NFVO not creating duplicated subscriptions - [Tags] no-duplicated-subs - [Documentation] Test ID: 5.3.4.6.6 - ... Test title: Create duplicated NS Performance subscription with NFVO not creating duplicated subscriptions - ... Test objective: The objective is to test the attempt of a creation of a duplicated NS Performance subscription and check that no new subscription is created by the NFVO and a link to the original subscription is returned - ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. - ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The NFVO does not support the creation of duplicated subscriptions - ... Post-Conditions: The existing NS Performance subscription returned is available in the NFVO - Send Post Request for Duplicated NS Performance Subscription - Check HTTP Response Status Code Is 303 - Check HTTP Response Body Is Empty - Check HTTP Response Header Contains Location - Check Postcondition Subscription Resource URI Returned in Location Header Is Available - -Create duplicated NS Performance subscription with NFVO creating duplicated subscriptions - [Tags] duplicated-subs - [Documentation] Test ID: 5.3.4.6.7 - ... Test title: Create duplicated NS Performance subscription with NFVO creating duplicated subscriptions - ... Test objective: The objective is to test the creation of a duplicated NS Performance subscription and perform a JSON schema and content validation of the returned duplicated subscription data structure - ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. - ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The NFVO supports the creation of duplicated subscriptions - ... Post-Conditions: The duplicated NS Performance subscription is successfully set and it matches the issued subscription - Send Post Request for Duplicated NS Performance Subscription - Check HTTP Response Status Code Is 201 - Check HTTP Response Body Json Schema Is PmSubscription - Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription - Check Postcondition NS Performance Subscription Is Set - - -PUT NSD Performance Subscriptions - Method not implemented - [Documentation] Test ID: 5.3.4.6.8 - ... Test title: PUT NS Performance Subscriptions - Method not implemented - ... Test objective: The objective is to test that PUT method is not allowed to modify NS Performance subscriptions - ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. - ... Reference: Clause 7.4.7.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send Put Request for NS Performance Subscriptions - Check HTTP Response Status Code Is 405 - - -PATCH NSD Performance Subscriptions - Method not implemented - [Documentation] Test ID: 5.3.4.6.9 - ... Test title: PATCH NS Performance Subscriptions - Method not implemented - ... Test objective: The objective is to test that PATCH method is not allowed to update NS Performance subscriptions - ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. - ... Reference: Clause 7.4.7.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Send Patch Request for NS Performance Subscriptions - Check HTTP Response Status Code Is 405 - - -DELETE NSD Performance Subscriptions - Method not implemented - [Documentation] Test ID: 5.3.4.6.10 - ... Test title: DELETE NS Performance Subscriptions - Method not implemented - ... Test objective: The objective is to test that DELETE method is not allowed to delete NS Performance subscriptions - ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. - ... Reference: Clause 7.4.7.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: The NS Performance subscriptions are not deleted by the failed operation - Send Delete Request for NS Performance Subscriptions - Check HTTP Response Status Code Is 405 - -Get All NS Performance Subscriptions as Paged Response - [Documentation] Test ID: 5.3.4.6.11 - ... Test title: Get All NS Performance Subscriptions as Paged Response - ... Test objective: The objective is to test the retrieval of all NS Performance subscriptions as paged response. - ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. - ... Reference: Clause 7.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get all NS Performance Subscriptions - Check HTTP Response Status Code Is 200 - Check LINK in Header - -Get NS Performance Subscriptions - Bad Request Response too Big - [Documentation] Test ID: 5.3.4.6.12 - ... Test title: Get NS Performance Subscriptions - Bad Request Response too Big - ... Test objective: The objective is to test that the retrieval of NS Performance subscriptions fails because response is too big, and perform the JSON schema validation of the failed operation HTTP response. - ... Pre-conditions: At least one NS Performance subscription is available in the NFVO. - ... Reference: Clause 7.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: none - ... Post-Conditions: none - Get all NS Performance Subscriptions - Check HTTP Response Status Code Is 400 - Check HTTP Response Body Json Schema Is ProblemDetails \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/Thresholds.robot b/SOL005/NSPerformanceManagement-API/Thresholds.robot index 8affd84fe24ce7a063c29b97aca8bc4d2aeb5c7f..cc1bc0fc4d66c7067b1dce2ca6ec454924a86a2f 100644 --- a/SOL005/NSPerformanceManagement-API/Thresholds.robot +++ b/SOL005/NSPerformanceManagement-API/Thresholds.robot @@ -5,7 +5,6 @@ Resource environment/variables.txt # Generic Parameters Resource NSPerformanceManagementKeywords.robot Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Resource environment/thresholds.txt Library OperatingSystem *** Test Cases *** @@ -14,7 +13,7 @@ GET All Performance Thresholds ... Test title: GET All Performance Thresholds ... Test objective: The objective is to test the retrieval of all the available NS performance thresholds and perform a JSON schema validation of the collected thresholds data structure ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -27,7 +26,7 @@ GET Performance Thresholds with attribute-based filter ... Test title: GET Performance Thresholds with attribute-based filter ... Test objective: The objective is to test the retrieval of all the available NS performance thresholds when using attribute-based filters, perform a JSON schema validation of the collected thresholds data structure, and verify that the retrieved information matches the issued attribute-based filter ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -41,19 +40,20 @@ GET Performance Thresholds with invalid attribute-based filter ... Test title: GET Performance Thresholds with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of NS performance thresholds fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET Performance Thresholds with invalid attribute-based filter Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails GET Performance Thresholds with invalid resource endpoint [Documentation] Test ID: 5.3.4.4.4 ... Test title: GET Performance Thresholds with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of NS performance thresholds fails when using invalid resource endpoint, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -66,7 +66,7 @@ Create new Performance Threshold ... Test title: Create new Performance Threshold ... Test objective: The objective is to test the creation of a new NS performance threshold and perform the JSON schema validation of the returned threshold data structure ... Pre-conditions: A NS instance is instantiated. - ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The NS performance Threshold is successfully created on the NFVO @@ -81,7 +81,7 @@ PUT Performance Thresholds - Method not implemented ... Test title: PUT Performance Thresholds - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify NS performance Thresholds ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. - ... Reference: Clause 7.4.5.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.5.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -93,7 +93,7 @@ PATCH Performance Thresholds - Method not implemented ... Test title: PATCH Performance Thresholds - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify NS performance Thresholds ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. - ... Reference: Clause 7.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -105,33 +105,32 @@ DELETE Performance Thresholds - Method not implemented ... Test title: DELETE Performance Thresholds - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to update NS performance Thresholds ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. - ... Reference: Clause 7.4.5.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.5.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The NS performance thresholds are not deleted by the failed operation + ... Post-Conditions: none Send DELETE Request for all Performance Thresholds Check HTTP Response Status Code Is 405 - Check Postcondition Thresholds Exist GET All Performance Thresholds as Paged Response [Documentation] Test ID: 5.3.4.4.9 ... Test title: GET All Performance Thresholds as Paged Response ... Test objective: The objective is to test the retrieval of all the available NS performance thresholds as paged response. ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET all Performance Thresholds Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contains Location GET Performance Thresholds - Bad Request Response too Big [Documentation] Test ID: 5.3.4.4.10 ... Test title: GET Performance Thresholds - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of NS performance thresholds fails because reponse is too big, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A NS instance is instantiated. One or more NS performance thresholds are set in the NFVO. - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none diff --git a/SOL005/NSPerformanceManagement-API/environment/IndividualPmJob.txt b/SOL005/NSPerformanceManagement-API/environment/IndividualPmJob.txt deleted file mode 100644 index 99a00a7484150980769bc2d9c572d6dafc1331b5..0000000000000000000000000000000000000000 --- a/SOL005/NSPerformanceManagement-API/environment/IndividualPmJob.txt +++ /dev/null @@ -1,6 +0,0 @@ -*** Variables *** -${pmJobId} 29f4ff6a-be91-4ec8-856e-fcf1e2479e4e -${erroneousPmJobId} erroneousPmJobId -${response}= httpresponse -${OrigResponse}= httpresponse -${newPmJobId} newPmJobId diff --git a/SOL005/NSPerformanceManagement-API/environment/individualSubscription.txt b/SOL005/NSPerformanceManagement-API/environment/individualSubscription.txt deleted file mode 100644 index db29963dfdd9fc8f2f9e9a61d13696ce60b864a9..0000000000000000000000000000000000000000 --- a/SOL005/NSPerformanceManagement-API/environment/individualSubscription.txt +++ /dev/null @@ -1,6 +0,0 @@ -*** Variables *** -${subscriptionId} 17563e75-0e14-4bd7-94b4-6bbb869c79aa -${erroneousSubscriptionId} erroneousSubscriptionId -${newSubscriptionId} newSubsciptionId -${response} httpresponse -${origResponse} httpresponse diff --git a/SOL005/NSPerformanceManagement-API/environment/individualThresholds.txt b/SOL005/NSPerformanceManagement-API/environment/individualThresholds.txt deleted file mode 100644 index 92faec2b7b5be23bdf06dddc847df117bb1d2f58..0000000000000000000000000000000000000000 --- a/SOL005/NSPerformanceManagement-API/environment/individualThresholds.txt +++ /dev/null @@ -1,6 +0,0 @@ -*** Variables *** -${thresholdId} 1f50d68b-82e8-4deb-bd40-c934d4d1ac0a -${erroneousThresholdId} erroneousThresholdId -${newThresholdId} newThresholdId -${response}= httpresponse -${origResponse}= httpresponse diff --git a/SOL005/NSPerformanceManagement-API/environment/notifications.txt b/SOL005/NSPerformanceManagement-API/environment/notifications.txt deleted file mode 100644 index cd1193ae50b7d17b51b86c8ce7582d1fbed8db59..0000000000000000000000000000000000000000 --- a/SOL005/NSPerformanceManagement-API/environment/notifications.txt +++ /dev/null @@ -1,12 +0,0 @@ -*** Variables *** -${callback_uri} http://localhost -${callback_port} 9091 -${callback_endpoint} /endpoint -${callback_endpoint_fwd} /endpoint/check -${callback_endpoint_error} /endpoint_404 -${sleep_interval} 20s -${total_polling_time} 2 min -${polling_interval} 10 sec - -${notification_request} [] -${notification_response} [] \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/environment/pmJobs.txt b/SOL005/NSPerformanceManagement-API/environment/pmJobs.txt deleted file mode 100644 index ee57a30913f39f012ca6687895264a8e75e27eb7..0000000000000000000000000000000000000000 --- a/SOL005/NSPerformanceManagement-API/environment/pmJobs.txt +++ /dev/null @@ -1,4 +0,0 @@ -*** Variables *** -${POS_FILTER} objectInstanceIds=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a -${NEG_FILTER} criteriaPmJob=erroneousAttributeName -${fields} criteria,objectInstanceIds diff --git a/SOL005/NSPerformanceManagement-API/environment/reports.txt b/SOL005/NSPerformanceManagement-API/environment/reports.txt deleted file mode 100644 index 6ac5f7c0b020825db1e44161c95118d9b08b5dbd..0000000000000000000000000000000000000000 --- a/SOL005/NSPerformanceManagement-API/environment/reports.txt +++ /dev/null @@ -1,7 +0,0 @@ -*** Variables *** -${pmJobId} 1f50d68b-82e8-4deb-bd40-c934d4d1ac0a -${reportId} 0fb4c875-e07f-46ca-a9dd-13907667a568 -${erroneousReportId} erroneousReportId -${newReportId} newReportId -${response}= httpresponse -${OrigResponse}= httpresponse diff --git a/SOL005/NSPerformanceManagement-API/environment/subscriptions.txt b/SOL005/NSPerformanceManagement-API/environment/subscriptions.txt deleted file mode 100644 index 78a574197d739221a5462a2884452624be7ed3fc..0000000000000000000000000000000000000000 --- a/SOL005/NSPerformanceManagement-API/environment/subscriptions.txt +++ /dev/null @@ -1,4 +0,0 @@ -*** Variables *** -${filter_ok} callbackUri=http://localhost/subscriptions -${filter_ko} erroneousFilter=erroneous -${SEPERATOR} = diff --git a/SOL005/NSPerformanceManagement-API/environment/thresholds.txt b/SOL005/NSPerformanceManagement-API/environment/thresholds.txt deleted file mode 100644 index 587560f0d556da259fb3666360ddcb090d2b6e6b..0000000000000000000000000000000000000000 --- a/SOL005/NSPerformanceManagement-API/environment/thresholds.txt +++ /dev/null @@ -1,4 +0,0 @@ -*** Variables *** -${FILTER_OK_Threshold} objectInstanceId=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a -${FILTER_KO} criterias=erroneousFilter -${SEPERATOR} = \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/environment/variables.txt b/SOL005/NSPerformanceManagement-API/environment/variables.txt index 64de1566ed183475beac88efd2a969031e80397f..1f6e3dfadca02ca67ab72c97ba747241d7569a85 100644 --- a/SOL005/NSPerformanceManagement-API/environment/variables.txt +++ b/SOL005/NSPerformanceManagement-API/environment/variables.txt @@ -2,13 +2,13 @@ ${NFVO_HOST} localhost # Hostname of the NFVO ${NFVO_PORT} 8081 # Listening port of the NFVO ${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${CONTENT_TYPE_JSON} application/json ${ACCEPT_JSON} application/json ${apiRoot} / ${AUTH_USAGE} 1 -${NEG_AUTHORIZATION} Bearer negativetoken -${apiVersion} v1 +${apiMajorVersion} v2 ${apiName} nspm ${FIELD_USAGE} 1 ${NFVO_CHECKS_NOTIF_ENDPOINT} 1 @@ -18,7 +18,7 @@ ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies. ${testOptionalMethods} 0 ${callback_port} 9091 -${callback_uri} http://172.22.1.7:${callback_port} +${callback_uri} http://172.22.1.7 ${callback_endpoint} /nspm/subscriptions ${callback_endpoint_error} /subs_404 ${sleep_interval} 20s @@ -26,5 +26,43 @@ ${sleep_interval} 20s ${total_polling_time} 2 min ${polling_interval} 10 sec +${performanceMetric} cpu_util +${thresholdType} SIMPLE +${thresholdValue} 10 +${hysteresis} 50 +${collectionPeriod} 10 +${reportingPeriod} 30 -${response} +${response} {} +${CONTENT_TYPE_PATCH} application/merge-patch+json + +${pmJobId} 29f4ff6a-be91-4ec8-856e-fcf1e2479e4e +${erroneousPmJobId} erroneousPmJobId +${newPmJobId} newPmJobId + +${thresholdId} 1f50d68b-82e8-4deb-bd40-c934d4d1ac0a +${erroneousThresholdId} erroneousThresholdId +${newThresholdId} newThresholdId +${origResponse}= httpresponse + +${callback_endpoint_fwd} /endpoint/check + +${notification_request} [] +${notification_response} [] + + +${POS_FILTER} objectInstanceIds=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a +${NEG_FILTER} criteriaPmJob=erroneousAttributeName +${fields} criteria,objectInstanceIds + + +${reportId} 0fb4c875-e07f-46ca-a9dd-13907667a568 +${erroneousReportId} erroneousReportId +${newReportId} newReportId + + +${FILTER_OK_Threshold} objectInstanceId=1f50d68b-82e8-4deb-bd40-c934d4d1ac0a +${FILTER_KO} criterias=erroneousFilter +${SEPARATOR} = + +${callbackResp} 127.0.0.1 \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/jsons/CreatePmJobRequest.json b/SOL005/NSPerformanceManagement-API/jsons/CreatePmJobRequest.json index 75549f534008035d1c44877387a37021e764c190..506e254752a4e030563c24468c28586b5882e3ac 100644 --- a/SOL005/NSPerformanceManagement-API/jsons/CreatePmJobRequest.json +++ b/SOL005/NSPerformanceManagement-API/jsons/CreatePmJobRequest.json @@ -1,9 +1,9 @@ -{ - "objectInstanceIds": ["1f50d68b-82e8-4deb-bd40-c934d4d1ac0a"], - "criteria": { - "performanceMetric": [], +{{ + "objectInstanceIds": ["{pmJobId}"], + "criteria": {{ + "performanceMetric": "{performanceMetric}", "performanceMetricGroup": [], - "collectionPeriod": 10, - "reportingPeriod": 30 - } -} \ No newline at end of file + "collectionPeriod": {collectionPeriod}, + "reportingPeriod": {reportingPeriod} + }} +}} \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/jsons/CreateThresholdRequest.json b/SOL005/NSPerformanceManagement-API/jsons/CreateThresholdRequest.json index 1e58c2bac513f36d37597e8f11bbe06d68b664cc..e5b0b975cef2efe7690becfdb99ae08b1dcd2c71 100644 --- a/SOL005/NSPerformanceManagement-API/jsons/CreateThresholdRequest.json +++ b/SOL005/NSPerformanceManagement-API/jsons/CreateThresholdRequest.json @@ -1,12 +1,11 @@ -{ - "objectInstanceIds" : "1f50d68b-82e8-4deb-bd40-c934d4d1ac0a", - "criteria" : { - "performanceMetric": "cpu_util", - "thresholdType": "SIMPLE", - "simpleThresholdDetails": { - "thresholdValue": 10, - "hysteresis": 50 - } - - } -} \ No newline at end of file +{{ + "objectInstanceIds" : "{pmJobId}", + "criteria" : {{ + "performanceMetric": "{performanceMetric}", + "thresholdType": "{thresholdType}", + "simpleThresholdDetails": {{ + "thresholdValue": {thresholdValue}, + "hysteresis": {hysteresis} + }} + }} +}} \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/jsons/PerformanceInformationAvailableNotification.json b/SOL005/NSPerformanceManagement-API/jsons/PerformanceInformationAvailableNotification.json index cbe45fa78eb1068c0153b95e2ac7a74b90231019..675d38d77aea1da6d029bb7a7b3fdccb511c8b42 100644 --- a/SOL005/NSPerformanceManagement-API/jsons/PerformanceInformationAvailableNotification.json +++ b/SOL005/NSPerformanceManagement-API/jsons/PerformanceInformationAvailableNotification.json @@ -1,13 +1,11 @@ { "id": "id", "notificationType" : "PerformanceInformationAvailableNotification", - "subscriptionId ": "subscriptionId", "timeStamp": "2012-04-21T18:25:43-05:00", "objectInstanceId": "vnfID", "_links": { - "subscription": "link to subscription", + "objectInstance": "link to instance", "pmJob" : "link to PMJob", "performanceReport": "link to PerformanceReport" } - } \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/jsons/PmJobModifications.json b/SOL005/NSPerformanceManagement-API/jsons/PmJobModifications.json new file mode 100644 index 0000000000000000000000000000000000000000..f66ab98ecb866f998aa8dd096104fbb632f2d507 --- /dev/null +++ b/SOL005/NSPerformanceManagement-API/jsons/PmJobModifications.json @@ -0,0 +1,3 @@ +{ + "callbackUri": "" +} \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/jsons/ThresholdCrossedNotification.json b/SOL005/NSPerformanceManagement-API/jsons/ThresholdCrossedNotification.json index e2dcdec9fe3f9c49e07d678f8578d66b370ca40c..a92f914d518c443ceb2b6d308ce69599609a509a 100644 --- a/SOL005/NSPerformanceManagement-API/jsons/ThresholdCrossedNotification.json +++ b/SOL005/NSPerformanceManagement-API/jsons/ThresholdCrossedNotification.json @@ -1,7 +1,6 @@ { "id": "id", "notificationType": "ThresholdCrossedNotification", - "subscriptionId ": "subscriptionId", "timeStamp": "2012-04-21T18:25:43-05:00", "thresholdId": "thresholdId", "crossingDirection": "UP", @@ -9,7 +8,7 @@ "performanceMetric": "performanceMetric", "performanceValue": 7, "_links": { - "subscription": "link to subscription", + "objectInstance": "objectInstance", "threshold": "link to threshold" } diff --git a/SOL005/NSPerformanceManagement-API/jsons/ThresholdModifications.json b/SOL005/NSPerformanceManagement-API/jsons/ThresholdModifications.json new file mode 100644 index 0000000000000000000000000000000000000000..60c7f184d6db26ba735cab6d5bc63c2c90036246 --- /dev/null +++ b/SOL005/NSPerformanceManagement-API/jsons/ThresholdModifications.json @@ -0,0 +1,3 @@ +{ + "callbackUri":"" +} \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/jsons/subscriptions.json b/SOL005/NSPerformanceManagement-API/jsons/subscriptions.json deleted file mode 100644 index 6293d99d2b56eb51db7fdd6c23884ffb69af0077..0000000000000000000000000000000000000000 --- a/SOL005/NSPerformanceManagement-API/jsons/subscriptions.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "callbackUri": "http://172.22.1.7:9091/nspm/subscriptions", - "filter": { - "notificationTypes": ["ThresholdCrossedNotification"] - } -} \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/schemas/PmJobModifications.json b/SOL005/NSPerformanceManagement-API/schemas/PmJobModifications.json new file mode 100644 index 0000000000000000000000000000000000000000..26910ec0a1c96fcb3fe56b64e936e22faef78303 --- /dev/null +++ b/SOL005/NSPerformanceManagement-API/schemas/PmJobModifications.json @@ -0,0 +1,64 @@ +{ + "description": "This type represents modifications to a PM job. It shall comply with the provisions defined in Table 7.5.2.12-1.\n", + "type": "object", + "properties": { + "callbackUri": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string", + "format": "uri" + }, + "authentication": { + "type": "object", + "required": [ + "authType" + ], + "properties": { + "authType": { + "description": "Defines the types of Authentication / Authorization which the API consumer is willing to accept when receiving a notification. Permitted values: - BASIC: In every HTTP request to the notification endpoint, use\n HTTP Basic authentication with the client credentials.\n- OAUTH2_CLIENT_CREDENTIALS: In every HTTP request to the\n notification endpoint, use an OAuth 2.0 Bearer token, obtained\n using the client credentials grant type.\n- TLS_CERT: Every HTTP request to the notification endpoint is sent\n over a mutually authenticated TLS session, i.e. not only the\n server is authenticated, but also the client is authenticated\n during the TLS tunnel setup.\n", + "type": "array", + "items": { + "type": "string", + "enum": [ + "BASIC", + "OAUTH2_CLIENT_CREDENTIALS", + "TLS_CERT" + ] + } + }, + "paramsBasic": { + "description": "Parameters for authentication/authorization using BASIC. Shall be present if authType is \"BASIC\" and the contained information has not been provisioned out of band. Shall be absent otherwise.\n", + "type": "object", + "properties": { + "userName": { + "description": "Username to be used in HTTP Basic authentication. Shall be present if it has not been provisioned out of band.\n", + "type": "string" + }, + "password": { + "description": "Password to be used in HTTP Basic authentication. Shall be present if it has not been provisioned out of band.\n", + "type": "string" + } + } + }, + "paramsOauth2ClientCredentials": { + "description": "Parameters for authentication/authorization using OAUTH2_CLIENT_CREDENTIALS. Shall be present if authType is \"OAUTH2_CLIENT_CREDENTIALS\" and the contained information has not been provisioned out of band. Shall be absent otherwise.\n", + "type": "object", + "properties": { + "clientId": { + "description": "Client identifier to be used in the access token request of the OAuth 2.0 client credentials grant type. Shall be present if it has not been provisioned out of band. The clientId and clientPassword passed in a subscription shall not be the same as the clientId and clientPassword that are used to obtain authorization for API requests. Client credentials may differ between subscriptions. The value of clientPassword should be generated by a random process.\n", + "type": "string" + }, + "clientPassword": { + "description": "Client password to be used in the access token request of the OAuth 2.0 client credentials grant type. Shall be present if it has not been provisioned out of band. The clientId and clientPassword passed in a subscription shall not be the same as the clientId and clientPassword that are used to obtain authorization for API requests. Client credentials may differ between subscriptions. The value of clientPassword should be generated by a random process.\n", + "type": "string" + }, + "tokenEndpoint": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string", + "format": "uri" + } + } + } + } + } + } + } \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/schemas/PmSubscription.schema.json b/SOL005/NSPerformanceManagement-API/schemas/PmSubscription.schema.json deleted file mode 100644 index 8fc48f07ff59d22ec8964eeb57e969c54380eca7..0000000000000000000000000000000000000000 --- a/SOL005/NSPerformanceManagement-API/schemas/PmSubscription.schema.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "description": "This type represents a subscription.\n", - "type": "object", - "required": [ - "id", - "callbackUri", - "_links" - ], - "properties": { - "id": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - }, - "filter": { - "description": "This type represents a filter that can be used to subscribe for notifications related to performance management events. It shall comply with the provisions defined in Table 7.5.3.2-1. At a particular nesting level in the filter structure, the following applies: All attributes shall match in order for the filter to match (logical \"and\" between different filter attributes). If an attribute is an array, the attribute shall match if at least one of the values in the array matches (logical \"or\" between the values of one filter attribute).\n", - "type": "object", - "properties": { - "nsInstanceSubscriptionFilter": { - "description": "This type represents subscription filter criteria to match NS instances.\n", - "type": "object", - "properties": { - "nsdIds": { - "description": "If present, match NS instances that were created based on a NSD identified by one of the nsdId values listed in this attribute.\n", - "type": "array", - "items": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - } - }, - "vnfdIds": { - "description": "If present, match NS instances that contain VNF instances that were created based on a VNFD identified by one of the vnfdId values listed in this attribute.\n", - "type": "array", - "items": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - } - }, - "pnfdIds": { - "description": "If present, match NS instances that contain PNFs that are represented by a PNFD identified by one of the pnfdId values listed in this attribute.\n", - "type": "array", - "items": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - } - }, - "nsInstanceIds": { - "description": "If present, match NS instances with an instance identifier listed in this attribute.\n", - "type": "array", - "items": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - } - }, - "nsInstanceNames": { - "description": "If present, match NS instances with a NS Instance Name listed in this attribute.\n", - "type": "array", - "items": { - "description": "This type represents stack of string values\n", - "type": "string" - } - } - } - }, - "notificationTypes": { - "description": "Match particular notification types. Permitted values: - ThresholdCrossedNotification - PerformanceInformationAvailableNotification The permitted values of the \"notificationTypes\" attribute are spelled exactly as the names of the notification types to facilitate automated code generation systems. \n", - "type": "array", - "items": { - "type": "string", - "enum": [ - "ThresholdCrossedNotification", - "PerformanceInformationAvailableNotification" - ] - } - } - } - }, - "callbackUri": { - "description": "String formatted according to IETF RFC 3986.\n", - "type": "string" - }, - "_links": { - "description": "Links to resources related to this resource.\n", - "type": "object", - "required": [ - "self" - ], - "properties": { - "self": { - "description": "This type represents a link to a resource.\n", - "type": "object", - "required": [ - "href" - ], - "properties": { - "href": { - "description": "URI of the referenced resource.\n", - "type": "string", - "format": "url" - } - } - } - } - } - } -} \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/schemas/PmSubscriptions.schema.json b/SOL005/NSPerformanceManagement-API/schemas/PmSubscriptions.schema.json deleted file mode 100644 index afe99ab68a66709eca35ad5bb8ba8c6db606c700..0000000000000000000000000000000000000000 --- a/SOL005/NSPerformanceManagement-API/schemas/PmSubscriptions.schema.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "type": "array", - "items": { - "description": "This type represents a subscription.\n", - "type": "object", - "required": [ - "id", - "callbackUri", - "_links" - ], - "properties": { - "id": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - }, - "filter": { - "description": "This type represents a filter that can be used to subscribe for notifications related to performance management events. It shall comply with the provisions defined in Table 7.5.3.2-1. At a particular nesting level in the filter structure, the following applies: All attributes shall match in order for the filter to match (logical \"and\" between different filter attributes). If an attribute is an array, the attribute shall match if at least one of the values in the array matches (logical \"or\" between the values of one filter attribute).\n", - "type": "object", - "properties": { - "nsInstanceSubscriptionFilter": { - "description": "This type represents subscription filter criteria to match NS instances.\n", - "type": "object", - "properties": { - "nsdIds": { - "description": "If present, match NS instances that were created based on a NSD identified by one of the nsdId values listed in this attribute.\n", - "type": "array", - "items": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - } - }, - "vnfdIds": { - "description": "If present, match NS instances that contain VNF instances that were created based on a VNFD identified by one of the vnfdId values listed in this attribute.\n", - "type": "array", - "items": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - } - }, - "pnfdIds": { - "description": "If present, match NS instances that contain PNFs that are represented by a PNFD identified by one of the pnfdId values listed in this attribute.\n", - "type": "array", - "items": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - } - }, - "nsInstanceIds": { - "description": "If present, match NS instances with an instance identifier listed in this attribute.\n", - "type": "array", - "items": { - "description": "An identifier with the intention of being globally unique.\n", - "type": "string" - } - }, - "nsInstanceNames": { - "description": "If present, match NS instances with a NS Instance Name listed in this attribute.\n", - "type": "array", - "items": { - "description": "This type represents stack of string values\n", - "type": "string" - } - } - } - }, - "notificationTypes": { - "description": "Match particular notification types. Permitted values: - ThresholdCrossedNotification - PerformanceInformationAvailableNotification The permitted values of the \"notificationTypes\" attribute are spelled exactly as the names of the notification types to facilitate automated code generation systems. \n", - "type": "array", - "items": { - "type": "string", - "enum": [ - "ThresholdCrossedNotification", - "PerformanceInformationAvailableNotification" - ] - } - } - } - }, - "callbackUri": { - "description": "String formatted according to IETF RFC 3986.\n", - "type": "string" - }, - "_links": { - "description": "Links to resources related to this resource.\n", - "type": "object", - "required": [ - "self" - ], - "properties": { - "self": { - "description": "This type represents a link to a resource.\n", - "type": "object", - "required": [ - "href" - ], - "properties": { - "href": { - "description": "URI of the referenced resource.\n", - "type": "string", - "format": "url" - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/schemas/ThresholdModifications.json b/SOL005/NSPerformanceManagement-API/schemas/ThresholdModifications.json new file mode 100644 index 0000000000000000000000000000000000000000..4b011194f6e21bdd4fbdfc2a3a619668a93937ed --- /dev/null +++ b/SOL005/NSPerformanceManagement-API/schemas/ThresholdModifications.json @@ -0,0 +1,64 @@ +{ + "description": "This type represents modifications to a threshold. It shall comply with the provisions defined in Table 7.5.2.11-1.\n", + "type": "object", + "properties": { + "callbackUri": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string", + "format": "uri" + }, + "authentication": { + "type": "object", + "required": [ + "authType" + ], + "properties": { + "authType": { + "description": "Defines the types of Authentication / Authorization which the API consumer is willing to accept when receiving a notification. Permitted values: - BASIC: In every HTTP request to the notification endpoint, use\n HTTP Basic authentication with the client credentials.\n- OAUTH2_CLIENT_CREDENTIALS: In every HTTP request to the\n notification endpoint, use an OAuth 2.0 Bearer token, obtained\n using the client credentials grant type.\n- TLS_CERT: Every HTTP request to the notification endpoint is sent\n over a mutually authenticated TLS session, i.e. not only the\n server is authenticated, but also the client is authenticated\n during the TLS tunnel setup.\n", + "type": "array", + "items": { + "type": "string", + "enum": [ + "BASIC", + "OAUTH2_CLIENT_CREDENTIALS", + "TLS_CERT" + ] + } + }, + "paramsBasic": { + "description": "Parameters for authentication/authorization using BASIC. Shall be present if authType is \"BASIC\" and the contained information has not been provisioned out of band. Shall be absent otherwise.\n", + "type": "object", + "properties": { + "userName": { + "description": "Username to be used in HTTP Basic authentication. Shall be present if it has not been provisioned out of band.\n", + "type": "string" + }, + "password": { + "description": "Password to be used in HTTP Basic authentication. Shall be present if it has not been provisioned out of band.\n", + "type": "string" + } + } + }, + "paramsOauth2ClientCredentials": { + "description": "Parameters for authentication/authorization using OAUTH2_CLIENT_CREDENTIALS. Shall be present if authType is \"OAUTH2_CLIENT_CREDENTIALS\" and the contained information has not been provisioned out of band. Shall be absent otherwise.\n", + "type": "object", + "properties": { + "clientId": { + "description": "Client identifier to be used in the access token request of the OAuth 2.0 client credentials grant type. Shall be present if it has not been provisioned out of band. The clientId and clientPassword passed in a subscription shall not be the same as the clientId and clientPassword that are used to obtain authorization for API requests. Client credentials may differ between subscriptions. The value of clientPassword should be generated by a random process.\n", + "type": "string" + }, + "clientPassword": { + "description": "Client password to be used in the access token request of the OAuth 2.0 client credentials grant type. Shall be present if it has not been provisioned out of band. The clientId and clientPassword passed in a subscription shall not be the same as the clientId and clientPassword that are used to obtain authorization for API requests. Client credentials may differ between subscriptions. The value of clientPassword should be generated by a random process.\n", + "type": "string" + }, + "tokenEndpoint": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string", + "format": "uri" + } + } + } + } + } + } + } \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/schemas/links.schema.json b/SOL005/NSPerformanceManagement-API/schemas/links.schema.json index 945df7daa143612fc605fd247e3edd5c18d0d258..0d6b2172ae100c566c70ee0a3cd7a858bf0ee2e8 100644 --- a/SOL005/NSPerformanceManagement-API/schemas/links.schema.json +++ b/SOL005/NSPerformanceManagement-API/schemas/links.schema.json @@ -1,53 +1,50 @@ { - "type": "array", - "items": { - "type": "object", - "description": "Links to resources related to this resource.\n", - "required": [ - "self", - "packageContent" - ], - "properties": { - "self": { - "description": "This type represents a link to a resource.\n", - "type": "object", - "required": [ - "href" - ], - "properties": { - "href": { - "description": "URI of the referenced resource.\n", - "type": "string", - "format": "url" - } + "type": "object", + "description": "Links to resources related to this resource.\n", + "required": [ + "self", + "packageContent" + ], + "properties": { + "self": { + "description": "This type represents a link to a resource.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "URI of the referenced resource.\n", + "type": "string", + "format": "url" } - }, - "vnfd": { - "description": "This type represents a link to a resource.\n", - "type": "object", - "required": [ - "href" - ], - "properties": { - "href": { - "description": "URI of the referenced resource.\n", - "type": "string", - "format": "url" - } + } + }, + "vnfd": { + "description": "This type represents a link to a resource.\n", + "type": "object", + "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", - "type": "object", - "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", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "URI of the referenced resource.\n", + "type": "string", + "format": "url" } } } diff --git a/SOL005/README.md b/SOL005/README.md index 8b8fdae30fbea15a41cb2e493b91a61051df1553..0b08282d2824ec45afba4e8a8dd582d04f95d4e8 100644 --- a/SOL005/README.md +++ b/SOL005/README.md @@ -2,7 +2,7 @@ This folder includes the NFV API conformance test descriptions for NFV SOL005 APIs. -The reference spec version is v2.6.1: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/005/02.06.01_60/gs_NFV-SOL005v020601p.pdf +The reference spec version is v2.7.1: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/005/02.07.01_60/gs_NFV-SOL005v020701p.pdf ## License diff --git a/SOL005/VNFPackageManagement-API/AccessConfigurationForExternalArtifacts.robot b/SOL005/VNFPackageManagement-API/AccessConfigurationForExternalArtifacts.robot new file mode 100644 index 0000000000000000000000000000000000000000..c8da3d0255955276eb407b4fee39dee78561fc16 --- /dev/null +++ b/SOL005/VNFPackageManagement-API/AccessConfigurationForExternalArtifacts.robot @@ -0,0 +1,109 @@ +*** 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 Access configuration for external artifacts + [Documentation] Test ID: 5.3.5.10.1 + ... Test title: Get Access configuration for external artifacts + ... Test objective: The objective is to test the GET method reads the access configuration information that is used by the NFVO to get the content of external VNF package artifacts and perform a JSON schema and content validation of the collected data structure + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get access configuration information for external artifacts + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ExternalArtifactsAccessConfig + +Get Access configuration for external artifacts - Not Found + [Documentation] Test ID: 5.3.5.10.2 + ... Test title: Get Access configuration for external artifacts - Not Found + ... Test objective: The objective is to test that the retrieval of access configuration information that is used by the NFVO to get the content of external VNF package artifacts fails because resource is not present. + ... Pre-conditions: none + ... Reference: Clause 9.4.4a.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get access configuration information for external artifacts + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails + +PUT Access configuration for external artifacts + [Documentation] Test ID: 5.3.5.10.3 + ... Test title: Access configuration for external artifacts + ... Test objective: The objective is to test that PUT method provides the access configuration information for the NFVO to download the content of external VNF package artifacts. + ... Pre-conditions: the individual VNF package resource shall have been created, and the value of "onboardingState" attribute shall equal to "CREATED" or "ERROR" + ... Reference: Clause 9.4.4a.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Check Postcondition individual VNF Package is created + Send PUT Request to access configuration information for external artifacts + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ExternalArtifactsAccessConfig + +PUT Access configuration for external artifacts - Downloading + [Documentation] Test ID: 5.3.5.10.4 + ... Test title: Access configuration for external artifacts - Downloading + ... Test objective: The objective is to test that VNF package has been uploaded successfully previously, to indicate that the access configuration information has been stored successfully by the NFVO and the NFVO now starts downloading external artifacts. + ... Pre-conditions: the individual VNF package resource shall have been created, and the value of "onboardingState" attribute shall equal to "CREATED" or "ERROR" + ... Reference: Clause 9.4.4a.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Check Postcondition individual VNF Package is created + Send PUT Request to access configuration information for external artifacts + Check HTTP Response Status Code Is 202 + +PUT Access configuration for external artifacts - Conflict + [Documentation] Test ID: 5.3.5.10.5 + ... Test title: Access configuration for external artifacts + ... Test objective: The objective is to test that PUT method provides the access configuration information for the NFVO to download the content of external VNF package artifacts. + ... Pre-conditions: the individual VNF package resource shall have been created, and the value of "onboardingState" attribute is neither "CREATED" nor "ERROR" + ... Reference: Clause 9.4.4a.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request to access configuration information for external artifacts + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST Access configuration for external artifacts - Method not implemented + [Documentation] Test ID: 5.3.5.10.6 + ... Test title: POST Access configuration for external artifacts - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create access configuration for external artifacts + ... Pre-conditions: none + ... Reference: Clause 9.4.4a.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for access configuration for external artifacts + Check HTTP Response Status Code Is 405 + +PATCH Access configuration for external artifacts - Method not implemented + [Documentation] Test ID: 5.3.5.10.7 + ... Test title: PATCH Access configuration for external artifacts - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update access configuration for external artifacts + ... Pre-conditions: none + ... Reference: Clause 9.4.4a.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for access configuration for external artifacts + Check HTTP Response Status Code Is 405 + +DELETE Access configuration for external artifacts - Method not implemented + [Documentation] Test ID: 5.3.5.10.8 + ... Test title: DELETE Access configuration for external artifacts - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete access configuration for external artifacts + ... Pre-conditions: none + ... Reference: Clause 9.4.4a.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send DELETE Request for Access configuration for external artifacts + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/ApiVersion.robot b/SOL005/VNFPackageManagement-API/ApiVersion.robot index 787f4ccf549e453b2f04a782c9f3619a3d74bb65..c3b82eec1e3b599e16d0270ecf4c0bef99c630dd 100644 --- a/SOL005/VNFPackageManagement-API/ApiVersion.robot +++ b/SOL005/VNFPackageManagement-API/ApiVersion.robot @@ -1,213 +1,212 @@ -*** Settings *** - -Resource environment/variables.txt - -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false -Library DependencyLibrary -Library JSONLibrary -Library JSONSchemaLibrary schemas/ - -*** Test Cases *** -POST API Version - Method not implemented - [Documentation] Test ID: 5.3.5.10.1 - ... Test title: POST API version - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version - [Documentation] Test ID: 5.3.5.10.2 - ... Test title: GET API Version - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version - Method not implemented - [Documentation] Test ID: 5.3.5.10.3 - ... Test title: PUT API Version - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version - Method not implemented - [Documentation] Test ID: 5.3.5.10.4 - ... Test title: PATCH API Version - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version - Method not implemented - [Documentation] Test ID: 5.3.5.10.5 - ... Test title: DELETE API Version - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -POST API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 5.3.5.10.6 - ... Test title: POST API version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version with apiMajorVerion - [Documentation] Test ID: 5.3.5.10.7 - ... Test title: GET API Version with apiMajorVerion - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 5.3.5.10.8 - ... Test title: PUT API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 5.3.5.10.9 - ... Test title: PATCH API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 5.3.5.10.10 - ... Test title: DELETE API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -*** Keywords *** -POST API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/v1/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response['body']} +*** Settings *** + +Resource environment/variables.txt +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 5.3.5.10.1 + ... Test title: POST API version - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 5.3.5.10.2 + ... Test title: GET API Version + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version - Method not implemented + [Documentation] Test ID: 5.3.5.10.3 + ... Test title: PUT API Version - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 5.3.5.10.4 + ... Test title: PATCH API Version - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 5.3.5.10.5 + ... Test title: DELETE API Version - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +POST API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 5.3.5.10.6 + ... Test title: POST API version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 5.3.5.10.7 + ... Test title: GET API Version with apiMajorVerion + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 5.3.5.10.8 + ... Test title: PUT API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 5.3.5.10.9 + ... Test title: PATCH API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 5.3.5.10.10 + ... Test title: DELETE API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/IndividualSubscription.robot b/SOL005/VNFPackageManagement-API/IndividualSubscription.robot index 06b4a44c55f8b75fc1a48fe61613c91c8170d2a1..7fc5498cfd7f01aed131f75eee456b33425e0562 100644 --- a/SOL005/VNFPackageManagement-API/IndividualSubscription.robot +++ b/SOL005/VNFPackageManagement-API/IndividualSubscription.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt # Generic Parameters -Resource environment/individualSubscription.txt +Resource environment/variables.txt Resource VNFPackageManagementKeywords.robot Library OperatingSystem Library JSONLibrary @@ -13,7 +12,7 @@ GET Individual VNF Package Subscription ... Test title: GET Individual VNF Package Subscription ... Test objective: The objective is to test the retrieval of individual VNF package subscription and perform a JSON schema and content validation of the returned subscription data structure ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 9.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -21,25 +20,27 @@ GET Individual VNF Package Subscription Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is PkgmSubscription Check HTTP Response Body Subscription Identifier matches the requested Subscription + Check HTTP Response Body PkgmSubscription content against VNF Descriptor GET Individual VNF Package Subscription with invalid resource identifier [Documentation] Test ID: 5.3.5.8.2 ... Test title: GET Individual VNF Package Subscription with invalid resource identifier ... Test objective: The objective is to test that the retrieval of an individual VNF package subscription fails when using an invalid resource identifier ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 9.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.9.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET individual VNF Package Subscription with invalid resource identifier Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails DELETE Individual VNF Package Subscription with invalid resource identifier [Documentation] Test ID: 5.3.5.8.3 ... Test title: DELETE Individual VNF Package Subscription with invalid resource identifier ... Test objective: The objective is to test that the deletion of an individual VNF package subscription fails when using an invalid resource identifier ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 9.4.9.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.9.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -51,7 +52,7 @@ POST Individual VNF Package Subscription - Method not implemented ... Test title: POST Individual VNF Package Subscription - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new VNF Package Subscription ... Pre-conditions: none - ... Reference: Clause 9.4.9.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.9.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -63,7 +64,7 @@ PUT Individual VNF Package Subscription - Method not implemented ... Test title: PUT Individual VNF Package Subscription - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing VNF Package subscription ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 9.4.9.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.9.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -75,7 +76,7 @@ PATCH Individual VNF Package Subscription - Method not implemented ... Test title: PATCH Individual VNF Package Subscription - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing VNF Package subscription ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 9.4.9.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.9.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -87,7 +88,7 @@ DELETE Individual VNF Package Subscription ... Test title: DELETE Individual VNF Package Subscription ... Test objective: The objective is to test the deletion of an individual VNF package subscription ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 9.4.9.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.9.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The VNF Package Subscription is not available anymore in the NFVO diff --git a/SOL005/VNFPackageManagement-API/IndividualVNFPackage.robot b/SOL005/VNFPackageManagement-API/IndividualVNFPackage.robot index 8e8d887c0f0d03c7fa720b8405b805e7606c8515..6e6a4d5d328cb3c558459ae3fe6b5bf12f148202 100644 --- a/SOL005/VNFPackageManagement-API/IndividualVNFPackage.robot +++ b/SOL005/VNFPackageManagement-API/IndividualVNFPackage.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt # Generic Parameters -Resource environment/individualVnfPackage.txt +Resource environment/variables.txt Resource VNFPackageManagementKeywords.robot Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false @@ -12,7 +11,7 @@ GET Individual VNF Package ... 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: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -20,25 +19,27 @@ 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 + Check HTTP Response Body vnfPkgInfo content against VNF Descriptor GET Individual VNF Package with invalid resource identifier [Documentation] Test ID: 5.3.5.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: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.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 + Check HTTP Response Body Json Schema Is ProblemDetails POST Individual VNF Package - Method not implemented [Documentation] Test ID: 5.3.5.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: Clause 9.4.3.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.3.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -50,7 +51,7 @@ PUT Individual VNF Package - Method not implemented ... 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: Clause 9.4.3.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.3.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -62,7 +63,7 @@ Disable Individual VNF Package ... Test title: Disable Individual VNF Package ... Test objective: The objective is to test the disabling of an individual VNF Package and perform a JSON schema and content validation of the collected data structure ... Pre-conditions: One or more VNF Packages are onboarded in the NFVO in ENABLED operational state. - ... Reference: Clause 9.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The VNF Package is in operational state DISABLED @@ -76,7 +77,7 @@ Disable Individual VNF Package with conflict due to operational state DISABLED ... Test title: Disable Individual VNF Package with conflict due to operational state DISABLED ... Test objective: The objective is to test that disabling an individual VNF Package that is already in DISABLED operational state fails and perform a JSON schema validation of the failed operation HTTP response ... Pre-conditions: One or more VNF Packages are onboarded in the NFVO in DISABLED operational state (Test ID 5.3.5.2.5). - ... Reference: Clause 9.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -89,7 +90,7 @@ Enable Individual VNF Package ... Test title: Enable Individual VNF Package ... Test objective: The objective is to test the enabling of an individual VNF Package and perform a JSON schema and content validation of the collected data structure ... Pre-conditions: One or more VNF Packages are onboarded in the NFVO in DISABLED operational state (Test ID 5.3.5.2.5). - ... Reference: Clause 9.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The VNF Package is in operational state ENABLED @@ -103,7 +104,7 @@ Enable Individual VNF Package with conflict due to operational state ENABLED ... Test title: Enable Individual VNF Package with conflict due to operational state ENABLED ... Test objective: The objective is to test that enabling an individual VNF Package that is already in ENABLED operational state fails and perform a JSON schema validation of the failed operation HTTP response ... Pre-conditions: One or more VNF Packages are onboarded in the NFVO in ENABLED operational state (Test ID 5.3.5.2.7). - ... Reference: Clause 9.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -116,12 +117,12 @@ DELETE Individual VNF Package ... Test title: DELETE Individual VNF Package ... Test objective: The objective is to test the deletion of an individual VNF Package ... Pre-conditions: One or more VNF packages are onboarded in the NFVO in DISABLED operational state - ... Reference: Clause 9.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The VNF Package is not available anymore in the NFVO Send DELETE Request for individual VNF Package - Check HTTP Response Status Code Is 405 + Check HTTP Response Status Code Is 204 Check Postcondition VNF Package is Deleted DELETE Individual VNF Package in operational state ENABLED @@ -129,7 +130,7 @@ DELETE Individual VNF Package in operational state ENABLED ... Test title: DELETE Individual VNF Package in operational state ENABLED ... Test objective: The objective is to test that the deletion of an individual VNF Package in operational state ENABLED 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 ENABLED operational state (Test ID 5.3.1.2.7). - ... Reference: Clause 9.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The VNF Package is not deleted by the failed operation. @@ -143,13 +144,11 @@ DELETE Individual VNF Package used for instantiated VNF instances ... 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. - ... Reference: Clause 9.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.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 Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - Check Postcondition VNF Package Exists - - + Check Postcondition VNF Package Exists \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/IndividualVNFPackageArtifacts.robot b/SOL005/VNFPackageManagement-API/IndividualVNFPackageArtifacts.robot new file mode 100644 index 0000000000000000000000000000000000000000..d1e7fecd310d1223ceef1b420277b3cee94e1293 --- /dev/null +++ b/SOL005/VNFPackageManagement-API/IndividualVNFPackageArtifacts.robot @@ -0,0 +1,144 @@ +*** 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 Individual VNF Package Artifact + [Documentation] Test ID: 5.3.5.6.1 + ... Test title: GET Individual VNF Package Artifact + ... Test objective: The objective is to test the retrieval of an individual VNF package artifact + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Individual VNF Package Artifact + Check HTTP Response Status Code Is 200 + +GET Individual VNF Package Artifact in octet stream format + [Documentation] Test ID: 5.3.5.6.2 + ... Test title: GET Individual VNF Package Artifact in octet stream format + ... Test objective: The objective is to test the retrieval of an individual VNF package artifact when the NFVO cannot determine the artifact content type. The test performs a validation that the returned artifcat in is octet-stream format + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO cannot determine the content type of the artifact + ... Post-Conditions: none + GET Individual VNF Package Artifact in octet stream format + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/octet-stream + +GET Individual VNF Package Artifact with Range Request and NFVO supporting Range Requests + [Documentation] Test ID: 5.3.5.6.3 + ... Test title: GET Individual VNF Package Artifact with Range Request and NFVO supporting Range Requests + ... Test objective: The objective is to test the retrieval of an individual VNF package artifact 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 9.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.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 Individual VNF Package Artifact 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 Individual VNF Package Artifact with Range Request and NFVO not supporting Range Requests + [Documentation] Test ID: 5.3.5.6.4 + ... Test title: GET Individual VNF Package Artifact with Range Request and NFVO not supporting Range Requests + ... Test objective: The objective is to test that the retrieval of an individual VNF package artifact, 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 artifact. + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: The NFVO does not support range requests to return single range of bytes from the VNF package artifact + ... Post-Conditions: none + GET Individual VNF Package Artifact with Range Request + Check HTTP Response Status Code Is 200 + +GET Individual VNF Package Artifact with invalid Range Request + [Documentation] Test ID: 5.3.5.6.5 + ... Test title: GET Individual VNF Package Artifact with invalid Range Request + ... Test objective: The objective is to test that the retrieval of an individual VNF package artifact 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 9.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.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 Individual VNF Package Artifact with invalid Range Request + Check HTTP Response Status Code Is 416 + +GET Individual VNF Package Artifact with invalid resource identifier + [Documentation] Test ID: 5.3.5.6.6 + ... Test title: GET Individual VNF Package Artifact with invalid resource identifier + ... Test objective: The objective is to test that the retrieval of an individual VNF package artifact fails when using an invalid resource identifier + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Individual VNF Package Artifact with invalid resource identifier + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET Individual VNF Package Artifact with conflict due to onboarding state + [Documentation] Test ID: 5.3.5.6.7 + ... Test title: GET Individual VNF Package Artifact with conflict due to onboarding state + ... Test objective: The objective is to test that the retrieval of an individual VNF package artifact 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 9.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Artifact for VNF Package in onboarding state different from ONBOARDED + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST Individual VNF Package Artifact - Method not implemented + [Documentation] Test ID: 5.3.5.6.8 + ... Test title: POST Individual 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 9.4.7.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for individual VNF Package Artifact + Check HTTP Response Status Code Is 405 + +PUT Individual VNF Package Artifact - Method not implemented + [Documentation] Test ID: 5.3.5.6.9 + ... Test title: PUT Individual 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 9.4.7.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for individual VNF Package Artifact + Check HTTP Response Status Code Is 405 + +PATCH Individual VNF Package Artifact - Method not implemented + [Documentation] Test ID: 5.3.5.6.10 + ... Test title: PATCH Individual 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 9.4.7.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for individual VNF Package Artifact + Check HTTP Response Status Code Is 405 + +DELETE Individual VNF Package Artifact - Method not implemented + [Documentation] Test ID: 5.3.5.6.11 + ... Test title: DELETE Individual 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 9.4.7.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send DELETE Request for individual VNF Package Artifact + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/ManifestInIndividualVNFPackage.robot b/SOL005/VNFPackageManagement-API/ManifestInIndividualVNFPackage.robot new file mode 100644 index 0000000000000000000000000000000000000000..75dbfc62c654525d6ce03ba57947cc911b17ae27 --- /dev/null +++ b/SOL005/VNFPackageManagement-API/ManifestInIndividualVNFPackage.robot @@ -0,0 +1,107 @@ +*** 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 Manifest in Individual VNF Package + [Documentation] Test ID: 5.3.5.11.1 + ... Test title: Get Manifest in Individual VNF Package + ... Test objective: The objective is to test that content of manifest within a NVF Package is read successfully. + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.4b.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual VNF Package in plainFormat + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is text/plain + +Get Manifest in Individual VNF Package with security information + [Documentation] Test ID: 5.3.5.11.2 + ... Test title: Get Manifest in Individual VNF Package with security information + ... Test objective: The objective is to test the retrieval of the Manifest in individual VNF package shall include in the ZIP archive the security information 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 9.4.4b.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual VNF Package with security information + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +Get Manifest in Individual VNF Package - Not Acceptable + [Documentation] Test ID: 5.3.5.11.3 + ... Test title: Get Manifest in Individual VNF Package - Not Acceptable + ... Test objective: The objective is to test that the "Accept" header is not compatible with Content type "application/zip" but "incude_signature" is provided.\ + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.4b.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual VNF Package with unacceptable request + Check HTTP Response Status Code Is 406 + Check HTTP Response Body Json Schema Is ProblemDetails + +Get Manifest in Individual VNF Package - Conflict + [Documentation] Test ID: 5.3.5.11.4 + ... Test title: Get Manifest in Individual VNF Package - Conflict + ... Test objective: The objective is to test that the operation cannot be executed currently, due to a conflict with the state of the resource. + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.4b.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get Manifest in Individual VNF Package in plainFormat + Check HTTP Response Status Code Is 409 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST Manifest in Individual VNF Package - Method not implemented + [Documentation] Test ID: 5.3.5.11.5 + ... Test title: POST Manifest in Individual VNF Package - Method not implemented + ... Test objective: The objective is to test that POST method is not allowed to create new Manifest + ... Pre-conditions: none + ... Reference: Clause 9.4.4b.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send POST Request for Manifest in individual VNF Package + Check HTTP Response Status Code Is 405 + +PUT Manifest in Individual VNF Package - Method not implemented + [Documentation] Test ID: 5.3.5.11.6 + ... Test title: PUT Manifest in Individual VNF Package - Method not implemented + ... Test objective: The objective is to test that PUT method is not allowed to modify a Manifest + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.4b.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PUT Request for Manifest in individual VNF Package + Check HTTP Response Status Code Is 405 + +PATCH Manifest in Individual VNF Package - Method not implemented + [Documentation] Test ID: 5.3.5.11.7 + ... Test title: PATCH Manifest in Individual VNF Package - Method not implemented + ... Test objective: The objective is to test that PATCH method is not allowed to update a Manifest + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.4b.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send PATCH Request for Manifest in individual VNF Package + Check HTTP Response Status Code Is 405 + +DELETE Manifest in Individual VNF Package - Method not implemented + [Documentation] Test ID: 5.3.5.11.8 + ... Test title: DELETE Manifest in Individual VNF Package - Method not implemented + ... Test objective: The objective is to test that DELETE method is not allowed to delete a Manifest + ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. + ... Reference: Clause 9.4.4b.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Send DELETE Request for Manifest in individual VNF Package + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/NotificationEndpoint.robot b/SOL005/VNFPackageManagement-API/NotificationEndpoint.robot new file mode 100644 index 0000000000000000000000000000000000000000..751754359ee60b7c3465d6a95632618d180fc5a9 --- /dev/null +++ b/SOL005/VNFPackageManagement-API/NotificationEndpoint.robot @@ -0,0 +1,73 @@ +*** Settings *** +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Resource VNFPackageManagementKeywords.robot +Library OperatingSystem +Library JSONLibrary +Library String +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +VNF Package Onboarding Notification + [Documentation] Test ID: 5.3.5.13.1 + ... Test title: VNF Package Onboarding Notification + ... Test objective: The objective is to test that VNF Package Onboarding Notification is delivered with success to the notification consumer + ... Pre-conditions: A VNF package subscription for onboarding notifications is available in the NFVO. + ... Reference: Clause 9.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post VNF Package Onboarding Notification + Check HTTP Response Status Code Is 204 + +VNF Package Change Notification + [Documentation] Test ID: 5.3.5.13.2 + ... Test title: VNF Package Change Notification + ... Test objective: The objective is to test that VNF Package Change Notification is delivered with success to the notification consumer + ... Pre-conditions: A VNF package subscription for change notifications is available in the NFVO. + ... Reference: Clause 9.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post VNF Package Change Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body PkgmSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post VNF Package Onboarding Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 Parse the Descriptor File + ${template} = Get File jsons/VnfPackageOnboardingNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfPkgId=${vnfPkgId} vnfdId=${Descriptor_ID} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Post VNF Package Change Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Run Keyword If ${check_descriptors} == 1 Parse the Descriptor File + ${template} = Get File jsons/VnfPackageChangeNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} vnfPkgId=${vnfPkgId} vnfdId=${Descriptor_ID} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/Notifications.robot b/SOL005/VNFPackageManagement-API/Notifications.robot index fefa8c79b87dab95993f0b2d24020e8a1e4fbca7..361499a7b0637f4440be219527299bd879699a3e 100644 --- a/SOL005/VNFPackageManagement-API/Notifications.robot +++ b/SOL005/VNFPackageManagement-API/Notifications.robot @@ -16,7 +16,7 @@ VNF Package Onboarding Notification ... Test title: VNF Package Onboarding Notification ... Test objective: The objective is to test the dispatch of VNF Package Onboarding notification when the VNF package onboarding operation is successfully completed, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A VNF package subscription for onboarding notifications is available in the NFVO. - ... Reference: Clause 9.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -29,7 +29,7 @@ VNF Package Operational State Change Notification ... Test title: VNF Package Operational State Change Notification ... Test objective: The objective is to test the dispatch of VNF Package Change notification when the VNF package operational state is modified, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A VNF package subscription for change notifications is available in the NFVO. - ... Reference: Clause 9.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -43,7 +43,7 @@ VNF Package Deletion Notification ... Test title: VNF Package Deletion Notification ... Test objective: The objective is to test the dispatch of VNF Package Change notification when the VNF package is deleted on the NFVO, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A VNF package subscription for change notifications is available in the NFVO. - ... Reference: Clause 9.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.10.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -118,9 +118,12 @@ Configure Notification Onboarding Handler set to dictionary ${json} notificationType ${type} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} + Set Suite Variable ${notification_request} ${notification_request} Configure Notification Delete Handler [Arguments] ${endpoint} ${type} ${change} @@ -128,8 +131,10 @@ Configure Notification Delete Handler set to dictionary ${json} notificationType ${type} changeType ${change} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Change Status Handler @@ -138,8 +143,10 @@ Configure Notification Change Status Handler set to dictionary ${json} notificationType ${type} changeType ${change} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification - &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{req}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} + Set Global Variable ${req} ${notification_request} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL005/VNFPackageManagement-API/Subscriptions.robot b/SOL005/VNFPackageManagement-API/Subscriptions.robot index 00d943bf7feb566a94e67cb35f4349546b74dd4f..b1ea7ce9ba89c88f82595260460aaa7b356d6ae5 100644 --- a/SOL005/VNFPackageManagement-API/Subscriptions.robot +++ b/SOL005/VNFPackageManagement-API/Subscriptions.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt # Generic Parameters -Resource environment/subscriptions.txt +Resource environment/variables.txt Resource VNFPackageManagementKeywords.robot Library OperatingSystem Library JSONLibrary @@ -17,7 +16,7 @@ Get All VNF Package Subscriptions ... Test title: GET all VNF Package Subscriptions ... Test objective: The objective is to test the retrieval of all VNF package subscriptions and perform a JSON schema validation of the returned subscriptions data structure ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 9.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -25,13 +24,12 @@ Get All VNF Package Subscriptions Check HTTP Response Status Code Is 200 Check HTTP Response Body Json Schema Is PkgmSubscriptions - Get VNF Package Subscriptions with attribute-based filter [Documentation] Test ID: 5.3.5.7.2 ... Test title: Get VNF Package Subscriptions with attribute-based filter ... Test objective: The objective is to test the retrieval of VNF package subscriptions using attribute-based filter, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 9.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -40,13 +38,12 @@ Get VNF Package Subscriptions with attribute-based filter Check HTTP Response Body Json Schema Is PkgmSubscriptions Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter - Get VNF Package Subscriptions with invalid attribute-based filter [Documentation] Test ID: 5.3.5.7.3 ... Test title: Get VNF Package Subscriptions with attribute-based filters ... Test objective: The objective is to test that the retrieval of VNF package subscriptions fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 9.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -59,19 +56,20 @@ GET VNF Package Subscription with invalid resource endpoint ... Test title: GET VNF Package Subscription with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of all VNF package subscriptions fails when using invalid resource endpoint. ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 9.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Get VNF Package Subscriptions with invalid resource endpoint Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails Create new VNF Package subscription [Documentation] Test ID: 5.3.5.7.5 ... Test title: Create new VNF Package subscription ... Test objective: The objective is to test the creation of a new VNF package subscription and perform a JSON schema and content validation of the returned subscription data structure ... Pre-conditions: none - ... Reference: Clause 9.4.8.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.8.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The VNF package subscription is successfully set and it matches the issued subscription @@ -87,7 +85,7 @@ Create duplicated VNF Package subscription with NFVO not creating duplicated sub ... Test title: Create duplicated VNF Package subscription with NFVO not creating duplicated subscriptions ... Test objective: The objective is to test the attempt of a creation of a duplicated VNF package subscription and check that no new subscription is created by the NFVO and a link to the original subscription is returned ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 9.4.8.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.8.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO does not support the creation of duplicated subscriptions ... Post-Conditions: The existing VNF package subscription returned is available in the NFVO @@ -103,7 +101,7 @@ Create duplicated VNF Package subscription with NFVO creating duplicated subscri ... Test title: Create duplicated VNF Package subscription with NFVO creating duplicated subscriptions ... Test objective: The objective is to test the creation of a duplicated VNF package subscription and perform a JSON schema and content validation of the returned duplicated subscription data structure ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 9.4.8.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.8.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO supports the creation of duplicated subscriptions ... Post-Conditions: The duplicated VNF package subscription is successfully set and it matches the issued subscription @@ -118,7 +116,7 @@ PUT VNF Package Subscriptions - Method not implemented ... Test title: PUT VNF Package Subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify VNF package subscriptions ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 9.4.8.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.8.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -130,14 +128,13 @@ PATCH VNF Package Subscriptions - Method not implemented ... Test title: PATCH VNF Package Subscriptions - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update VNF package subscriptions ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 9.4.8.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.8.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Send Patch Request for VNF Package Subscriptions Check HTTP Response Status Code Is 405 - - + DELETE VNF Package Subscriptions - Method not implemented [Documentation] Test ID: 5.3.5.7.10 ... Test title: DELETE VNF Package Subscriptions - Method not implemented @@ -145,30 +142,29 @@ DELETE VNF Package Subscriptions - Method not implemented ... Pre-conditions: At least one VNF package subscription is available in the NFVO. ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The VNF package subscriptions are not deleted by the failed operation + ... Post-Conditions: none Send Delete Request for VNF Package Subscriptions Check HTTP Response Status Code Is 405 - Check Postcondition VNF Package Subscriptions Exists Get All VNF Package Subscriptions as Paged Response [Documentation] Test ID: 5.3.5.7.11 ... Test title: GET all VNF Package Subscriptions as Paged Response ... Test objective: The objective is to test the retrieval of all VNF package subscriptions as paged response. ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 9.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Get all VNF Package Subscriptions Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contains Location Get VNF Package Subscriptions - Bad Request Response too Big [Documentation] Test ID: 5.3.5.7.12 ... Test title: Get VNF Package Subscriptions - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of VNF package subscriptions fails because response is too big, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: At least one VNF package subscription is available in the NFVO. - ... Reference: Clause 9.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.8.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none diff --git a/SOL005/VNFPackageManagement-API/VNFDInIndividualVNFPackage.robot b/SOL005/VNFPackageManagement-API/VNFDInIndividualVNFPackage.robot index 9ea927e2940c2f37a97e61edbc1d200ffcfca386..47375543ca9f5ddef2199898fa9e48114138c7d5 100644 --- a/SOL005/VNFPackageManagement-API/VNFDInIndividualVNFPackage.robot +++ b/SOL005/VNFPackageManagement-API/VNFDInIndividualVNFPackage.robot @@ -1,31 +1,28 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt # Generic Parameters -Resource environment/vnfdInIndividualVnfPackage.txt +Resource environment/variables.txt Resource VNFPackageManagementKeywords.robot Library JSONLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false *** Test Cases *** -Get single file VNFD in Individual VNF Package in Plain Format - [Documentation] Test ID: 5.3.5.3.1 - ... Test title: Get single file VNFD in Individual VNF Package in Plain Format - ... Test objective: The objective is to test the retrieval of the VNFD in plain format for an individual VNF package and perform a validation that returned content is in plain format - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The VNFD is implemented as a single file - ... Post-Conditions: none - Get single file VNFD in Individual VNF Package in Plain Format - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is text/plain +Void + [Documentation] Test ID: 5.3.5.3.1 + ... Test title: Void + ... Test objective: Void + ... Pre-conditions: Void + ... Reference: Void + ... Config ID: Void + ... Applicability: Void + ... Post-Conditions: Void + Void Get VNFD in Individual VNF Package in Zip Format [Documentation] Test ID: 5.3.5.3.2 ... Test title: Get VNFD in Individual VNF Package in Zip Format ... Test objective: The objective is to test the retrieval of the VNFD in zip format for an individual VNF package 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 9.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -33,63 +30,59 @@ Get VNFD in Individual VNF Package in Zip Format Check HTTP Response Status Code Is 200 Check HTTP Response Header Content-Type Is application/zip -Get single file VNFD in Individual VNF Package in Plain or Zip Format - [Documentation] Test ID: 5.3.5.3.3 - ... Test title: Get single file VNFD in Individual VNF Package in Plain or Zip Format - ... Test objective: The objective is to test the retrieval of the single file VNFD for an individual VNF package when requesting Plain or Zip format to NFVO by including both formats in the request, and perform a validation that returned content is in Plain or Zip format - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The VNFD is implemented as a single file - ... Post-Conditions: none - Get single file VNFD in Individual VNF Package in Plain or Zip Format - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is Any of text/plain application/zip +Void + [Documentation] Test ID: 5.3.5.3.3 + ... Test title: Void + ... Test objective: Void + ... Pre-conditions: Void + ... Reference: Void + ... Config ID: Void + ... Applicability: Void + ... Post-Conditions: Void + Void -Get multi file VNFD in Individual VNF Package in Plain or Zip Format - [Documentation] Test ID: 5.3.5.3.4 - ... Test title: Get multi file VNFD in Individual VNF Package in Plain or Zip Format - ... Test objective: The objective is to test the retrieval of the multi file VNFD for an individual VNF package when requesting Plain or Zip format to NFVO by including both formats in the request, 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 9.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The VNFD is implemented as a multi file - ... Post-Conditions: none - Get multi file VNFD in Individual VNF Package in Plain or Zip Format - Check HTTP Response Status Code Is 200 - Check HTTP Response Header Content-Type Is application/zip +Void + [Documentation] Test ID: 5.3.5.3.4 + ... Test title: Void + ... Test objective: Void + ... Pre-conditions: Void + ... Reference: Void + ... Config ID: Void + ... Applicability: Void + ... Post-Conditions: Void + Void + +Void + [Documentation] Test ID: 5.3.5.3.5 + ... Test title: Void + ... Test objective: Void + ... Pre-conditions: Void + ... Reference: Void + ... Config ID: Void + ... Applicability: Void + ... Post-Conditions: Void + Void -Get multi file VNFD in Individual VNF Package in Plain Format - [Documentation] Test ID: 5.3.5.3.5 - ... Test title: Get multi file VNFD in Individual VNF Package in Plain Format - ... Test objective: The objective is to test that the retrieval of the multi file VNFD for an individual VNF package fails when requesting it in Plain format, and perform a validation of the JSON schema validation of the failed operation HTTP response - ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 - ... Config ID: Config_prod_NFVO - ... Applicability: The VNFD is implemented as a multi file - ... Post-Conditions: none - Get multi file VNFD in Individual VNF Package in Plain Format - Check HTTP Response Status Code Is 406 - Check HTTP Response Body Json Schema Is ProblemDetails Get VNFD in Individual VNF Package with invalid resource identifier [Documentation] Test ID: 5.3.5.3.6 ... Test title: Get VNFD in Individual VNF Package with invalid resource identifier ... Test objective: The objective is to test that the retrieval of the VNFD for an individual VNF Package fails when using an invalid resource identifier ... Pre-conditions: none - ... Reference: Clause 9.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none Get VNFD in Individual VNF Package with invalid resource identifier Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails Get VNFD in Individual VNF Package with conflict due to onboarding state [Documentation] Test ID: 5.3.5.3.7 ... Test title: Get VNFD in Individual VNF Package with conflict due to onboarding state ... Test objective: The objective is to test that the retrieval of the VNFD for an individual VNF Package 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 VNFD is requested is different from ONBOARDED. - ... Reference: Clause 9.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -102,7 +95,7 @@ POST VNFD in Individual VNF Package - Method not implemented ... Test title: POST VNFD in Individual VNF Package - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create new VNFD ... Pre-conditions: none - ... Reference: Clause 9.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -114,7 +107,7 @@ PUT VNFD in Individual VNF Package - Method not implemented ... Test title: PUT VNFD in Individual VNF Package - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify a VNFD ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.4.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.4.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -126,7 +119,7 @@ PATCH VNFD in Individual VNF Package - Method not implemented ... Test title: PATCH VNFD in Individual VNF Package - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update a VNFD ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -138,10 +131,27 @@ DELETE VNFD in Individual VNF Package - Method not implemented ... Test title: DELETE VNFD in Individual VNF Package - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete a VNFD ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.4.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.4.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The VNFD is not deleted by the failed operation + ... Post-Conditions: none Send DELETE Request for VNFD in individual VNF Package Check HTTP Response Status Code Is 405 - Check Postcondition VNFD Exist \ No newline at end of file + +Get VNFD in Individual VNF Package with security information + [Documentation] Test ID: 5.3.5.3.12 + ... Test title: Get VNFD in Individual VNF Package with security information + ... Test objective: The objective is to test the retrieval of the VNFD in zip format for an individual VNF package shall include in the ZIP archive the security information 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 9.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + Get VNFD in Individual VNF Package with security information + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Content-Type Is application/zip + +*** Keywords *** + +Void + log do nothing \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/VNFPackageArtifacts.robot b/SOL005/VNFPackageManagement-API/VNFPackageArtifacts.robot index 17fe131cf12c88d248fe202ddb2fe949143c8dbb..4d4b7d5bcc8b9058ce9a093d76034d00de7151f0 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackageArtifacts.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackageArtifacts.robot @@ -1,145 +1,200 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt # Generic Parameters -Resource environment/vnfPackageArtifacts.txt -Resource VNFPackageManagementKeywords.robot +Resource environment/variables.txt +Resource VNFPackageManagementKeywords.robot Library JSONLibrary +Library OperatingSystem Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false *** Test Cases *** -GET Individual VNF Package Artifact - [Documentation] Test ID: 5.3.5.6.1 - ... Test title: GET Individual VNF Package Artifact - ... Test objective: The objective is to test the retrieval of an individual VNF package artifact +Get VNF Package Artifact + [Documentation] Test ID: 5.3.5.12.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 9.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - GET Individual VNF Package Artifact + Get Artifact in VNF Package Check HTTP Response Status Code Is 200 - -GET Individual VNF Package Artifact in octet stream format - [Documentation] Test ID: 5.3.5.6.2 - ... Test title: GET Individual VNF Package Artifact in octet stream format - ... Test objective: The objective is to test the retrieval of an individual VNF package artifact when the NFVO cannot determine the artifact content type. The test performs a validation that the returned artifcat in is octet-stream format + Check HTTP Response Header Content-Type Is application/zip + +Get VNF Package Artifact with "exclude_all_mano_artifacts" parameter + [Documentation] Test ID: 5.3.5.12.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 9.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: The NFVO cannot determine the content type of the artifact + ... Applicability: none ... Post-Conditions: none - GET Individual VNF Package Artifact in octet stream format + 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/octet-stream - -GET Individual VNF Package Artifact with Range Request and NFVO supporting Range Requests - [Documentation] Test ID: 5.3.5.6.3 - ... Test title: GET Individual VNF Package Artifact with Range Request and NFVO supporting Range Requests - ... Test objective: The objective is to test the retrieval of an individual VNF package artifact 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 + Check HTTP Response Header Content-Type Is application/zip + +Get VNF Package Artifact with "exclude_all_non_mano_artifacts" parameter + [Documentation] Test ID: 5.3.5.12.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 9.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.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: 5.3.5.12.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 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.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: 5.3.5.12.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 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.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: 5.3.5.12.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 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.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 Individual VNF Package Artifact with Range Request + 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 Individual VNF Package Artifact with Range Request and NFVO not supporting Range Requests - [Documentation] Test ID: 5.3.5.6.4 - ... Test title: GET Individual VNF Package Artifact with Range Request and NFVO not supporting Range Requests - ... Test objective: The objective is to test that the retrieval of an individual VNF package artifact, 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 artifact. + +Get VNF Package Artifact with invalid URI parameters "exclude_all_non_mano_artifacts", "select_non_mano_artifact_sets" + [Documentation] Test ID: 5.3.5.12.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 9.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 ... Config ID: Config_prod_NFVO - ... Applicability: The NFVO does not support range requests to return single range of bytes from the VNF package artifact - ... Post-Conditions: none - GET Individual VNF Package Artifact with Range Request - Check HTTP Response Status Code Is 200 - -GET Individual VNF Package Artifact with invalid Range Request - [Documentation] Test ID: 5.3.5.6.5 - ... Test title: GET Individual VNF Package Artifact with invalid Range Request - ... Test objective: The objective is to test that the retrieval of an individual VNF package artifact fails when using a range request that does not match any available byte range in the file. + ... 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: 5.3.5.12.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 9.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.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 Individual VNF Package Artifact with invalid Range Request - Check HTTP Response Status Code Is 416 - -GET Individual VNF Package Artifact with invalid resource identifier - [Documentation] Test ID: 5.3.5.6.6 - ... Test title: GET Individual VNF Package Artifact with invalid resource identifier - ... Test objective: The objective is to test that the retrieval of an individual VNF package artifact fails when using an invalid resource identifier + ... 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: 5.3.5.12.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 9.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: none - GET Individual VNF Package Artifact with invalid resource identifier - Check HTTP Response Status Code Is 404 + ... 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 Individual VNF Package Artifact with conflict due to onboarding state - [Documentation] Test ID: 5.3.5.6.7 - ... Test title: GET Individual VNF Package Artifact with conflict due to onboarding state - ... Test objective: The objective is to test that the retrieval of an individual VNF package artifact 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 +Get VNF Package Artifact with conflict due to onboarding state + [Documentation] Test ID: 5.3.5.12.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 9.4.7.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - GET Artifact for VNF Package in onboarding state different from ONBOARDED + 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 - -POST Individual VNF Package Artifact - Method not implemented - [Documentation] Test ID: 5.3.5.6.8 - ... Test title: POST Individual VNF Package Artifact - Method not implemented + +GET VNF Package Artifact with invalid Range Request + [Documentation] Test ID: 5.3.5.12.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 9.4.5a.3.2 - ETSI GS NFV-SOL 005 [1] v2.7.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 + Check HTTP Response Body Json Schema Is ProblemDetails + +POST VNF Package Artifact - Method not implemented + [Documentation] Test ID: 5.3.5.12.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 9.4.7.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.5a.3.1 - ETSI GS NFV-SOL 005 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Send POST Request for individual VNF Package Artifact + Send POST Request for VNF Package Artifact Check HTTP Response Status Code Is 405 -PUT Individual VNF Package Artifact - Method not implemented - [Documentation] Test ID: 5.3.5.6.9 - ... Test title: PUT Individual VNF Package Artifact - Method not implemented +PUT VNF Package Artifact - Method not implemented + [Documentation] Test ID: 5.3.5.12.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 9.4.7.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.5a.3.3 - ETSI GS NFV-SOL 005 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Send PUT Request for individual VNF Package Artifact + Send PUT Request for VNF Package Artifact Check HTTP Response Status Code Is 405 -PATCH Individual VNF Package Artifact - Method not implemented - [Documentation] Test ID: 5.3.5.6.10 - ... Test title: PATCH Individual VNF Package Artifact - Method not implemented +PATCH VNF Package Artifact - Method not implemented + [Documentation] Test ID: 5.3.5.12.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 9.4.7.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.5a.3.4 - ETSI GS NFV-SOL 005 [1] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none - Send PATCH Request for individual VNF Package Artifact + Send PATCH Request for VNF Package Artifact Check HTTP Response Status Code Is 405 -DELETE Individual VNF Package Artifact - Method not implemented - [Documentation] Test ID: 5.3.5.6.11 - ... Test title: DELETE Individual VNF Package Artifact - Method not implemented +DELETE VNF Package Artifact - Method not implemented + [Documentation] Test ID: 5.3.5.12.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 9.4.7.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.6.3.5 - ETSI GS NFV-SOL 005 [1] v2.7.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 individual VNF Package Artifact - Check HTTP Response Status Code Is 405 - Check Postcondition VNF Package Artifact Exist \ No newline at end of file + ... Post-Conditions: none + Send DELETE Request for VNF Package Artifact + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/VNFPackageContent.robot b/SOL005/VNFPackageManagement-API/VNFPackageContent.robot index 8d4248295881a76f9998606340f0bba055fd1c4e..57401ae3c8b4c69e54ef4d65e7ff9cac129d2167 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackageContent.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackageContent.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt # Generic Parameters -Resource environment/vnfPackageContent.txt +Resource environment/variables.txt Resource VNFPackageManagementKeywords.robot Library JSONLibrary Library OperatingSystem @@ -13,7 +12,7 @@ GET Individual VNF Package Content ... 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: Clause 9.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -26,7 +25,7 @@ GET Individual VNF Package Content with Range Request and NFVO supporting Range ... 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: Clause 9.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.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 @@ -41,11 +40,11 @@ GET Individual VNF Package Content with Range Request and NFVO not supporting Ra ... 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: Clause 9.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.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 + GET Individual VNF Package Content with explicit Range Request Check HTTP Response Status Code Is 200 Check HTTP Response Header Content-Type Is application/zip @@ -54,7 +53,7 @@ GET Individual VNF Package Content with invalid Range Request ... 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: Clause 9.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.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 @@ -66,19 +65,20 @@ GET Individual VNF Package Content with invalid resource identifier ... 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: Clause 9.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.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 + Check HTTP Response Body Json Schema Is ProblemDetails GET Individual VNF Package Content with conflict due to onboarding state [Documentation] Test ID: 5.3.5.4.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: Clause 9.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -91,7 +91,7 @@ POST Individual VNF Package Content - Method not implemented ... 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: Clause 9.4.5.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.5.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -103,7 +103,7 @@ Upload VNF Package Content ... Test title: Upload VNF Package Content ... Test objective: The objective is to test the upload of a VNF Package Content in Zip format. ... Pre-conditions: One or more VNF Packages are onboarded in the NFVO. - ... Reference: Clause 9.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The VNF Package content is successfully uploaded and available in the NFVO @@ -116,7 +116,7 @@ Upload VNF Package Content with conflict due to onboarding state ... Test title: Upload VNF Package Content with conflict due to onboarding state ... Test objective: The objective is to test that the upload of the VNF Package Content fails due to a conflict when the VNF Package is not in onboarding state CREATED 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 CREATED. - ... Reference: Clause 9.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -129,7 +129,7 @@ PATCH Individual VNF Package Content - Method not implemented ... 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: Clause 9.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -141,10 +141,9 @@ DELETE Individual VNF Package Content - Method not implemented ... 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: Clause 9.4.5.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.5.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The VNF Package content is not deleted by the failed operation + ... Post-Conditions: none Send DELETE Request for individual VNF Package Content Check HTTP Response Status Code Is 405 - Check Postcondition VNF Package Content Exist diff --git a/SOL005/VNFPackageManagement-API/VNFPackageContentViaURI.robot b/SOL005/VNFPackageManagement-API/VNFPackageContentViaURI.robot index 82ccf7e73b0ca3ce87a9782873df1ea2c8555ee4..0d61fb1035c57cf902ee82c45e23a71c6531fa1e 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackageContentViaURI.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackageContentViaURI.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ -Resource environment/variables.txt # Generic Parameters -Resource environment/vnfPackageContentViaUri.txt +Resource environment/variables.txt Resource VNFPackageManagementKeywords.robot Library JSONLibrary Library OperatingSystem @@ -13,7 +12,7 @@ Upload VNF Package Content from URI ... Test title: Upload VNF Package Content from URI ... Test objective: The objective is to test the upload of a VNF Package Content from URI. ... Pre-conditions: One or more VNF Packages are in onboarding state CREATED in the NFVO. - ... Reference: Clause 9.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -26,7 +25,7 @@ Upload VNF Package Content from URI with conflict due to onboarding state ... Test title: Upload VNF Package Content from URI with conflict due to onboarding state ... Test objective: The objective is to test that the upload of the VNF Package Content from URI fails due to a conflict when the VNF Package is not in onboarding state CREATED 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 CREATED. - ... Reference: Clause 9.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -34,13 +33,12 @@ Upload VNF Package Content from URI with conflict due to onboarding state Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - GET Individual VNF Package Content from URI - Method not implemented [Documentation] Test ID: 5.3.5.5.3 ... Test title: GET Individual VNF Package Content from URI - Method not implemented ... Test objective: The objective is to test that GET method is not allowed to retrieve a VNF Package content from URI ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.6.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.6.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -52,7 +50,7 @@ PUT Individual VNF Package Content from URI - Method not implemented ... Test title: PUT Individual VNF Package Content from URI - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify a VNF Package content from URI ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.6.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.6.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -64,7 +62,7 @@ PATCH Individual VNF Package Content from URI - Method not implemented ... 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 from URI ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.6.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.6.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -76,10 +74,9 @@ DELETE Individual VNF Package Content from URI - Method not implemented ... 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 from URI ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.6.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.6.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The VNF Package content is not deleted by the failed operation + ... Post-Conditions: none Send DELETE Request for individual VNF Package Content from URI - Check HTTP Response Status Code Is 405 - Check Postcondition VNF Package Content from URI Exist \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index ff83f44c601054446ece0a46dc88e86295f28a65..b04c333b5f4a189c789ba0312f7ed961b193fa9e 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -1,28 +1,24 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/subscriptions.txt -Resource environment/vnfPackages.txt # VNF Packages specific parameters -Resource environment/individualVnfPackage.txt -Resource environment/vnfdInIndividualVnfPackage.txt -Resource environment/vnfPackageContent.txt -Resource environment/vnfPackageContentViaUri.txt -Resource environment/vnfPackageArtifacts.txt -Resource environment/individualSubscription.txt Library OperatingSystem Library JSONLibrary +Library RequestsLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library Process Library MockServerLibrary Library String - +Library Collections +Library String +#Variables descriptors/SOL001/VNFD/vnfd_SOL001.yaml +#Variables descriptors/SOL006/VNFD/vnfd_SOL006.yaml *** 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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} @@ -53,23 +49,23 @@ Check HTTP Response Body Does Not Contain checksum 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} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/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 - @{attr} = Split String ${POS_FILTER} ,${VAR_SEPERATOR} - @{var_id} = Split String @{attr}[0] ,${SEPERATOR} - @{var_provider} = Split String @{attr}[1] ,${SEPERATOR} + @{attr} = Split String ${POS_FILTER} ${VAR_SEPARATOR} + @{var_id} = Split String @{attr}[0] ${SEPARATOR} + @{var_provider} = Split String @{attr}[1] ${SEPARATOR} Should Be True "${response['body'][0]['vnfdId']}"=="@{var_id}[1]" and "${response['body'][0]['vnfProvider']}"=="@{var_provider}[1]" 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} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?${NEG_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} @@ -77,9 +73,9 @@ Get all VNF Packages with malformed authorization token Pass Execution If ${AUTH_USAGE} == 0 Skipping test as NFVO is not supporting authentication Log The GET method queries using invalid token Set Headers {"Accept": "${ACCEPT_JSON}"} - Set Headers {"Authorization": "${BAD_AUTHORIZATION}"} + Set Headers {"${AUTHORIZATION_HEADER}": "${BAD_AUTHORIZATION_TOKEN}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_packages + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages ${output}= Output response Set Suite Variable ${response} ${output} @@ -88,15 +84,15 @@ Get all VNF Packages without authorization token Log The GET method queries omitting token Set Headers {"Accept": "${ACCEPT_JSON}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/vnf_packages + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages ${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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?all_fields ${output}= Output response Set Suite Variable ${response} ${output} @@ -116,8 +112,8 @@ Check HTTP Response Body VnfPkgsInfo Matches the requested all_fields selector 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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -135,8 +131,8 @@ 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} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -154,8 +150,8 @@ 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} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -172,8 +168,8 @@ Check HTTP Response Body vnfPkgsInfo Matches the requested exclude_fields select 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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${erroneousVnfPkgId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -181,17 +177,64 @@ Send Post Request to create new VNF Package Resource Log Creating a new VNF Package Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File jsons/CreateVnfPkgInfoRequest.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages ${body} + ${body} = Get File jsons/CreateVnfPkgInfoRequest.json + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages ${body} ${output}= Output response Set Suite Variable ${response} ${output} + + +Check HTTP Response Body vnfPkginfo content against VNF Descriptor + #${check_descriptors} flag, 1 to check descriptors + Run Keyword If ${check_descriptors} == 1 Check Individual VNFPkgInfo Content + +Check Individual VNFPkgInfo Content + PARSE the Descriptor File + Match the Response Attributes of vnfPkgInfo with Descriptors + +PARSE the Descriptor File + Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 descriptor file ELSE Fetch Information from SOL006 descriptor file + +Fetch Information from SOL001 descriptor file + Import Variables ${CURDIR}/descriptors/SOL001/VNFD/vnfd_SOL001.yaml + ${descriptor_id}= Get Variable Value ${topology_template.node_templates.properties.descriptor_id} + ${provider}= Get Variable Value ${topology_template.node_templates.properties.provider} + ${product_name}= Get Variable Value ${topology_template.node_templates.properties.product_name} + ${software_version}= Get Variable Value ${topology_template.node_templates.properties.software_version} + ${descriptor_version}= Get Variable Value ${topology_template.node_templates.properties.descriptor_version} + + Set Global Variable ${Descriptor_ID} ${descriptor_id} + Set Global Variable ${Provider} ${provider} + Set Global Variable ${Product_Name} ${product_name} + Set Global Variable ${Software_Version} ${software_version} + Set Global Variable ${Descriptor_Version} ${descriptor_version} + +Fetch Information from SOL006 descriptor file + Import Variables ${CURDIR}/descriptors/SOL006/VNFD/vnfd_SOL006.yaml + ${descriptor_id}= Get Variable Value ${nfv.vnfd[0].id} + ${provider}= Get Variable Value ${nfv.vnfd[0].provider} + ${product_name}= Get Variable Value ${nfv.vnfd[0].product-name} + ${software_version}= Get Variable Value ${nfv.vnfd[0].software-version} + ${descriptor_version}= Get Variable Value ${nfv.vnfd[0].version} + Set Global Variable ${Descriptor_ID} ${descriptor_id} + Set Global Variable ${Provider} ${provider} + Set Global Variable ${Product_Name} ${product_name} + Set Global Variable ${Software_Version} ${software_version} + Set Global Variable ${Descriptor_Version} ${descriptor_version} + +Match the Response Attributes of vnfPkgInfo with Descriptors + #Checking Response attributes with VNF Descriptors + Should Be Equal As Strings ${response['body']['vnfdId']} ${Descriptor_Id} + Should Be Equal As Strings ${response['body']['vnfProvider']} ${Provider} + Should Be Equal As Strings ${response['body']['vnfProductName']} ${Product_Name} + Should Be Equal As Strings ${response['body']['vnfSoftwareVersion']} ${Software_Version} + Should Be Equal As Strings ${response['body']['vnfdVersion']} ${Descriptor_Version} Check Postcondition VNF Package Resource Exists Log Checking that nsd info exists Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${response['body']['id']} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 200 @@ -200,36 +243,32 @@ Check Postcondition VNF Package Resource Exists 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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/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} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -241,24 +280,24 @@ Check HTTP Response Body vnfPkgInfo Identifier matches the requested VNF Package 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} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/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} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/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} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -266,9 +305,9 @@ Send PATCH to disable Individual VNF Package Log Trying to perform a PATCH. As prerequisite the nsdInfo shall be in enabled operational state Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File jsons/NsdInfoModificationDisable.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId} ${body} + ${body}= Get File jsons/VnfPkgInfoModificationsDisabled.json + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -281,31 +320,31 @@ Send PATCH to enable Individual VNF Package Log Trying to perform a PATCH. As prerequisite the nsdInfo shall be in disabled operational state Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File jsons/NsdInfoModificationEnable.json - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId} ${body} + ${body}= Get File jsons/VnfPkgInfoModifications.json + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId} ${body} ${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/${disabledVnfPackageId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${disabledVnfPackageId} ${output}= Output response Set Suite Variable ${response} ${output} Check Postcondition VNF Package is Deleted Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${disabledVnfPackageId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${disabledVnfPackageId} Integer response status 404 Send DELETE Request for Individual VNF Package in operational state ENABLED 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": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -316,42 +355,24 @@ Check Postcondition VNF Package Exists Send DELETE Request for Individual VNF Package used for instantiated VNF instances 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": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${instantiatedVnfPackageId} - ${output}= Output response - Set Suite Variable ${response} ${output} - -Get single file VNFD in Individual VNF Package in Plain Format - Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgPlainVNFD}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${instantiatedVnfPackageId} ${output}= Output response Set Suite Variable ${response} ${output} Get VNFD in Individual VNF Package in Zip Format Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} - -Get single file VNFD in Individual VNF Package in Plain or Zip Format - Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgPlainVNFD}/vnfd - ${output}= Output response - Set Suite Variable ${response} ${output} -Get multi file VNFD in Individual VNF Package in Plain or Zip Format +Get VNFD in Individual VNF Package with security information Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue - Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd/include_signatures ${output}= Output response Set Suite Variable ${response} ${output} @@ -362,8 +383,8 @@ Check HTTP Response Header Content-Type Is Any of Get multi file VNFD in Individual VNF Package in Plain Format Log Trying to get a negative case performing a get on a VNFD from a given VNF Package present in the NFVO Catalogue. Accept will be text/plain but VNFD is composed my multiple files. Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -371,8 +392,8 @@ Get VNFD in Individual VNF Package with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${erroneousVnfPkgId}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${erroneousVnfPkgId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} @@ -380,56 +401,48 @@ Get VNFD in Individual VNF Package with conflict due to onboarding state Log Trying to get a VNFD from a given VNF Package present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_PLAIN}"} Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${onboardingStateVnfPkgId}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${onboardingStateVnfPkgId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} Send POST Request for VNFD in individual VNF Package Log Trying to perform a POST. This 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}/vnfd + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for VNFD in individual VNF Package 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}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for VNFD in individual VNF Package 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}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for VNFD in individual VNF Package 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/${vnfPkgZipVNFD}/vnfd + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd ${output}= Output response Set Suite Variable ${response} ${output} -Check Postcondition VNFD Exist - Log Checking that vnf pacakge still exists - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd - Check HTTP Response Status Code Is 200 - 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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -441,16 +454,26 @@ 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 + Set Headers {"Range": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET Individual VNF Package Content with explicit Range Request + Log Trying to get a VNF Package Content using RANGE using an NFVO that can handle it + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Set Headers {"Range": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/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} + Should Be Equal As Strings ${response['headers']['Content-Range']} bytes ${range}/${full_length} Log Header Content-Range is present Check HTTP Response Header Content-Length Is Present and Matches the requested range length @@ -463,112 +486,106 @@ 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 + Set Headers {"Range": "bytes=${erroneousRange}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/package_content ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request to upload VNF Package Content Log Trying to perform a PUT. This method upload the content of a NSD - Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get Binary File files/vnfPackage.zip - PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${newVnfPackageId}/package_content ${body} - ${response}= Output response body - Should Be Empty ${response} - ${output}= Output response - Set Suite Variable ${response} ${output} + Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_ZIP}", "Content-Type": "application/zip", "${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} verify=False + ${body}= Get Binary File ${contentZipVnfPackage} + ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${newVnfPackageId}/package_content data=${body} + Should Be Empty ${response.text} + ${response}= Create Dictionary status=${response.status_code} + Set Suite Variable ${response} ${response} + 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": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${newVnfPackageId}/package_content + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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 - Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get Binary File files/vnfPackage.zip - PUT ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${creatingVnfPackageId}/nsd_content ${body} - ${output}= Output response - Set Suite Variable ${response} ${output} + Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_ZIP}", "Content-Type": "application/zip", "${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} verify=False + ${body}= Get Binary File ${contentZipVnfPackage} + ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${creatingVnfPackageId}/package_content data=${body} + Should Be Empty ${response.text} + ${response}= Create Dictionary status=${response.status_code} + Set Suite Variable ${response} ${response} 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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/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 + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/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 - Check HTTP Response Status Code Is 200 GET Individual VNF Package Artifact Log Trying to get a VNF Package Artifact - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Individual VNF Package Artifact in octet stream format Log Trying to get a VNF Package Artifact - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageOctetStreamId}/artifacts/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageOctetStreamId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Individual VNF Package Artifact 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/${artifactPath} + Set Headers {"Range": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} @@ -576,151 +593,139 @@ GET Individual 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/${artifactPath} + Set Headers {"Range": "bytes=${erroneousRange}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Individual VNF Package Artifact with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${erroneousVnfPkgId}/artifacts/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${erroneousVnfPkgId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} GET Artifact for 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/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${onboardingStateVnfPkgId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} Send POST Request for individual 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/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for individual 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/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for individual 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/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for individual 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/${artifactPath} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} ${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/${artifactPath} - Check HTTP Response Status Code Is 200 - Send POST Request to upload VNF Package Content from URI 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}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/UploadVnfPkgFromUriRequest.json - POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgViaUriId}/package_content/upload_from_uri ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/UploadVnfPkgFromUriRequest.json + ${body}= Format String ${template} vnfPkgUri=${vnfPkgUri} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgViaUriId}/package_content/upload_from_uri ${body} ${output}= Output response Set Suite Variable ${response} ${output} Send POST Request to upload VNF Package Content from URI with conflict due to onboarding state 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}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/UploadVnfPkgFromUriRequest.json - POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${creatingVnfPkgViaUriId}/package_content/upload_from_uri ${body} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/UploadVnfPkgFromUriRequest.json + ${body}= Format String ${template} vnfPkgUri=${vnfPkgUri} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${creatingVnfPkgViaUriId}/package_content/upload_from_uri ${body} ${output}= Output response Set Suite Variable ${response} ${output} Send GET Request for individual VNF Package Content from URI 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}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgViaUriId}/package_content/upload_from_uri + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgViaUriId}/package_content/upload_from_uri ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for individual VNF Package Content from URI 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}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgViaUriId}/package_content/upload_from_uri + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgViaUriId}/package_content/upload_from_uri ${output}= Output response Set Suite Variable ${response} ${output} Send PATCH Request for individual VNF Package Content from URI 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/${vnfPkgViaUriId}/package_content/upload_from_uri + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgViaUriId}/package_content/upload_from_uri ${output}= Output response Set Suite Variable ${response} ${output} Send DELETE Request for individual VNF Package Content from URI 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/${vnfPkgViaUriId}/package_content/upload_from_uri + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgViaUriId}/package_content/upload_from_uri ${output}= Output response Set Suite Variable ${response} ${output} -Check Postcondition VNF Package Content from URI Exist - Log Checking that vnf pacakge still exists - Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgViaUriId} - Integer response status 200 - Get all VNF Package Subscriptions Log Trying to get the list of subscriptions Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/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}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ok} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/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 Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ko} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/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}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscription + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscription ${output}= Output response Set Suite Variable ${response} ${output} @@ -728,55 +733,69 @@ Send Post Request for VNF Package Subscription Log Trying to create a new 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 + Run Keyword If ${check_descriptors} == 1 PARSE the Descriptor File + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} vnfPkgId=${vnfPkgId} vnfdId=${Descriptor_ID} vnfProvider=${Provider} vnfProductName=${Product_Name} vnfSoftwareVersion=${Software_Version} vnfdVersions=${Descriptor_Version} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint Send Post Request for Duplicated VNF Package Subscription Log Trying to create a subscription with an already created content 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} + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} vnfPkgId=${vnfPkgId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} + #Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 #removed as the check of notif endpoint is done by NFVO while processing subscription reques + #... Check Notification Endpoint Send Put Request for VNF Package Subscriptions 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}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} Send Patch Request for VNF Package Subscriptions 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}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} Send Delete Request for VNF Package Subscriptions 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}/subscriptions + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response - Set Suite Variable ${response} ${output} - -Check Postcondition VNF Package Subscriptions Exists - Log Checking that subscriptions exists - Get all VNF Package Subscriptions + Set Suite Variable ${response} ${output} Check HTTP Response Body PkgmSubscription Attributes Values Match the Issued Subscription Log Check Response matches subscription - ${body}= Get File jsons/subscriptions.json + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} vnfPkgId=${vnfPkgId} ${subscription}= evaluate json.loads('''${body}''') json Should Be Equal ${response['body']['callbackUri']} ${subscription['callbackUri']} @@ -786,19 +805,19 @@ Check Postcondition VNF Package Subscription Is Set Log Check Postcondition subscription exist Log Trying to get the subscription Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Run Keyword If ${location} == Location - ... GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${response['body']['id']} + ... REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${response['body']['id']} Run Keyword If ${location} == Location - ... GET ${response['headers']['Location']} + ... REST.GET ${response['headers']['Location']} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 200 Check Postcondition Subscription Resource Returned in Location Header Is Available Log Going to check postcondition - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${response['headers']['Location']} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${response['headers']['Location']} Integer response status 200 Log Received a 200 OK as expected ${contentType}= Output response headers Content-Type @@ -806,7 +825,8 @@ Check Postcondition Subscription Resource Returned in Location Header Is Availab ${result}= Output response body Validate Json PkgmSubscription.schema.json ${result} Log Validated PkgmSubscription schema - ${body}= Get File jsons/subscriptions.json + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} vnfPkgId=${vnfPkgId} ${subscription}= evaluate json.loads('''${body}''') json Should Be Equal ${result['callbackUri']} ${subscription['callbackUri']} Log Validated Issued subscription is same as original @@ -814,24 +834,24 @@ Check Postcondition Subscription Resource Returned in Location Header Is Availab Get Individual VNF Package Subscription Log Trying to get a single subscription identified by subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} GET individual VNF Package Subscription with invalid resource identifier Log Trying to perform a request on a subscriptionID which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Package Subscription Log Trying to perform a DELETE on a subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -843,32 +863,32 @@ Check Postcondition VNF Package Subscription is Deleted Send Delete request for individual VNF Package Subscription with invalid resource identifier Log Trying to perform a DELETE on a subscriptionId which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual VNF Package Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${newSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for individual VNF Package Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Patch request for individual VNF Package Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -883,24 +903,22 @@ Check Postcondition VNF Package Subscription is Unmodified (Implicit) Check Postcondition VNF Package Subscription is not Created Log Trying to get a new subscription Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${newSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 404 Create Sessions - Pass Execution If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 0 MockServer not started as NFVO is not checking the notification endpoint Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance Wait For Process handle=mockInstance timeout=5s on_timeout=continue Create Mock Session ${callback_uri}:${callback_port} Check HTTP Response Status Code Is - [Arguments] ${expected_status} + [Arguments] ${expected_status} Should Be Equal As Strings ${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 @@ -908,10 +926,9 @@ Check HTTP Response Body Json Schema Is Validate Json ${schema} ${response['body']} Log Json Schema Validation OK - Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filter Log Check Response includes VNF Package Management according to filter - @{words} = Split String ${filter_ok} ,${SEPERATOR} + @{words} = Split String ${filter_ok} ${SEPARATOR} Should Be Equal As Strings ${response['body'][0]['callbackUri']} @{words}[1] Check HTTP Response Body Subscription Identifier matches the requested Subscription @@ -919,16 +936,33 @@ Check HTTP Response Body Subscription Identifier matches the requested Subscript Should Be Equal ${response['body']['id']} ${subscriptionId} Log Subscription identifier as expected +Check HTTP Response Body PkgmSubscription content against VNF Descriptor + #${check_descriptors} flag, 1 to check descriptors + Run Keyword If ${check_descriptors} == 1 Check Individual PkgmSubscription Content + +Check Individual PkgmSubscription Content + PARSE the Descriptor File + Match the Response Attributes of PkgmSubscription with Descriptors + +Match the Response Attributes of PkgmSubscription with Descriptors + Should Be Equal As Strings ${response['body']['filter']['vnfdId']} ${Descriptor_ID} + Should Be Equal As Strings ${response['body']['filter']['vnfProductsFromProviders']['vnfProvider']} ${Provider} + Should Be Equal As Strings ${response['body']['filter']['vnfProductsFromProviders']['vnfProducts']['vnfProductName']} ${Product_Name} + Should Be Equal As Strings ${response['body']['filter']['vnfProductsFromProviders']['vnfProducts']['vnfProductName']['versions']['vnfSoftwareVersion']} ${Software_Version} + Should Be Equal As Strings ${response['body']['filter']['vnfProductsFromProviders']['vnfProducts']['vnfProductName']['versions']['vnfdVersion']} ${Descriptor_Version} + Check Notification Endpoint - &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{notification_request}= Create Mock Request Matcher REST.GET ${callback_endpoint} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} Check HTTP Response Body Matches the Subscription Log Check Response matches subscription - ${body}= Get File jsons/subscriptions.json + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} vnfPkgId=${vnfPkgId} ${subscription}= evaluate json.loads('''${body}''') json Should Be Equal As Strings ${response['body']['callbackUri']} ${subscription['callbackUri']} @@ -941,6 +975,219 @@ Check HTTP Response Header Contains Should Contain ${response['headers']} ${CONTENT_TYPE} Log Header is present -Check LINK in Header +Check HTTP Response Header Contains Location ${linkURL}= Get Value From Json ${response['headers']} $..Link Should Not Be Empty ${linkURL} + +Get access configuration information for external artifacts + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/ext_artifacts_access + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PUT Request to access configuration information for external artifacts + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body}= Get File jsons/ExternalArtifactsAccessConfig.json + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/ext_artifacts_access ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} + +Check Postcondition individual VNF Package is created + GET Individual VNF Package + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is vnfPkgInfo + Should Be True '${response['body']['id']}' =='CREATED' or '${response['body']['id']}'=='ERROR' + +Send POST Request for access configuration for external artifacts + Log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/ext_artifacts_access + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PATCH Request for access configuration for external artifacts + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/ext_artifacts_access + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send DELETE Request for Access configuration for external artifacts + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/ext_artifacts_access + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Manifest in Individual VNF Package in plainFormat + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Manifest in Individual VNF Package with security information + Log Trying to get a manifest from a given VNF Package present in the NFVO Catalogue + Set Headers {"Accept": "${ACCEPT_ZIP}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/manifest/include_signatures + ${output}= Output response + Set Suite Variable ${response} ${output} + +Get Manifest in Individual VNF Package with unacceptable request + Set Headers {"Accept": "${ACCEPT_PLAIN}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/manifest/include_signatures + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send POST Request for manifest in individual VNF Package + Log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PUT Request for manifest in individual VNF Package + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send PATCH Request for manifest in individual VNF Package + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/manifest + ${output}= Output response + Set Suite Variable ${response} ${output} + +Send DELETE Request for manifest in individual VNF Package + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPkgId}/manifest + ${output}= Output response + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/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_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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} + +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 + ${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": "bytes=${range}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/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_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/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_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/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_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/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": "bytes=${erroneousRange}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.GET ${apiRoot}/${apiName}/${apiMajorVersion}/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_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.POST ${apiRoot}/${apiName}/${apiMajorVersion}/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_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PUT ${apiRoot}/${apiName}/${apiMajorVersion}/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_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/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_HEADER}":"${AUTHORIZATION_TOKEN}"} + REST.DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_packages/${vnfPackageId}/artifacts + ${output}= Output response + Set Suite Variable ${response} ${output} diff --git a/SOL005/VNFPackageManagement-API/VNFPackages.robot b/SOL005/VNFPackageManagement-API/VNFPackages.robot index 617e627de366d2c37c90ecb4f1d601d920e064ce..b0b15ff99f8bc128a8d7fa894068a24aa0a2a003 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackages.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackages.robot @@ -1,5 +1,4 @@ *** Settings *** -Resource environment/vnfPackages.txt # VNF Packages specific parameters Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters Resource VNFPackageManagementKeywords.robot @@ -12,7 +11,7 @@ GET all VNF Packages ... Test title: GET all VNF Packages ... Test objective: The objective is to test the retrieval of all the available VNF packages information and perform a JSON schema and content validation of the collected data structure ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -29,7 +28,7 @@ GET VNF Packages with attribute-based filter ... Test title: GET VNF Packages with attribute-based filter ... Test objective: The objective is to test the retrieval of VNF packages using attribute-based filter, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued attribute-based filter ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -43,7 +42,7 @@ GET VNF Packages with invalid attribute-based filter ... Test title: GET VNF Packages with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of VNF packages fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -56,7 +55,7 @@ Get all VNF Packages with malformed authorization token ... Test title: Get all VNF Packages Information with malformed authorization token ... Test objective: The objective is to test that the retrieval of VNF Packages fails when using malformed authorization token ... Pre-conditions: One or more VNF Packages are onboarded in the NFVO. - ... Reference: Clause 4.5.3.3, 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 4.5.3.3, 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none @@ -68,7 +67,7 @@ Get all VNF Packages without authorization token ... Test title: Get all VNF Packages without authorization token ... Test objective: The objective is to test that the retrieval of VNF Packages fails when omitting the authorization token ... Pre-conditions: One or more VNF Packages are onboarded in the NFVO. - ... Reference: Clause 4.5.3.3, 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 4.5.3.3, 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The NFVO requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none @@ -80,7 +79,7 @@ GET VNF Packages with "all_fields" attribute selector ... Test title: GET VNF Packages with "all_fields" attribute selector ... Test objective: The objective is to test the retrieval of VNF packages with "all_fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "all_fileds" selector ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 4.3.3.2.1, 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 4.3.3.2.1, 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -94,7 +93,7 @@ GET VNF Packages with "exclude_default" attribute selector ... Test title: GET VNF Packages with exclude_default attribute selector ... Test objective: The objective is to test the retrieval of VNF packages with "exclude_default" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "exclude_default" selector ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 4.3.3.2.1, 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 4.3.3.2.1, 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -108,7 +107,7 @@ GET VNF Packages with "fields" attribute selector ... Test title: GET VNF Packages with fields attribute selector ... Test objective: The objective is to test the retrieval of VNF packages with "fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "fields" selector ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 4.3.3.2.1, 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 4.3.3.2.1, 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The VNFM supports the use of fields attribute selector ... Post-Conditions: none @@ -122,7 +121,7 @@ GET VNF Packages with "exclude_fields" attribute selector ... Test title: GET VNF Packages with exclude_fields attribute selector ... Test objective: The objective is to test the retrieval of VNF packages with "exclude_fields" attribute selector, perform a JSON schema validation of the collected data structure, and verify that the retrieved information matches the issued "exclude_fields" selector ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 4.3.3.2.1, 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 4.3.3.2.1, 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: The VNFM supports the use of exclude_fields attribute selector ... Post-Conditions: none @@ -136,19 +135,20 @@ GET all VNF Packages with invalid resource endpoint ... Test title: GET VNF Packages with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of VNF packages fails when using invalid resource endpoint ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET all VNF Packages with invalid resource endpoint Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails Create new VNF Package Resource [Documentation] Test ID: 5.3.5.1.11 ... Test title: Create new VNF Package Resource ... Test objective: The objective is to test the creation of a new VNF Package Resource and perform the JSON schema validation of the returned structure ... Pre-conditions: none - ... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: The VNF Package Resource is successfully created on the NFVO @@ -157,13 +157,14 @@ Create new VNF Package Resource Check HTTP Response Body Json Schema Is vnfPkgInfo Check HTTP Response Header Contains Location Check Postcondition VNF Package Resource Exists + Check HTTP Response Body vnfPkgInfo content against VNF Descriptor PUT all VNF Packages - Method not implemented [Documentation] Test ID: 5.3.5.1.12 ... Test title: PUT all VNF Packages - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify existing VNF Packages ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -175,7 +176,7 @@ PATCH all VNF Packages - Method not implemented ... Test title: PATCH all VNF Packages - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update existing VNF Packages ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.2.3.4 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none @@ -187,33 +188,32 @@ DELETE all VNF Packages - Method not implemented ... Test title: DELETE all VNF Packages - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete existing VNF Packages ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.2.3.5 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.2.3.5 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none - ... Post-Conditions: The VNF Packages are not deleted by the failed operation + ... Post-Conditions: none Send DELETE Request for all VNF Packages Check HTTP Response Status Code Is 405 - Check Postcondition VNF Packages Exist GET all VNF Packages as Paged Response [Documentation] Test ID: 5.3.5.1.15 ... Test title: GET all VNF Packages as Paged Response ... Test objective: The objective is to test the retrieval of all the available VNF packages information as paged response. ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none GET all VNF Packages Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contains Location GET VNF Packages - Bad Request Response too Big [Documentation] Test ID: 5.3.5.1.16 ... Test title: GET VNF Packages - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of VNF packages fails because response is too big, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: One or more VNF packages are onboarded in the NFVO. - ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Reference: Clause 9.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v2.7.1 ... Config ID: Config_prod_NFVO ... Applicability: none ... Post-Conditions: none diff --git a/SOL005/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml b/SOL005/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml new file mode 100644 index 0000000000000000000000000000000000000000..413d76def0e50c64c1890a8476fa7bdb22981ae3 --- /dev/null +++ b/SOL005/VNFPackageManagement-API/descriptors/SOL001/VNFD/vnfd_SOL001.yaml @@ -0,0 +1,167 @@ +tosca_definitions_version: tosca_simple_yaml_1_2 +description: "TST010 reference VNF-B" + +imports: + - https://forge.etsi.org/rep/nfv/SOL001/raw/v2.7.1/etsi_nfv_sol001_vnfd_types.yaml + +metadata: + descriptor_id: "VNF-B" + vendor: "ETSI TST WG" + version: "2.0" + +node_types: + tst010.vnf.simple: + derived_from: tosca.nodes.nfv.VNF + properties: + descriptor_id: + type: string + default: VNF-B + descriptor_version: + type: string + default: '1.0' + provider: + type: string + default: ETSI TST WG + product_name: + type: string + default: VNF-B + software_version: + type: string + default: '1.0' + product_info_name: + type: string + default: VNF-B + product_info_description: + type: string + default: TST010 reference VNF-B + flavour_id: + type: string + default: VNF-B_flavor + flavour_description: + type: string + default: "VNF-B flavor" + vnfm_info: + type: list + entry_schema: + type: string + default: [ 'etsivnfm:v2.3.1' ] + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + description: Invoked upon receipt of a Scale VNF request + terminate: + description: Invoked upon receipt Terminate VNF request + operate: + description: Invoked upon receipt of an Operate VNF request + requirements: + - virtual_link_right: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_left: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link_management: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 1] + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + occurrences: [0, 0] + +topology_template: + substitution_mappings: + node_type: "tst010.vnf.simple" + requirements: + virtual_link_right: + [right, virtual_link_right] + virtual_link_management: + [management, virtual_link_management] + virtual_link_left: + [left, virtual_link_left] + node_templates: + right: + type: "tosca.nodes.nfv.VduCp" + properties: + layer_protocols: [ ipv4 ] + order: 1 + requirements: + - virtual_binding: VDU-B + vdu-b-1-vsd: + management: + type: "tosca.nodes.nfv.VduCp" + properties: + layer_protocols: [ ipv4 ] + order: 0 + requirements: + - virtual_binding: VDU-B + vdu-b-1-vsd: + left: + type: "tosca.nodes.nfv.VduCp" + properties: + layer_protocols: [ ipv4 ] + order: 2 + requirements: + - virtual_binding: VDU-B + vdu-b-1-vsd: + type: "tosca.nodes.nfv.Vdu.VirtualBlockStorage" + properties: + virtual_block_storage_data: + size_of_storage: 20 GB + rdma_enabled: false + sw_image_data: + name: "vdu-b-1 image" + version: "1.1" + checksum: + algorithm: "sha-224" + hash: "somehashfortst010" + container_format: "bare" + disk_format: qcow2 + min_disk: '1' + min_ram: '2' + size: '1' + VDU-B: + type: "tosca.nodes.nfv.Vdu.Compute" + properties: + name: "vdu-b-1-vcd" + description: "Description of VDU-B-1" + vdu_profile: + min_number_of_instances: 1 + max_number_of_instances: 2 + capabilities: + virtual_compute: + properties: + virtual_memory: + virtual_mem_size: 4096 MB + numa_enabled: false + virtual_cpu: + num_virtual_cpu: 2 + requirements: + - virtual_storage: vdu-b-1-vsd + + vnf-b-1_VNF: + type: "tst010.vnf.simple" + properties: + descriptor_id: "VNF-B" + descriptor_version: "2.0" + provider: "ETSI TST WG" + product_name: "VDU_VNF-B" + software_version: "2.0" + product_info_name: "VDU_VNF-B" + product_info_description: "TST010 reference VNF-A" + flavour_id: "VNF-B_flavor" + flavour_description: "VNF-B flavor" + vnfm_info: + - etsivnfm:v2.3.1 + interfaces: + Vnflcm: + type: "tosca.interfaces.nfv.Vnflcm" + scale: + implementation: scale-example.yaml + terminate: + implementation: terminate-example.yaml + operate: + implementation: operate-example.yaml \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/descriptors/SOL006/VNFD/vnfd_SOL006.yaml b/SOL005/VNFPackageManagement-API/descriptors/SOL006/VNFD/vnfd_SOL006.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0ea9820f0efc5df45c1882c49e010a94357ad403 --- /dev/null +++ b/SOL005/VNFPackageManagement-API/descriptors/SOL006/VNFD/vnfd_SOL006.yaml @@ -0,0 +1,137 @@ +nfv: + vnfd: + - id: VNF-B-2vdu + provider: ETSI TST WG + product_name: TST010 reference VNF-B with 2 VDUs + software_version: '2.2' + version: '2.2' + vnfm_info: ETSI VNFM + vdu: + - id: vdu-b-1 + name: VNF-B VDU 1 + int_cpd: + - id: left + layer_protocol: ethernet + - id: management + layer_protocol: ethernet + - id: internal + layer_protocol: ethernet + int_virtual_link_desc: internal-vl + virtual_compute_desc: vdu-b-1-vcd + virtual_storage_desc: vdu-b-1-vsd + sw_image_desc: vdu-b-1-image + - id: vdu-b-2 + name: VNF-B VDU 2 + int_cpd: + - id: right + layer_protocol: ethernet + - id: management + layer_protocol: ethernet + - id: internal + layer_protocol: ethernet + int_virtual_link_desc: internal-vl + virtual_compute_desc: vdu-b-2-vcd + virtual_storage_desc: vdu-b-2-vsd + sw_image_desc: vdu-b-2-image + virtual_compute_desc: + id: vdu-b-1-vcd + virtual_memory: + size: '4.0' + virtual_cpu: + num_virtual_cpu: '2' + virtual_storage_desc: + id: vdu-b-1-vsd + type_of_storage: root-storage + size_of_storage: '0' + sw_image_desc: + id: vdu-b-1-image + name: VNF-B image + version: '1.1' + checksum: + algorithm: sha-224 + hash: somehashfortst010 + container_format: bare + disk_format: qcow2 + min_disk: '1' + min_ram: '2.0' + size: '1' + image: 'http://someurl.com/VNF-B.qcow2' + virtual_compute_desc: + id: vdu-b-2-vcd + virtual_memory: + size: '6.0' + virtual_cpu: + num_virtual_cpu: '2' + virtual_storage_desc: + id: vdu-b-2-vsd + type_of_storage: root-storage + size_of_storage: '0' + sw_image_desc: + id: vdu-b-2-image + name: VNF-B-2 image + version: '1.1' + checksum: + algorithm: sha-224 + hash: somehashfortst010 + container_format: bare + disk_format: qcow2 + min_disk: '1' + min_ram: '2.0' + size: '1' + image: 'http://someurl.com/VNF-B-2.qcow2' + int_virtual_link_desc: + - id: internal-vl + flavour: + id: internal-vl-flavour + qos: + latency: '1' + packet_delay_variation: '1' + packet_loss_ratio: '0.05' + connectivity_type: + layer_protocol: ethernet + ext_cpd: + - id: ext-b-left + int_cpd: + vdu_id: vdu-b-1 + cpd: left + layer_protocol: ethernet + - id: management + int_cpd: + vdu_id: vdu-b-1 + cpd: management + layer_protocol: ethernet + - id: ext-b-right + int_cpd: + vdu_id: vdu-b-2 + cpd: right + layer_protocol: ethernet + df: + id: normal + vdu_profile: + - id: vdu-b-1 + min_number_of_instances: '1' + max_number_of_instances: '2' + - id: vdu-b-2 + min_number_of_instances: '1' + max_number_of_instances: '4' + instantiation_level: + - id: double + vdu_level: + - vdu_id: vdu-b-1 + number_of_instances: '2' + - vdu_id: vdu-b-2 + number_of_instances: '2' + - id: single + vdu_level: + - vdu_id: vdu-b-1 + number_of_instances: '1' + - vdu_id: vdu-b-2 + number_of_instances: '1' + default_instantiation_level: single + lcm_operations_configuration: + scale_vnf_to_level_op_config: + arbitrary_target_levels_supported: 'true' + terminate_vnf_op_config: + min_graceful_termination: '1' + operate_vnf_op_config: + min_graceful_stop_timeout: '1' \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/environment/individualSubscription.txt b/SOL005/VNFPackageManagement-API/environment/individualSubscription.txt deleted file mode 100644 index 78c7b91b436411ec93240864274e0912381ef171..0000000000000000000000000000000000000000 --- a/SOL005/VNFPackageManagement-API/environment/individualSubscription.txt +++ /dev/null @@ -1,7 +0,0 @@ -*** Variables *** -${subscriptionId} f3ae6df7-07e1-47c9-8924-9ebe10343586 -${erroneousSubscriptionId} 442e3ee5-0499-4849-9b31-eb91ce1638f1 # Not existing ID on the subscriptions -${newSubscriptionId} newSubsciptionId -${response} httpresponse -${origResponse} httpresponse - diff --git a/SOL005/VNFPackageManagement-API/environment/individualVnfPackage.txt b/SOL005/VNFPackageManagement-API/environment/individualVnfPackage.txt deleted file mode 100644 index 23b0dd07b95fb53b3a1022e25b0b003eb8e46d2a..0000000000000000000000000000000000000000 --- a/SOL005/VNFPackageManagement-API/environment/individualVnfPackage.txt +++ /dev/null @@ -1,5 +0,0 @@ -*** Variables *** -${erroneousVnfPackageId} erroneousVnfPackageId # Given ID for vnfPkg not present in database -${disabledVnfPackageId} 87a2c9d3-00ea-4032-8c67-a5106d001868 -${vnfPackageId} 788106a2-d692-44f3-a86d-384f0ce35e42 -${instantiatedVnfPackageId} 0b79bab50daca910b000d4f1a2b675d604257e42 \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/environment/subscriptions.txt b/SOL005/VNFPackageManagement-API/environment/subscriptions.txt deleted file mode 100644 index ca34ee831fbdd3dd3727821ab00ee81d82c00fc6..0000000000000000000000000000000000000000 --- a/SOL005/VNFPackageManagement-API/environment/subscriptions.txt +++ /dev/null @@ -1,7 +0,0 @@ -*** Variables *** -${filter_ok} callbackUri=http://172.22.1.7:9091/vnfpkgm/subscriptions -${filter_ko} nfvId=f9f130e4-05eb-4082-a676-4c97d13a883d # Not existant filter attribute-based -${callbackUri} http://172.22.1.7:9091/vnfpkgm/subscriptions -${total_polling_time} 2 min -${polling_interval} 10 sec -${SEPERATOR} = \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/environment/variables.txt b/SOL005/VNFPackageManagement-API/environment/variables.txt index 80469cdfead4dc91b9668e91d26b19968ed0f798..f6dd5c0e8ec828b2d89a4fb963960490e18984d6 100644 --- a/SOL005/VNFPackageManagement-API/environment/variables.txt +++ b/SOL005/VNFPackageManagement-API/environment/variables.txt @@ -3,18 +3,18 @@ ${NFVO_HOST} localhost # Hostname of the NFVO ${NFVO_PORT} 8081 # Listening port of the NFVO ${NFVO_SCHEMA} https -${AUTHORIZATION} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${CONTENT_TYPE_JSON} application/json ${ACCEPT_JSON} application/json ${apiRoot} / ${AUTH_USAGE} 1 -${NEG_AUTHORIZATION} Bearer negativetoken -${apiVersion} v1 +${NEG_AUTHORIZATION_TOKEN} Bearer negativetoken +${apiMajorVersion} v2 ${apiName} vnfpkgm ${FIELD_USAGE} 1 ${NFVO_PLAIN} 1 ${NFVO_FIELDS} 1 -${onboardingStateVnfPkgId} 788106a2-d692-44f3-a86d-384f0ce35e42 # The VNF Package is in CREATED onboardingState ${testOptionalMethods} 0 @@ -31,7 +31,85 @@ ${polling_interval} 10 sec ${NFVO_CHECKS_NOTIF_ENDPOINT} 1 -${response} +${response} ${notification_request} [] ${notification_response} [] + +${subscriptionId} f3ae6df7-07e1-47c9-8924-9ebe10343586 +${erroneousSubscriptionId} 442e3ee5-0499-4849-9b31-eb91ce1638f1 # Not existing ID on the subscriptions +${newSubscriptionId} newSubsciptionId +${origResponse} httpresponse + +${filter_ok} callbackUri=http://172.22.1.7:9091/vnfpkgm/subscriptions +${filter_ko} nfvId=f9f130e4-05eb-4082-a676-4c97d13a883d # Not existant filter attribute-based +${SEPARATOR} = + +${erroneousVnfPackageId} erroneousVnfPackageId # Given ID for vnfPkg not present in database +${disabledVnfPackageId} 87a2c9d3-00ea-4032-8c67-a5106d001868 +${vnfPackageId} 788106a2-d692-44f3-a86d-384f0ce35e42 +${instantiatedVnfPackageId} 0b79bab50daca910b000d4f1a2b675d604257e42 + +${contentZipVnfPackage} files/vnfPackage.zip + +${ACCEPT_PLAIN} text/plain +${ACCEPT_ZIP} application/zip +${CONTENT_TYPE_PLAIN} text/plain +${CONTENT_TYPE_ZIP} application/zip +${NFVO_VNFD_PLAIN} 1 +${NFVO_VNFD_ZIP} 0 +${vnfPkgPlainVNFD} c26ad7fb-072b-48c4-a663-7d71646d9e98 # The VNF Pakcage contains a VNFD which is a Single Plain File +${vnfPkgZipVNFD} f5b220d4-6177-4ebb-a554-a43311e16075 # The VNF Package contains a VNFD composed by multiple files +${erroneousVnfPkgId} erroneousPkgId +${onboardingStateVnfPkgId} 788106a2-d692-44f3-a86d-384f0ce35e42 # The VNF Package is in CREATED onboardingState + +${artifactPath} artifactPath +${CONTENT_TYPE_OCTET} application/octet-stream +${NFVO_RANGE_OK} 1 # If 1 means that Range is supported by the NFVO +${range} 0-1023 +${full_length} 2000 # Size of the requested artifact to be downloaded via partial downloads +${length} 1024 # Size of the requested range +${erroneousRange} 10000000-1000000000 # Requesting a out of range number of bytes +${vnfPackageOctetStreamId} octetStreamPkgId +${vnfPkgId} 788106a2-d692-44f3-a86d-384f0ce35e42 +${creatingVnfPackageId} d246ccdd-71aa-402f-b256-6a80ee54be3d +${newVnfPackageId} d246ccdd-71aa-402f-b256-6a80ee54be3d + +${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 +${CAN_FILTER} 1 # NFVO in able to use filters when retrieving VNF Packages +${fields} softwareImages,additionalArtifacts +${BAD_AUTHORIZATION_TOKEN} Bear sometoken +${VAR_SEPARATOR} & + +${vnfPkgViaUriId} 788106a2-d692-44f3-a86d-384f0ce35e42 +${creatingVnfPkgViaUriId} d246ccdd-71aa-402f-b256-6a80ee54be3d +${vnfPkgUri} http://localhost/content.zip + +${NFVO_non-MANO_OK} 1 # If 1 means that non-MANO artifacts are supported by the NFVO +${non_mano_artifact_sets} +${callbackResp} 127.0.0.1 + +${check_descriptors} 1 +${descriptorType} SOL006 + +${tosca_type_VDU_compute} tosca.nodes.nfv.Vdu.Compute +${tosca_type_VNF} tst010.vnf.simple # custom tosca type defined in the descriptor vnfd_SOL001.yaml in descriptors folder +${tosca_type_virtual_link} tosca.nodes.nfv.VnfVirtualLink +${tosca_type_VDU_cp} tosca.nodes.nfv.VduCp +${tosca_type_storage} tosca.nodes.nfv.Vdu.VirtualBlockStorage + +@{VDU_IDs} +@{VNF_IDs} +@{virtualLink_IDs} +@{CP_IDs} +@{Storage_IDs} +@{internalCP_IDs} +@{externalCP_IDs} +@{InstantiationLevel_IDs} + +${Descriptor_ID} +${Provider} +${Product_Name} +${Software_Version} +${Descriptor_Version} diff --git a/SOL005/VNFPackageManagement-API/environment/vnfPackageArtifacts.txt b/SOL005/VNFPackageManagement-API/environment/vnfPackageArtifacts.txt deleted file mode 100644 index 4acfbd727d6a975eb3da974c81a9cb1f7b7e397f..0000000000000000000000000000000000000000 --- a/SOL005/VNFPackageManagement-API/environment/vnfPackageArtifacts.txt +++ /dev/null @@ -1,8 +0,0 @@ -*** Variables *** -${artifactPath} artifactPath -${CONTENT_TYPE_OCTET} application/octet-stream -${NFVO_RANGE_OK} 1 # If 1 means that Range is supported by the NFVO -${range} bytes=0-1023 -${erroneousRange} bytes=10000000-1000000000 # Requesting a out of range number of bytes -${erroneousVnfPkgId} erroneousPkgId -${vnfPackageOctetStreamId} octetStreamPkgId \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/environment/vnfPackageContent.txt b/SOL005/VNFPackageManagement-API/environment/vnfPackageContent.txt deleted file mode 100644 index c775a126d8f2e4031134feb00028a2358f32d2ce..0000000000000000000000000000000000000000 --- a/SOL005/VNFPackageManagement-API/environment/vnfPackageContent.txt +++ /dev/null @@ -1,12 +0,0 @@ -*** Variables *** -${ACCEPT_ZIP} application/zip -${CONTENT_TYPE_ZIP} application/zip -${NFVO_RANGE_OK} 1 # If 1 means that Range is supported by the NFVO -${erroneousVnfPkgId} erroneousPkgId -${vnfPkgId} 788106a2-d692-44f3-a86d-384f0ce35e42 -${erroneousRange} bytes=100000-1000000 # Requesting a out of range number of bytes -${range} bytes=0-1023 -${length} 1024 -${creatingVnfPackageId} d246ccdd-71aa-402f-b256-6a80ee54be3d -${newVnfPackageId} d246ccdd-71aa-402f-b256-6a80ee54be3d - diff --git a/SOL005/VNFPackageManagement-API/environment/vnfPackageContentViaUri.txt b/SOL005/VNFPackageManagement-API/environment/vnfPackageContentViaUri.txt deleted file mode 100644 index 9cb902861d34f0dc7c909832c489dc7a8cea5309..0000000000000000000000000000000000000000 --- a/SOL005/VNFPackageManagement-API/environment/vnfPackageContentViaUri.txt +++ /dev/null @@ -1,4 +0,0 @@ -*** Variables *** -${vnfPkgViaUriId} 788106a2-d692-44f3-a86d-384f0ce35e42 -${creatingVnfPkgViaUriId} d246ccdd-71aa-402f-b256-6a80ee54be3d - diff --git a/SOL005/VNFPackageManagement-API/environment/vnfPackages.txt b/SOL005/VNFPackageManagement-API/environment/vnfPackages.txt deleted file mode 100644 index 8f599ef60e0a6c0bb1da6116f2e035e686ffae1a..0000000000000000000000000000000000000000 --- a/SOL005/VNFPackageManagement-API/environment/vnfPackages.txt +++ /dev/null @@ -1,10 +0,0 @@ -*** Variables *** -${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 -${CAN_FILTER} 1 # NFVO in able to use filters when retrieving VNF Packages -${fields} softwareImages,additionalArtifacts -${response} httpresponse -${NEG_AUTHORIZATION} Bearer negativetoken -${BAD_AUTHORIZATION} Bear sometoken -${SEPERATOR} = -${VAR_SEPERATOR} & diff --git a/SOL005/VNFPackageManagement-API/environment/vnfdInIndividualVnfPackage.txt b/SOL005/VNFPackageManagement-API/environment/vnfdInIndividualVnfPackage.txt deleted file mode 100644 index 8e228037e47c58578d936e9e1485308add7406d2..0000000000000000000000000000000000000000 --- a/SOL005/VNFPackageManagement-API/environment/vnfdInIndividualVnfPackage.txt +++ /dev/null @@ -1,12 +0,0 @@ -*** Variables *** -${ACCEPT_PLAIN} text/plain -${ACCEPT_ZIP} application/zip -${CONTENT_TYPE_PLAIN} text/plain -${CONTENT_TYPE_ZIP} application/zip -${NFVO_VNFD_PLAIN} 1 -${NFVO_VNFD_ZIP} 0 -${vnfPkgPlainVNFD} c26ad7fb-072b-48c4-a663-7d71646d9e98 # The VNF Pakcage contains a VNFD which is a Single Plain File -${vnfPkgZipVNFD} f5b220d4-6177-4ebb-a554-a43311e16075 # The VNF Package contains a VNFD composed by multiple files -${erroneousVnfPkgId} erroneousPkgId -${onboardingStateVnfPkgId} 788106a2-d692-44f3-a86d-384f0ce35e42 # The VNF Package is in CREATED onboardingState -${vnfPackageId} 788106a2-d692-44f3-a86d-384f0ce35e42 diff --git a/SOL005/VNFPackageManagement-API/files/vnfPackage.zip b/SOL005/VNFPackageManagement-API/files/vnfPackage.zip new file mode 100644 index 0000000000000000000000000000000000000000..9fcfb621d458e16f5e725f85d697d327ff8ab439 Binary files /dev/null and b/SOL005/VNFPackageManagement-API/files/vnfPackage.zip differ diff --git a/SOL005/VNFPackageManagement-API/jsons/ExternalArtifactsAccessConfig.json b/SOL005/VNFPackageManagement-API/jsons/ExternalArtifactsAccessConfig.json new file mode 100644 index 0000000000000000000000000000000000000000..987555643c030650a0ec2874593b86a9b83184b3 --- /dev/null +++ b/SOL005/VNFPackageManagement-API/jsons/ExternalArtifactsAccessConfig.json @@ -0,0 +1,6 @@ +{ + "artifact": + { + "artifactUri":"127.0.0.1" + } +} \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/jsons/PkgmSubscription.json b/SOL005/VNFPackageManagement-API/jsons/PkgmSubscription.json deleted file mode 100644 index c01e92b484e9305f89fbd1a54db3d69ea514695c..0000000000000000000000000000000000000000 --- a/SOL005/VNFPackageManagement-API/jsons/PkgmSubscription.json +++ /dev/null @@ -1,414 +0,0 @@ -[ - { - "id": "ABCDEFGHIJKL", - "callbackUri": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "_links": { - "self": { - "href": "ABCDEFGHIJKLMNOPQR" - } - }, - "filter": { - "notificationTypes": [ - "VnfPackageChangeNotification" - ], - "vnfProductsFromProviders": [ - { - "vnfProvider": "ABCDEFGHIJKLMNOPQRSTUVW", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGHIJKLMNOPQRSTUVWX", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQ", - "ABCDE" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXYZA", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ] - } - ] - }, - { - "vnfProductName": "ABCDEFGHIJKLM", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMN", - "vnfdVersions": [ - "ABCDEF", - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "vnfdVersions": [ - "ABCDEFGHIJKLMNO", - "ABCDEFGH", - "ABCDEF" - ] - }, - { - "vnfSoftwareVersion": "ABCD", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXY", - "ABCDEFGHIJ", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRST", - "vnfdVersions": [ - "ABCDEFG", - "ABCDEFGHIJKLMNOPQRSTU" - ] - } - ] - } - ] - }, - { - "vnfProvider": "ABCDEF", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGH", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRST", - "vnfdVersions": [ - "ABCDE", - "ABCDE", - "ABCDEFGHIJKLMNOPQR" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWX", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOP" - ] - } - ] - }, - { - "vnfProductName": "ABCDE", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNO", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJ", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRS" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJK", - "vnfdVersions": [ - "ABCD" - ] - }, - { - "vnfSoftwareVersion": "ABCD", - "vnfdVersions": [ - "ABCDEFGHIJKL", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ] - } - ] - }, - { - "vnfProductName": "ABCD", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRST", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQ", - "ABCDEFGHIJKL" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXY", - "vnfdVersions": [ - "ABCDEF", - "ABCDEFGHIJKLMNOPQRST" - ] - }, - { - "vnfSoftwareVersion": "ABCDEF", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLMNOPQR", - "ABCDEFGHIJKLMNOP" - ] - } - ] - } - ] - } - ], - "vnfdId": [ - "ABCDEFGHIJKLMNOPQRS", - "ABCDEFGHIJKLMNO", - "ABCDEFGHIJKLM", - "ABCDEFGHIJK" - ], - "vnfPkgId": [ - "ABCDEFGH", - "ABCDEFGHIJKLMNOPQ", - "ABCDE", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ], - "operationalState": "DISABLED", - "usageState": {} - } - }, - { - "id": "ABCDE", - "callbackUri": "ABCDEFGHIJKLM", - "_links": { - "self": { - "href": "ABCDEFGHIJKLMNOPQRSTU" - } - }, - "filter": { - "notificationTypes": [ - "VnfPackageOnboardingNotification", - "VnfPackageOnboardingNotification", - "VnfPackageOnboardingNotification" - ], - "vnfProductsFromProviders": [ - { - "vnfProvider": "ABCDEFGH", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGHIJKLMNOPQRSTUV", - "versions": [ - { - "vnfSoftwareVersion": "ABCD", - "vnfdVersions": [ - "ABCDEFGHIJKLMN", - "ABCDEFGHIJKLMNOPQRSTUVW", - "ABCDE", - "ABCDEFGHIJKLMNOPQRS" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRS" - ] - } - ] - }, - { - "vnfProductName": "ABCDEFGHIJKLMN", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOP", - "vnfdVersions": [ - "ABCDEFGHIJ", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLMNOPQRSTUVWX", - "ABCDEFGHIJKLMNOPQR" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMN", - "vnfdVersions": [ - "ABCDEFGHIJKLMNO", - "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "ABCDEFGHIJKLMNOPQRSTUVW" - ] - }, - { - "vnfSoftwareVersion": "ABCDEF", - "vnfdVersions": [ - "ABCDEFGHIJKLM", - "ABCDE", - "ABCDEFGHIJKLMNOPQRSTUVWXYZA" - ] - } - ] - } - ] - }, - { - "vnfProvider": "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGHIJKLMNOPQ", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWXY", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQ", - "ABCDE" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMN", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWX", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC" - ] - } - ] - }, - { - "vnfProductName": "ABCDEFGHIJKLMNOP", - "versions": [ - { - "vnfSoftwareVersion": "ABCD", - "vnfdVersions": [ - "ABCDEFGH", - "ABCDEFGHIJKLMN", - "ABCDEFGHIJKLMNOP" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLM", - "vnfdVersions": [ - "ABCDEFGHIJKLM", - "ABCDEFGH" - ] - } - ] - } - ] - } - ], - "vnfdId": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLM", - "ABCDEFGHIJKLMNOPQRS", - "ABCDEFGHIJKL" - ], - "vnfPkgId": [ - "ABCDEFGHIJKLMNOPQRSTUVWXY" - ], - "operationalState": "DISABLED", - "usageState": {} - } - }, - { - "id": "ABCDEF", - "callbackUri": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "_links": { - "self": { - "href": "ABCDEFGHIJKLMNOPQ" - } - }, - "filter": { - "notificationTypes": [ - "VnfPackageChangeNotification", - "VnfPackageOnboardingNotification", - "VnfPackageChangeNotification", - "VnfPackageOnboardingNotification" - ], - "vnfProductsFromProviders": [ - { - "vnfProvider": "ABCDEFGHIJKL", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGHIJK", - "versions": [ - { - "vnfSoftwareVersion": "ABCDE", - "vnfdVersions": [ - "ABCDEFGHI", - "ABCDEFGHIJKLMNOPQRS", - "ABCDEFGHIJKLMNOPQR" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQRSTUVWX", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWX", - "ABCDEFG", - "ABCDEFGHIJKLMNOPQRSTUVW", - "ABCDEFGHIJKLMNOPQRSTUVWXY" - ] - } - ] - } - ] - }, - { - "vnfProvider": "ABCDEFGHI", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGHIJ", - "versions": [ - { - "vnfSoftwareVersion": "ABCDEFGHIJKL", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZA", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKL", - "ABCDEFGHIJKLMNOPQR" - ] - }, - { - "vnfSoftwareVersion": "ABCDEFGHIJKLMNOPQ", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLMNOPQRSTU", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLMN" - ] - } - ] - } - ] - }, - { - "vnfProvider": "ABCDEFGHIJKLMNOPQRSTUVWXYZA", - "vnfProducts": [ - { - "vnfProductName": "ABCDEFGH", - "versions": [ - { - "vnfSoftwareVersion": "ABCDE", - "vnfdVersions": [ - "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "ABCDEFGHIJKLMNOPQRSTUVWXYZABC", - "ABCDEFGHIJKLMNOPQRS", - "ABCDEFGHIJKLMNOPQRST" - ] - } - ] - } - ] - } - ], - "vnfdId": [ - "ABCDEFGHIJKLMNOP", - "ABCDEFGHIJKLMNOPQRSTUVWXYZA" - ], - "vnfPkgId": [ - "ABCDEFGHIJKLMNOPQRSTUVW", - "ABCDEFGHIJKLMNOPQ", - "ABCDEFGHIJKLMN" - ], - "operationalState": "ENABLED", - "usageState": [ - 773, - [ - {}, - [ - false, - true - ], - null, - null - ] - ] - } - } -] \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/jsons/UploadVnfPkgFromUriRequest.json b/SOL005/VNFPackageManagement-API/jsons/UploadVnfPkgFromUriRequest.json index f76054e5fa6e0350cc2cafcff459bff2a88daab4..68534020426dcc0ab9cebe61a6e2e62a26718be6 100644 --- a/SOL005/VNFPackageManagement-API/jsons/UploadVnfPkgFromUriRequest.json +++ b/SOL005/VNFPackageManagement-API/jsons/UploadVnfPkgFromUriRequest.json @@ -1,3 +1,3 @@ -{ -"addressInformation": "http://localhost/content.zip" -} \ No newline at end of file +{{ + "addressInformation": "{vnfPkgUri}" +}} \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/jsons/VnfPackageChangeNotification.json b/SOL005/VNFPackageManagement-API/jsons/VnfPackageChangeNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..e6ababfad9294128d297d4e25a0ddc45660e6fe8 --- /dev/null +++ b/SOL005/VNFPackageManagement-API/jsons/VnfPackageChangeNotification.json @@ -0,0 +1,10 @@ +{{ + "id":"", + "notificationType":"VnfPackageChangeNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "vnfPkgId":"{vnfPkgId}", + "vnfdId":"{vnfdId}", + "changeType":"PKG_DELETE", + "_links":"" +}} diff --git a/SOL005/VNFPackageManagement-API/jsons/VnfPackageOnboardingNotification.json b/SOL005/VNFPackageManagement-API/jsons/VnfPackageOnboardingNotification.json new file mode 100644 index 0000000000000000000000000000000000000000..f455852dac2de6d540ba952195a467829b0df854 --- /dev/null +++ b/SOL005/VNFPackageManagement-API/jsons/VnfPackageOnboardingNotification.json @@ -0,0 +1,10 @@ +{{ + "id":"", + "notificationType":"VnfPackageOnboardingNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "vnfPkgId":"{vnfPkgId}", + "vnfdId":"{vnfdId}", + "vnfmInfo":"", + "_links":"" +}} diff --git a/SOL005/VNFPackageManagement-API/jsons/subscriptions.json b/SOL005/VNFPackageManagement-API/jsons/subscriptions.json index 4314ec0cee75d792059a04637926c589958f59a2..e4db0e2b57c0ee7a3857b5b0966c89bb0b2afdb6 100644 --- a/SOL005/VNFPackageManagement-API/jsons/subscriptions.json +++ b/SOL005/VNFPackageManagement-API/jsons/subscriptions.json @@ -1,6 +1,16 @@ -{ - "callbackUri": "http://127.0.0.1/subscribe", - "filter": { - "vnfPkgId": ["491ed430-67f5-4c6c-b78e-797f5d718868"] - } -} \ No newline at end of file +{{ + "callbackUri": "{callback_uri}{callback_endpoint}", + "filter": {{ + "vnfdId": ["{vnfdId}"], + "vnfPkgId": ["{vnfPkgId}"], + "vnfProductsFromProviders": {{ + "vnfProvider": {"vnfProvider"}, + "vnfProducts": {{ + "vnfProductName": {"vnfProductName"}, + "versions": {{ + "vnfSoftwareVersion": {"vnfSoftwareVersion"}, + "vnfdVersions": [{"vnfdVersion"}] + }} + }} + }} +}} \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/schemas/ExternalArtifactsAccessConfig.json b/SOL005/VNFPackageManagement-API/schemas/ExternalArtifactsAccessConfig.json new file mode 100644 index 0000000000000000000000000000000000000000..a9b43cf0b5f30a71da75df73f1f02989c2671064 --- /dev/null +++ b/SOL005/VNFPackageManagement-API/schemas/ExternalArtifactsAccessConfig.json @@ -0,0 +1,65 @@ +{ + "description": "This type represents the access configuration information for downloading external VNF package artifacts. The NFVO can obtain the external VNF package artifact file through the information provided in this structure, together with information provided in the manifest / VNFD. The data structure shall comply with the provisions defined in Table 9.5.2.10-1. If the data structure is part of a response body, security-sensitive attributes shall be excluded as specified in Table 9.5.2.10-1.\n", + "type": "object", + "properties": { + "artifact": { + "description": "Access configuration information for an external artefact.\n", + "type": "object", + "required": [ + "artifactUri" + ], + "properties": { + "artifactUri": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string", + "format": "uri" + }, + "overrideUri": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string", + "format": "uri" + }, + "authType": { + "description": "Defines the type of authentication / authorization for downloading the VNF package. Permitted values: - BASIC: Only the \"username\" and \"password\" attributes shall be present. - OAUTH2_CLIENT_CREDENTIAL S: Only the \"paramsOauth2ClientCredentials\" attribute shall be present. This attribute shall not be present if no credentials are provided for the artifact.\n", + "type": "string", + "enum": [ + "BASIC", + "OAUTH2_CLIENT_CREDENTIALS" + ] + }, + "username": { + "description": "User name to be used for authentication.\n", + "type": "string" + }, + "password": { + "description": "Password to be used for authentication. Shall not be present in response bodies.\n", + "type": "string" + }, + "paramsOauth2ClientCredentials": { + "description": "Parameters for authentication/authorization using OAUTH2_CLIENT_CREDENTIALS.\n", + "type": "object", + "required": [ + "clientId", + "clientPassword", + "tokenEndpoint" + ], + "properties": { + "clientId": { + "description": "Client identifier to be used in the access token request of the OAuth 2.0 client credentials grant type.\n", + "type": "string" + }, + "clientPassword": { + "description": "Client password to be used in the access token request of the OAuth 2.0 client credentials grant type. Shall not be present in response bodies.\n", + "type": "string" + }, + "tokenEndpoint": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string", + "format": "uri" + } + } + } + } + } + } + } \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/schemas/VnfPackageChangeNotification.schema.json b/SOL005/VNFPackageManagement-API/schemas/VnfPackageChangeNotification.schema.json index 7db3fe98c9a79d01dd1369f1a2266ec7079de6f3..2932cf93f2cde9a92d201ee5a98580f4574ed6ef 100644 --- a/SOL005/VNFPackageManagement-API/schemas/VnfPackageChangeNotification.schema.json +++ b/SOL005/VNFPackageManagement-API/schemas/VnfPackageChangeNotification.schema.json @@ -1,5 +1,5 @@ { - "description": "This type represents a VNF package management notification, which informs the receiver of a change of the status in an on-boarded VNF package. Only changes in the \"operationalState\" attribute of an on-boarded VNF package and the deletion of the VNF package will be reported. Change in the \"usageState\" and \"onboardingState\" attributes are not reported. The notification shall comply with the provisions defined in Table 9.5.2.9-1. The support of this notification is mandatory. The notification shall be triggered by the NFVO when there is a change in the status of an onboarded VNF package, as follows. • The \"operationalState\" attribute of a VNF package has changed, and the \"onboardingState\" attribute of the package has the value \"ONBOARDED\". • The on-boarded VNF package has been deleted.\n", + "description": "This type represents a VNF package management notification, which informs the receiver of a change of the status in an on-boarded VNF package. Only changes in the \"operationalState\" attribute of an on-boarded VNF package and the deletion of the VNF package will be reported. Change in the \"usageState\" and \"onboardingState\" attributes are not reported. The notification shall comply with the provisions defined in Table 9.5.2.9-1. The support of this notification is mandatory. The notification shall be triggered by the NFVO when there is a change in the status of an onboarded VNF package, as follows. The \"operationalState\" attribute of a VNF package has changed, and the \"onboardingState\" attribute of the package has the value \"ONBOARDED\". The on-boarded VNF package has been deleted.\n", "type": "object", "required": [ "id", diff --git a/SOL005/VNFPackageManagement-API/schemas/links.schema.json b/SOL005/VNFPackageManagement-API/schemas/links.schema.json index 945df7daa143612fc605fd247e3edd5c18d0d258..3f4bb0e1fa4d4992e50a2c892cd7fc40fbc78c8b 100644 --- a/SOL005/VNFPackageManagement-API/schemas/links.schema.json +++ b/SOL005/VNFPackageManagement-API/schemas/links.schema.json @@ -1,6 +1,4 @@ { - "type": "array", - "items": { "type": "object", "description": "Links to resources related to this resource.\n", "required": [ @@ -52,4 +50,3 @@ } } } -} \ No newline at end of file diff --git a/indexes/sol_002_index.csv b/indexes/sol_002_index.csv index 52042c494468d5cc6352be51bdad9745b6a01fb8..9cfc3bb621de45ff39098055e00aabd6d5691c40 100644 --- a/indexes/sol_002_index.csv +++ b/indexes/sol_002_index.csv @@ -1,51 +1,53 @@ -6, Ve-Vnfm Reference Point, SOL002 -6.3.1, VNF Configuration Interface , VNFConfiguration-API -6.3.1.1, Configuration Resource Endpoint , Configuration.robot -6.3.1.2,API Version Resource Endpoint, ApiVersion.robot -6.3.2, VNF Indicator Interface , VNFIndicator-API -6.3.2.1, VNF Indicators Resource Endpoint , VNFIndicators.robot -6.3.2.2, VNF Indicators related to a VNF Instance Resource Endpoint , VnfIndicatorsInVnfInstanceId.robot -6.3.2.3, Individual VNF Indicator Resource Endpoit,IndividualVNFindicator.robot -6.3.2.4, Subscriptions Resource Endpoint , Subscriptions.robot -6.3.2.5, Individual Subscription Resource Endpoint , IndividualSubscription.robot -6.3.2.6, Notification Endpoint , ../VNFIndicatorNotification-API/VnfIndicatorNotification.robot -6.3.2.7,API Version Resource Endpoint, ApiVersion.robot -6.3.3, VNF Performance Management Interface , VNFPerformanceManagement-API -6.3.3.1, PM Jobs Resource Endpoint , PMJobs.robot -6.3.3.2, Individual PM Job Resource Endpoint , IndividualPmJob.robot -6.3.3.3, Individual Performance Report Resource Endpoint , IndividualReport.robot -6.3.3.4, Thresholds Resource Endpoint , Thresholds.robot -6.3.3.5, Individual Threshold Resource Endpoint , IndividualThreshold.robot -6.3.3.6, Subscriptions Resource Endpoint , Subscriptions.robot -6.3.3.7, Individual Subscription Resource Endpoint , IndividualSubscription.robot -6.3.3.8, Notification Endpoint , ../VNFPerformanceManagementNotification-API/PerformanceManagementNotification.robot -6.3.3.9,API Version Resource Endpoint, ApiVersion.robot -6.3.4, VNF Fault Management interface , VNFFaultManagement-API -6.3.4.1, Alarms , Alarms.robot -6.3.4.2, Individual Alarm , IndividualAlarm.robot -6.3.4.3, Escalate the perceived severity , EscalatePerceivedSeverityTask.robot -6.3.4.4, Subscriptions , Subscriptions.robot -6.3.4.5, Individual Subscription , IndividualSubscription.robot -6.3.4.6, Notification Endpoint , NotificationEndpoint.robot -6.3.4.7,API Version Resource Endpoint, ApiVersion.robot -6.3.5, VNF Lifecycle Management interface , VNFLifecycleManagement-API -6.3.5.1, VNF Instances , VNFInstances.robot -6.3.5.2, Individual VNFInstance , IndividualVNFInstance.robot -6.3.5.3, Instantiate VNF Task , InstantiateVNFTask.robot -6.3.5.4, Scale VNF Task , ScaleVNFTask.robot -6.3.5.5, Scale a VNF to level Task , ScaleVNFToLevelTask.robot -6.3.5.6, Change VNF deployment flavour Task , ChangeVNFFlavourTask.robot -6.3.5.7, Terminate VNF Task , TerminateVNFTask.robot -6.3.5.8, Heal VNF Task , HealVNFTask.robot -6.3.5.9, Operate VNF Task , OperateVNFTask.robot -6.3.5.10, Change external VNF connectivity , ChangeExternalVNFConnectivityTask.robot -6.3.5.11, VNF LCM OP occurrences , VnfLcmOperationOccurences.robot -6.3.5.12, Individual VNF LCM OP occurrence , IndividualVnfLcmOperationOccurence.robot -6.3.5.13, Retry operation task , RetryOperationTask.robot -6.3.5.14, Rollback operation task , RollbackOperationTask.robot -6.3.5.15, Fail operation task , FailOperationTask.robot -6.3.5.16, Cancel operation task , CancelOperationTask.robot -6.3.5.17, Subscriptions , Subscriptions.robot -6.3.5.18, Individual Subscription , IndividualSubscription.robot -6.3.5.19, Notification Endpoint , NotificationEndpoint.robot -6.3.5.20,API Version Resource Endpoint, ApiVersion.robot +6,Ve-Vnfm Reference Point, SOL002 +6.3.1,VNF Configuration Interface,VNFConfiguration-API +6.3.1.1,Configuration Resource Endpoint,Configuration.robot +6.3.1.2,API Version Resource Endpoint,ApiVersion.robot +6.3.2, VNF Indicator Interface,VNFIndicator-API +6.3.2.1,VNF Indicators Resource Endpoint,VNFIndicators.robot +6.3.2.2,VNF Indicators related to a VNF Instance Resource Endpoint,VnfIndicatorsInVnfInstanceId.robot +6.3.2.3,Individual VNF Indicator Resource Endpoit,IndividualVNFindicator.robot +6.3.2.4,Subscriptions Resource Endpoint,Subscriptions.robot +6.3.2.5,Individual Subscription Resource Endpoint,IndividualSubscription.robot +6.3.2.6,Notifications,../VNFIndicatorNotification-API/Notifications.robot +6.3.2.7,API Version Resource Endpoint,ApiVersion.robot +6.3.2.8,Notification Endpoint,NotificationEndpoint.robot +6.3.3,VNF Performance Management Interface,VNFPerformanceManagement-API +6.3.3.1,PM Jobs Resource Endpoint,PMJobs.robot +6.3.3.2,Individual PM Job Resource Endpoint,IndividualPmJob.robot +6.3.3.3,Individual Performance Report Resource Endpoint,IndividualReport.robot +6.3.3.4,Thresholds Resource Endpoint,Thresholds.robot +6.3.3.5,Individual Threshold Resource Endpoint,IndividualThreshold.robot +6.3.3.8,Notification Endpoint,../VNFPerformanceManagementNotification-API/Notifications.robot +6.3.3.9,API Version Resource Endpoint,ApiVersion.robot +6.3.3.10, Notification Endpoint,NotificationEndpoint.robot +6.3.4,VNF Fault Management interface,VNFFaultManagement-API +6.3.4.1,Alarms,Alarms.robot +6.3.4.2,Individual Alarm,IndividualAlarm.robot +6.3.4.3,Escalate the perceived severity,EscalatePerceivedSeverityTask.robot +6.3.4.4,Subscriptions,Subscriptions.robot +6.3.4.5,Individual Subscription,IndividualSubscription.robot +6.3.4.6,Notifications,Notifications.robot +6.3.4.7,API Version Resource Endpoint,ApiVersion.robot +6.3.4.8,Notification Endpoint,NotificationEndpoint.robot +6.3.5,VNF Lifecycle Management interface,VNFLifecycleManagement-API +6.3.5.1,VNF Instances,VNFInstances.robot +6.3.5.2,Individual VNFInstance,IndividualVNFInstance.robot +6.3.5.3,Instantiate VNF Task,InstantiateVNFTask.robot +6.3.5.4,Scale VNF Task,ScaleVNFTask.robot +6.3.5.5,Scale a VNF to level Task,ScaleVNFToLevelTask.robot +6.3.5.6,Change VNF deployment flavour Task,ChangeVNFFlavourTask.robot +6.3.5.7,Terminate VNF Task,TerminateVNFTask.robot +6.3.5.8,Heal VNF Task,HealVNFTask.robot +6.3.5.9,Operate VNF Task,OperateVNFTask.robot +6.3.5.10,Change external VNF connectivity,ChangeExternalVNFConnectivityTask.robot +6.3.5.11,VNF LCM OP occurrences,VnfLcmOperationOccurences.robot +6.3.5.12,Individual VNF LCM OP occurrence,IndividualVnfLcmOperationOccurence.robot +6.3.5.13,Retry operation task,RetryOperationTask.robot +6.3.5.14,Rollback operation task,RollbackOperationTask.robot +6.3.5.15,Fail operation task,FailOperationTask.robot +6.3.5.16,Cancel operation task,CancelOperationTask.robot +6.3.5.17,Subscriptions,Subscriptions.robot +6.3.5.18,Individual Subscription,IndividualSubscription.robot +6.3.5.19,Notifications,Notifications.robot +6.3.5.20,API Version Resource Endpoint,ApiVersion.robot +6.3.5.21,Notification Endpoint,NotificationEndpoint.robot diff --git a/indexes/sol_003_index.csv b/indexes/sol_003_index.csv index 922ac9509836453f5f80a32a12fff6afd4c0c1f2..49acbd530697ed6767c5269b7bd6ea8a2b9fe37f 100644 --- a/indexes/sol_003_index.csv +++ b/indexes/sol_003_index.csv @@ -33,8 +33,9 @@ 7.3.1.31,VNF Instance Scale To Level, ScaleVNFToLevelWorkflow.robot 7.3.1.32,VNF Instance Scale Out, ScaleVNFWorkflow.robot 7.3.1.33,Terminate a VNF Instance, TerminateVNFWorkflow.robot -7.3.1.34,Notification Endpoint, NotificationEndpoint.robot +7.3.1.34,Notifications, Notifications.robot 7.3.1.35,API Version Resource Endpoint, ApiVersion.robot +7.3.1.36,Notification Endpoint,NotificationEndpoint.robot 7.3.2,VNF Lifecycle Operation Granting Interface, VNFLifecycleOperationGranting-API 7.3.2.1,Grants, Grants.robot 7.3.2.2,Individual Grant, IndividualGrant.robot @@ -47,34 +48,40 @@ 7.3.3.5,Individual VNF Package Artifact Resource Endpoint, VNFPackageArtifacts.robot 7.3.3.6,Subscriptions Resource Endpoint, Subscriptions.robot 7.3.3.7,Individual Subscription Resource Endpoint, IndividualSubscription.robot -7.3.3.8,Notification Endpoint, PackageManagementNotification.robot +7.3.3.8,Notifications, Notifications.robot 7.3.3.9,API Version Resource Endpoint, ApiVersion.robot +7.3.3.10,Manifest In Individual VNF Package Endpoint,ManifestInIndividualVNFPackage.robot +7.3.3.11,VNF Package Artifacts Endpoint,VNFPackageArtifacts.robot +7.3.3.12,Notification Endpoint,NotificationEndpoint.robot 7.3.4,VNF Performance Management Interface, VNFPerformanceManagement-API 7.3.4.1,PM Jobs Resource Endpoint, PMJobs.robot 7.3.4.2,Individual Pm Job Resource Endpoint, IndividualPmJob.robot 7.3.4.3,Individual Performance Report Resource Endpoint, IndividualReport.robot 7.3.4.4,Thresholds Resource Endpoint, Thresholds.robot 7.3.4.5,Individual Threshold Resource Endpoint, IndividualThreshold.robot -7.3.4.6,Subscriptions, Subscriptions.robot -7.3.4.7,Individual Subscription Resource Endpoint, IndividualSubscription.robot -7.3.4.8,Notification Endpoint, PerformanceManagementNotification.robot +7.3.4.8,Notifications,Notifications.robot 7.3.4.9,API Version Resource Endpoint, ApiVersion.robot +7.3.4.10,Notification Endpoint,NotificationEndpoint.robot 7.3.5,VNF Fault Management interface, VNFFaultManagement-API 7.3.5.1,Alarms, Alarms.robot 7.3.5.2,Individual Alarm, IndividualAlarm.robot 7.3.5.3,Subscriptions, Subscriptions.robot 7.3.5.4,Individual Subscription, IndividualSubscription.robot -7.3.5.5,Notification Endpoint, ../VNFFaultManagementNotification-API/NotificationEndpoint.robot +7.3.5.5,Notifications, ../VNFFaultManagementNotification-API/Notifications.robot 7.3.5.6,API Version Resource Endpoint, ApiVersion.robot +7.3.5.7,Notification Endpoint,NotificationEndpoint.robot 7.3.6,VNF Indicator Interface, VNFIndicator-API 7.3.6.1,VNF Indicators Resource Endpoint, VNFIndicators.robot 7.3.6.2,VNF Indicators Related to a VNF Instance Resource Endpoint, VnfIndicatorsInVnfInstanceId.robot 7.3.6.3,Individual VNF Indicator Resource Endpoint, IndividualVNFindicator.robot 7.3.6.4,Subscriptions Resource Endpoint, Subscriptions.robot 7.3.6.5,Individual Subscription Resource Endpoint, IndividualSubscription.robot -7.3.6.6,Notification Endpoint, VnfIndicatorNotification.robot +7.3.6.6,Notifications,Notifications.robot 7.3.6.7,API Version Resource Endpoint, ApiVersion.robot +7.3.6.8,Notification Endpoint,NotificationEndpoint.robot 7.3.7,Virtualised Resources Quota Available Notification interface, VirtualisedResourcesQuotaAvailableNotification-API 7.3.7.1,Subscriptions, Subscriptions.robot 7.3.7.2,Individual Subscription, IndividualSubscription.robot 7.3.7.3,API Version Resource Endpoint, ApiVersion.robot +7.3.7.4,Notification Endpoint,NotificationEndpoint.robot +7.3.7.5,Notifications, Notifications.robot diff --git a/indexes/sol_005_index.csv b/indexes/sol_005_index.csv index cc95f0ea74bfb301c3364f1e9d756741c5843646..a8ea6aa16be2e1f52b2b76e89a0d99814fb304b1 100644 --- a/indexes/sol_005_index.csv +++ b/indexes/sol_005_index.csv @@ -1,66 +1,75 @@ -5,Os-Ma-Nfvo Reference Point, SOL005 -5.3.1,NSD Management interface, NSDManagement-API -5.3.1.1,Network Service Descriptors Resource Endpoint, NSDescriptors.robot -5.3.1.2,Individual NS Descriptor Resource Endpoint , IndividualNSDescriptor.robot -5.3.1.3,NSD Content Resource Endpoint, NSDContent.robot -5.3.1.4,PNF Descriptors Resource Endpoint, PNFDescriptors.robot -5.3.1.5,Individual PNF Descriptor Resource Endpoint, IndividualPnfDescriptor.robot -5.3.1.6,PNFD Content Resource Endpoint, PNFDContent.robot -5.3.1.7,Subscriptions Resource Endpoint, Subscriptions.robot -5.3.1.8,Individual Subscription Resource Endpoint, IndividualSubscription.robot -5.3.1.9,Notifications Endpoint, NSDManagementNotification.robot -5.3.1.10,API Version Resource Endpoint, ApiVersion.robot -5.3.2,NS Lifecycle Management interface, NSLifecycleManagement-API -5.3.2.1,NsInstances, NSInstances.robot -5.3.2.2,Individual NSInstance, IndividualNSInstance.robot -5.3.2.3,Instantiate NS Task, InstantiateNSTask.robot -5.3.2.4,Scale a nsInstance, ScaleNSTask.robot -5.3.2.5,Update a NSInstance, UpdateNSTask.robot -5.3.2.6,Heal a NSInstance, HealNSTask.robot -5.3.2.7,Terminate a NSInstance, TerminateNSTask.robot -5.3.2.8,NS LCM occurrences, NSLCMOccurences.robot -5.3.2.9,Individual NS LCM Occurences, IndividualNSLCMOccurences.robot -5.3.2.10, Retry operation task, RetryOperationTask.robot -5.3.2.11, Rollback operation task, RollbackOperationTask.robot -5.3.2.12,Continue operation task, ContinueOperationTask.robot -5.3.2.13,Fail operation task, FailOperationTask.robot -5.3.2.14,Cancel operation task, CancelOperationTask.robot -5.3.2.15,Subscriptions, Subscriptions.robot -5.3.2.16,Individual Subscription, IndividualSubscription.robot -5.3.2.17,Notification Endpoint, NotificationEndpoint.robot -5.3.2.18,NS Instance Creation Workflow, CreateNSInstanceWorkflow.robot -5.3.2.19, NS Instance Deletion, DeleteNSInstanceWorkflow.robot -5.3.2.20, Heal Flow of NS lifecycle management operations, HealNSTaskWorkflow.robot -5.3.2.21, Instantiate Flow of NS lifecycle management operations, InstanciateNSTaskWorkflow.robot -5.3.2.22, Scale Flow of NS lifecycle management operations, ScaleNSTaskWorkflow.robot -5.3.2.23, Terminate Flow of NS lifecycle management operations, TerminateNSTaskWorkflow.robot -5.3.2.24, Update Flow of NS lifecycle management operations, UpdateNSTaskWorkflow.robot -5.3.2.25,API Version Resource Endpoint, ApiVersion.robot -5.3.3,NS Fault Management interface, NSFaultManagement-API -5.3.3.1,Alarms, Alarms.robot -5.3.3.2,Individual Alarm, IndividualAlarm.robot -5.3.3.3,Subscriptions, Subscriptions.robot -5.3.3.4,Individual Subscription, IndividualSubscription.robot -5.3.3.5,Notification Endpoint, NotificationEndpoint.robot -5.3.3.6,API Version Resource Endpoint, ApiVersion.robot -5.3.4,NS Performance Management interface, NSPerformanceManagement-API -5.3.4.1,PM Jobs Resource Endpoint, PMJobs.robot -5.3.4.2,Individual PM Job Resource Endpoint, IndividualPmJob.robot -5.3.4.3,Individual Performance Report Resource Endpoint, IndividualReport.robot -5.3.4.4,Thresholds Resource Endpoint, Thresholds.robot -5.3.4.5,Individual Threshold Resource Endpoint, IndividualThreshold.robot -5.3.4.6,Subscriptions Resource Endpoint, Subscriptions.robot -5.3.4.7,Individual Subscription Resource Endpoint, IndividualSubscription.robot -5.3.4.8,Notifications Endpoint, Notifications.robot -5.3.4.9,API Version Resource Endpoint, ApiVersion.robot -5.3.5,VNF Package Management interface, VNFPackageManagement-API -5.3.5.1,VNF Packages Resource Endpoint, VNFPackages.robot -5.3.5.2,Individual VNF Package Resource Endpoint, IndividualVNFPackage.robot -5.3.5.3,VNFD In Individual VNF Package Resource Endpoint, VNFDInIndividualVNFPackage.robot -5.3.5.4,VNF Package Content Resource Endpoint, VNFPackageContent.robot -5.3.5.5,Upload VNF Package From URI Resource Endpoint, VNFPackageContentViaURI.robot -5.3.5.6,Individual VNF Package Artifact Resource Endpoint, VNFPackageArtifacts.robot -5.3.5.7,Subscriptions Resource Endpoint, Subscriptions.robot -5.3.5.8,Individual Subscription Resource Endpoint, IndividualSubscription.robot -5.3.5.9,Notifications Endpoint, Notifications.robot -5.3.5.10,API Version Resource Endpoint, ApiVersion.robot +5,Os-Ma-Nfvo Reference Point, SOL005 +5.3.1,NSD Management interface, NSDManagement-API +5.3.1.1,Network Service Descriptors Resource Endpoint, NSDescriptors.robot +5.3.1.2,Individual NS Descriptor Resource Endpoint , IndividualNSDescriptor.robot +5.3.1.3,NSD Content Resource Endpoint, NSDArchiveContent.robot +5.3.1.4,PNF Descriptors Resource Endpoint, PNFDescriptors.robot +5.3.1.5,Individual PNF Descriptor Resource Endpoint, IndividualPnfDescriptor.robot +5.3.1.6,PNFD Content Resource Endpoint, PNFDArchiveContent.robot +5.3.1.7,Subscriptions Resource Endpoint, Subscriptions.robot +5.3.1.8,Individual Subscription Resource Endpoint, IndividualSubscription.robot +5.3.1.9,Notifications, Notifications.robot +5.3.1.10,API Version Resource Endpoint, ApiVersion.robot +5.3.1.11,NSD Resource Endpoint, NSD.robot +5.3.1.12,NSD Archive Manifest Resource Endpoint, NSDArchiveManifest.robot +5.3.1.13,PNFD Resource Endpoint, PNFD.robot +5.3.1.14,PNFD Archive Manifest Resource Endpoint, PNFDArchiveManifest.robot +5.3.1.15,Notification Endpoint,NotificationEndpoint.robot +5.3.2,NS Lifecycle Management interface, NSLifecycleManagement-API +5.3.2.1,NsInstances, NSInstances.robot +5.3.2.2,Individual NSInstance, IndividualNSInstance.robot +5.3.2.3,Instantiate NS Task, InstantiateNSTask.robot +5.3.2.4,Scale a nsInstance, ScaleNSTask.robot +5.3.2.5,Update a NSInstance, UpdateNSTask.robot +5.3.2.6,Heal a NSInstance, HealNSTask.robot +5.3.2.7,Terminate a NSInstance, TerminateNSTask.robot +5.3.2.8,NS LCM occurrences, NSLCMOccurences.robot +5.3.2.9,Individual NS LCM Occurences, IndividualNSLCMOccurences.robot +5.3.2.10, Retry operation task, RetryOperationTask.robot +5.3.2.11, Rollback operation task, RollbackOperationTask.robot +5.3.2.12,Continue operation task, ContinueOperationTask.robot +5.3.2.13,Fail operation task, FailOperationTask.robot +5.3.2.14,Cancel operation task, CancelOperationTask.robot +5.3.2.15,Subscriptions, Subscriptions.robot +5.3.2.16,Individual Subscription, IndividualSubscription.robot +5.3.2.17,Notifications, Notifications.robot +5.3.2.18,NS Instance Creation Workflow, CreateNSInstanceWorkflow.robot +5.3.2.19, NS Instance Deletion, DeleteNSInstanceWorkflow.robot +5.3.2.20, Heal Flow of NS lifecycle management operations, HealNSTaskWorkflow.robot +5.3.2.21, Instantiate Flow of NS lifecycle management operations, InstantiateNSTaskWorkflow.robot +5.3.2.22, Scale Flow of NS lifecycle management operations, ScaleNSTaskWorkflow.robot +5.3.2.23, Terminate Flow of NS lifecycle management operations, TerminateNSTaskWorkflow.robot +5.3.2.24, Update Flow of NS lifecycle management operations, UpdateNSTaskWorkflow.robot +5.3.2.25,API Version Resource Endpoint, ApiVersion.robot +5.3.2.26,Notification Endpoint,NotificationEndpoint.robot +5.3.3,NS Fault Management interface, NSFaultManagement-API +5.3.3.1,Alarms, Alarms.robot +5.3.3.2,Individual Alarm, IndividualAlarm.robot +5.3.3.3,Subscriptions, Subscriptions.robot +5.3.3.4,Individual Subscription, IndividualSubscription.robot +5.3.3.5,Notifications, Notifications.robot +5.3.3.6,API Version Resource Endpoint, ApiVersion.robot +5.3.3.7,Notification Endpoint,NotificationEndpoint.robot +5.3.4,NS Performance Management interface, NSPerformanceManagement-API +5.3.4.1,PM Jobs Resource Endpoint, PMJobs.robot +5.3.4.2,Individual PM Job Resource Endpoint, IndividualPmJob.robot +5.3.4.3,Individual Performance Report Resource Endpoint, IndividualReport.robot +5.3.4.4,Thresholds Resource Endpoint, Thresholds.robot +5.3.4.5,Individual Threshold Resource Endpoint, IndividualThreshold.robot +5.3.4.8,Notifications, Notifications.robot +5.3.4.9,API Version Resource Endpoint, ApiVersion.robot +5.3.4.10,Notification Endpoint,NotificationEndpoint.robot +5.3.5,VNF Package Management interface, VNFPackageManagement-API +5.3.5.1,VNF Packages Resource Endpoint, VNFPackages.robot +5.3.5.2,Individual VNF Package Resource Endpoint, IndividualVNFPackage.robot +5.3.5.3,VNFD In Individual VNF Package Resource Endpoint, VNFDInIndividualVNFPackage.robot +5.3.5.4,VNF Package Content Resource Endpoint, VNFPackageContent.robot +5.3.5.5,Upload VNF Package From URI Resource Endpoint, VNFPackageContentViaURI.robot +5.3.5.6,Individual VNF Package Artifact Resource Endpoint, VNFPackageArtifacts.robot +5.3.5.7,Subscriptions Resource Endpoint, Subscriptions.robot +5.3.5.8,Individual Subscription Resource Endpoint, IndividualSubscription.robot +5.3.5.9,Notifications, Notifications.robot +5.3.5.10,API Version Resource Endpoint, ApiVersion.robot +5.3.5.11,Manifest In Individual VNF Package Endpoint,ManifestInIndividualVNFPackage.robot +5.3.5.11,VNF Package Artifacts Endpoint,VNFPackageArtifacts.robot +5.3.5.13,Notification Endpoint,NotificationEndpoint.robot diff --git a/requirements.txt b/requirements.txt index 7ec1190495ac1486e8197859602d284336cbbbf7..bafc102d3843316cb6cca0a589fffb5deb65e8f5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -###### List of required python libraries ###### ## To install the libraries, use: # pip -r requirements.txt @@ -8,5 +7,5 @@ RESTinstance==1.0.0rc4 robotframework-dependencylibrary==1.0.0.post1 robotframework-jsonlibrary==0.3 robotframework-jsonschemalibrary==1.0 -robotframework-mockserver==0.0.4 - +robotframework-mockserver==0.0.7 +robotframework-requests==0.7.1 diff --git a/scripts/build-container.sh b/scripts/build-container.sh new file mode 100644 index 0000000000000000000000000000000000000000..f5c825ad9b06585a6b1aff2191c5df9ef18a3f7b --- /dev/null +++ b/scripts/build-container.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# Copyright ETSI 2019 +# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt + +#set -e +set -vx + +DOCKER_FILE=./scripts/docker/Dockerfile +if [ -f ${DOCKER_FILE} ] +then + #check and build stf583-rf-validation image + DOCKER_ID=`docker ps -a | grep -e stf583-rf-validation | awk '{ print $1 }'` +# if [ ! -z "${DOCKER_ID}" ] +# then +# docker rm --force stf583-rf-validation +# fi + docker build --tag stf583-rf-validation -f ${DOCKER_FILE} . + if [ "$?" != "0" ] + then + echo "Docker build failed: $?" + exit -1 + fi +# docker image ls -a +# docker inspect stf583-rf-validation:latest +# if [ "$?" != "0" ] +# then +# echo "Docker inspect failed: $?" +# exit -2 +# fi +#else +# exit -3 +fi + +# That's all Floks +exit 0 + diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..9f753df87329ee5f9811c52fab79cee8e0018b36 --- /dev/null +++ b/scripts/docker/Dockerfile @@ -0,0 +1,58 @@ +FROM ubuntu:16.04 + +MAINTAINER ETSI STF 583 + +LABEL description="SFT583 Robot Framework Docker Image" + +ENV TERM=xterm +ENV HOSTNAME docker-robot-STF583 + +ARG ssh_prv_key + +RUN DEBIAN_FRONTEND=noninteractive apt update \ + && apt install python3 git -y \ + && apt install python3-pip -y \ + && DEBIAN_FRONTEND=noninteractive apt-get autoremove --purge -y \ + && DEBIAN_FRONTEND=noninteractive apt-get autoclean \ + && rm -rf /var/lib/apt/lists/* + +RUN echo "docker-robot-STF583" > /etc/hostname \ + && echo "root:etsi" | chpasswd + +RUN useradd --create-home --shell /bin/bash --user-group etsi --groups sudo \ + && echo "etsi:etsi" | chpasswd \ + && adduser etsi sudo \ + && echo "etsi ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers + +RUN DEBIAN_FRONTEND=noninteractive \ + && mkdir -p /home/etsi/dev/robot \ + && cd /home/etsi/dev/robot + +#RUN pip3 install robotframework + +ADD requirements.txt /home/etsi/dev/robot/ +ADD extensions /home/etsi/dev/robot/extensions + +RUN ls /home/etsi/dev/robot + + +RUN DEBIAN_FRONTED=noninteractive \ + cd /home/etsi/dev/ \ + mkdir -p build \ + && git clone https://forge.etsi.org/rep/forge-tools/robot2doc.git \ + && cd robot2doc \ + && pip3 install -r requirements.txt \ + && python3 -m pip install -e . + +RUN DEBIAN_FRONTEND=noninteractive \ + && cd /home/etsi/dev/robot \ + && pip3 install -r requirements.txt + + +ADD . /home/etsi/dev/robot + +RUN chmod +x /home/etsi/dev/robot/scripts/* + +CMD tail -f /dev/null + + diff --git a/scripts/launch-validation.sh b/scripts/launch-validation.sh new file mode 100644 index 0000000000000000000000000000000000000000..59030577655abb1e4a05e0e092b7b8af5cd105ba --- /dev/null +++ b/scripts/launch-validation.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +echo "Starting check on ROBOT CODE" + +for FILE in $(find . -name "*.robot"); do + echo "Syntax check on ${FILE}" + robot --dryrun -d /tmp ${FILE} +done diff --git a/scripts/run-all.bash b/scripts/run-all.bash new file mode 100644 index 0000000000000000000000000000000000000000..793febd18ebca7b55f1eecc2fbaf294f19c3dee9 --- /dev/null +++ b/scripts/run-all.bash @@ -0,0 +1,38 @@ +#!/bin/bash + +## Launch robot tests validator + +mkdir logs + +/bin/bash scripts/launch-validation.sh > logs/robot_stdout.log 2> logs/robot_stderr.log + +## Filter failed Keywords +grep -r10n "| FAIL |" logs/robot_stdout.log | grep -v "Output:" | grep -v "Log:" | grep -v "Report:" > logs/failures.log +rm -f logs/robot_stdout.log + + +## Filter Errors on code +grep -rn " ERROR " logs/robot_stderr.log | grep -v "File has no tests or tasks" > logs/errors.log +rm -f logs/robot_stderr.log + + +ERRORS=`awk 'END{print NR}' logs/errors.log logs/failures.log` +if [ "${ERRORS}" -eq 0 ]; then + rm -f logs/errors.log + rm -f logs/failures.log +fi + + +if [ -f logs/errors.log ]; then + cat logs/errors.log +fi + +if [ -f logs/failures.log ]; then + cat logs/failures.log +fi + +if [ -f logs/erros.log ] || [ -f logs.failures.log ]; then + echo "Errors are found. Job failed" + exit 1 +fi + diff --git a/scripts/run-container.sh b/scripts/run-container.sh new file mode 100644 index 0000000000000000000000000000000000000000..c0ea09699ff44dd9ef5ee6e29b2564683f7a7099 --- /dev/null +++ b/scripts/run-container.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright ETSI 2019 +# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt + +#set -e +#set -vx + +mkdir -p build + +docker run -v "$(pwd)/build:/home/etsi/dev/build" stf583-rf-validation:latest "bash" \ + -c "/home/etsi/dev/robot/scripts/validate.sh" + +ret=$? + +exit $ret + diff --git a/scripts/validate.sh b/scripts/validate.sh index 6d95c3574ee4ae94af92d114506dc56a7e3ecee7..ae06e2ea0e0d328935f8d4de143093ff075d95c1 100644 --- a/scripts/validate.sh +++ b/scripts/validate.sh @@ -2,12 +2,26 @@ # # Validate syntax and keywords existance in each Robot file +cd /home/etsi/dev/robot/ + res=0 for i in */*/*.robot ; do - [[ "$i" != *"Keywords.robot"* && "$i" != *"Keyword.robot"* ]] && \ - (echo "++++ Dryrun $i" && \ - robot --dryrun --output NONE --report NONE --log NONE $i || \ - (echo "++++ Issues in file $i" && res=1)); + if [[ "$i" != *"Keywords.robot"* && "$i" != *"Keyword.robot"* ]] ; then + echo "++++ Dryrun file $i" + msg=$(robot --dryrun --output NONE --report NONE --log NONE $i 2>&1) + if [ $? != 0 ] ; then + echo "++++ Issues found in file $i" + echo "$msg" + res=1 + fi + fi done -exit $res +cd /home/etsi/dev/robot2doc/robot2doc + +mkdir -p /home/etsi/dev/build + +python3 create_sols.py ../../robot 'local' ../../build +res2=$? + +exit $res && $res2