diff --git a/SOL002/VNFFaultManagement-API/Alarms.robot b/SOL002/VNFFaultManagement-API/Alarms.robot index a1f2e05352fa53e08c2eabbdbbe0d10aeb55d779..f1a68615fe78b9307412c256a28a308c1bc2d023 100644 --- a/SOL002/VNFFaultManagement-API/Alarms.robot +++ b/SOL002/VNFFaultManagement-API/Alarms.robot @@ -14,7 +14,7 @@ POST Alarms - Method not implemented ... Test title: POST Alarms - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 7.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -26,7 +26,7 @@ GET information about multiple alarms ... Test title: GET information about multiple alarms ... Test objective: The objective is to retrieve information about the alarm list ... Pre-conditions: none - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -39,7 +39,7 @@ GET information about multiple alarms with attribute-based filter ... Test title: GET information about multiple alarms with attribute-based filter ... 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] v5.2.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -52,7 +52,7 @@ GET information about multiple alarms with invalid attribute-based filter ... 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: none - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -65,7 +65,7 @@ GET information about multiple alarms with "all_fields" attribute selector ... 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: none - ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -78,7 +78,7 @@ GET information about multiple alarms with exclude_default attribute selector ... 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: none - ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -91,7 +91,7 @@ GET information about multiple alarms with fields attribute selector ... 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: none - ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -104,7 +104,7 @@ GET information about multiple alarms with "exclude_fields" attribute selector ... 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: none - ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -117,7 +117,7 @@ PUT Alarms - Method not implemented ... Test title: PUT Alarms - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -129,7 +129,7 @@ PATCH Alarms - Method not implemented ... Test title: PATCH Alarms - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 7.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.2.3.4 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -141,7 +141,7 @@ DELETE Alarms - Method not implemented ... Test title: DELETE Alarms - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 7.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.2.3.5 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -153,7 +153,7 @@ GET information about multiple alarms to get Paged Response ... 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: none - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -166,7 +166,7 @@ GET information about multiple alarms for Bad Request Response too big ... 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: none - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -179,7 +179,7 @@ GET information about alarms with attribute-based filter "id" ... 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: none - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -193,7 +193,7 @@ GET information about multiple alarms with attribute-based filter "vnfcInstanceI ... 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: none - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -207,7 +207,7 @@ GET information about multiple alarms with attribute-based filter "rootCauseFaul ... 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: none - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -221,7 +221,7 @@ GET information about multiple alarms with attribute-based filter "eventType" ... 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: none - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -235,7 +235,7 @@ GET information about multiple alarms with attribute-based filter "perceivedSeve ... 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: none - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -249,7 +249,7 @@ GET information about multiple alarms with attribute-based filter "probableCause ... 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: none - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -262,7 +262,7 @@ GET information about multiple alarms with permitted authorization scope ... Test title: GET information about multiple alarms with permitted authorization scope ... Test objective: The objective is to retrieve information about the alarm list with permitted authorization scope ... Pre-conditions: none - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -274,7 +274,7 @@ GET information about multiple alarms with not permitted authorization scope ... Test title: GET information about multiple alarms with not permitted authorization scope ... Test objective: The objective is to retrieve information about the alarm list with not permitted authorization scope ... Pre-conditions: none - ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -282,6 +282,18 @@ GET information about multiple alarms with not permitted authorization scope Check HTTP Response Status Code Is 403 Check HTTP Response Body Json Schema Is ProblemDetails +GET information about multiple alarms - Unauthorized + [Documentation] Test ID: 6.3.4.1.22 + ... Test title: GET information about multiple alarms - Unauthorized + ... Test objective: The objective is to retrieve information about the alarm list without authorization. + ... Pre-conditions: none + ... Reference: Clause 7.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET Alarms Task - Unauthorized + Check HTTP Response Status Code Is 401 + Check HTTP Response Body Json Schema Is ProblemDetails *** Keywords *** POST Alarms Task log Trying to perform a POST. This method should not be implemented @@ -324,6 +336,14 @@ GET Alarms Task Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} +GET Alarms Task - Unauthorized + Log Query VNF The GET method queries information about multiple alarms without authorization. + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Version": "${API_VERSION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} GET Alarms Task with filter Log Query VNF The GET method queries information about multiple alarms with filters. Set Headers {"Accept": "${ACCEPT}"} diff --git a/SOL002/VNFFaultManagement-API/ApiVersion.robot b/SOL002/VNFFaultManagement-API/ApiVersion.robot index f7937d8999a7daaed499d81e52bb7d53e5e3e23d..d9b4ea1171c3e7d8ca106064fa760f4a4ee05a7b 100644 --- a/SOL002/VNFFaultManagement-API/ApiVersion.robot +++ b/SOL002/VNFFaultManagement-API/ApiVersion.robot @@ -13,7 +13,7 @@ POST API Version - Method not implemented ... 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 [5] v5.2.1 + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 [5] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -25,7 +25,7 @@ GET API Version ... 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 [5] v5.2.1 + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 [5] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -38,7 +38,7 @@ PUT API Version - Method not implemented ... 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 [5] v5.2.1 + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 [5] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -50,7 +50,7 @@ PATCH API Version - Method not implemented ... 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 [5] v5.2.1 + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 [5] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -62,7 +62,7 @@ DELETE API Version - Method not implemented ... 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 [5] v5.2.1 + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 [5] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -74,7 +74,7 @@ POST API Version with apiMajorVerion - Method not implemented ... 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 [5] v5.2.1 + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 [5] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -86,7 +86,7 @@ GET API Version with apiMajorVerion ... 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 [5] v5.2.1 + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 [5] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -99,7 +99,7 @@ PUT API Version with apiMajorVerion - Method not implemented ... 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 [5] v5.2.1 + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 [5] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -111,7 +111,7 @@ PATCH API Version with apiMajorVerion - Method not implemented ... 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 [5] v5.2.1 + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 [5] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -123,7 +123,7 @@ DELETE API Version with apiMajorVerion - Method not implemented ... 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 [5] v5.2.1 + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 [5] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none diff --git a/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot b/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot index 2acf4517eb05cd08758ea6f1442e87af3884eed9..9eb9c26ea80e8a3b283b6855d3ad2fba3ef296a4 100644 --- a/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot +++ b/SOL002/VNFFaultManagement-API/EscalatePerceivedSeverityTask.robot @@ -13,7 +13,7 @@ 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] v5.2.1 + ... Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -25,7 +25,7 @@ GET Escalate the perceived severity - Method not implemented ... 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: none - ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -37,7 +37,7 @@ PUT Escalate the perceived severity - Method not implemented ... 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: none - ... Reference: Clause 7.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -49,7 +49,7 @@ PATCH Escalate the perceived severity - Method not implemented ... 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: none - ... Reference: Clause 7.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -61,7 +61,7 @@ DELETE Escalate the perceived severity - Method not implemented ... 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: none - ... Reference: Clause 7.4.4.3.5 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.4.3.5 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -72,7 +72,7 @@ Escalate the perceived severity with permitted authorization scope ... Test title: Escalate the perceived severity with permitted authorization scope ... Test objective: To enable the consumer to escalate the perceived severity of an alarm that is represented by an individual alarm resource with permitted authorization scope. ... Pre-conditions: The resource representing the individual alarm has been created - ... Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -83,13 +83,26 @@ Escalate the perceived severity with NOT permitted authorization scope ... Test title: Escalate the perceived severity with NOT permitted authorization scope ... Test objective: To enable the consumer to escalate the perceived severity of an alarm that is represented by an individual alarm resource with NOT permitted authorization scope. ... Pre-conditions: The resource representing the individual alarm has been created - ... Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none POST escalate severity with not permitted authorization scope Check HTTP Response Status Code Is 403 +Escalate the perceived severity - Unauthorized + [Documentation] Test ID: 6.3.4.3.8 + ... Test title: Escalate the perceived severity - Unauthorized + ... Test objective: To enable the consumer to escalate the perceived severity of an alarm that is represented by an individual alarm resource with unauthorized. + ... Pre-conditions: The resource representing the individual alarm has been created + ... Reference: Clause 7.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v5.3.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Post escalate severity - Unauthorized + Check HTTP Response Status Code Is 401 + Check HTTP Response Body Json Schema Is ProblemDetails + *** Keywords *** Check resource existence Set Headers {"Accept":"${ACCEPT}"} @@ -109,7 +122,17 @@ POST escalate severity Post ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}/escalate ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} - + +POST escalate severity - Unauthorized + Log escalate the perceived severity of an alarm with the VNFM without authorization. + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Version": "${API_VERSION}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + ${template}= Get File jsons/EscalatePerceivedSeverity.json + ${body}= Format String ${template} perceivedSeverity=${PerceivedSeverity} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId}/escalate ${body} + ${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_HEADER}":"${AUTHORIZATION_TOKEN}"} diff --git a/SOL002/VNFFaultManagement-API/IndividualAlarm.robot b/SOL002/VNFFaultManagement-API/IndividualAlarm.robot index 52c9ff53873b3adf371b8d0a8bd1d6d885688d98..8fc0a18f93a39044a347e527d852b2e0f191d354 100644 --- a/SOL002/VNFFaultManagement-API/IndividualAlarm.robot +++ b/SOL002/VNFFaultManagement-API/IndividualAlarm.robot @@ -16,7 +16,7 @@ POST Alarm - Method not implemented ... Test title: POST Alarm - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 7.4.3.3.1 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.3.3.1 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -28,7 +28,7 @@ GET information about an individual alarm ... 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] v5.2.1 + ... Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -42,7 +42,7 @@ PUT Individual Alarm - Method not implemented ... Test title: PUT Individual Alarm - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 7.4.3.3.3 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.3.3.3 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -54,7 +54,7 @@ PATCH Individual Alarm ... 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] v5.2.1 + ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -68,7 +68,7 @@ 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] v5.2.1 + ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The alarm resource is not modified @@ -82,7 +82,7 @@ PATCH Individual Alarm - Conflict ... 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] v5.2.1 + ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The alarm resource is not modified @@ -96,7 +96,7 @@ DELETE Individual Alarm - Method not implemented ... Test title: DELETE Individual Alarm - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 7.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -108,7 +108,7 @@ GET information about an individual alarm - Not Found ... 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] v5.2.1 + ... Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -120,7 +120,7 @@ PATCH Individual Alarm with permitted authorization scope ... Test title: PATCH Individual Alarm with permitted authorization scope ... Test objective: The objective is to Modify an individual alarm resource with permitted authorization scope ... Pre-conditions: The related alarm exists - ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -133,7 +133,7 @@ PATCH Individual Alarm with NOT permitted authorization scope ... Test title: PATCH Individual Alarm with NOT permitted authorization scope ... Test objective: The objective is to Modify an individual alarm resource with NOT permitted authorization scope ... Pre-conditions: The related alarm exists - ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -141,6 +141,42 @@ PATCH Individual Alarm with NOT permitted authorization scope Check HTTP Response Status Code Is 403 Check HTTP Response Body Json Schema Is ProblemDetails +GET information about an individual alarm - Unauthorized + [Documentation] Test ID: 6.3.4.2.11 + ... Test title: GET information about an individual alarm - Unauthorized + ... Test objective: The objective is to read an individual alarm without authorization. + ... Pre-conditions: The related alarm exists + ... Reference: Clause 7.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET Alarm Task - Unauthorized + Check HTTP Response Status Code Is 401 + Check HTTP Response Body Json Schema Is ProblemDetails +PATCH Individual Alarm - Unauthorized + [Documentation] Test ID: 6.3.4.2.12 + ... Test title: PATCH Individual Alarm - Unauthorized + ... Test objective: The objective is to Modify an individual alarm resource without authorization. + ... Pre-conditions: The related alarm exists + ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v5.3.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH Alarm Task - Unauthorized + Check HTTP Response Status Code Is 401 + Check HTTP Response Body Json Schema Is ProblemDetails +PATCH Individual Alarm - Not Found + [Documentation] Test ID: 6.3.4.2.13 + ... Test title: PATCH Individual Alarm - Not Found + ... Test objective: The objective is to Modify an individual alarm resource that does not exist + ... Pre-conditions: The related alarm exists + ... Reference: Clause 7.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v5.3.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH Alarm Task - Not Found + 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 @@ -170,6 +206,29 @@ PATCH Alarm Task Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + +PATCH Alarm Task - Unauthorized + log Trying to perform a PATCH. This method modifies an individual alarm resource without authorization. + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Version": "${API_VERSION}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} + Set Headers {"If-Match": "${original_etag[0]}"} + ${body}= Get File jsons/alarmModifications.json + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH Alarm Task - Not Found + log Trying to perform a PATCH. This method modifies an individual alarm resource on a not existing resource. + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Version": "${API_VERSION}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} + Set Headers {"If-Match": "${original_etag[0]}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body}= Get File jsons/alarmModifications.json + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${not_existing_alarmId} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} PATCH Alarm Task with wrong precondition log Trying to perform a PATCH. This method modifies an individual alarm resource Set Headers {"Accept": "${ACCEPT}"} @@ -203,6 +262,17 @@ GET Alarm Task ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} +GET Alarm Task - Unauthorized + Log Query VNF The GET method queries information about individual alarm without authorization. + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Version": "${API_VERSION}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} + ${etag} Output response headers ETag + Set Suite Variable &{original_etag} ${etag} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + Check HTTP Response Header Contains ETag and Last-Modified Pass Execution If ${HEADER_TEST_SUPPORTED} == 0 Headers testing not supported. Skipping the Test. Log ${response['headers']} diff --git a/SOL002/VNFFaultManagement-API/IndividualSubscription.robot b/SOL002/VNFFaultManagement-API/IndividualSubscription.robot index 6ef5cc5be448efbeefbce8d7a4e2f19bfc94def0..829e1bf58476598f7de8026dcc155957a092fa9e 100644 --- a/SOL002/VNFFaultManagement-API/IndividualSubscription.robot +++ b/SOL002/VNFFaultManagement-API/IndividualSubscription.robot @@ -14,7 +14,7 @@ POST Individual Subscription - Method not implemented ... Test title: POST Individual Subscription - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -26,7 +26,7 @@ GET Information about an individual subscription ... Test title: GET Information about an individual subscription ... Test objective: The objective is to read an individual subscription for 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] v5.2.1 + ... Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -39,7 +39,7 @@ PUT an individual subscription - Method not implemented ... Test title: PUT an individual subscription - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 7.4.6.3.3 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.6.3.3 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -51,7 +51,7 @@ PATCH an individual subscription - Method not implemented ... Test title: PATCH an individual subscription - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 7.4.6.3.4 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.6.3.4 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -63,7 +63,7 @@ DELETE an individual subscription ... Test title: DELETE an individual subscription ... 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] v5.2.1 + ... Reference: Clause 7.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: the subscription is deleted @@ -76,7 +76,7 @@ GET Information about an individual subscription - Not Found ... 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] v5.2.1 + ... Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -88,7 +88,7 @@ GET Information about an individual subscription with permitted authorization sc ... Test title: GET Information about an individual subscription with permitted authorization scope ... Test objective: The objective is to read an individual subscription for VNF alarms subscribed by the client with the permitted authorization scope ... Pre-conditions: The subscription with the given id exists - ... Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -100,12 +100,48 @@ GET Information about an individual subscription with NOT permitted authorizatio ... Test title: GET Information about an individual subscription with NOT permitted authorization scope ... Test objective: The objective is to read an individual subscription for VNF alarms subscribed by the client with not permitted authorization scope ... Pre-conditions: The subscription with the given id exists - ... Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Get individual subscription with not permitted authorization scope Check HTTP Response Status Code Is 403 +GET Information about an individual subscription - Unauthorized + [Documentation] Test ID: 6.3.4.5.9 + ... Test title: GET Information about an individual subscription without authorization + ... Test objective: The objective is to read an individual subscription for VNF alarms subscribed by the client without authorization + ... Pre-conditions: The subscription with the given id exists + ... Reference: Clause 7.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get individual subscription - Unauthorized + Check HTTP Response Status Code Is 401 + Check HTTP Response Body Json Schema Is ProblemDetails +DELETE an individual subscription - Unauthorized + [Documentation] Test ID: 6.3.4.5.10 + ... Test title: DELETE an individual subscription - Unauthorized + ... Test objective: The objective is to test that the deletion of a individual subscription resource without authorization fails. + ... Pre-conditions: one or more subscription already exsist + ... Reference: Clause 7.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v5.3.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: the subscription is deleted + Delete individual subscription - Unauthorized + Check HTTP Response Status Code Is 401 + Check HTTP Response Body Json Schema Is ProblemDetails +DELETE an individual subscription - Not Found + [Documentation] Test ID: 6.3.4.5.11 + ... Test title: DELETE an individual subscription which does not exist + ... Test objective: The objective is to test that the deletion of a individual subscription resource fails when the subscription does not exist. + ... Pre-conditions: none + ... Reference: Clause 7.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v5.3.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Delete individual subscription - Not Found + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails *** Keywords *** Check resource existence Set Headers {"Accept":"${ACCEPT}"} @@ -129,6 +165,13 @@ Get individual subscription Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} +Get individual subscription - Unauthorized + log Trying to get information about an individual subscription without authorization + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Version": "${API_VERSION}"} + 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}"} @@ -168,7 +211,21 @@ DELETE individual subscription Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} - +DELETE individual subscription - Not Found + log Try to delete an individual subscription which does not exist + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Version": "${API_VERSION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${not_existing_subscriptionId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} +DELETE individual subscription - Unauthorized + log Try to delete an individual subscription without authorization + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Version": "${API_VERSION}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + ${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} diff --git a/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot b/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot index df31134d7744c77ef35b6f5f43ff7ec0bdd29d52..25d372478efdbc34c207b2dc5952e34c7319b56b 100644 --- a/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot +++ b/SOL002/VNFFaultManagement-API/NotificationEndpoint.robot @@ -13,7 +13,7 @@ VNF Fault Alarm Notification ... 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] v5.2.1 + ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none @@ -25,7 +25,7 @@ VNF Fault Alarm Cleared Notification ... 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] v5.2.1 + ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none @@ -37,7 +37,7 @@ VNF Fault Alarm List Rebuilt Notification ... 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] v5.2.1 + ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none @@ -48,7 +48,7 @@ Test the Notification Endpoint - Successful ... Test title: Test the Notification Endpoint - Successful ... Test objective: The objective is to test the Notification Endpoint provided by the notification consumer. ... Pre-conditions: A notification endpoint is provided by the API consumer upon subscription. - ... Reference: Clause 7.4.7.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.7.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none @@ -59,7 +59,7 @@ PUT Notification endpoint - Method Not Implemented ... Test title: PUT Notification endpoint - Method Not Implemented ... Test objective: The objective is to test the PUT method for Notification Endpoint provided by the consumer is not implemented. ... Pre-conditions: A notification endpoint is provided by the API consumer upon subscription. - ... Reference: Clause 7.4.7.3.3 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.7.3.3 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none @@ -70,7 +70,7 @@ PATCH Notification endpoint - Method Not Implemented ... Test title: PATCH Notification endpoint - Method Not Implemented ... Test objective: The objective is to test the PATCH method for Notification Endpoint provided by the consumer is not implemented. ... Pre-conditions: A notification endpoint is provided by the API consumer upon subscription. - ... Reference: Clause 7.4.7.3.4 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.7.3.4 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none @@ -81,13 +81,48 @@ DELETE Notification endpoint - Method Not Implemented ... Test title: DELETE Notification endpoint - Method Not Implemented ... Test objective: The objective is to test the DELETE method for Notification Endpoint provided by the consumer is not implemented. ... Pre-conditions: A notification endpoint is provided by the API consumer upon subscription. - ... Reference: Clause 7.4.7.3.5 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.7.3.5 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none DELETE notification endpoint Check HTTP Response Status Code Is 405 +VNF Fault Alarm Notification - Unauthorized + [Documentation] Test ID: 6.3.4.8.8 + ... Test title: VNF Fault Alarm Notification - Unauthorized + ... Test objective: The objective is to test that VNF Fault Alarm Notification isn't delivered with success to the notification consumer without authorization. + ... 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] v5.3.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Post Alarm Notification - Unauthorized + Check HTTP Response Status Code Is 401 + +Test the Notification Endpoint - Unauthorized + [Documentation] Test ID: 6.3.4.8.9 + ... Test title: Test the Notification Endpoint - Unauthorized + ... Test objective: The objective is to test the Notification Endpoint provided by the notification consumer without authorization. + ... Pre-conditions: A notification endpoint is provided by the API consumer upon subscription. + ... Reference: Clause 7.4.7.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Get reach the notification endpoint - Unauthorized + Check HTTP Response Status Code Is 401 +Test the Notification Endpoint - Not Found + [Documentation] Test ID: 6.3.4.8.10 + ... Test title: Test the Notification Endpoint - Not Found + ... Test objective: The objective is to test the Notification Endpoint provided by the notification consumer when it does not exist. + ... Pre-conditions: A notification endpoint is provided by the API consumer upon subscription. + ... Reference: Clause 7.4.7.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Get reach the notification endpoint - Not Found + Check HTTP Response Status Code Is 404 + *** Keywords *** Check resource existence and get CallbackUri Set Headers {"Accept": "${ACCEPT}"} @@ -116,6 +151,16 @@ Post Alarm Notification ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} +Post Alarm Notification - Unauthorized + log Trying to perform a POST to get notification without authorization + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Version": "${API_VERSION}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + ${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}"} @@ -147,6 +192,22 @@ GET reach the notification endpoint GET ${callbackResp} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + +GET reach the notification endpoint - Unauthorized + Log Trying to reach the notification endpoint using GET method without authorization. + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} + GET ${callbackResp} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} +GET reach the notification endpoint - Not Found + Log Trying to reach the notification endpoint that does not existusing GET method. + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${Invalid_callbackResp} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} PUT notification endpoint Log Trying to perform a PUT. This method should not be implemented. Set Headers {"Accept": "${ACCEPT_JSON}"} diff --git a/SOL002/VNFFaultManagement-API/Notifications.robot b/SOL002/VNFFaultManagement-API/Notifications.robot index 6b76a56ef8d8dd30e4c9ed6e4831d5e5effb167b..5a93301a3c440cdc170b25604a14fd88df4cf325 100644 --- a/SOL002/VNFFaultManagement-API/Notifications.robot +++ b/SOL002/VNFFaultManagement-API/Notifications.robot @@ -5,6 +5,7 @@ Library MockServerLibrary Library Process Library OperatingSystem Library Collections +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Suite Setup Create Sessions Suite Teardown Terminate All Processes kill=true @@ -15,39 +16,42 @@ 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] v5.2.1 + ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Trigger the fault of a virtualised resource in the VNF instance (external action) - Check Alarm Notification Http POST Request Body Json Schema Is alarmNotification - Check Alarm Notification Http POST Request Body notificationType attribute Is alarmNotification + Check Alarm Notification Http POST Request Body Json Schema Is AlarmNotification + Check Alarm Notification Http POST Request Body notificationType attribute Is AlarmNotification + Check Alarm Notification validation VNF Fault Alarm Cleared Notification [Documentation] Test ID: 6.3.4.6.2 ... Test title: VNF Fault Alarm Cleared Notification ... Test objective: The objective is to test the dispatch of VNF Fault Alarm Cleared Notification when a faulty virtualised resource within an VNF instance is cleared, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A VNF instance is instantiated, a virtualised resource is in faulty state, and a subscription for fault alarm cleared notifications is available in the VNFM. - ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Trigger the clear of a faulty virtualised resource in the VNF instance (external action) - Check Alarm cleared Notification Http POST Request Body Json Schema Is alarmClearedNotification - Check Alarm cleared Notification Http POST Request Body notificationType attribute Is alarmClearedNotification + Check Alarm cleared Notification Http POST Request Body Json Schema Is AlarmClearedNotification + Check Alarm cleared Notification Http POST Request Body notificationType attribute Is AlarmClearedNotification + Check Alarm Cleared Notification validation VNF Fault Alarm List Rebuilt Notification [Documentation] Test ID: 6.3.4.6.3 ... Test title: VNF Fault Alarm List Rebuilt Notification ... Test objective: The objective is to test the dispatch of VNF Fault Alarm List Rebuilt Notification when the VNFM decides to rebuild the list of its VNF alarms, e.g. due to a corruption in the alarm storage, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A VNF instance is instantiated, one or more virtualised resource are in faulty state, and a subscription for fault alarm list rebuilt notifications is available in the VNFM. - ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.7.3.1 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Trigger the VNF fault alarm list rebuild in the NFVO (external action) - Check Alarm list rebuilt Notification Http POST Request Body Json Schema Is alarmListRebuiltNotification - Check Alarm list rebuilt Notification Http POST Request Body notificationType attribute Is alarmListRebuiltNotification + Check Alarm list rebuilt Notification Http POST Request Body Json Schema Is AlarmListRebuiltNotification + Check Alarm list rebuilt Notification Http POST Request Body notificationType attribute Is AlarmListRebuiltNotification + Check Alarm List Rebuilt Notification validation *** Keywords *** @@ -107,6 +111,71 @@ Check Alarm Clerance Notification Http POST Request Body changeType attribute Is Log do nothing +Check Alarm Notification validation + ${requests}= Retrieve Requests ${callback_endpoint_fwd} + Should Not Be Empty ${requests} + ${last_request}= Get From List ${requests} -1 + ${body}= Get From Dictionary ${last_request} body + ${body_text}= Get From Dictionary ${body} string + ${notification}= Evaluate json.loads(r'''${body_text}''') json + ${alarm}= Get From Dictionary ${notification} alarm + Dictionary Should Contain Key ${alarm} id + Dictionary Should Contain Key ${alarm} managedObjectId + ${subscriptionId}= Get From Dictionary ${notification} subscriptionId + ${alarmId}= Get From Dictionary ${alarm} id + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${subscription_response}= GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + ${subscription_response_object}= Get From Dictionary ${subscription_response} response + ${subscription_status}= Get From Dictionary ${subscription_response_object} status + Should Be Equal As Integers ${subscription_status} 200 + ${alarm_response}= GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} + ${alarm_response_object}= Get From Dictionary ${alarm_response} response + ${alarm_status}= Get From Dictionary ${alarm_response_object} status + Should Be Equal As Integers ${alarm_status} 200 + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Check Alarm Cleared Notification validation + ${requests}= Retrieve Requests ${callback_endpoint_fwd} + Should Not Be Empty ${requests} + ${last_request}= Get From List ${requests} -1 + ${body}= Get From Dictionary ${last_request} body + ${body_text}= Get From Dictionary ${body} string + ${notification}= Evaluate json.loads(r'''${body_text}''') json + ${subscriptionId}= Get From Dictionary ${notification} subscriptionId + ${alarmId}= Get From Dictionary ${notification} alarmId + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${subscription_response}= GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + ${subscription_response_object}= Get From Dictionary ${subscription_response} response + ${subscription_status}= Get From Dictionary ${subscription_response_object} status + Should Be Equal As Integers ${subscription_status} 200 + ${alarm_response}= GET ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} + ${alarm_response_object}= Get From Dictionary ${alarm_response} response + ${alarm_status}= Get From Dictionary ${alarm_response_object} status + Should Be Equal As Integers ${alarm_status} 200 + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + +Check Alarm List Rebuilt Notification validation + ${requests}= Retrieve Requests ${callback_endpoint_fwd} + Should Not Be Empty ${requests} + ${last_request}= Get From List ${requests} -1 + ${body}= Get From Dictionary ${last_request} body + ${body_text}= Get From Dictionary ${body} string + ${notification}= Evaluate json.loads(r'''${body_text}''') json + ${subscriptionId}= Get From Dictionary ${notification} subscriptionId + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${subscription_response}= GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + ${subscription_response_object}= Get From Dictionary ${subscription_response} response + ${subscription_status}= Get From Dictionary ${subscription_response_object} status + Should Be Equal As Integers ${subscription_status} 200 + Clear Requests ${callback_endpoint} + Clear Requests ${callback_endpoint_fwd} + + Configure Notification Alarm List Rebuilt Handler [Arguments] ${endpoint} ${type} ${json}= evaluate {} @@ -139,7 +208,7 @@ Configure Notification Alarm Cleareance Handler Set Global Variable ${notification_request} ${req} &{notification_response}= Create Mock Response status_code=204 Create Mock Expectation ${notification_request} ${notification_response} - + Configure Notification Forward [Arguments] ${schema} ${endpoint} ${endpoint_fwd} Log Creating mock Http POST forward to handle ${schema} diff --git a/SOL002/VNFFaultManagement-API/Subscriptions.robot b/SOL002/VNFFaultManagement-API/Subscriptions.robot index 1e382e062e1f3b0dc732eb1128c09aeb2091c6aa..4a3d110a8a1ce9269b796f59394ed0a6df434e5f 100644 --- a/SOL002/VNFFaultManagement-API/Subscriptions.robot +++ b/SOL002/VNFFaultManagement-API/Subscriptions.robot @@ -17,7 +17,7 @@ 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] v5.2.1 + ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: Resource created successfully @@ -34,7 +34,7 @@ Create a duplicated Subscription ... Test title: Create a duplicated Subscription ... Test objective: The objective is to create a duplicate subscription. ... Pre-conditions: subscription with the same filter and callbackUri exists - ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: ... Post-Conditions: duplicated subscription is created if the IUT allows duplications, otherwise the duplicated subscription is not created @@ -58,7 +58,7 @@ GET Subscriptions ... Test title: GET Subscriptions ... Test objective: The objective is to retrieve the list of active subscriptions ... Pre-conditions: none - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -71,7 +71,7 @@ GET Subscription - Filter ... Test title: GET Subscription - Filter ... Test objective: The objective is to retrieve the list of active subscriptions with filter ... Pre-conditions: none - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -84,7 +84,7 @@ GET subscriptions - Bad Request Invalid attribute-based filtering parameters ... Test title: GET subscriptions - Bad Request Invalid attribute-based filtering parameters ... Test objective: The objective is to retrieve the list of active subscriptions with Invalid attribute-based filtering parameters ... Pre-conditions: none - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -97,7 +97,7 @@ GET subscriptions with "all_fields" attribute selector ... Test title: GET subscriptions with "all_fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector ... Pre-conditions: none - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -110,7 +110,7 @@ GET subscriptions with "exclude_default" attribute selector ... Test title: GET subscriptions with "exclude_default" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector ... Pre-conditions: none - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -123,7 +123,7 @@ GET subscriptions with "fields" attribute selector ... Test title: GET subscriptions with "fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector ... Pre-conditions: none - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -136,7 +136,7 @@ GET subscriptions with "exclude_fields" attribute selector ... Test title: GET subscriptions with "exclude_fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with attribute selector ... Pre-conditions: none - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -149,7 +149,7 @@ PUT subscriptions - Method not implemented ... Test title: PUT subscriptions - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 7.4.5.3.3 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.5.3.3 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -161,7 +161,7 @@ PATCH subscriptions - Method not implemented ... Test title: PUT subscriptions - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 7.4.5.3.4 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.5.3.4 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -173,7 +173,7 @@ DELETE subscriptions - Method not implemented ... Test title: DELETE subscriptions - Method not implemented ... Test objective: The objective is to test that the method is not implemented ... Pre-conditions: none - ... Reference: Clause 7.4.5.3.5 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.5.3.5 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -185,7 +185,7 @@ GET Subscriptions to get Paged Response ... 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: none - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -198,7 +198,7 @@ GET subscriptions - Bad Request Response too Big ... 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: none - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -211,7 +211,7 @@ GET Subscription with attribute-based filter "id" ... 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: none - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -225,7 +225,7 @@ Get subscriptions with filter "filter.notificationTypes" ... 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: none - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -239,7 +239,7 @@ Get subscriptions with filter "filter.faultyResourceTypes" ... 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: none - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -253,7 +253,7 @@ Get subscriptions with filter "filter.perceivedSeverities" ... 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: none - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -267,7 +267,7 @@ Get subscriptions with filter "filter.eventTypes" ... 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: none - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -281,7 +281,7 @@ Get subscriptions with filter "filter.probableCauses" ... 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: none - ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -295,7 +295,7 @@ POST Create a new Subscription - Unprocessable Content ... Test title: POST Create a new Subscription - Unprocessable Content ... Test objective: The objective is to test that content type of the message content is supported and the message content 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] v5.2.1 + ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -307,7 +307,7 @@ Create a new subscription with permitted authorization scope ... Test title: Create a new subscription with permitted authorization scope ... Test objective: The objective is to create a new subscription with permitted authorization scope. ... Pre-conditions: no subscription with the same filter and callbackUri exists - ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: Resource created successfully @@ -323,13 +323,37 @@ Create a new subscription with not permitted authorization scope ... Test title: Create a new subscription with not permitted authorization scope ... Test objective: The objective is to create a new subscription with not permitted authorization scope. ... Pre-conditions: no subscription with the same filter and callbackUri exists - ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v5.2.1 + ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v5.3.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: Resource created successfully Post Create subscription with not permitted authorization scope Check HTTP Response Status Code Is 403 +Create a new subscription - Unauthorized + [Documentation] Test ID: 6.3.4.4.25 + ... Test title: Create a new subscription - Unauthorized + ... Test objective: The objective is to create a new subscription without authorization. + ... Pre-conditions: no subscription with the same filter and callbackUri exists + ... Reference: Clause 7.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v5.3.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: Resource created successfully + Post Create subscription - Unauthorized + Check HTTP Response Status Code Is 401 + Check HTTP Response Body Json Schema Is ProblemDetails +GET Subscriptions - Unauthorized + [Documentation] Test ID: 6.3.4.4.26 + ... Test title: GET Subscriptions - Unauthorized + ... Test objective: The objective is to retrieve the list of active subscriptions without authorization. + ... Pre-conditions: none + ... Reference: Clause 7.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v5.3.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get subscriptions - Unauthorized + Check HTTP Response Status Code Is 401 + Check HTTP Response Body Json Schema Is ProblemDetails *** Keywords *** Void log do nothing @@ -356,7 +380,23 @@ Post Create subscription ${output}= Output response Set Global Variable ${response} ${output} Clear Requests ${callback_endpoint} - + +Post Create subscription - Unauthorized + Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions without authorization + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Version": "${API_VERSION}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + ${template}= Get File jsons/fmSubscriptionRequest.json + ${body}= Format String ${template} callback_uri=${callback_uri}:${callback_port} callback_endpoint=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the subscription request + Create Mock Expectation ${notification_request} ${notification_response} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} allow_redirects=false + ${output}= Output response + Set Global Variable ${response} ${output} + Clear Requests ${callback_endpoint} # Post Create subscription - DUPLICATION # Log Trying to create a subscription with an already created content # Pass Execution If ${VNFM_ALLOWS_DUPLICATE_SUBS} == 0 NVFO is not permitting duplication. Skipping the test @@ -389,6 +429,15 @@ Get subscriptions Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} +Get subscriptions - Unauthorized + Log Get the list of active subscriptions without authorization + Set Headers {"Accept": "${ACCEPT}"} + Set Headers {"Version": "${API_VERSION}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Log Execute Query and validate response + 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}"} diff --git a/SOL002/VNFFaultManagement-API/environment/variables.txt b/SOL002/VNFFaultManagement-API/environment/variables.txt index 5567f283f91e9781e7999b1f944bd62a106b6ce9..71ef01b4432f7ec936340c27d7dda0baf17b86fc 100644 --- a/SOL002/VNFFaultManagement-API/environment/variables.txt +++ b/SOL002/VNFFaultManagement-API/environment/variables.txt @@ -30,7 +30,7 @@ ${origResponse}= httpresponse ${VNFM_ALLOWS_DUPLICATE_SUBS} 0 ${alarmId} 6fc3539c-e602-4afa-8e13-962fb5a7d81d - +${not_existing_alarmId} not_existing_alarmId ${CONTENT_TYPE_PATCH} application/merge-patch+json ${PerceivedSeverity} CRITICAL @@ -39,7 +39,7 @@ ${sub_filter} filter ${sub_filter_invalid} filter_invalid ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f - +${not_existing_subscriptionId} not_existing_subscriptionId ${callback_uri} http://localhost ${callback_port} 9091 ${callback_endpoint} /endpoint @@ -62,4 +62,5 @@ ${probableCause} ${notification_type} AlarmNotification -${callbackResp} localhost \ No newline at end of file +${callbackResp} localhost +${Invalid_callbackResp} Invalid_callbackResp \ No newline at end of file