diff --git a/SOL003/VNFFaultManagement-API/Alarms.robot b/SOL003/VNFFaultManagement-API/Alarms.robot index 04c5c4bfaacc722085e74728f586e0fa2501b54f..69001f4075e0230bb8181c1d90f94ebdddf01e39 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,11 +63,11 @@ 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 @@ -77,11 +76,11 @@ 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 @@ -90,11 +89,11 @@ 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 @@ -103,10 +102,10 @@ 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 @@ -117,7 +116,7 @@ PUT Alarms - Method not implemented ... 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..943898e57c6d15e285ea5fda1760b13630d28e15 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":"${AUTHORIZATION}"} + 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":"${AUTHORIZATION}"} + 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":"${AUTHORIZATION}"} + 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":"${AUTHORIZATION}"} + 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":"${AUTHORIZATION}"} + 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":"${AUTHORIZATION}"} + 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":"${AUTHORIZATION}"} + 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":"${AUTHORIZATION}"} + 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":"${AUTHORIZATION}"} + 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":"${AUTHORIZATION}"} + 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 ${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..1f9b5e86ea2214b7a77b7d819f0c45e7d65eb8f0 100644 --- a/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot +++ b/SOL003/VNFFaultManagement-API/FaultManagement-APIKeyword.robot @@ -1,5 +1,6 @@ *** 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/ @@ -15,25 +16,20 @@ ${original_etag} 1234 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']} + 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 @@ -42,13 +38,13 @@ 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} + 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} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} Integer response status 404 Check HTTP Response Status Code Is @@ -90,7 +86,7 @@ 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 + Post ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -98,7 +94,7 @@ 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 + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse} = Output response Set Global Variable ${response} ${outputResponse} @@ -106,7 +102,7 @@ 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 + Put ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -114,7 +110,7 @@ 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 + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -123,7 +119,7 @@ GET Fault Management Alarms Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Log Execute Query - Get ${apiRoot}/${apiName}/${apiVersion}/alarms + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -132,7 +128,7 @@ GET Fault Management Alarms With Filters Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} 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} @@ -141,7 +137,7 @@ GET Fault Management Alarms With Invalid Filters Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} 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 @@ -149,7 +145,7 @@ GET Alarms Task with all_fields attribute selector 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 + GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET Alarms Task with exclude_default attribute selector @@ -157,7 +153,7 @@ GET Alarms Task with exclude_default attribute selector 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 + GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_default ${output}= Output response Set Suite Variable ${response} ${output} GET Alarms Task with fields attribute selector @@ -165,7 +161,7 @@ GET Alarms Task with fields attribute selector 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} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} GET Alarms Task with exclude_fields attribute selector @@ -173,14 +169,14 @@ GET Alarms Task with exclude_fields attribute selector 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} + 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} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -188,7 +184,7 @@ 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} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -196,7 +192,7 @@ 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} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -206,7 +202,7 @@ GET Fault Management Individual Alarm Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} 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 @@ -218,7 +214,7 @@ GET Fault Management Individual Alarm with invalid id Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Log Execute Query - Get ${apiRoot}/${apiName}/${apiVersion}/alarms/${invalidAlarmId} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${invalidAlarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -228,7 +224,7 @@ PATCH Fault Management Individual Alarm Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${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} @@ -239,7 +235,7 @@ PATCH Fault Management Individual Alarm - precondition failed Set Headers {"If-Match": "${original_etag[0]}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${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} @@ -250,40 +246,42 @@ PATCH Fault Management Individual Alarm Conflict Set Headers {"If-Match": "${Etag}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${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} + ${template}= Get File jsons/fmSubscriptionRequest.json + ${body}= Format String ${template} vnfdIds=${vnfdIds} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} 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} + ${template}= Get File jsons/fmSubscriptionRequest.json + ${body}= Format String ${template} vnfdIds=${vnfdIds} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} 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} + ${template}= Get File jsons/fmSubscriptionRequest.json + ${body}= Format String ${template} vnfdIds=${vnfdIds} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -291,7 +289,7 @@ 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 + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -299,7 +297,7 @@ 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} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -307,42 +305,42 @@ 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} + 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 + 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 + 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} + 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} + 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 + Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -350,7 +348,7 @@ 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 + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -358,7 +356,7 @@ 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 + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -366,7 +364,7 @@ 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} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -374,7 +372,7 @@ 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} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -382,7 +380,7 @@ 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} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -390,7 +388,7 @@ 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} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -398,11 +396,11 @@ 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} + 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} @@ -410,7 +408,7 @@ 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} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?id=${subscription_id} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -421,7 +419,7 @@ 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} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.notificationTypes=${notification_type} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -434,7 +432,7 @@ 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} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.faultyResourceTypes=${faultyResourceType} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -447,7 +445,7 @@ 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} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.perceivedSeverities=${perceivedSeverity} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -460,7 +458,7 @@ 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} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.eventTypes=${eventType} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -473,7 +471,7 @@ 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} + 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/NotificationConsumer.robot b/SOL003/VNFFaultManagement-API/NotificationConsumer.robot new file mode 100644 index 0000000000000000000000000000000000000000..b8cb18b900d5d60690bd76cab7f81ac46d7dce9e --- /dev/null +++ b/SOL003/VNFFaultManagement-API/NotificationConsumer.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_VNFM + ... 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_VNFM + ... 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_VNFM + ... 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":"${AUTHORIZATION}"} + 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":"${AUTHORIZATION}"} + ${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":"${AUTHORIZATION}"} + ${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":"${AUTHORIZATION}"} + ${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..6a98f35f88f233fa25a26c47382b7dc286ed80fe 100644 --- a/SOL003/VNFFaultManagement-API/Subscriptions.robot +++ b/SOL003/VNFFaultManagement-API/Subscriptions.robot @@ -13,7 +13,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 +23,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 +43,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 +57,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 +70,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 +83,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 +96,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 +109,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 +122,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 +135,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 +148,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 +160,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 +172,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 +184,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 +206,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 +220,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 +234,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 +248,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 +262,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 +276,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 +288,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..5908e8e4a19fb2377454a78baa408d4fddc85d0b 100644 --- a/SOL003/VNFFaultManagement-API/environment/variables.txt +++ b/SOL003/VNFFaultManagement-API/environment/variables.txt @@ -26,7 +26,7 @@ ${NFVO_FIELDS} 1 ${apiRoot} / ${apiName} vnffm -${apiVersion} v1 +${apiMajorVersion} v1 ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f @@ -46,9 +46,14 @@ ${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_endpoint} /subscribe + +${vnfdIds} 6fc3539c-e602-4afa-8e13-962fb5a7d81f + +${callbackResp} localhost \ 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/NotificationEndpoint.robot index 95a357d1e83e4eb2ad01bba3f58ba37174adfb74..78e8209e15cffeb6a3a1d640c869bdb00e49259b 100644 --- a/SOL003/VNFFaultManagementNotification-API/NotificationEndpoint.robot +++ b/SOL003/VNFFaultManagementNotification-API/NotificationEndpoint.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