diff --git a/SOL002/VNFFaultManagement-API/Alarms.robot b/SOL002/VNFFaultManagement-API/Alarms.robot index c7ef62b0fd07b36ea5bc9195c42540e79cb51fca..b2c226c552155cb2dea292907d9fe8653caa463c 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 @@ -263,28 +262,28 @@ 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 + 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 + 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 + 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 + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Alarms Task @@ -292,7 +291,7 @@ GET Alarms Task Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} 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 @@ -300,7 +299,7 @@ GET Alarms Task with filter Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} 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 @@ -308,35 +307,35 @@ GET Alarms Task with invalid filter Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} 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 + 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 + 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} + 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} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms?exclude_fields=${fields} ${output}= Output response Set Suite Variable ${response} ${output} @@ -358,7 +357,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} @@ -367,7 +366,7 @@ GET Alarms Task with filter "id" Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} 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} @@ -379,7 +378,7 @@ GET Alarms Task with filter "vnfcInstanceIds" Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} 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} @@ -393,7 +392,7 @@ GET Alarms Task with filter "rootCauseFaultyResource_faultyResourceType" Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} 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} @@ -407,7 +406,7 @@ GET Alarms Task with filter "eventType" Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} 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} @@ -421,13 +420,13 @@ GET Alarms Task with filter "perceivedSeverity" Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} 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" @@ -435,7 +434,7 @@ GET Alarms Task with filter "probableCause" Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} 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..2f4b46c4a94ce8a36fb634459e5aa32e3a6770d2 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":"${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/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot b/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot index 89822d2b591bcc9ef4f551a219ce5a027a354d34..63f0d49d919fc266974f764eb0e0ebf5976593c8 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 @@ -71,38 +70,38 @@ 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} + 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} + 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 + 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 + 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 + 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 + 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..97c96dc562c9a9de6d96b086c6c683d0304f0961 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,46 +65,60 @@ 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} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT Alarm Task @@ -119,7 +126,7 @@ PUT Alarm Task Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${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 @@ -129,7 +136,7 @@ PATCH Alarm Task 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} PATCH Alarm Task with wrong precondition @@ -138,14 +145,17 @@ PATCH Alarm Task with wrong precondition 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} + 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} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET Alarm Task @@ -153,7 +163,7 @@ GET Alarm Task Set Headers {"Accept":"${ACCEPT}"} 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 @@ -163,7 +173,7 @@ GET Alarm Task with filter Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} 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 @@ -171,7 +181,7 @@ GET Alarm Task with invalid filter Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} 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..6189b4e04ed3440c7601c5b78b923394b98628ca 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,79 +37,91 @@ 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} + 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} + 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} + 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} + 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} + 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} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH individual subscription @@ -117,14 +129,14 @@ PATCH individual subscription 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} + 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} + 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/NotificationConsumer.robot b/SOL002/VNFFaultManagement-API/NotificationConsumer.robot new file mode 100644 index 0000000000000000000000000000000000000000..039fcec989df6a1a176a0e6c1e39d6f0157287dd --- /dev/null +++ b/SOL002/VNFFaultManagement-API/NotificationConsumer.robot @@ -0,0 +1,93 @@ +*** 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: 6.3.4.8.1 + ... Test title: VNF Fault Alarm Notification + ... 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.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: 6.3.4.8.2 + ... Test title: VNF Fault Alarm Cleared Notification + ... 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 + 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 + 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 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 + +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/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot b/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot index 0b8e28edac324e2e9662679b0cb1f79d065eafd0..d5795f5c030253e7a5a8de349954ffaaa79da384 100644 --- a/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot +++ b/SOL002/VNFFaultManagement-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.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... 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 @@ -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.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... 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 @@ -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.7.3.1 - ETSI GS NFV-SOL 002 [2] v2.6.1 + ... 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 diff --git a/SOL002/VNFFaultManagement-API/Subscriptions.robot b/SOL002/VNFFaultManagement-API/Subscriptions.robot index 1977027d5e4e68508e4af21a279a518602ace4a7..3c64348197caca4827ffdfd0cbf6a48b4b7d920d 100644 --- a/SOL002/VNFFaultManagement-API/Subscriptions.robot +++ b/SOL002/VNFFaultManagement-API/Subscriptions.robot @@ -4,6 +4,7 @@ Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=fal Library OperatingSystem Library JSONLibrary Library JSONSchemaLibrary schemas/ +Library String *** Test Cases *** Create a new subscription @@ -11,49 +12,53 @@ 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 [Documentation] Test ID: 6.3.4.4.2 ... Test title: Create a new Subscription - DUPLICATION ... 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 + ... 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 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 + Check HTTP Response Header Contain Link + Check Postcondition Duplicate Subscription exsist 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 + Check HTTP Response Header Contain Link 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 +67,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 +80,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 +93,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 +106,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 +119,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 +132,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 +157,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 +169,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 +181,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 +207,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 +235,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 +249,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 +263,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,24 +277,38 @@ 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.21 + ... 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 *** 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} + ${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 - DUPLICATION @@ -301,8 +317,9 @@ Post Create subscription - 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/fmSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + ${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 @@ -311,8 +328,9 @@ Post Create subscription - NO-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/fmSubscriptionRequest.json - Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + ${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 @@ -321,70 +339,70 @@ Get subscriptions 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}/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} + 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} + 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. 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} 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 + 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 + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -400,7 +418,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} @@ -408,7 +426,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} @@ -419,7 +437,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} @@ -432,7 +450,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} @@ -445,7 +463,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} @@ -458,7 +476,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} @@ -471,7 +489,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} @@ -480,9 +498,11 @@ 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} + 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} \ No newline at end of file diff --git a/SOL002/VNFFaultManagement-API/environment/variables.txt b/SOL002/VNFFaultManagement-API/environment/variables.txt index 1264a6aa915fde606f59bfb72f96a0d13a5db0f5..7eb09910bd66c2fbeed3c4dce8b23971ddd0fad3 100644 --- a/SOL002/VNFFaultManagement-API/environment/variables.txt +++ b/SOL002/VNFFaultManagement-API/environment/variables.txt @@ -11,9 +11,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 +54,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