diff --git a/SOL009/NFVMANOLogManagement-API/IndividualSubscription.robot b/SOL009/NFVMANOLogManagement-API/IndividualSubscription.robot index ce3f231f0d9a320daa4a1e2a1983409ac11c4d9b..65456e8fdc37d44a459830b7b3b7b9e71198b69e 100644 --- a/SOL009/NFVMANOLogManagement-API/IndividualSubscription.robot +++ b/SOL009/NFVMANOLogManagement-API/IndividualSubscription.robot @@ -32,6 +32,7 @@ GET Individual Subscription - invalid resource identifier ... Post-Conditions: none GET individual Subscription with invalid resource identifier Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails DELETE Individual Subscription [Documentation] Test ID: 8.3.4.6.3 diff --git a/SOL009/NFVMANOLogManagement-API/NFVMANOLogManagementKeywords.robot b/SOL009/NFVMANOLogManagement-API/NFVMANOLogManagementKeywords.robot index 6aedfe83ca50ce318f75f6e8afd45589ab3c43dc..b49ebc37a48a6d0c93947160a8d3549ab3afe2b4 100644 --- a/SOL009/NFVMANOLogManagement-API/NFVMANOLogManagementKeywords.robot +++ b/SOL009/NFVMANOLogManagement-API/NFVMANOLogManagementKeywords.robot @@ -418,6 +418,30 @@ Get Subscriptions with invalid attribute-based filters ${output}= Output response Set Suite Variable ${response} ${output} +Get subscriptions with filter "id" + Log Get the list of active subscriptions using a filter "id" + Set Headers {"Accept": "${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?id=${subscription_id} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check PostCondition HTTP Response Body Subscription Matches the requested attribute-based filter "id" + Should Be Equal As Strings ${response['body']['id']} ${subscription_id} + +Get subscriptions with filter "filter_notificationTypes" + Log Get the list of active subscriptions using a filter "filter.notificationTypes" + Set Headers {"Accept": "${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?filter.notificationTypes=${notification_type} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check PostCondition HTTP Response Body Subscriptions Matches the requested attribute-based filter "filter_notificationTypes" + :FOR ${item} IN @{response['body']} + Should Be Equal As Strings ${item['filter']['notificationTypes']} ${notification_type} + END + Send Post Request for Subscription Set headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set headers {"Accept": "${ACCEPT_JSON}"} diff --git a/SOL009/NFVMANOLogManagement-API/Subscriptions.robot b/SOL009/NFVMANOLogManagement-API/Subscriptions.robot index 1213076cf477638c9b2e3c18948dabcb5128f2bb..37bf29bc6629ffec5aae66b2af08500eedcc1a1b 100644 --- a/SOL009/NFVMANOLogManagement-API/Subscriptions.robot +++ b/SOL009/NFVMANOLogManagement-API/Subscriptions.robot @@ -63,7 +63,6 @@ GET Subscriptions - invalid attribute-based filter Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails - GET Subscriptions - Bad Request Response too Big [Documentation] Test ID: 8.3.4.5.5 ... Test title: GET Subscriptions - Bad Request Response too Big @@ -88,12 +87,41 @@ GET Subscriptions - invalid resource endpoint ... Post-Conditions: none Get all Subscriptions Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET Subscription with attribute-based filter "id" + [Documentation] Test ID: 8.3.4.5.7 + ... 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 8.5.7.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Get subscriptions with filter "id" + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is LogmSubscription + Check PostCondition HTTP Response Body Subscription Matches the requested attribute-based filter "id" + +Get subscriptions with filter "filter.notificationTypes" + [Documentation] Test ID: 8.3.4.5.8 + ... 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 8.5.7.3.2 - ETSI GS NFV-SOL 009 [6] V3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + Get subscriptions with filter "filter_notificationTypes" + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is LogmSubscriptions + Check PostCondition HTTP Response Body Subscriptions Matches the requested attribute-based filter "filter_notificationTypes" Create new Subscription - [Documentation] Test ID 8.3.4.5.7 + [Documentation] Test ID 8.3.4.5.9 ... Test title: Create new Subscription ... Test objective: The objective is to test the creation of a new subscription to log management notification and perform a JSON schema and content validation of the returned subscription data structure - ... Pre-conditions: + ... Pre-conditions: none ... Reference: clause 8.5.7.3.1 - ETSI GS NFV-SOL 009 [6] V3.3.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none @@ -106,7 +134,7 @@ Create new Subscription Create request for duplicated Subscription not creating duplicated subscriptions [Tags] no-duplicated-subs - [Documentation] Test ID 8.3.4.5.8 + [Documentation] Test ID 8.3.4.5.10 ... Test title: Create request for duplicated Subscription not creating duplicated subscriptions ... Test objective: The objective is to test the attempt of a creation of a duplicated subscription failed and check that no new subscription is created and a link to the original subscription is returned ... Pre-conditions: At least one subscription is available in the NFV-MANO. @@ -122,7 +150,7 @@ Create request for duplicated Subscription not creating duplicated subscriptions Create request for duplicated Subscription creating duplicated subscriptions [Tags] duplicated-subs - [Documentation] Test ID 8.3.4.5.9 + [Documentation] Test ID 8.3.4.5.11 ... Test title: Create request for duplicated Subscription creating duplicated subscriptions ... Test objective: The objective is to test the creation of a duplicated subscription and perform a JSON schema and content validation of the returned duplicated subscription data structure ... Pre-conditions: At least one subscription is available in the NFV-MANO. @@ -137,7 +165,7 @@ Create request for duplicated Subscription creating duplicated subscriptions Check Postcondition Subscription Is Set PUT Subscriptions - Method not implemented - [Documentation] Test ID 8.3.4.5.10 + [Documentation] Test ID 8.3.4.5.12 ... Test title: PUT Subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify subscriptions ... Pre-conditions: none @@ -149,7 +177,7 @@ PUT Subscriptions - Method not implemented Check HTTP Response Status Code Is 405 PATCH Subscriptions - Method not implemented - [Documentation] Test ID 8.3.4.5.11 + [Documentation] Test ID 8.3.4.5.13 ... Test title: PATCH Subscriptions - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update subscriptions ... Pre-conditions: none @@ -161,7 +189,7 @@ PATCH Subscriptions - Method not implemented Check HTTP Response Status Code Is 405 DELETE Subscriptions - Method not implemented - [Documentation] Test ID 8.3.4.5.12 + [Documentation] Test ID 8.3.4.5.14 ... Test title: DELETE Subscriptions - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete subscriptions ... Pre-conditions: none diff --git a/SOL009/NFVMANOLogManagement-API/environment/variables.txt b/SOL009/NFVMANOLogManagement-API/environment/variables.txt index 4a30d550ac4686d700b404262d71aa3e560a38b6..82c8646ff8ad555bb371ee2b8a187c71c70a9587 100644 --- a/SOL009/NFVMANOLogManagement-API/environment/variables.txt +++ b/SOL009/NFVMANOLogManagement-API/environment/variables.txt @@ -62,4 +62,5 @@ ${subscriptionId} 17563e75-0e14-4bd7-94b4-6bbb869c79aa ${erroneousSubscriptionId} erroneousSubscriptionId ${newSubscriptionId} newSubsciptionId -${objectInstanceId} 4bd7-94b4-6bbb86-9c79aa \ No newline at end of file +${objectInstanceId} 4bd7-94b4-6bbb86-9c79aa +${notification_type} LogReportAvailableNotification \ No newline at end of file