From 3b10810919a6f4bde779a046b8b74af0bdf75f23 Mon Sep 17 00:00:00 2001 From: "g.bernini" Date: Thu, 5 Sep 2024 15:54:44 +0200 Subject: [PATCH 1/5] Update reference to SOL009 v4.5.1 in all NFVMANOFM tests --- .../NFVMANOFaultManagement-API/Alarms.robot | 34 +++++++++---------- .../IndividualAlarm.robot | 16 ++++----- .../IndividualSubscription.robot | 12 +++---- .../NotificationEndpoint.robot | 6 ++-- .../Notifications.robot | 6 ++-- .../Subscriptions.robot | 34 +++++++++---------- 6 files changed, 54 insertions(+), 54 deletions(-) diff --git a/SOL009/NFVMANOFaultManagement-API/Alarms.robot b/SOL009/NFVMANOFaultManagement-API/Alarms.robot index 3d6d861e7..eaac272aa 100644 --- a/SOL009/NFVMANOFaultManagement-API/Alarms.robot +++ b/SOL009/NFVMANOFaultManagement-API/Alarms.robot @@ -7,7 +7,7 @@ POST Alarms - Method not implemented ... Test title: POST Alarms - Method not implemented ... Test objective: The objective is to test that Post method is not allowed to create fault management alarms on NFV-MANO ... Pre-conditions: none - ... Reference: clause 7.5.3.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.3.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -19,7 +19,7 @@ Get information about multiple alarms ... Test title: Get information about multiple alarms ... Test objective: The objective is to retrieve information about the alarm list and perform a JSON schema of the returned alarms data structure ... Pre-conditions: none - ... Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -32,7 +32,7 @@ Get information about multiple alarms with filter ... Test title: Get information about multiple alarms with filter ... Test objective: The objective is to retrieve information about the alarm list and perform a JSON schema validation of the returned alarms data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: none - ... Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -45,7 +45,7 @@ Get information about multiple alarms with invalid attribute-based filtering par ... Test title: Get information about multiple alarms with invalid attribute-based filtering parameters ... Test objective: The objective is to try to retrieve information about the alarm list with invalid filters and perform a JSON schema validation of the returned problem details data structure ... Pre-conditions: none - ... Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -58,7 +58,7 @@ Get information about multiple alarms as a Paged Response ... Test title: Get information about multiple alarms as a Paged Response ... Test objective: The objective is to retrieve information about the alarm list as a Paged Response. ... Pre-conditions: none - ... Reference: Clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: Clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -71,7 +71,7 @@ Get information about multiple alarms - Bad Request Response too Big ... Test title: Get information about multiple alarms - Bad Request Response too Big ... Test objective: The objective is to try to retrieve information about the alarm list because response is too big and perform a JSON schema validation of the returned problem details data structure ... Pre-conditions: none - ... Reference: Clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: Clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -84,7 +84,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.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: Clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -98,7 +98,7 @@ GET information about multiple alarms with attribute-based filter "managedObject ... Test title: GET information about multiple alarms with attribute-based filter "managedObjectId" ... Test objective: The objective is to retrieve information about the alarm list with attribute filter "managedObjectId" ... Pre-conditions: none - ... Reference: Clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: Clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -112,7 +112,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.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: Clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -126,7 +126,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.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: Clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -140,7 +140,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.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: Clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -154,7 +154,7 @@ Get information about multiple alarms with malformed authorization token ... Test title: Get information about multiple alarms with malformed authorization token ... Test objective: The objective is to test that the retrieval of information about the alarm list fails when using malformed authorization token ... Pre-conditions: none - ... Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: The NFV-MANO entity requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none @@ -166,7 +166,7 @@ Get information about multiple alarms without authorization token ... Test title: Get information about multiple alarms without authorization token ... Test objective: The objective is to test that the retrieval of information about the alarm list fails when omitting the authorization token ... Pre-conditions: none - ... Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: The NFV-MANO entity requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none @@ -178,7 +178,7 @@ GET information about multiple alarms with expired or revoked authorization toke ... Test title: GET information about multiple alarms with expired or revoked authorization token ... Test objective: The objective is to test that the retrieval of information about the alarm list fails when using expired or revoked authorization token ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO - ... Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: The NFV-MANO entity requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none @@ -190,7 +190,7 @@ PUT Alarms - Method not implemented ... Test title: PUT Alarms - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify fault management alarms on NFV-MANO. ... Pre-conditions: none - ... Reference: clause 7.5.3.3.3 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.3.3.3 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -202,7 +202,7 @@ PATCH Alarms - Method not implemented ... Test title: PATCH Alarms - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify fault management alarms on NFV-MANO. ... Pre-conditions: none - ... Reference: clause 7.5.3.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.3.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -214,7 +214,7 @@ DELETE Alarms - Method not implemented ... Test title: POST Alarms - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed for fault management alarms on NFV-MANO ... Pre-conditions: none - ... Reference: clause 7.5.3.3.5 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.3.3.5 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none diff --git a/SOL009/NFVMANOFaultManagement-API/IndividualAlarm.robot b/SOL009/NFVMANOFaultManagement-API/IndividualAlarm.robot index 9b1d6e2b1..21aa3a580 100644 --- a/SOL009/NFVMANOFaultManagement-API/IndividualAlarm.robot +++ b/SOL009/NFVMANOFaultManagement-API/IndividualAlarm.robot @@ -7,7 +7,7 @@ POST Individual Alarm - Method not implemented ... Test title: POST Individual Alarm - Method not implemented ... Test objective: The objective is to test that Post method is not allowed to create fault management individual alarm on NFV-MANO ... Pre-conditions: none - ... Reference: clause 7.5.4.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.4.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -19,7 +19,7 @@ Get information about an fault management individual alarm ... Test title: Get information about an fault management individual alarm ... Test objective: The objective is to retrieve information about an individual alarm and perform a JSON schema and content validation of the returned alarm data structure ... Pre-conditions: The related alarm exists - ... Reference: clause 7.5.4.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.4.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -32,7 +32,7 @@ Get information about an fault management individual alarm - Not Found ... Test title: Get information about an fault management individual alarm ... Test objective: The objective is to test the retrieval of information about an individual alarm fails when the resource is not present. ... Pre-conditions: none - ... Reference: clause 7.5.4.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.4.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -45,7 +45,7 @@ PUT Individual Alarm - Method not implemented ... Test title: PUT Individual Alarm - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to for fault management individual alarm on NFV-MANO ... Pre-conditions: none - ... Reference: clause 7.5.4.3.3 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.4.3.3 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -57,7 +57,7 @@ PATCH Fault Management Individual Alarm ... Test title: PATCH Fault Management Individual Alarm ... Test objective: The objective is to Modify an individual alarm resource, and perform a JSON schema validation of the returned alarm data structure. ... Pre-conditions: The related alarm exists - ... Reference: clause 7.5.4.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.4.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: Alarm is modified. @@ -70,7 +70,7 @@ Modify an individual alarm resource - Precondition failed ... Test title: Modify an individual alarm resource - Precondition failed ... Test objective: The objective is to test that an individual alarm resource cannot be modified if the alarm is already in the state that is requested to be set, and perform a JSON schema validation of the returned data structure. ... Pre-conditions: The related alarm exists - ... Reference: clause 7.5.4.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.4.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: Alarm is not modified. @@ -84,7 +84,7 @@ Modify an individual alarm resource - Conflict ... Test title: Modify an individual alarm resource - Conflict ... Test objective: The objective is to test that an individual alarm resource cannot be modified if the resource was modified by another entity , and perform a JSON schema validation of the returned data structure. ... Pre-conditions: The related alarm exists - ... Reference: clause 7.5.4.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.4.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: Alarm is not modified. @@ -98,7 +98,7 @@ DELETE Individual Alarm - Method not implemented ... Test title: DELETE Individual Alarm - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete fault management individual alarm on NFV-MANO. ... Pre-conditions: none - ... Reference: clause 7.5.4.3.5 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.4.3.5 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none diff --git a/SOL009/NFVMANOFaultManagement-API/IndividualSubscription.robot b/SOL009/NFVMANOFaultManagement-API/IndividualSubscription.robot index 36bbf07f9..3e6e6b0d0 100644 --- a/SOL009/NFVMANOFaultManagement-API/IndividualSubscription.robot +++ b/SOL009/NFVMANOFaultManagement-API/IndividualSubscription.robot @@ -7,7 +7,7 @@ Post Individual Subscription - Method not implemented ... Test title: Post Individual Subscription - Method not implemented ... Test objective: The objective is to test that POST method is not allowed for fault management subscription on NFV-MANO ... Pre-conditions: none - ... Reference: clause 7.5.6.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.6.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -19,7 +19,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 from NFV-MANO alarms subscribed by the client and perform a JSON schema and content validation of the returned fault management individual subscription data structure ... Pre-conditions: The subscription with the given id exists - ... Reference: clause 7.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -32,7 +32,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 the retrieval of individual subscription from NFV-MANO alarms fails when the resource is not present. ... Pre-conditions: none - ... Reference: clause 7.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -44,7 +44,7 @@ PUT an individual subscription - Method not implemented ... Test title:PUT an individual subscription - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed for fault management individual subscription on VNF ... Pre-conditions: none - ... Reference: clause 7.5.6.3.3 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.6.3.3 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -56,7 +56,7 @@ PATCH an individual subscription - Method not implemented ... Test title:PATCH an individual subscription - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed for fault management individual subscription on VNF ... Pre-conditions: none - ... Reference: clause 7.5.6.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.6.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -68,7 +68,7 @@ DELETE an individual subscription ... Test title:DELETE an individual subscription ... Test objective: The objective is to test that DELETE method removes individual subscription on VNF ... Pre-conditions: The Subsbcription already exists - ... Reference: clause 7.5.6.3.5 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.6.3.5 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: subscription is deleted diff --git a/SOL009/NFVMANOFaultManagement-API/NotificationEndpoint.robot b/SOL009/NFVMANOFaultManagement-API/NotificationEndpoint.robot index 0f5430888..14e8a77bf 100644 --- a/SOL009/NFVMANOFaultManagement-API/NotificationEndpoint.robot +++ b/SOL009/NFVMANOFaultManagement-API/NotificationEndpoint.robot @@ -8,7 +8,7 @@ Alarm Notification ... Test title: Alarm Notification ... Test objective: The objective is to test that Alarm Notification is delivered with success to the notification consumer. ... Pre-conditions: A subscription for alarm notification is available in the NFV-MANO. - ... Reference: clause 7.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none @@ -20,7 +20,7 @@ Alarm Cleared Notification ... Test title: Alarm Cleared Notification ... Test objective: The objective is to test that Alarm Cleared Notification is delivered with success to the notification consumer. ... Pre-conditions: A subscription for alarm cleared notification is available in the NFV-MANO. - ... Reference: clause 7.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none @@ -32,7 +32,7 @@ Alarm List Rebuilt Notification ... Test title: Alarm List Rebuilt Notification ... Test objective: The objective is to test that Alarm List Rebuilt Notification is delivered with success to the notification consumer. ... Pre-conditions: A subscription for alarm list rebuilt notification is available in the NFV-MANO. - ... Reference: clause 7.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none diff --git a/SOL009/NFVMANOFaultManagement-API/Notifications.robot b/SOL009/NFVMANOFaultManagement-API/Notifications.robot index 61b3e367c..81970be62 100644 --- a/SOL009/NFVMANOFaultManagement-API/Notifications.robot +++ b/SOL009/NFVMANOFaultManagement-API/Notifications.robot @@ -10,7 +10,7 @@ NFV-MANO Fault Alarm Notification ... Test title: NFV-MANO Fault Alarm Notification ... Test objective: The objective is to test the dispatch of NFV-MANO Fault Alarm Notification when a resource within an NFV-MANO 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 NFV-MANO instance is instantiated, and a subscription for fault alarm notifications is available. - ... Reference: clause 7.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -23,7 +23,7 @@ NFV-MANO Fault Alarm Cleared Notification ... Test title: NFV-MANO Fault Alarm Cleared Notification ... Test objective: The objective is to test the dispatch of NFV-MANO Fault Alarm Cleared Notification when a faulty resource within an NFV-MANO 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 NFV-MANO instance is instantiated, a virtualised resource is in faulty state, and a subscription for fault alarm cleared notifications is available. - ... Reference: clause 7.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -36,7 +36,7 @@ NFV-MANO Fault Alarm List Rebuilt Notification ... Test title: NFV-MANO Fault Alarm List Rebuilt Notification ... Test objective: The objective is to test the dispatch of NFV-MANO Fault Alarm List Rebuilt Notification when the NFV-MANO decides to rebuild the list of its NFV-MANO 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 NFV-MANO instance is instantiated, one or more virtualised resource are in faulty state, and a subscription for fault alarm list rebuilt notifications is available. - ... Reference: clause 7.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.7.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none diff --git a/SOL009/NFVMANOFaultManagement-API/Subscriptions.robot b/SOL009/NFVMANOFaultManagement-API/Subscriptions.robot index 7b747f50a..31d5adfc6 100644 --- a/SOL009/NFVMANOFaultManagement-API/Subscriptions.robot +++ b/SOL009/NFVMANOFaultManagement-API/Subscriptions.robot @@ -7,7 +7,7 @@ POST Create a new Fault Management alarm subscription ... Test title: POST Create a new fault management alarm subscription ... Test objective: The objective is to create a new fault management alarm subscription and perform a JSON schema validation of the returned fault management alarms subscription data structure ... Pre-conditions: No subscription with the same filter and callbackUri exists - ... Reference: clause 7.5.5.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.5.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: subscription is created @@ -22,7 +22,7 @@ POST Create a new alarm subscription - DUPLICATION ... Test title: POST Create a new alarm subscription - DUPLICATION ... Test objective: The objective is to create a new subscription with the NFV-MANO allowing duplication and perform a JSON schema validation of the returned fault management alarms subscription data structure. ... Pre-conditions: subscription with the same filter and callbackUri exists - ... Reference: clause 7.5.5.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.5.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: the NFV-MANO allows creating a subscription resource if another subscription resource with the same filter and callbackUri already exists ... Post-Conditions: duplicated subscription is created @@ -37,7 +37,7 @@ POST Create a new alarm subscription - NO DUPLICATION ... Test title: POST Create a new alarm subscription - NO DUPLICATION ... Test objective: The objective is to create a new subscription with the NFV-MANO not allowing duplication and perform a JSON schema validation of the returned fault management alarms subscription data structure. ... Pre-conditions: subscription with the same filter and callbackUri exists - ... Reference: clause 7.5.5.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.5.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: the NFV-MANO does not allow to create a duplicate subscription resource ... Post-Conditions: duplicated subscription is not created @@ -52,7 +52,7 @@ Retrieve a list of alarm subscriptions ... Test title: Retrieve a list of alarm subscriptions ... Test objective: The objective is to retrieve the list of active subscriptions and perform a JSON schema validation of the returned fault management alarms subscription data structure. ... Pre-conditions: none - ... Reference: clause 7.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: noe @@ -65,7 +65,7 @@ Retrieve a list of alarm subscriptions with filter ... Test title: Retrieve a list of alarm subscriptions with filter ... Test objective: The objective is to retrieve the list of active subscriptions with filter and perform a JSON schema validation of the returned fault management alarms subscription data structure. ... Pre-conditions: none - ... Reference: clause 7.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -78,7 +78,7 @@ Get information about multiple alarms as a Paged Response ... Test title: Get information about multiple alarms as a Paged Response ... Test objective: The objective is to retrieve information about active list subscriptions as a Paged Response ... Pre-conditions: none - ... Reference: Clause 7.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: Clause 7.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -91,7 +91,7 @@ GET subscriptions - Bad Request Invalid attribute-based filtering parameters ... Test title: GET subscriptions - Bad Request Invalid attribute-based filtering parameters ... Test objective: The objective is to retrieve the list of active subscriptions with Invalid attribute-based filtering parameters and perform a JSON schema validation of the returned problem details data structure. ... Pre-conditions: none - ... Reference: clause 7.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -104,7 +104,7 @@ Get information about multiple alarms - Bad Request Response too Big ... Test title: Get information about multiple alarms - Bad Request Response too Big ... Test objective: The objective is to try to retrieve information about active list subscription to check that response is too big and perform a JSON schema validation of the returned problem details data structure ... Pre-conditions: none - ... Reference: Clause clause 7.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: Clause clause 7.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -117,7 +117,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.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: Clause 7.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -131,7 +131,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.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: Clause 7.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -145,7 +145,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.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: Clause 7.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -159,7 +159,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.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: Clause 7.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -173,7 +173,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.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: Clause 7.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -187,7 +187,7 @@ PUT subscriptions - Method not implemented ... Test title:PUT subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to for fault management subscriptions on VNF ... Pre-conditions: none - ... RReference: clause 7.5.5.3.3 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... RReference: clause 7.5.5.3.3 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -199,7 +199,7 @@ PATCH subscriptions - Method not implemented ... Test title: PATCH subscriptions - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to for fault management subscriptions on VNF ... Pre-conditions: none - ... Reference: clause 7.5.5.3.4 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.5.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -211,7 +211,7 @@ DELETE subscriptions - Method not implemented ... Test title: DELETE subscriptions - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to for fault management subscriptions on VNF ... Pre-conditions: none - ... Reference: clause 7.5.5.3.5 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.5.3.5 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -223,7 +223,7 @@ POST Create a new Fault Management alarm subscription - Unprocessable content ... Test title: POST Create a new fault management alarm subscription - Unprocessable content ... Test objective: The objective is to test that a new fault management alarm subscription is not created if the notification endpoint is unreachable by the NFV-MANO. ... Pre-conditions: No subscription with the same filter and callbackUri exists. - ... Reference: clause 7.5.5.3.1 - ETSI GS NFV-SOL 009 [7] v4.4.1 + ... Reference: clause 7.5.5.3.1 - ETSI GS NFV-SOL 009 [7] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: Notification endpoint is unreachable by the NFV-MANO. ... Post-Conditions: none -- GitLab From 7c1c5296669998fa41558f3219c0964b211170a4 Mon Sep 17 00:00:00 2001 From: "g.bernini" Date: Thu, 12 Sep 2024 11:12:58 +0200 Subject: [PATCH 2/5] added oauth scope tests for alarms --- .../NFVMANOFaultManagement-API/Alarms.robot | 25 ++++++++++++++++ .../FaultManagement-APIKeyword.robot | 30 +++++++++++++++++++ .../environment/variables.txt | 7 +++++ 3 files changed, 62 insertions(+) diff --git a/SOL009/NFVMANOFaultManagement-API/Alarms.robot b/SOL009/NFVMANOFaultManagement-API/Alarms.robot index eaac272aa..01d60318d 100644 --- a/SOL009/NFVMANOFaultManagement-API/Alarms.robot +++ b/SOL009/NFVMANOFaultManagement-API/Alarms.robot @@ -220,4 +220,29 @@ DELETE Alarms - Method not implemented ... Post-Conditions: none DELETE Fault management Alarms Check HTTP Response Status Code Is 405 + +Get information about multiple alarms with permitted authorization scope + [Documentation] Test ID: 8.3.3.1.18 + ... 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.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET Fault Management Alarms with permitted authorization scope + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is Alarms + +Get information about multiple alarms with not permitted authorization scope + [Documentation] Test ID: 8.3.3.1.19 + ... Test title: Get information about multiple alarms with not permitted authorization scope + ... Test objective: The objective is to test that retrieve information about the alarm list fails with not permitted authorization scope + ... Pre-conditions: none + ... Reference: clause 7.5.3.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET Fault Management Alarms with not permitted authorization scope + Check HTTP Response Status Code Is 401 \ No newline at end of file diff --git a/SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot b/SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot index 4d1427ddf..16b7f150a 100644 --- a/SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot +++ b/SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot @@ -8,6 +8,7 @@ Library OperatingSystem Library Collections Library MockServerLibrary Library Process +Library jwt # *** Variables *** # ${original_etag} 1234 @@ -36,7 +37,31 @@ GET Fault Management Alarms Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} + +GET Fault Management Alarms with permitted authorization scope + Log Query NFV-MANO The GET method queries information about multiple alarms. + Set Headers {"Accept":"${ACCEPT}"} + ${scopeValue}= Create Dictionary scope=${ALARMS_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + Log Execute Query + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} +GET Fault Management Alarms with not permitted authorization scope + Log Query NFV-MANO The GET method queries information about multiple alarms. + Set Headers {"Accept":"${ACCEPT}"} + ${scopeValue}= Create Dictionary scope=${NOT_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + Log Execute Query + Get ${apiRoot}/${apiName}/${apiMajorVersion}/alarms + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + Check HTTP Response Body Json Schema Is [Arguments] ${input} Run Keyword If '${input}' == 'ProblemDetails' Should Contain ${response['headers']['Content-Type']} application/problem+json @@ -713,3 +738,8 @@ DELETE API Version with apiMajorVersion Delete ${apiRoot}/${apiName}/${apiMajorVersion} /api_versions ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + +JWT Encode + [Arguments] ${payload} ${key} ${algorithm} + ${encoded}= Evaluate jwt.encode(${payload}, ${key}, ${algorithm}) + [Return] ${encoded} diff --git a/SOL009/NFVMANOFaultManagement-API/environment/variables.txt b/SOL009/NFVMANOFaultManagement-API/environment/variables.txt index 62dcfc043..c62ca1f17 100644 --- a/SOL009/NFVMANOFaultManagement-API/environment/variables.txt +++ b/SOL009/NFVMANOFaultManagement-API/environment/variables.txt @@ -10,6 +10,13 @@ ${ACCEPT_JSON} application/json ${AUTH_USAGE} 1 ${NEG_AUTHORIZATION_TOKEN} Bearer negativetoken ${BAD_AUTHORIZATION_TOKEN} Bear sometoken + +${OAUTH_ENCRIPTION_ALGORITHM} HS256 +${ALAMRS_PERMITTED_SCOPE} nfvmanofm:v2:alarm_info +${ALARMS_NOT_PERMITTED_SCOPE} nfvmanofm:v2:alarm_info:readonly +${NOT_PERMITTED_SCOPE} nfvmanofm:v2:policies:invalid + + ${apiRoot} / ${apiName} nfvmanofm ${apiMajorVersion} v1 -- GitLab From 41662d6f64d08ecaecca29caae79a4933329cced Mon Sep 17 00:00:00 2001 From: "g.bernini" Date: Thu, 12 Sep 2024 11:19:25 +0200 Subject: [PATCH 3/5] added oauth scope tests for individual alarms --- .../FaultManagement-APIKeyword.robot | 26 +++++++++++++++++ .../IndividualAlarm.robot | 28 ++++++++++++++++++- 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot b/SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot index 16b7f150a..077205688 100644 --- a/SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot +++ b/SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot @@ -165,6 +165,32 @@ PATCH Fault Management Individual Alarm Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body} ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} + +PATCH Fault Management Individual Alarm with permitted authorization scope + log Trying to perform a PATCH. This method modifies an individual alarm resource + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} + ${scopeValue}= Create Dictionary scope=${ALARMS_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + ${body}= Get File jsons/alarmModifications.json + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +PATCH Fault Management Individual Alarm with not permitted authorization scope + log Trying to perform a PATCH. This method modifies an individual alarm resource + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} + ${scopeValue}= Create Dictionary scope=${ALARMS_NOT_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + ${body}= Get File jsons/alarmModifications.json + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/alarms/${alarmId} ${body} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} PATCH Fault Management Individual Alarm - precondition failed log Trying to perform a PATCH. This method fail to modifies an individual alarm resource diff --git a/SOL009/NFVMANOFaultManagement-API/IndividualAlarm.robot b/SOL009/NFVMANOFaultManagement-API/IndividualAlarm.robot index 21aa3a580..2998c682b 100644 --- a/SOL009/NFVMANOFaultManagement-API/IndividualAlarm.robot +++ b/SOL009/NFVMANOFaultManagement-API/IndividualAlarm.robot @@ -103,4 +103,30 @@ DELETE Individual Alarm - Method not implemented ... Applicability: none ... Post-Conditions: none DELETE Fault Management Individual Alarm - Check HTTP Response Status Code Is 405 \ No newline at end of file + Check HTTP Response Status Code Is 405 + +PATCH Fault Management Individual Alarm with permitted authorization scope + [Documentation] Test ID: 8.3.3.2.9 + ... Test title: PATCH Fault Management 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.5.4.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: Alarm is modified. + PATCH Fault Management Individual Alarm with permitted authorization scope + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is AlarmModification + +PATCH Fault Management Individual Alarm with not permitted authorization scope + [Documentation] Test ID: 8.3.3.2.10 + ... Test title: PATCH Fault Management Individual Alarm with not permitted authorization scope + ... Test objective: The objective is to test that Modification of an individual alarm resource fails with not permitted authorization scope. + ... Pre-conditions: The related alarm exists + ... Reference: clause 7.5.4.3.4 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: Alarm is modified. + PATCH Fault Management Individual Alarm with not permitted authorization scope + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is AlarmModification \ No newline at end of file -- GitLab From 324935cee1f853b3f2216119e921699095b8750d Mon Sep 17 00:00:00 2001 From: "g.bernini" Date: Thu, 12 Sep 2024 11:27:01 +0200 Subject: [PATCH 4/5] added oauth scope tests for subscriptions --- .../FaultManagement-APIKeyword.robot | 22 ++++++++++++++++ .../Subscriptions.robot | 25 +++++++++++++++++++ .../environment/variables.txt | 2 ++ 3 files changed, 49 insertions(+) diff --git a/SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot b/SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot index 077205688..32b573718 100644 --- a/SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot +++ b/SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot @@ -307,6 +307,28 @@ GET Subscriptions GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} + +GET Subscriptions with permitted authorization scope + Log Get the list of active subscriptions + Set Headers {"Accept": "${ACCEPT}"} + ${scopeValue}= Create Dictionary scope=${SUBSCRIPTIONS_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +GET Subscriptions with not permitted authorization scope + Log Get the list of active subscriptions + Set Headers {"Accept": "${ACCEPT}"} + ${scopeValue}= Create Dictionary scope=${NOT_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} GET Subscriptions with filter Log Get the list of active subscriptions using a filter diff --git a/SOL009/NFVMANOFaultManagement-API/Subscriptions.robot b/SOL009/NFVMANOFaultManagement-API/Subscriptions.robot index 31d5adfc6..f2a65fa00 100644 --- a/SOL009/NFVMANOFaultManagement-API/Subscriptions.robot +++ b/SOL009/NFVMANOFaultManagement-API/Subscriptions.robot @@ -230,3 +230,28 @@ POST Create a new Fault Management alarm subscription - Unprocessable content POST Subscription with Unreachable callbackUri Check HTTP Response Status Code Is 422 Check HTTP Response Body Json Schema Is ProblemDetails + +Get list of alarm subscriptions with permitted authorization scope + [Documentation] Test ID: 8.3.3.3.18 + ... Test title: Retrieve a list of alarm subscriptions with permitted authorization scope + ... Test objective: The objective is to retrieve the list of active subscriptions with permitted authorization scope. + ... Pre-conditions: none + ... Reference: clause 7.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: noe + GET Subscriptions with permitted authorization scope + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is FmSubscriptions + +Get list of alarm subscriptions with not permitted authorization scope + [Documentation] Test ID: 8.3.3.3.19 + ... Test title: Retrieve a list of alarm subscriptions with not permitted authorization scope + ... Test objective: The objective is to test that retrieving the list of active subscriptions fails with not permitted authorization scope. + ... Pre-conditions: none + ... Reference: clause 7.5.5.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: noe + GET Subscriptions with not permitted authorization scope + Check HTTP Response Status Code Is 401 \ No newline at end of file diff --git a/SOL009/NFVMANOFaultManagement-API/environment/variables.txt b/SOL009/NFVMANOFaultManagement-API/environment/variables.txt index c62ca1f17..a982a46f5 100644 --- a/SOL009/NFVMANOFaultManagement-API/environment/variables.txt +++ b/SOL009/NFVMANOFaultManagement-API/environment/variables.txt @@ -14,6 +14,8 @@ ${BAD_AUTHORIZATION_TOKEN} Bear sometoken ${OAUTH_ENCRIPTION_ALGORITHM} HS256 ${ALAMRS_PERMITTED_SCOPE} nfvmanofm:v2:alarm_info ${ALARMS_NOT_PERMITTED_SCOPE} nfvmanofm:v2:alarm_info:readonly +${SUBSCRIPTIONS_PERMITTED_SCOPE} nfvmanofm:v2:subscriptions +${SUBSCRIPTIONS_NOT_PERMITTED_SCOPE} nfvmanofm:v2:subscriptions:readonly ${NOT_PERMITTED_SCOPE} nfvmanofm:v2:policies:invalid -- GitLab From 54d5658b999353e090d7889104030127aa95ec4c Mon Sep 17 00:00:00 2001 From: "g.bernini" Date: Thu, 12 Sep 2024 11:30:21 +0200 Subject: [PATCH 5/5] added oauth scope tests for individual subscriptions --- .../FaultManagement-APIKeyword.robot | 22 +++++++++++++++ .../IndividualSubscription.robot | 27 ++++++++++++++++++- .../environment/variables.txt | 1 - 3 files changed, 48 insertions(+), 2 deletions(-) diff --git a/SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot b/SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot index 32b573718..5a02292a4 100644 --- a/SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot +++ b/SOL009/NFVMANOFaultManagement-API/FaultManagement-APIKeyword.robot @@ -385,6 +385,28 @@ GET Individual Subscription Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${outputResponse}= Output response Set Global Variable @{response} ${outputResponse} + +GET Individual Subscription with permitted authorization scope + log Trying to get information about an individual subscription + Set Headers {"Accept":"${ACCEPT}"} + ${scopeValue}= Create Dictionary scope=${SUBSCRIPTIONS_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} + +GET Individual Subscription with not permitted authorization scope + log Trying to get information about an individual subscription + Set Headers {"Accept":"${ACCEPT}"} + ${scopeValue}= Create Dictionary scope=${NOT_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Authorization Token: ${authorizationToken} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + ${outputResponse}= Output response + Set Global Variable @{response} ${outputResponse} PUT Individual Subscription log Trying to perform a PUT. This method should not be implemented diff --git a/SOL009/NFVMANOFaultManagement-API/IndividualSubscription.robot b/SOL009/NFVMANOFaultManagement-API/IndividualSubscription.robot index 3e6e6b0d0..c6ad4f9a9 100644 --- a/SOL009/NFVMANOFaultManagement-API/IndividualSubscription.robot +++ b/SOL009/NFVMANOFaultManagement-API/IndividualSubscription.robot @@ -74,4 +74,29 @@ DELETE an individual subscription ... Post-Conditions: subscription is deleted DELETE Individual Subscription Check HTTP Response Status Code Is 204 - Check Individual Subscription deleted \ No newline at end of file + Check Individual Subscription deleted + +Get Information about an individual subscription with permitted authorization scope + [Documentation] Test ID: 8.3.3.4.7 + ... Test title: Get Information about an individual subscription with permitted authorization scope + ... Test objective: The objective is to read an individual subscription from NFV-MANO alarms subscribed by the client with permitted authorization scope + ... Pre-conditions: The subscription with the given id exists + ... Reference: clause 7.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET Individual Subscription with permitted authorization scope + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is FmSubscription + +Get Information about an individual subscription with not permitted authorization scope + [Documentation] Test ID: 8.3.3.4.7 + ... Test title: Get Information about an individual subscription with not permitted authorization scope + ... Test objective: The objective is to test that reading an individual subscription from NFV-MANO alarms subscribed by the client fails with not permitted authorization scope + ... Pre-conditions: The subscription with the given id exists + ... Reference: clause 7.5.6.3.2 - ETSI GS NFV-SOL 009 [7] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET Individual Subscription with not permitted authorization scope + Check HTTP Response Status Code Is 401 \ No newline at end of file diff --git a/SOL009/NFVMANOFaultManagement-API/environment/variables.txt b/SOL009/NFVMANOFaultManagement-API/environment/variables.txt index a982a46f5..068c4dff4 100644 --- a/SOL009/NFVMANOFaultManagement-API/environment/variables.txt +++ b/SOL009/NFVMANOFaultManagement-API/environment/variables.txt @@ -15,7 +15,6 @@ ${OAUTH_ENCRIPTION_ALGORITHM} HS256 ${ALAMRS_PERMITTED_SCOPE} nfvmanofm:v2:alarm_info ${ALARMS_NOT_PERMITTED_SCOPE} nfvmanofm:v2:alarm_info:readonly ${SUBSCRIPTIONS_PERMITTED_SCOPE} nfvmanofm:v2:subscriptions -${SUBSCRIPTIONS_NOT_PERMITTED_SCOPE} nfvmanofm:v2:subscriptions:readonly ${NOT_PERMITTED_SCOPE} nfvmanofm:v2:policies:invalid -- GitLab