diff --git a/SOL012/PolicyManagement-API/IndividualPolicy.robot b/SOL012/PolicyManagement-API/IndividualPolicy.robot index b6d5f1e3f4818e3a78fd943c1660603cdaacd0f1..badd0b5ceb1762f43afc89127ed1291d00fe1b26 100644 --- a/SOL012/PolicyManagement-API/IndividualPolicy.robot +++ b/SOL012/PolicyManagement-API/IndividualPolicy.robot @@ -8,7 +8,7 @@ POST Individual Policy - Method not implemented ... Test title: POST Individual Policy - Method not implemented ... Test objective: The objective is to test that POST method is not implemented. ... Pre-conditions: none - ... Reference: Clause 5.5.4.3.1 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.4.3.1 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -20,7 +20,7 @@ GET Information about an individual policy - Successful ... Test title: GET Information about an individual policy - Successful ... Test objective: The objective is to test the retrieval of Individual Policy and perform a JSON schema validation of the returned Policy data structure. ... Pre-conditions: At least one policy is available in the NFV-MANO. - ... Reference: Clause 5.5.4.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.4.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -33,7 +33,7 @@ GET Information about an individual policy - NOT FOUND ... Test title: GET Information about an individual policy - NOT FOUND ... Test objective: The objective is to test that the retrieval of individual policy fails when using an invalid resource identifier. ... Pre-conditions: At least one individual policy is available in the NFV-MANO. - ... Reference: Clause 5.5.8.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.8.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -46,7 +46,7 @@ PUT an individual policy - Method not implemented ... Test title: PUT an individual policy - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented. ... Pre-conditions: none - ... Reference: Clause 5.5.4.3.3 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.4.3.3 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -58,7 +58,7 @@ PATCH an individual policy - Successful ... Test title: PATCH an individual policy - Successful ... Test objective: The objective is to test that an individual policy is modified successfully when there is no conflict using PATCH method. ... Pre-conditions: There should not exist a conflict as described in Reference. - ... Reference: Clause 5.5.4.3.4 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.4.3.4 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -71,7 +71,7 @@ PATCH an individual policy - Conflict ... Test title: PATCH an individual policy - Conflict ... Test objective: The objective is to test that an individual policy is not modified when there is a conflict using PATCH method. ... Pre-conditions: There exists a conflict as described in Reference. - ... Reference: Clause 5.5.4.3.4 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.4.3.4 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -85,7 +85,7 @@ DELETE an individual policy - Successful ... Test title: DELETE an individual policy - Successful ... Test objective: The objective is to test that DELETE method deletes a deactivated individual policy. ... Pre-conditions: The activation status of individual policy to be deleted is not set to ACTIVATED. - ... Reference: Clause 5.5.8.3.5 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.8.3.5 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: The individual policy is not available anymore in the NFV-MANO. @@ -98,11 +98,36 @@ DELETE an individual policy - CONFLICT ... Test title: DELETE an individual policy - CONFLICT ... Test objective: The objective is to test that DELETE method does not delete an activated individual policy. ... Pre-conditions: The activation status of individual policy to be deleted is set to ACTIVATED. - ... Reference: Clause 5.5.8.3.5 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.8.3.5 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: The individual policy is not deleted. DELETE Individual Policy in status ACTIVATED Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - Check Postcondition Individual Policy is Not Deleted \ No newline at end of file + Check Postcondition Individual Policy is Not Deleted + +PATCH an individual policy with permitted authorization scope + [Documentation] Test ID: 10.3.1.3.9 + ... Test title: PATCH an individual policy with permitted authorization scope + ... Test objective: The objective is to test that an individual policy is modified successfully when a permitted authorization scope is used. + ... Pre-conditions: There should not exist a conflict as described in Reference. + ... Reference: Clause 5.5.4.3.4 - ETSI GS NFV-SOL 012 [9] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + PATCH Individual Policy with permitted authorization scope + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PolicyModifications + +PATCH an individual policy with permitted authorization scope + [Documentation] Test ID: 10.3.1.3.10 + ... Test title: PATCH an individual policy with not permitted authorization scope + ... Test objective: The objective is to test that an individual policy is not modified when a not permitted authorization scope is used. + ... Pre-conditions: There should not exist a conflict as described in Reference. + ... Reference: Clause 5.5.4.3.4 - ETSI GS NFV-SOL 012 [9] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + PATCH Individual Policy with not permitted authorization scope + Check HTTP Response Status Code Is 401 \ No newline at end of file diff --git a/SOL012/PolicyManagement-API/IndividualSubscription.robot b/SOL012/PolicyManagement-API/IndividualSubscription.robot index 82755dae1e90db8527376abe4d982af6942b3381..5d870bf09cefa316158d3d761d1bdf75c4b565b3 100644 --- a/SOL012/PolicyManagement-API/IndividualSubscription.robot +++ b/SOL012/PolicyManagement-API/IndividualSubscription.robot @@ -8,7 +8,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 implemented for this resource. ... Pre-conditions: none - ... Reference: Clause 5.5.8.3.1 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.8.3.1 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -20,7 +20,7 @@ GET Information about an individual subscription - Successful ... Test title: GET Information about an individual subscription - Successful ... Test objective: The objective is to test the retrieval of Policy Management subscription and perform a JSON schema validation of the returned PolicySubscription data structure ... Pre-conditions: At least one policy management subscription is available in the NFV-MANO. - ... Reference: Clause 5.5.8.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.8.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -33,7 +33,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 the retrieval of individual Policy Management subscription fails when using an invalid resource identifier. ... Pre-conditions: At least one Policy Management subscription is available in the NFV-MANO. - ... Reference: Clause 5.5.8.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.8.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -46,7 +46,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 implemented for this resource. ... Pre-conditions: none - ... Reference: Clause 5.5.8.3.3 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.8.3.3 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -58,7 +58,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 implemented for this resource. ... Pre-conditions: none - ... Reference: Clause 5.5.8.3.4 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.8.3.4 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -70,10 +70,35 @@ DELETE an individual subscription ... Test title: DELETE an individual subscription ... Test objective: The objective is to test that DELETE method deletes an individual subscription ... Pre-conditions: At least one policy management subscription is available in the NFV-MANO. - ... Reference: Clause 5.5.8.3.5 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.8.3.5 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: The Policy Management subscription is no longer available in the NFV-MANO. DELETE Individual Subscription Check HTTP Response Status Code Is 204 - Check Postcondition Individual Subscription is Deleted \ No newline at end of file + Check Postcondition Individual Subscription is Deleted + +GET Information about an individual subscription with permitted authorization scope + [Documentation] Test ID: 10.3.1.7.7 + ... Test title: GET Information about an individual subscription with permitted authorization scope + ... Test objective: The objective is to test the retrieval of Policy Management subscription when a permitted authorization scope is used. + ... Pre-conditions: At least one policy management subscription is available in the NFV-MANO. + ... Reference: Clause 5.5.8.3.2 - ETSI GS NFV-SOL 012 [9] 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 PolicySubscription + +GET Information about an individual subscription with not permitted authorization scope + [Documentation] Test ID: 10.3.1.7.8 + ... Test title: GET Information about an individual subscription with not permitted authorization scope + ... Test objective: The objective is to test that retrieval of Policy Management subscription fails when a not permitted authorization scope is used. + ... Pre-conditions: At least one policy management subscription is available in the NFV-MANO. + ... Reference: Clause 5.5.8.3.2 - ETSI GS NFV-SOL 012 [9] 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/SOL012/PolicyManagement-API/NotificationEndpoint.robot b/SOL012/PolicyManagement-API/NotificationEndpoint.robot index 48089c6547c208a4345a3c64ae31c85aa3a39242..ae7efc4b3e2ee5b0d0d59788aeaac71198b03682 100644 --- a/SOL012/PolicyManagement-API/NotificationEndpoint.robot +++ b/SOL012/PolicyManagement-API/NotificationEndpoint.robot @@ -9,7 +9,7 @@ Policy Change Notification ... Test title: Policy Change Notification ... Test objective: The objective is to test that Policy Change Notification is delivered with success to the notification consumer. ... Pre-conditions: A subscription for policy change notification is available in the NFV-MANO. - ... Reference: Clause 5.5.9.3.1 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.9.3.1 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none @@ -21,7 +21,7 @@ Policy Conflict Notification ... Test title: Policy Conflict Notification ... Test objective: The objective is to test that Policy Conflict Notification is delivered with success to the notification consumer. ... Pre-conditions: A subscription for policy conflict notification is available in the NFV-MANO. - ... Reference: Clause 5.5.9.3.1 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.9.3.1 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none @@ -33,7 +33,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 5.5.9.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.9.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none @@ -45,7 +45,7 @@ Test the Notification Endpoint - UNREACHABLE ... Test title: Test the Notification Endpoint - UNREACHABLE ... 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 5.5.7.3.1 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.7.3.1 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: The notification endpoint is unreachable by the API producer. ... Post-Conditions: none @@ -58,7 +58,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 5.5.9.3.3 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.9.3.3 - ETSI GS NFV-SOL 012 [9] v4.5.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 5.5.9.3.4 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.9.3.4 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none @@ -82,7 +82,7 @@ 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 5.5.9.3.5 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.9.3.5 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none diff --git a/SOL012/PolicyManagement-API/Notifications.robot b/SOL012/PolicyManagement-API/Notifications.robot index 0ef06146979b0e4ad47c0d4a90792e9362cb2cae..84c7d0b2d431315c84990cad8ff336d5918f2808 100644 --- a/SOL012/PolicyManagement-API/Notifications.robot +++ b/SOL012/PolicyManagement-API/Notifications.robot @@ -13,7 +13,7 @@ Policy Change Notification ... Test title: Policy Change Notification ... Test objective: The objective is to test the dispatch of Policy Change Notification when the policy is changed, 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 subscription for policy change notification is available in the NFV-MANO. - ... Reference: Clause 5.5.9.3.1 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.9.3.1 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -26,7 +26,7 @@ Policy Conflict Notification ... Test title: Policy Conflict Notification ... Test objective: The objective is to test the dispatch of Policy Conflict Notification when a conflict in policy is detected, 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 subscription for policy conflict notification is available in the NFV-MANO. - ... Reference: Clause 5.5.9.3.1 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.9.3.1 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none diff --git a/SOL012/PolicyManagement-API/ParticularVersionOfAnIndividualPolicy.robot b/SOL012/PolicyManagement-API/ParticularVersionOfAnIndividualPolicy.robot index 464523ad8044b5433f62dc4ad8a182f5bc55e490..8d91316ea7dde866faca1961d013549f82f71646 100644 --- a/SOL012/PolicyManagement-API/ParticularVersionOfAnIndividualPolicy.robot +++ b/SOL012/PolicyManagement-API/ParticularVersionOfAnIndividualPolicy.robot @@ -8,7 +8,7 @@ POST Particular Version of an Individual Policy - Method not implemented ... Test title: POST Particular Version of an Individual Policy - Method not implemented ... Test objective: The objective is to test that POST method is not implemented for this resource. ... Pre-conditions: none - ... Reference: Clause 5.5.6.3.1 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.6.3.1 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -20,7 +20,7 @@ GET Information about a Particular Version of an Individual Policy - Successful ... Test title: GET Information about a Particular Version of an Individual Policy - Successful ... Test objective: The objective is to test that GET method fetches the content of a particular version of an individual policy. ... Pre-conditions: Individual policy is available in the NFV-MANO. Policy contents are provided in the json/PolicyContent folder. - ... Reference: Clause 5.5.6.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.6.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: The policy content type is either JSON, YAML or ZIP. ... Post-Conditions: none @@ -33,7 +33,7 @@ GET Information about a Particular Version of an Individual Policy - NOT FOUND ... Test title: GET Information about a Particular Version of an Individual Policy - NOT FOUND ... Test objective: The objective is to test that the information about a particular version of an individual policy fails when using an invalid resource identifier. ... Pre-conditions: none - ... Reference: Clause 5.5.6.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.6.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -46,7 +46,7 @@ PUT Particular Version of an individual policy - Successful ... Test title: PUT Particular Version of an individual policy - Successful ... Test objective: The objective is to test that the PUT method transfers the content of a particular version of an individual policy. ... Pre-conditions: none - ... Reference: Clause 5.5.6.3.3 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.6.3.3 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: The policy content type is either JSON, YAML or ZIP. ... Post-Conditions: none @@ -58,7 +58,7 @@ PUT Particular Version of an individual policy - CONFLICT ... Test title: PUT Particular Version of an individual policy - CONFLICT ... Test objective: The objective is to test that the PUT method does not transfer the content of a particular version in case of a conflict. ... Pre-conditions: The particular version has already been transferred to the API producer. - ... Reference: Clause 5.5.6.3.3 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.6.3.3 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: The policy content type is either JSON, YAML or ZIP. ... Post-Conditions: none @@ -71,7 +71,7 @@ PATCH Particular Version of an individual policy - Method not implemented ... Test title: PATCH Particular Version of an individual policy - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented for this resource. ... Pre-conditions: none - ... Reference: Clause 5.5.6.3.4 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.6.3.4 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -83,7 +83,7 @@ DELETE Particular Version of an individual policy - Successful ... Test title: DELETE Particular Version of an individual policy - Successful ... Test objective: The objective is to test that the DELETE method deletes a particular version of an individual policy. ... Pre-conditions: none - ... Reference: Clause 5.5.6.3.5 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.6.3.5 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -95,10 +95,34 @@ DELETE Particular Version of an individual policy - CONFLICT ... Test title: DELETE Particular Version of an individual policy - CONFLICT ... Test objective: The objective is to test that the DELETE method does not delete a particular version of an individual policy in case of a conflict. ... Pre-conditions: The requested version of the individual policy is the selected version. - ... Reference: Clause 5.5.6.3.5 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.6.3.5 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none DELETE Particular Version of an Individual Policy Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails + +PUT Particular Version of an individual policy with permitted authorization scope + [Documentation] Test ID: 10.3.1.5.9 + ... Test title: PUT Particular Version of an individual policy with permitted authorization scope + ... Test objective: The objective is to test that the PUT method transfers the content of a particular version of an individual policy when a permitted authorization scope is used. + ... Pre-conditions: none + ... Reference: Clause 5.5.6.3.3 - ETSI GS NFV-SOL 012 [9] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: The policy content type is either JSON, YAML or ZIP. + ... Post-Conditions: none + PUT Particular Version of an Individual Policy with permitted authorization scope + Check HTTP Response Status Code Is 201 + +PUT Particular Version of an individual policy with not permitted authorization scope + [Documentation] Test ID: 10.3.1.5.10 + ... Test title: PUT Particular Version of an individual policy with not permitted authorization scope + ... Test objective: The objective is to test that the PUT method fails to transfer the content of a particular version of an individual policy when a not permitted authorization scope is used.. + ... Pre-conditions: none + ... Reference: Clause 5.5.6.3.3 - ETSI GS NFV-SOL 012 [9] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: The policy content type is either JSON, YAML or ZIP. + ... Post-Conditions: none + PUT Particular Version of an Individual Policy with not permitted authorization scope + Check HTTP Response Status Code Is 401 diff --git a/SOL012/PolicyManagement-API/Policies.robot b/SOL012/PolicyManagement-API/Policies.robot index 18c4837b501b82a952efc1ceabb9a9a3b90151b0..ee4fe887191e447c09349b7a62c05a4aef8a701b 100644 --- a/SOL012/PolicyManagement-API/Policies.robot +++ b/SOL012/PolicyManagement-API/Policies.robot @@ -8,7 +8,7 @@ POST Create a new Policy ... Test title: POST Create a new Policy ... Test objective: The objective is to test that POST method creates a policy. ... Pre-conditions: none - ... Reference: Clause 5.5.3.3.1 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.3.3.1 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: Policy is created. @@ -22,7 +22,7 @@ GET Policies ... Test title: GET Policies ... Test objective: The objective is to test that GET method retrieves the list of existing policies. ... Pre-conditions: none - ... Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -35,7 +35,7 @@ GET Policies - Filter ... Test title: GET Policies - Filter ... Test objective: The objective is to GET the list of existing policies using a filter. ... Pre-conditions: none - ... Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -48,7 +48,7 @@ GET Policies - Bad Request Invalid attribute-based filtering parameters ... Test title: GET Policies - Bad Request Invalid attribute-based filtering parameters ... Test objective: The objective is to GET the list of existing policies using an invalid filter. ... Pre-conditions: none - ... Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -61,7 +61,7 @@ GET Policies - Bad Request Response too Big ... Test title: GET Policies - Bad Request Response too Big ... Test objective: The objective is test that the retrieval of existing policies list fails because response is too big, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: none - ... Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: NFV-MANO does not support paged response. ... Post-Conditions: none @@ -74,7 +74,7 @@ GET Policies with "all_fields" attribute selector ... Test title: GET Policies with "all_fields" attribute selector ... Test objective: The objective is to retrieve the list of existing policies with "all_fields" attribute selector. ... Pre-conditions: none - ... Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -87,7 +87,7 @@ GET Policies with "exclude_default" attribute selector ... Test title: GET policies with "exclude_default" attribute selector ... Test objective: The objective is to retrieve the list of existing policies with "exclude_default"s attribute selector. ... Pre-conditions: none - ... Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -100,7 +100,7 @@ GET Policies with "fields" attribute selector ... Test title: GET Policies with "fields" attribute selector ... Test objective: The objective is to retrieve the list of existing policies with "fields" attribute selector. ... Pre-conditions: none - ... Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -113,7 +113,7 @@ GET Policies with "exclude_fields" attribute selector ... Test title: GET Policies with "exclude_fields" attribute selector ... Test objective: The objective is to retrieve the list of existing policies with "exclude_fields" attribute selector. ... Pre-conditions: none - ... Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -126,7 +126,7 @@ GET Policies with "exclude_default" and "fields" attribute selector ... Test title: GET Policies with "exclude_default" and "fields" attribute selector ... Test objective: The objective is to retrieve the list of existing policies with "exclude_default" and "fields" attribute selector ... Pre-conditions: - ... Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -139,7 +139,7 @@ GET Policies as Paged Response ... Test title: GET Policies as Paged Response ... Test objective: The objective is to test that GET method retrieves the list of existing policies as paged response. ... Pre-conditions: none - ... Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.3.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: NFV-MANO supports paged response. ... Post-Conditions: none @@ -152,7 +152,7 @@ PUT Policies - Method not implemented ... Test title: PUT Policies - Method not implemented ... Test objective: The objective is to test that PUT method cannot modify policies. ... Pre-conditions: none - ... Reference: Clause 5.5.3.3.3 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.3.3.3 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -164,7 +164,7 @@ PATCH Policies - Method not implemented ... Test title: PATCH Policies - Method not implemented ... Test objective: The objective is to test that PATCH method cannot modify policies. ... Pre-conditions: none - ... Reference: Clause 5.5.3.3.4 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.3.3.4 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -176,10 +176,36 @@ DELETE Policies - Method not implemented ... Test title: DELETE Policies - Method not implemented ... Test objective: The objective is to test that DELETE method cannot delete policies. ... Pre-conditions: none - ... Reference: Clause 5.5.3.3.5 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.3.3.5 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: Policies are not deleted DELETE Policies Check HTTP Response Status Code Is 405 Check Postcondition Policies Exist + +POST Create a new Policy with permitted authorization scope + [Documentation] Test ID: 10.3.1.2.15 + ... Test title: POST Create a new Policy with permitted authorization scope + ... Test objective: The objective is to test that POST method creates a policy with permitted authorization scope. + ... Pre-conditions: none + ... Reference: Clause 5.5.3.3.1 - ETSI GS NFV-SOL 012 [9] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: Policy is created. + POST Policies with permitted authorization scope + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is Policy + Check HTTP Response Header Contains Location + +POST Create a new Policy with not permitted authorization scope + [Documentation] Test ID: 10.3.1.2.16 + ... Test title: POST Create a new Policy with not permitted authorization scope + ... Test objective: The objective is to test that POST method to create a policy fails when a not permitted authorization scope is used. + ... Pre-conditions: none + ... Reference: Clause 5.5.3.3.1 - ETSI GS NFV-SOL 012 [9] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none. + POST Policies with not permitted authorization scope + Check HTTP Response Status Code Is 401 \ No newline at end of file diff --git a/SOL012/PolicyManagement-API/PolicyManagementKeywords.robot b/SOL012/PolicyManagement-API/PolicyManagementKeywords.robot index b6fd1f0e88eb2b072ca01b4dee311c60592e1be8..bddba0dea153447924ab6517f05dfc047f081ca7 100644 --- a/SOL012/PolicyManagement-API/PolicyManagementKeywords.robot +++ b/SOL012/PolicyManagement-API/PolicyManagementKeywords.robot @@ -7,6 +7,7 @@ Library JSONSchemaLibrary schemas/ Library String Library MockServerLibrary Library Process +Library jwt *** Keywords *** Create Sessions @@ -199,6 +200,32 @@ GET Subscriptions Get ${apiRoot}/${apiName}/${apiVersion}/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}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + ${scopeValue}= Create Dictionary scope=${SUBSCRIPTIONS_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Log Authorization Token: ${authorizationToken} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/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}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + ${scopeValue}= Create Dictionary scope=${NOT_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Log Authorization Token: ${authorizationToken} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Log Execute Query and validate response + Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} Get subscriptions with all_fields attribute selector Log Get the list of active subscriptions, using fields @@ -305,6 +332,28 @@ GET Individual subscription Get ${apiRoot}/${apiName}/${apiVersion}/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} + Log Authorization Token: ${authorizationToken} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Get ${apiRoot}/${apiName}/${apiVersion}/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} + Log Authorization Token: ${authorizationToken} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Get ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} GET Individual subscription with Invalid URI log Trying to get information about an individual subscription with invalid subscription ID @@ -427,6 +476,32 @@ POST Policies ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} +POST Policies with permitted authorization scope + Log Create policy instance by POST to ${apiRoot}/${apiName}/${apiVersion}/policies + ${scopeValue}= Create Dictionary scope=${POLICIES_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Log Authorization Token: ${authorizationToken} + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + ${body}= Get File jsons/CreatePolicyRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/policies ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST Policies with not permitted authorization scope + Log Create policy instance by POST to ${apiRoot}/${apiName}/${apiVersion}/policies + ${scopeValue}= Create Dictionary scope=${POLICIES_NOT_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Log Authorization Token: ${authorizationToken} + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + ${body}= Get File jsons/CreatePolicyRequest.json + Post ${apiRoot}/${apiName}/${apiVersion}/policies ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + GET Policies Log Get the list of existing policies Set Headers {"Accept":"${ACCEPT}"} @@ -573,6 +648,32 @@ PATCH Individual Policy Patch ${apiRoot}/${apiName}/${apiVersion}/policies/${policyId} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + +PATCH Individual Policy with permitted authorization scope + Log Modify individual policy instance by PATCH to ${apiRoot}/${apiName}/${apiVersion}/policies/${policyId} + ${scopeValue}= Create Dictionary scope=${POLICIES_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Log Authorization Token: ${authorizationToken} + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + ${body}= Get File jsons/PolicyModifications.json + Patch ${apiRoot}/${apiName}/${apiVersion}/policies/${policyId} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH Individual Policy with not permitted authorization scope + Log Modify individual policy instance by PATCH to ${apiRoot}/${apiName}/${apiVersion}/policies/${policyId} + ${scopeValue}= Create Dictionary scope=${POLICIES_NOT_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Log Authorization Token: ${authorizationToken} + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + ${body}= Get File jsons/PolicyModifications.json + Patch ${apiRoot}/${apiName}/${apiVersion}/policies/${policyId} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} DELETE Individual Policy log Trying to delete an individual policy, no conflict @@ -630,7 +731,29 @@ GET Selected Version of an Individual Policy Get ${apiRoot}/${apiName}/${apiVersion}/policies/${policyId}/selected_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} + +GET Selected Version of an Individual Policy with permitted authorization scope + log Trying to get information about the selected version of an individual policy + ${scopeValue}= Create Dictionary scope=${SELECTED_VERSION_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Log Authorization Token: ${authorizationToken} + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Get ${apiRoot}/${apiName}/${apiVersion}/policies/${policyId}/selected_version + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} +GET Selected Version of an Individual Policy with not permitted authorization scope + log Trying to get information about the selected version of an individual policy + ${scopeValue}= Create Dictionary scope=${NOT_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Log Authorization Token: ${authorizationToken} + Set Headers {"Accept":"${ACCEPT}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + Get ${apiRoot}/${apiName}/${apiVersion}/policies/${policyId}/selected_version + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + GET Selected Version of an Individual Policy in CREATED state log Trying to get information about the selected version of an individual policy which is in CREATED state Set Headers {"Accept":"${ACCEPT}"} @@ -702,6 +825,34 @@ PUT Particular Version of an Individual Policy ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} +PUT Particular Version of an Individual Policy with permitted authorization scope + Log Using PUT method to transfer the content of a particular version of an individual policy. + Set Headers {"Accept":"${ACCEPT}"} + Determine Policy Content Type + Set Headers {"Content-Type": "${POLICY_CONTENT_TYPE}"} + ${scopeValue}= Create Dictionary scope=${VERSIONS_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Log Authorization Token: ${authorizationToken} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + ${body}= Get File ${POLICY_CONTENT_FILENAME} + Put ${apiRoot}/${apiName}/${apiVersion}/policies/${policyId}/versions/${policyVersion} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT Particular Version of an Individual Policy with not permitted authorization scope + Log Using PUT method to transfer the content of a particular version of an individual policy. + Set Headers {"Accept":"${ACCEPT}"} + Determine Policy Content Type + Set Headers {"Content-Type": "${POLICY_CONTENT_TYPE}"} + ${scopeValue}= Create Dictionary scope=${VERSIONS_NOT_PERMITTED_SCOPE} + ${authorizationToken}= JWT Encode payload=${scopeValue} key='' algorithm=${OAUTH_ENCRIPTION_ALGORITHM} + Log Authorization Token: ${authorizationToken} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + ${body}= Get File ${POLICY_CONTENT_FILENAME} + Put ${apiRoot}/${apiName}/${apiVersion}/policies/${policyId}/versions/${policyVersion} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + PUT Particular Version of an Individual Policy CONFLICT Log Using PUT method to transfer the content of a particular version of an already transferred policy. Set Headers {"Accept":"${ACCEPT}"} @@ -741,4 +892,9 @@ Check that the Content-Type Header Is Set Determine Policy Content Type Log Validating content type Should Be Equal ${response['headers']['Content-Type']} ${POLICY_CONTENT_TYPE} - Log Content Type validated \ No newline at end of file + Log Content Type validated + +JWT Encode + [Arguments] ${payload} ${key} ${algorithm} + ${encoded}= Evaluate jwt.encode(${payload}, ${key}, ${algorithm}) + [Return] ${encoded} \ No newline at end of file diff --git a/SOL012/PolicyManagement-API/SelectedVersionOfAnIndividualPolicy.robot b/SOL012/PolicyManagement-API/SelectedVersionOfAnIndividualPolicy.robot index 7394c56d416a304297ade3f04865634bc5384544..f993f768bc79282c9e2095173fced9c612836363 100644 --- a/SOL012/PolicyManagement-API/SelectedVersionOfAnIndividualPolicy.robot +++ b/SOL012/PolicyManagement-API/SelectedVersionOfAnIndividualPolicy.robot @@ -8,7 +8,7 @@ POST Selected Version of an Individual Policy - Method not implemented ... Test title: POST Selected Version of an Individual Policy - Method not implemented ... Test objective: The objective is to test that POST method is not implemented for this resource. ... Pre-conditions: none - ... Reference: Clause 5.5.5.3.1 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.5.3.1 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -20,7 +20,7 @@ GET Information about the Selected Version of an Individual Policy - Successful ... Test title: GET Information about the Selected Version of an Individual Policy - Successful ... Test objective: The objective is to test The GET method fetches contents of the selected version of an individual policy and check that the HTTP Content-Type header is set according to the type of content. ... Pre-conditions: Individual policy is available in the NFV-MANO. Policy contents are provided in the json/PolicyContent folder. - ... Reference: Clause 5.5.5.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.5.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: The policy content type is either JSON, YAML or ZIP. ... Post-Conditions: none @@ -33,7 +33,7 @@ GET Information about the Selected Version of an Individual Policy - NOT FOUND ... Test title: GET Information about the Selected Version of an Individual Policy - NOT FOUND ... Test objective: The objective is to test that the information about the selected version of an individual policy fails when using an invalid resource identifier. ... Pre-conditions: The API producer did not find the current representation for the target resource. - ... Reference: Clause 5.5.5.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.5.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -46,7 +46,7 @@ GET Information about the Selected Version of an Individual Policy - CREATED STA ... Test title: GET Information about the Selected Version of an Individual Policy - NOT FOUND ... Test objective: The objective is to test that the information about the selected version of an individual policy is not retrieved when it is in CREATED state. ... Pre-conditions: none - ... Reference: Clause 5.5.5.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.5.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -59,7 +59,7 @@ PUT Selected Version of an individual policy - Method not implemented ... Test title: PUT Selected Version of an individual policy - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented for this resource. ... Pre-conditions: none - ... Reference: Clause 5.5.5.3.3 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.5.3.3 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -71,7 +71,7 @@ PATCH Selected Version of an individual policy - Method not implemented ... Test title: PATCH Selected Version of an individual policy - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented for this resource. ... Pre-conditions: none - ... Reference: Clause 5.5.5.3.4 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.5.3.4 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -83,9 +83,34 @@ DELETE Selected Version of an individual policy - Method not implemented ... Test title: DELETE Selected Version of an individual policy - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented for this resource. ... Pre-conditions: none - ... Reference: Clause 5.5.5.3.5 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.5.3.5 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none DELETE Selected Version of an Individual Policy Check HTTP Response Status Code Is 405 + +GET Information about the Selected Version of an Individual Policy with permitted authorization scope + [Documentation] Test ID: 10.3.1.4.8 + ... Test title: GET Information about the Selected Version of an Individual Policy with permitted authorization scope + ... Test objective: The objective is to test The GET method fetches contents of the selected version of an individual policy when a permitted authorization scope is used. + ... Pre-conditions: Individual policy is available in the NFV-MANO. Policy contents are provided in the json/PolicyContent folder. + ... Reference: Clause 5.5.5.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: The policy content type is either JSON, YAML or ZIP. + ... Post-Conditions: none + GET Selected Version of an Individual Policy with permitted authorization scope + Check HTTP Response Status Code Is 200 + Check that the Content-Type Header Is Set + +GET Information about the Selected Version of an Individual Policy with not permitted authorization scope + [Documentation] Test ID: 10.3.1.4.9 + ... Test title: GET Information about the Selected Version of an Individual Policy with not permitted authorization scope + ... Test objective: The objective is to test the GET method fails to fetch a selected version of an individual policy when a not permitted authorization scope is used. + ... Pre-conditions: Individual policy is available in the NFV-MANO. Policy contents are provided in the json/PolicyContent folder. + ... Reference: Clause 5.5.5.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: The policy content type is either JSON, YAML or ZIP. + ... Post-Conditions: none + GET Selected Version of an Individual Policy with not permitted authorization scope + Check HTTP Response Status Code Is 401 diff --git a/SOL012/PolicyManagement-API/Subscriptions.robot b/SOL012/PolicyManagement-API/Subscriptions.robot index e45cfdf8ee4354921adcb4d657e07df7994a7c12..9908826ea8d86d94b761cb918b7e4351b06753ad 100644 --- a/SOL012/PolicyManagement-API/Subscriptions.robot +++ b/SOL012/PolicyManagement-API/Subscriptions.robot @@ -11,7 +11,7 @@ POST Create a new subscription ... Test title: POST Create a new subscription ... Test objective: The objective is to test that POST method creates a subscription. ... Pre-conditions: none - ... Reference: Clause 5.5.7.3.1 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.7.3.1 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: Policy subscription is created. @@ -26,7 +26,7 @@ POST Create a new Subscription - DUPLICATION NOT ALLOWED ... Test title: POST Create a new subscription - DUPLICATION NOT ALLOWED ... Test objective: The objective is to test that POST method cannot create a duplicate subscription. ... Pre-conditions: A subscription shall already exist. - ... Reference: Clause 5.5.7.3.1 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.7.3.1 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: Duplication is not supported by NFVMANO. ... Post-Conditions: Individual subscription resource returned in the location header is available. @@ -40,7 +40,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 correct error code is generated when data in the request body cannot be processed. ... Pre-conditions: none - ... Reference: Clause 5.5.7.3.1 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.7.3.1 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: Callback URI is not reachable by the API producer. ... Post-Conditions: none @@ -53,7 +53,7 @@ GET Subscriptions ... Test title: GET Subscriptions ... Test objective: The objective is to test that GET method retrieves the list of existing subscriptions. ... Pre-conditions: none - ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -66,7 +66,7 @@ GET Subscription - Filter ... Test title: GET Subscription - Filter ... Test objective: The objective is to GET the list of active subscriptions using a filter. ... Pre-conditions: none - ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -79,7 +79,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 GET the list of active subscriptions using an invalid filter. ... Pre-conditions: none - ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -92,7 +92,7 @@ GET subscriptions - Bad Request Response too Big ... Test title: GET subscriptions - Bad Request Response too Big ... Test objective: The objective is test that the retrieval of active subscriptions list fails because response is too big, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: none - ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: NFV-MANO does not support paged response. ... Post-Conditions: none @@ -105,7 +105,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 "all_fields" attribute selector ... Pre-conditions: none - ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -118,7 +118,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 "exclude_default"s attribute selector ... Pre-conditions: none - ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -131,7 +131,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 "fields" attribute selector ... Pre-conditions: none - ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -144,7 +144,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 "exclude_fields" attribute selector ... Pre-conditions: none - ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -157,7 +157,7 @@ GET Subscriptions as Paged Response ... Test title: GET Subscriptions as Paged Response ... Test objective: The objective is to test that GET method retrieves the list of existing subscriptions as paged response. ... Pre-conditions: none - ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: NFV-MANO supports paged response. ... Post-Conditions: none @@ -170,7 +170,7 @@ GET subscriptions with "exclude_default" and "fields" attribute selector ... Test title: GET subscriptions with "exclude_default" and "fields" attribute selector ... Test objective: The objective is to retrieve the list of active subscriptions with "exclude_default" and "fields" attribute selector ... Pre-conditions: - ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -183,7 +183,7 @@ PUT subscriptions - Method not implemented ... Test title: PUT subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method cannot modify a policy management subscription. ... Pre-conditions: none - ... Reference: Clause 5.5.7.3.3 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.7.3.3 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -195,7 +195,7 @@ PATCH subscriptions - Method not implemented ... Test title: PATCH subscriptions - Method not implemented ... Test objective: The objective is to test that PATCH method cannot modify a policy management subscription. ... Pre-conditions: none - ... Reference: Clause 5.5.7.3.4 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.7.3.4 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: none @@ -207,10 +207,35 @@ DELETE subscriptions - Method not implemented ... Test title: DELETE subscriptions - Method not implemented ... Test objective: The objective is to test that DELETE method cannot delete a policy management subscription. ... Pre-conditions: none - ... Reference: Clause 5.5.7.3.5 - ETSI GS NFV-SOL 012 [7] v4.4.1 + ... Reference: Clause 5.5.7.3.5 - ETSI GS NFV-SOL 012 [9] v4.5.1 ... Config ID: Config_prod_NFV-MANO ... Applicability: none ... Post-Conditions: Subscriptions are not deleted DELETE subscriptions Check HTTP Response Status Code Is 405 Check Postcondition Subscriptions Exist + +GET Subscriptions with permitted authorization scope + [Documentation] Test ID: 10.3.1.6.17 + ... Test title: GET Subscriptions with permitted authorization scope + ... Test objective: The objective is to test that GET method retrieves the list of existing subscriptions when a permitted authorization scope is used. + ... Pre-conditions: none + ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET Subscriptions with permitted authorization scope + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is subscriptions + +GET Subscriptions with not permitted authorization scope + [Documentation] Test ID: 10.3.1.6.18 + ... Test title: GET Subscriptions with not permitted authorization scope + ... Test objective: The objective is to test that GET method fails to retrieve the list of existing subscriptions when a not permitted authorization scope is used. + ... Pre-conditions: none + ... Reference: Clause 5.5.7.3.2 - ETSI GS NFV-SOL 012 [9] v4.5.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET Subscriptions with not permitted authorization scope + Check HTTP Response Status Code Is 401 \ No newline at end of file diff --git a/SOL012/PolicyManagement-API/environment/variables.txt b/SOL012/PolicyManagement-API/environment/variables.txt index edba991e99ddc7395f83ae250a20bf858c40efe5..8d6db9734b88c701af233e528cc5eceef00c2b92 100644 --- a/SOL012/PolicyManagement-API/environment/variables.txt +++ b/SOL012/PolicyManagement-API/environment/variables.txt @@ -4,6 +4,16 @@ ${NFVMANO_PORT} 8081 # Listening port of the NFVO ${NFVMANO_SCHEMA} https ${AUTHORIZATION_HEADER} Authorization ${AUTHORIZATION_TOKEN} Bearer QWxhZGRpbjpvcGVuIHNlc2FtZQ== + +${OAUTH_ENCRIPTION_ALGORITHM} HS256 +${POLICIES_PERMITTED_SCOPE} nfvpolicy:v2:policies +${POLICIES_NOT_PERMITTED_SCOPE} nfvpolicy:v2:policies:readonly +${SELECTED_VERSION_PERMITTED_SCOPE} nfvpolicy:v2:policies:selected_version +${NOT_PERMITTED_SCOPE} nfvpolicy:v2:policies:invalid +${VERSIONS_PERMITTED_SCOPE} nfvpolicy:v2:versions +${VERSIONS_NOT_PERMITTED_SCOPE} nfvpolicy:v2:versions:readonly +${SUBSCRIPTIONS_PERMITTED_SCOPE} nfvpolicy:v2:subscriptions + ${CONTENT_TYPE} application/json ${CONTENT_TYPE_JSON} application/json ${ACCEPT} application/json