From aced8e070f904107609db8c9b8697d456629973f Mon Sep 17 00:00:00 2001 From: uihassan Date: Thu, 3 Sep 2020 16:29:55 +0500 Subject: [PATCH 01/11] new test case added for SOL003 VNFIndicator Subsriptions --- SOL003/VNFIndicator-API/Subscriptions.robot | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/SOL003/VNFIndicator-API/Subscriptions.robot b/SOL003/VNFIndicator-API/Subscriptions.robot index e9eeed23f..628e3a19a 100644 --- a/SOL003/VNFIndicator-API/Subscriptions.robot +++ b/SOL003/VNFIndicator-API/Subscriptions.robot @@ -173,3 +173,16 @@ GET VNF Indicator Subscriptions - Bad Request Response too Big Get All VNF Indicators Subscriptions Check HTTP Response Status Code Is 400 Check HTTP Response Body Json Schema Is ProblemDetails + +POST Create a new Subscription - Unprocessable Entity + [Documentation] Test ID: 7.3.6.4.13 + ... Test title: POST Create a new Subscription - Unprocessable Entity + ... Test objective: The objective is to test that content type of the payload body is supported and the payload body of a request contains syntactically correct data but the data cannot be processed. + ... re-conditions: none + ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Send Post Request for VNF Indicator Subscription + Check HTTP Response Status Code Is 422 + Check HTTP Response Body Json Schema Is ProblemDetails -- GitLab From 26fefaf4f70cbf5b0a925b4034340d25fb7bce08 Mon Sep 17 00:00:00 2001 From: uihassan Date: Fri, 9 Oct 2020 10:54:23 +0500 Subject: [PATCH 02/11] refernce updated --- SOL003/VNFIndicator-API/ApiVersion.robot | 20 +++++++------- .../IndividualSubscription.robot | 14 +++++----- .../IndividualVNFindicator.robot | 14 +++++----- SOL003/VNFIndicator-API/Subscriptions.robot | 26 +++++++++---------- SOL003/VNFIndicator-API/VNFIndicators.robot | 26 +++++++++---------- .../VnfIndicatorNotification.robot | 2 +- .../VnfIndicatorsInVnfInstanceId.robot | 20 +++++++------- 7 files changed, 61 insertions(+), 61 deletions(-) diff --git a/SOL003/VNFIndicator-API/ApiVersion.robot b/SOL003/VNFIndicator-API/ApiVersion.robot index 86dbd9074..856e31ed0 100644 --- a/SOL003/VNFIndicator-API/ApiVersion.robot +++ b/SOL003/VNFIndicator-API/ApiVersion.robot @@ -13,7 +13,7 @@ POST API Version - Method not implemented ... Test title: POST API version - Method not implemented ... Test objective: The objective is to test that POST method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -25,7 +25,7 @@ GET API Version ... Test title: GET API Version ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -38,7 +38,7 @@ PUT API Version - Method not implemented ... Test title: PUT API Version - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -50,7 +50,7 @@ PATCH API Version - Method not implemented ... Test title: PATCH API Version - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -62,7 +62,7 @@ DELETE API Version - Method not implemented ... Test title: DELETE API Version - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -74,7 +74,7 @@ POST API Version with apiMajorVerion - Method not implemented ... Test title: POST API version with apiMajorVerion - Method not implemented ... Test objective: The objective is to test that POST method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -86,7 +86,7 @@ GET API Version with apiMajorVerion ... Test title: GET API Version with apiMajorVerion ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -99,7 +99,7 @@ PUT API Version with apiMajorVerion - Method not implemented ... Test title: PUT API Version with apiMajorVerion - Method not implemented ... Test objective: The objective is to test that PUT method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -111,7 +111,7 @@ PATCH API Version with apiMajorVerion - Method not implemented ... Test title: PATCH API Version with apiMajorVerion - Method not implemented ... Test objective: The objective is to test that PATCH method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -123,7 +123,7 @@ DELETE API Version with apiMajorVerion - Method not implemented ... Test title: DELETE API Version with apiMajorVerion - Method not implemented ... Test objective: The objective is to test that DELETE method is not implemented ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.6.1 + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none diff --git a/SOL003/VNFIndicator-API/IndividualSubscription.robot b/SOL003/VNFIndicator-API/IndividualSubscription.robot index 161a48b87..0f83d27b3 100644 --- a/SOL003/VNFIndicator-API/IndividualSubscription.robot +++ b/SOL003/VNFIndicator-API/IndividualSubscription.robot @@ -12,7 +12,7 @@ GET Individual VNF Indicator Subscription ... Test title: GET Individual VNF Indicator Subscription ... Test objective: The objective is to test the retrieval of individual VNF indicator subscription and perform a JSON schema validation of the returned subscription data structure ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -25,7 +25,7 @@ GET Individual VNF Indicator Subscription with invalid resource identifier ... Test title: GET Individual VNF Indicator Subscription with invalid resource identifier ... Test objective: The objective is to test that the retrieval of individual VNF indicator subscription fails when using an invalid resource identifier. ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -37,7 +37,7 @@ DELETE Individual VNF Indicator Subscription ... Test title: DELETE Individual VNF Indicator Subscription ... Test objective: The objective is to test the deletion of an individual VNF indicator subscription. ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The subscription to VNF indicators is deleted @@ -50,7 +50,7 @@ DELETE Individual VNF Indicator Subscription with invalid resource identifier ... Test title: DELETE Individual VNF Indicator Subscription with invalid resource identifier ... Test objective: The objective is to test that the deletion of an individual VNF indicator subscription fails when using an invalid resource identifier. ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -62,7 +62,7 @@ PUT Individual VNF Indicator Subscription - Method not implemented ... Test title: PUT Individual VNF Indicator Subscription - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify an individual VNF indicator subscription ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.6.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.6.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The individual VNF indicator subscription is not modified by the operation @@ -75,7 +75,7 @@ PATCH Individual VNF Indicator Subscription - Method not implemented ... Test title: PATCH Individual VNF Indicator Subscription - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update an individual VNF indicator subscription ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.6.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.6.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The individual VNF indicator subscription is not modified by the operation @@ -88,7 +88,7 @@ POST Individual VNF Indicator Subscription - Method not implemented ... Test title: POST Individual VNF Indicator Subscription - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new VNF indicator subscription ... Pre-conditions: A VNF instance is instantiated. - ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The individual VNF indicator subscription is not created by the operation diff --git a/SOL003/VNFIndicator-API/IndividualVNFindicator.robot b/SOL003/VNFIndicator-API/IndividualVNFindicator.robot index c88c89903..be201072a 100644 --- a/SOL003/VNFIndicator-API/IndividualVNFindicator.robot +++ b/SOL003/VNFIndicator-API/IndividualVNFindicator.robot @@ -11,7 +11,7 @@ Get Individual Indicator for VNF Instance ... Test title: Get Individual Indicator for VNF Instance ... Test objective: The objective is to test the retrieval of an indicator for a given VNF instance and perform a JSON schema validation of the returned indicator data structure ... Pre-conditions: A VNF instance is instantiated. At least one measure of VNF indicator is available in the VNFM. - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -26,7 +26,7 @@ Get Individual Indicator for VNF Instance with invalid indicator identifier ... Test title: Get Individual Indicator for VNF Instance with invalid indicator identifier ... Test objective: The objective is to test that the retrieval of an indicator for a given VNF instance fails when using an invalid resource identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. At least one measure of VNF indicator is available in the VNFM. - ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -38,7 +38,7 @@ POST Individual VNF Indicator for VNF Instance - Method not implemented ... Test title: POST Individual VNF Indicator for VNF Instance - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new VNF indicator in the VNFM ... Pre-conditions: A VNF instance is instantiated. - ... Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -50,7 +50,7 @@ PUT Individual VNF Indicator for VNF Instance - Method not implemented ... Test title: PUT Individual VNF Indicator for VNF Instance - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify an existing indicator for a VNF instance ... Pre-conditions: A VNF instance is instantiated. At least one measure of VNF indicator is available in the VNFM - ... Reference: Clause 8.4.4.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.4.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -62,7 +62,7 @@ PATCH Individual VNF Indicator for VNF Instance - Method not implemented ... Test title: PATCH Individual VNF Indicator for VNF Instance - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update an existing indicator for a VNF instance ... Pre-conditions: A VNF instance is instantiated. At least one measure of VNF indicator is available for the given VNF instance. - ... Reference: Clause 8.4.4.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.4.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -74,10 +74,10 @@ DELETE Individual VNF Indicator for VNF Instance - Method not implemented ... Test title: DELETE Individual VNF Indicator for VNF Instance - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete an existing indicator for a VNF instance ... Pre-conditions: A VNF instance is instantiated. At least one measure of VNF indicator is available in the VNFM - ... Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The individual indicator for the VNF instance is not deleted by the unsuccessful operation + ... Post-Conditions: The individual indicator for the VNF instance is not deleted by the unsuccessful operations Send DELETE Request for individual indicator in VNF instance Check HTTP Response Status Code Is 405 Check Postcondition Indicator for VNF instance Exist \ No newline at end of file diff --git a/SOL003/VNFIndicator-API/Subscriptions.robot b/SOL003/VNFIndicator-API/Subscriptions.robot index 628e3a19a..251334e2b 100644 --- a/SOL003/VNFIndicator-API/Subscriptions.robot +++ b/SOL003/VNFIndicator-API/Subscriptions.robot @@ -17,7 +17,7 @@ GET All VNF Indicator Subscriptions ... Test title: GET All VNF Indicator Subscriptions ... Test objective: The objective is to test the retrieval of all VNF indicator subscriptions and perform a JSON schema validation of the returned subscriptions data structure ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -30,7 +30,7 @@ GET VNF Indicator Subscriptions with attribute-based filter ... Test title: GET VNF Indicator Subscriptions with attribute-based filter ... Test objective: The objective is to test the retrieval of VNF indicator subscriptions using attribute-based filter, perform a JSON schema validation of the collected indicators data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -44,7 +44,7 @@ GET VNF Indicator Subscriptions with invalid attribute-based filter ... Test title: GET VNF Indicator Subscriptions with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of VNF indicator subscriptions fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -57,7 +57,7 @@ GET VNF Indicator Subscriptions with invalid resource endpoint ... Test title: GET VNF Indicator Subscriptions with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of all VNF indicator subscriptions fails when using invalid resource endpoint. ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -69,7 +69,7 @@ Create new VNF indicator subscription ... Test title: Create new VNF indicator subscription ... Test objective: The objective is to test the creation of a new VNF indicator subscription and perform a JSON schema and content validation of the returned subscription data structure ... Pre-conditions: A VNF instance is instantiated. - ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF indicator subscription is successfully set and it matches the issued subscription @@ -85,7 +85,7 @@ Create duplicated VNF indicator subscription with VNFM not creating duplicated s ... Test title: Create duplicated VNF indicator subscription with VNFM not creating duplicated subscriptions ... Test objective: The objective is to test the attempt of a creation of a duplicated VNF indicator subscription and check that no new subscription is created by the VNFM and a link to the original subscription is returned ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNFM does not support the creation of duplicated subscriptions ... Post-Conditions: The existing VNF indicator subscription returned is available in the VNFM @@ -101,7 +101,7 @@ Create duplicated VNF indicator subscription with VNFM creating duplicated subsc ... Test title: Create duplicated VNF indicator subscription with VNFM creating duplicated subscriptions ... Test objective: The objective is to test the creation of a duplicated VNF indicator subscription and perform a JSON schema and content validation of the returned duplicated subscription data structure ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNFM supports the creation of duplicated subscriptions ... Post-Conditions: The duplicated VNF indicator subscription is successfully set and it matches the issued subscription @@ -116,7 +116,7 @@ PUT VNF Indicator Subscriptions - Method not implemented ... Test title: PUT VNF Indicator Subscriptions - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify VNF indicator subscriptions ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -128,7 +128,7 @@ PATCH VNF Indicator Subscriptions - Method not implemented ... Test title: PATCH VNF Indicator Subscriptions - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update VNF indicator subscriptions ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -140,7 +140,7 @@ DELETE VNF Indicator Subscriptions - Method not implemented ... Test title: DELETE VNF Indicator Subscriptions - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete VNF indicators subscriptions ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF indicator subscriptions are not deleted by the failed operation @@ -153,7 +153,7 @@ GET All VNF Indicator Subscriptions as Paged Response ... Test title: GET All VNF Indicator Subscriptions as Paged Response ... Test objective: The objective is to test the retrieval of all VNF indicator subscriptions as Paged Response. ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -166,7 +166,7 @@ GET VNF Indicator Subscriptions - Bad Request Response too Big ... Test title: GET VNF Indicator Subscriptions - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of VNF indicator subscriptions fails because reponse is too big, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. At least one VNF indicator subscription is available in the VNFM. - ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -179,7 +179,7 @@ POST Create a new Subscription - Unprocessable Entity ... Test title: POST Create a new Subscription - Unprocessable Entity ... Test objective: The objective is to test that content type of the payload body is supported and the payload body of a request contains syntactically correct data but the data cannot be processed. ... re-conditions: none - ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none diff --git a/SOL003/VNFIndicator-API/VNFIndicators.robot b/SOL003/VNFIndicator-API/VNFIndicators.robot index b215736ac..ca591ab98 100644 --- a/SOL003/VNFIndicator-API/VNFIndicators.robot +++ b/SOL003/VNFIndicator-API/VNFIndicators.robot @@ -12,7 +12,7 @@ Get all VNF Indicators ... Test title: Get all VNF Indicators ... Test objective: The objective is to test the retrieval of all the available VNF indicators and perform a JSON schema validation of the collected indicators data structure ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -25,7 +25,7 @@ Get VNF Indicators with attribute-based filter ... Test title: Get VNF Indicators with attribute-based filter ... Test objective: The objective is to test the retrieval of VNF indicators using attribute-based filter, perform a JSON schema validation of the collected indicators data structure, and verify that the retrieved information matches the issued attribute-based filters ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -39,7 +39,7 @@ Get VNF Indicators with invalid attribute-based filter ... Test title: Get VNF Indicators with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of VNF indicators fails when using invalid attribute-based filters, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -52,7 +52,7 @@ Get all VNF Indicators with malformed authorization token ... Test title: Get all VNF Indicators with malformed authorization token ... Test objective: The objective is to test that the retrieval of VNF indicators fails when using malformed authorization token ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNFM requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none @@ -64,7 +64,7 @@ Get all VNF Indicators without authorization token ... Test title: Get all VNF Indicators without authorization token ... Test objective: The objective is to test that the retrieval of VNF indicators fails when omitting the authorization token ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNF requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none @@ -76,7 +76,7 @@ GET all VNF Indicators with expired or revoked authorization token ... Test title: GET all VNF Indicators with expired or revoked authorization token ... Test objective: The objective is to test that the retrieval of VNF indicators fails when using expired or revoked authorization token ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNF requires the usage of access tokens for authorizing the API requests. ... Post-Conditions: none @@ -88,7 +88,7 @@ Get all VNF Indicators with invalid resource endpoint ... Test title: Get all VNF Indicators with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of VNF indicators fails when using invalid resource endpoint ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -100,7 +100,7 @@ POST all VNF Indicators - Method not implemented ... Test title: POST all VNF Indicators - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create new VNF indicators ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM - ... Reference: Clause 8.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -112,7 +112,7 @@ PUT all VNF Indicators - Method not implemented ... Test title: PUT all VNF Indicators - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify VNF indicators ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM - ... Reference: Clause 8.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -124,7 +124,7 @@ PATCH all VNF Indicators - Method not implemented ... Test title: PATCH all VNF Indicators - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update VNF indicators ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNF - ... Reference: Clause 8.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -136,7 +136,7 @@ DELETE all VNF Indicators - Method not implemented ... Test title: DELETE all VNF Indicators - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete VNF indicators ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNF - ... Reference: Clause 8.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF indicators are not deleted by the unsuccessful operation @@ -149,7 +149,7 @@ Get all VNF Indicators as Paged Response ... Test title: Get all VNF Indicators as Paged Response ... Test objective: The objective is to test the retrieval of all the available VNF indicators as Paged Response. ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -162,7 +162,7 @@ Get VNF Indicators - Bad Request Response too Big ... Test title: Get VNF Indicators - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of VNF indicators fails because reponse is too big, and perform the JSON schema validation of the failed operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM. - ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none diff --git a/SOL003/VNFIndicator-API/VnfIndicatorNotification.robot b/SOL003/VNFIndicator-API/VnfIndicatorNotification.robot index 057e7f1ef..79cd22af0 100644 --- a/SOL003/VNFIndicator-API/VnfIndicatorNotification.robot +++ b/SOL003/VNFIndicator-API/VnfIndicatorNotification.robot @@ -16,7 +16,7 @@ VNF Indicator Value Change Notification ... Test title: VNF Indicator Value Change Notification ... Test objective: The objective is to test the dispatch of VNF Indicator Value Change Notification when new indicator values are available in the VNFM, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A VNF is instantiated, and a subscription for indicator value change notifications is available in the VNFM. - ... Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none diff --git a/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot b/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot index a160eff47..2e6afb7c7 100644 --- a/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot +++ b/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot @@ -12,7 +12,7 @@ Get Indicators for VNF Instance ... Test title: Get Indicators for VNF Instance ... Test objective: The objective is to test the retrieval of all indicators for a given VNF instance and perform a JSON schema validation of the returned indicators data structure ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. - ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -26,7 +26,7 @@ GET Indicators for VNF Instance with attribute-based filter ... Test title: GET Indicators for VNF Instance with attribute-based filter ... Test objective: The objective is to test the retrieval of all indicators for a given VNF instance using attribute-based filter and perform a JSON schema validation of the returned indicators data structure ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. - ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -40,7 +40,7 @@ Get Indicators for VNF Instance with invalid attribute-based filter ... Test title: Get Indicators for VNF Instance with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of all indicators for a given VNF instance fails using invalid attribute-based filter. The test also checks the JSON schema of the unsuccessful operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. - ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -53,7 +53,7 @@ Get Indicators for VNF Instance with invalid resource identifier ... Test title: Get Indicators for VNF Instance with invalid resource identifier ... Test objective: The objective is to test that the retrieval of all indicators for a given VNF instance fails when using invalid resource identifier. The test also checks the JSON schema of the unsuccessful operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. - ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -66,7 +66,7 @@ POST Indicators for VNF instance - Method not implemented ... Test title: POST Indicators for VNF instance - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create new indicators for a VNF instance ... Pre-conditions: A VNF instance is instantiated. - ... Reference: Clause 8.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -78,7 +78,7 @@ PUT Indicators for VNF instance - Method not implemented ... Test title: PUT Indicators for VNF instance - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify existing indicators for a VNF instance ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. - ... Reference: Clause 8.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -90,7 +90,7 @@ PATCH Indicators for VNF instance - Method not implemented ... Test title: PATCH Indicators for VNF instance - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update existing indicators for a VNF instance ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. - ... Reference: Clause 8.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -102,7 +102,7 @@ DELETE Indicators for VNF instance - Method not implemented ... Test title: DELETE Indicators for VNF instance - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete indicators for a VNF instance ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. - ... Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The indicators for the VNF instance are not deleted by the unsuccessful operation @@ -115,7 +115,7 @@ Get Indicators for VNF Instance as Paged Response ... Test title: Get Indicators for VNF Instance as Paged Response ... Test objective: The objective is to test the retrieval of all indicators for a given VNF instance as Paged Response. ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. - ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -128,7 +128,7 @@ Get Indicators for VNF Instance - Bad Request Response too Big ... Test title: Get Indicators for VNF Instance - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of all indicators for a given VNF instance fails because response is too big. The test also checks the JSON schema of the unsuccessful operation HTTP response. ... Pre-conditions: A VNF instance is instantiated. One or more measures of VNF indicators are available in the VNFM for the given VNF instance. - ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.6.1 + ... Reference: Clause 8.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none -- GitLab From de33b652db5ee93d39eb444293efc480bcdd9190 Mon Sep 17 00:00:00 2001 From: uihassan Date: Fri, 9 Oct 2020 11:37:07 +0500 Subject: [PATCH 03/11] templating, minor fix and new testcases added --- .../IndividualSubscription.robot | 12 +++---- .../IndividualVNFindicator.robot | 6 ++-- SOL003/VNFIndicator-API/Subscriptions.robot | 5 ++- SOL003/VNFIndicator-API/VNFIndicators.robot | 2 +- .../VNFIndicatorsKeywords.robot | 34 ++++--------------- .../VnfIndicatorsInVnfInstanceId.robot | 5 ++- .../environment/variables.txt | 5 ++- .../VNFIndicator-API/jsons/subscriptions.json | 6 ++-- 8 files changed, 26 insertions(+), 49 deletions(-) diff --git a/SOL003/VNFIndicator-API/IndividualSubscription.robot b/SOL003/VNFIndicator-API/IndividualSubscription.robot index 0f83d27b3..839ed3e9c 100644 --- a/SOL003/VNFIndicator-API/IndividualSubscription.robot +++ b/SOL003/VNFIndicator-API/IndividualSubscription.robot @@ -31,6 +31,7 @@ GET Individual VNF Indicator Subscription with invalid resource identifier ... Post-Conditions: none GET Individual VNF Indicator Subscription with invalid resource identifier Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails DELETE Individual VNF Indicator Subscription [Documentation] Test ID: 7.3.6.5.3 @@ -68,7 +69,6 @@ PUT Individual VNF Indicator Subscription - Method not implemented ... Post-Conditions: The individual VNF indicator subscription is not modified by the operation Send Put Request for Individual VNF Indicator Subscription Check HTTP Response Status Code Is 405 - Check Postcondition VNF indicator subscription Unmodified (Implicit) PATCH Individual VNF Indicator Subscription - Method not implemented [Documentation] Test ID: 7.3.6.5.6 @@ -78,11 +78,10 @@ PATCH Individual VNF Indicator Subscription - Method not implemented ... Reference: Clause 8.4.6.3.4 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The individual VNF indicator subscription is not modified by the operation + ... Post-Conditions: none Send Patch Request for Individual VNF Indicator Subscription Check HTTP Response Status Code Is 405 - Check Postcondition VNF indicator subscription Unmodified (Implicit) - + POST Individual VNF Indicator Subscription - Method not implemented [Documentation] Test ID: 7.3.6.5.7 ... Test title: POST Individual VNF Indicator Subscription - Method not implemented @@ -91,7 +90,6 @@ POST Individual VNF Indicator Subscription - Method not implemented ... Reference: Clause 8.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The individual VNF indicator subscription is not created by the operation + ... Post-Conditions: none Send Post Request for Individual VNF Indicator Subscription - Check HTTP Response Status Code Is 405 - Check Postcondition VNF indicator subscription is not created \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFIndicator-API/IndividualVNFindicator.robot b/SOL003/VNFIndicator-API/IndividualVNFindicator.robot index be201072a..52b04e414 100644 --- a/SOL003/VNFIndicator-API/IndividualVNFindicator.robot +++ b/SOL003/VNFIndicator-API/IndividualVNFindicator.robot @@ -32,6 +32,7 @@ Get Individual Indicator for VNF Instance with invalid indicator identifier ... Post-Conditions: none Get Individual Indicator for a VNF instance with invalid indicator identifier Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails POST Individual VNF Indicator for VNF Instance - Method not implemented [Documentation] Test ID: 7.3.6.3.3 @@ -77,7 +78,6 @@ DELETE Individual VNF Indicator for VNF Instance - Method not implemented ... Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The individual indicator for the VNF instance is not deleted by the unsuccessful operations + ... Post-Conditions: none Send DELETE Request for individual indicator in VNF instance - Check HTTP Response Status Code Is 405 - Check Postcondition Indicator for VNF instance Exist \ No newline at end of file + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL003/VNFIndicator-API/Subscriptions.robot b/SOL003/VNFIndicator-API/Subscriptions.robot index 251334e2b..18cda29a4 100644 --- a/SOL003/VNFIndicator-API/Subscriptions.robot +++ b/SOL003/VNFIndicator-API/Subscriptions.robot @@ -143,10 +143,9 @@ DELETE VNF Indicator Subscriptions - Method not implemented ... Reference: Clause 8.4.5.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The VNF indicator subscriptions are not deleted by the failed operation + ... Post-Conditions: none Send Delete Request for VNF Indicator Subscriptions Check HTTP Response Status Code Is 405 - Check Postcondition VNF Indicator Subscriptions Exists GET All VNF Indicator Subscriptions as Paged Response [Documentation] Test ID: 7.3.6.4.11 @@ -159,7 +158,7 @@ GET All VNF Indicator Subscriptions as Paged Response ... Post-Conditions: none Get All VNF Indicators Subscriptions Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link GET VNF Indicator Subscriptions - Bad Request Response too Big [Documentation] Test ID: 7.3.6.4.12 diff --git a/SOL003/VNFIndicator-API/VNFIndicators.robot b/SOL003/VNFIndicator-API/VNFIndicators.robot index ca591ab98..5eb2cf7b7 100644 --- a/SOL003/VNFIndicator-API/VNFIndicators.robot +++ b/SOL003/VNFIndicator-API/VNFIndicators.robot @@ -155,7 +155,7 @@ Get all VNF Indicators as Paged Response ... Post-Conditions: none Get all VNF indicators Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link Get VNF Indicators - Bad Request Response too Big [Documentation] Test ID: 7.3.6.1.13 diff --git a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot index cb9e3925c..bc3c1d00d 100644 --- a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot +++ b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot @@ -103,7 +103,8 @@ Send Post Request for VNF Indicator Subscription Log Trying to create a new subscription Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File jsons/subscriptions.json + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback=${callback} {callback_subscribe}=${callback_subscribe} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${output}= Output response @@ -125,7 +126,8 @@ Send Post Request for Duplicated VNF indicator Subscription Log Trying to create a subscription with an already created content Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File jsons/subscriptions.json + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback=${callback} {callback_subscribe}=${callback_subscribe} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${output}= Output response @@ -403,14 +405,6 @@ Check HTTP Response Body Includes Requested VNF Instances ID Log Check Response includes Indicators according to resource identifier Should Be Equal As Strings ${response['body'][0]['vnfInstanceId']} ${vnfInstanceId} -Check Postcondition Indicators for VNF instance Exist - Log Check Postcondition Indicators for VNF instance Exist - Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} - Should Be Equal ${response['status']} 200 - - Get Individual Indicator for a VNF instance Log This resource represents a VNF indicator related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} @@ -471,11 +465,7 @@ Check Postcondition Indicator for VNF instance Exist Log Check Response includes VNF Indicator Get Individual Indicator for a VNF instance Should Be Equal ${response['body']['vnfInstanceId']} ${vnfInstanceId} - Should Be Equal ${response['body']['id']} ${indicatorId} - -Check Postcondition VNF Indicator Subscriptions Exists - Log Checking that subscriptions exists - Get all VNF Indicators Subscriptions + Should Be Equal ${response['body']['id']} ${indicatorId} GET Individual VNF Indicator Subscription Log Trying to get a given subscription identified by subscriptionId @@ -542,18 +532,6 @@ Check Postcondition Individual VNF Indicator Subscription is Deleted GET Individual VNF Indicator Subscription Check HTTP Response Status Code Is 404 -Check Postcondition VNF indicator subscription Unmodified (Implicit) - Log Check Postcondition subscription is not modified - GET Individual VNF Indicator Subscription - Log Check Response matches original subscription - ${subscription}= evaluate json.loads('''${response['body']}''') json - Should Be Equal ${origResponse['body']['callbackUri']} ${subscription.callbackUri} - -Check Postcondition VNF indicator subscription is not created - Log Check Postcondition subscription is not created - GET Individual VNF Indicator Subscription with invalid resource identifier - Check HTTP Response Status Code Is 404 - Create Sessions Pass Execution If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 0 MockServer not necessary to run Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance @@ -568,6 +546,6 @@ Check Notification Endpoint Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} -Check LINK in Header +Check HTTP Response Header Contain Link ${linkURL}= Get Value From Json ${response['headers']} $..Link Should Not Be Empty ${linkURL} diff --git a/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot b/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot index 2e6afb7c7..c2e54e5dd 100644 --- a/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot +++ b/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot @@ -105,10 +105,9 @@ DELETE Indicators for VNF instance - Method not implemented ... Reference: Clause 8.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v2.7.1 ... Config ID: Config_prod_VNFM ... Applicability: none - ... Post-Conditions: The indicators for the VNF instance are not deleted by the unsuccessful operation + ... Post-Conditions: none Send DELETE Request for indicators in VNF instance Check HTTP Response Status Code Is 405 - Check Postcondition Indicators for VNF instance Exist Get Indicators for VNF Instance as Paged Response [Documentation] Test ID: 7.3.6.2.9 @@ -121,7 +120,7 @@ Get Indicators for VNF Instance as Paged Response ... Post-Conditions: none Get all indicators for a VNF instance Check HTTP Response Status Code Is 200 - Check LINK in Header + Check HTTP Response Header Contain Link Get Indicators for VNF Instance - Bad Request Response too Big [Documentation] Test ID: 7.3.6.2.10 diff --git a/SOL003/VNFIndicator-API/environment/variables.txt b/SOL003/VNFIndicator-API/environment/variables.txt index 5949e3c17..cc906c8a3 100644 --- a/SOL003/VNFIndicator-API/environment/variables.txt +++ b/SOL003/VNFIndicator-API/environment/variables.txt @@ -32,4 +32,7 @@ ${polling_interval} 10 sec ${notification_request} [] ${notification_response} [] -${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar \ No newline at end of file +${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + +${callback} http://172.22.1.7:${callback_port} +${callback_subscribe} /vnfind/subscribes \ No newline at end of file diff --git a/SOL003/VNFIndicator-API/jsons/subscriptions.json b/SOL003/VNFIndicator-API/jsons/subscriptions.json index 3820370db..d48f9f99d 100644 --- a/SOL003/VNFIndicator-API/jsons/subscriptions.json +++ b/SOL003/VNFIndicator-API/jsons/subscriptions.json @@ -1,3 +1,3 @@ -{ - "callbackUri": "http://172.22.1.7:9091/vnfind/subscribes" -} \ No newline at end of file +{{ + "callbackUri": "{callback}{callback_subscribe}" +}} \ No newline at end of file -- GitLab From a61a6b846d7556d95b1aa5587535a2f1ad855ba1 Mon Sep 17 00:00:00 2001 From: uihassan Date: Wed, 14 Oct 2020 11:07:33 +0500 Subject: [PATCH 04/11] added majorApiVersion --- SOL002/VNFIndicator-API/ApiVersion.robot | 10 +++---- .../IndividualSubscription.robot | 18 ++++++------- .../IndividualVNFindicator.robot | 26 +++++++++---------- SOL002/VNFIndicator-API/Subscriptions.robot | 18 ++++++------- SOL002/VNFIndicator-API/VNFIndicators.robot | 22 ++++++++-------- .../VnfIndicatorsInVnfInstanceId.robot | 18 ++++++------- .../environment/variables.txt | 2 +- 7 files changed, 57 insertions(+), 57 deletions(-) diff --git a/SOL002/VNFIndicator-API/ApiVersion.robot b/SOL002/VNFIndicator-API/ApiVersion.robot index fce69405c..934cc24ef 100644 --- a/SOL002/VNFIndicator-API/ApiVersion.robot +++ b/SOL002/VNFIndicator-API/ApiVersion.robot @@ -169,35 +169,35 @@ DELETE API Version POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/v1/api_version + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/v1/api_version + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/v1/api_version + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/v1/api_version + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/v1/api_version + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL002/VNFIndicator-API/IndividualSubscription.robot b/SOL002/VNFIndicator-API/IndividualSubscription.robot index 16de0847e..01eb68eff 100644 --- a/SOL002/VNFIndicator-API/IndividualSubscription.robot +++ b/SOL002/VNFIndicator-API/IndividualSubscription.robot @@ -102,7 +102,7 @@ Get Individual VNF Indicator Subscription Log Trying to get a given subscription identified by subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -110,7 +110,7 @@ GET Individual VNF Indicator Subscription with invalid resource identifier Log Trying to perform a request on a subscriptionID which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -118,7 +118,7 @@ Send Delete Request for Individual VNF Indicator Subscription Log Trying to perform a DELETE on a subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -126,14 +126,14 @@ Send Delete Request for Individual VNF Indicator Subscription with invalid resou Log Trying to perform a DELETE on a subscriptionId which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post Request for Individual VNF Indicator Subscription Log Trying to create a new subscription Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -141,20 +141,20 @@ Send Put Request for Individual VNF Indicator Subscription Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Patch Request for Individual VNF Indicator Subscription Log Trying to create a new subscription Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot index f4cecd713..87ff57f43 100644 --- a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot +++ b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot @@ -163,7 +163,7 @@ Get Individual Indicator for a VNF instance Log This resource represents a VNF indicator related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -171,7 +171,7 @@ Get Individual Indicator for a VNF instance with invalid indicator identifier Log Trying to perform a negative get, using wrong identifier Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${erroneousIndicatorId} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${erroneousIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -179,7 +179,7 @@ Send POST Request for individual indicator in VNF instance Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -187,7 +187,7 @@ Send PUT Request for individual indicator in VNF instance Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -195,7 +195,7 @@ Send PATCH Request for individual indicator in VNF instance Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -203,7 +203,7 @@ Send DELETE Request for individual indicator in VNF instance Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -244,7 +244,7 @@ Get Individual Indicator Log This resource represents a VNF indicator related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${indicatorId} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -252,7 +252,7 @@ Get Individual Indicator with invalid indicator identifier Log Trying to perform a negative get, using wrong identifier Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${erroneousIndicatorId} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${erroneousIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -260,7 +260,7 @@ Send POST Request for individual indicator Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -268,7 +268,7 @@ Send PUT Request for individual indicator Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${indicatorId} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -276,7 +276,7 @@ Send PATCH Request for individual indicator Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${indicatorId} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -284,7 +284,7 @@ Send DELETE Request for individual indicator Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${indicatorId} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -292,5 +292,5 @@ Check PostCondition Individual Indicator exist Log This resource represents a VNF indicator related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/Subscriptions.robot b/SOL002/VNFIndicator-API/Subscriptions.robot index fd458fbb6..1ed601330 100644 --- a/SOL002/VNFIndicator-API/Subscriptions.robot +++ b/SOL002/VNFIndicator-API/Subscriptions.robot @@ -146,7 +146,7 @@ Get VNF Indicators Subscriptions Log Trying to get the list of subscriptions Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -154,7 +154,7 @@ Get VNF Indicators Subscriptions with filter Log Trying to get the list of subscriptions using filters Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${POS_FILTER} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${POS_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} @@ -162,7 +162,7 @@ Get VNF Indicators Subscriptions with invalid filter Log Trying to get the list of subscriptions using filters with wrong attribute name Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${NEG_FILTER} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${NEG_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} @@ -170,7 +170,7 @@ Get VNF Indicators Subscriptions with invalid resource endpoint Log Trying to perform a request on a Uri which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscription + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscription ${output}= Output response Set Suite Variable ${response} ${output} @@ -180,7 +180,7 @@ Send Post Request for VNF Indicator Subscription Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${body}= Get File jsons/subscriptions.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} ${output}= Output response Set Suite Variable ${response} ${output} Run Keyword If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 1 @@ -190,7 +190,7 @@ Send Put Request for VNF Indicator Subscriptions Log Trying to create a new subscription ${body}= Get File jsons/subscriptions.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -198,7 +198,7 @@ Send Patch Request for VNF Indicator Subscriptions Log Trying to create a new subscription ${body}= Get File jsons/subscriptions.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -206,7 +206,7 @@ Send Delete Request for VNF Indicator Subscriptions Log Trying to create a new subscription ${body}= Get File jsons/subscriptions.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -240,7 +240,7 @@ Check Postcondition VNF Indicator Subscription Is Set Log Trying to get the subscription Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${response['body']['id']} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 200 diff --git a/SOL002/VNFIndicator-API/VNFIndicators.robot b/SOL002/VNFIndicator-API/VNFIndicators.robot index bc6dbd9c9..0b05ea627 100644 --- a/SOL002/VNFIndicator-API/VNFIndicators.robot +++ b/SOL002/VNFIndicator-API/VNFIndicators.robot @@ -177,7 +177,7 @@ Get all VNF indicators Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -186,7 +186,7 @@ Get VNF indicators with filter Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators?${POS_FIELDS} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators?${POS_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} @@ -195,7 +195,7 @@ Get VNF indicators with invalid filter Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators?${NEG_FIELDS} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators?${NEG_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} @@ -205,7 +205,7 @@ Get all VNF indicators with malformed authorization token Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Authorization": "${BAD_AUTHORIZATION}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -215,7 +215,7 @@ Get all VNF indicators with expired or revoked authorization token Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Authorization": "${NEG_AUTHORIZATION}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -224,7 +224,7 @@ Get all VNF indicators without authorization token Log The GET method queries multiple VNF indicators omitting token Set Headers {"Accept": "${ACCEPT_JSON}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -233,7 +233,7 @@ Get all VNF indicators with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicator + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicator ${output}= Output response Set Suite Variable ${response} ${output} @@ -241,7 +241,7 @@ Send POST Request for all VNF indicators log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/indicators + Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -249,7 +249,7 @@ Send PUT Request for all VNF indicators log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/indicators + Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -257,7 +257,7 @@ Send PATCH Request for all VNF indicators log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/indicators + Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -265,7 +265,7 @@ Send DELETE Request for all VNF indicators log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/indicators + Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot index 11f83e45b..df5458c16 100644 --- a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot +++ b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot @@ -142,7 +142,7 @@ Get all indicators for a VNF instance Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -150,7 +150,7 @@ Get all indicators for a VNF instance with filter Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}?${POS_FIELDS} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}?${POS_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} @@ -158,7 +158,7 @@ Get all indicators for a VNF instance with invalid filter Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}?${NEG_FIELDS} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}?${NEG_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} @@ -166,7 +166,7 @@ Get all indicators for a VNF instance with invalid resource identifier Log Trying to perform a negative get, using wrong identifier Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${erroneousVnfInstanceId} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${erroneousVnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -174,7 +174,7 @@ Send POST Request for indicators in VNF instance Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -182,7 +182,7 @@ Send PUT Request for indicators in VNF instance Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -190,7 +190,7 @@ Send PATCH Request for indicators in VNF instance Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -198,7 +198,7 @@ Send DELETE Request for indicators in VNF instance Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -234,7 +234,7 @@ Check Postcondition Indicators for VNF instance Exist Log Check Postcondition Indicators for VNF instance Exist Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} Should Be Equal ${response['status']} 200 Check LINK in Header diff --git a/SOL002/VNFIndicator-API/environment/variables.txt b/SOL002/VNFIndicator-API/environment/variables.txt index 58dff1e61..22f32a1fb 100644 --- a/SOL002/VNFIndicator-API/environment/variables.txt +++ b/SOL002/VNFIndicator-API/environment/variables.txt @@ -12,7 +12,7 @@ ${EM-VNF_SCHEMA} https ${ACCEPT_JSON} application/json ${AUTH_USAGE} 1 ${apiRoot} / -${apiVersion} v1 +${apiMajorVersion} v1 ${apiName} vnfind -- GitLab From ba41f1dcdce67a0af9ebec8a71f6393c555df757 Mon Sep 17 00:00:00 2001 From: uihassan Date: Wed, 14 Oct 2020 11:10:14 +0500 Subject: [PATCH 05/11] Revert "added majorApiVersion" This reverts commit a61a6b846d7556d95b1aa5587535a2f1ad855ba1. --- SOL002/VNFIndicator-API/ApiVersion.robot | 10 +++---- .../IndividualSubscription.robot | 18 ++++++------- .../IndividualVNFindicator.robot | 26 +++++++++---------- SOL002/VNFIndicator-API/Subscriptions.robot | 18 ++++++------- SOL002/VNFIndicator-API/VNFIndicators.robot | 22 ++++++++-------- .../VnfIndicatorsInVnfInstanceId.robot | 18 ++++++------- .../environment/variables.txt | 2 +- 7 files changed, 57 insertions(+), 57 deletions(-) diff --git a/SOL002/VNFIndicator-API/ApiVersion.robot b/SOL002/VNFIndicator-API/ApiVersion.robot index 934cc24ef..fce69405c 100644 --- a/SOL002/VNFIndicator-API/ApiVersion.robot +++ b/SOL002/VNFIndicator-API/ApiVersion.robot @@ -169,35 +169,35 @@ DELETE API Version POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_version + Post ${apiRoot}/${apiName}/v1/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_version + Get ${apiRoot}/${apiName}/v1/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_version + Put ${apiRoot}/${apiName}/v1/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_version + Patch ${apiRoot}/${apiName}/v1/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_version + Delete ${apiRoot}/${apiName}/v1/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL002/VNFIndicator-API/IndividualSubscription.robot b/SOL002/VNFIndicator-API/IndividualSubscription.robot index 01eb68eff..16de0847e 100644 --- a/SOL002/VNFIndicator-API/IndividualSubscription.robot +++ b/SOL002/VNFIndicator-API/IndividualSubscription.robot @@ -102,7 +102,7 @@ Get Individual VNF Indicator Subscription Log Trying to get a given subscription identified by subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -110,7 +110,7 @@ GET Individual VNF Indicator Subscription with invalid resource identifier Log Trying to perform a request on a subscriptionID which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -118,7 +118,7 @@ Send Delete Request for Individual VNF Indicator Subscription Log Trying to perform a DELETE on a subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -126,14 +126,14 @@ Send Delete Request for Individual VNF Indicator Subscription with invalid resou Log Trying to perform a DELETE on a subscriptionId which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} + DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post Request for Individual VNF Indicator Subscription Log Trying to create a new subscription Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} + POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -141,20 +141,20 @@ Send Put Request for Individual VNF Indicator Subscription Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Patch Request for Individual VNF Indicator Subscription Log Trying to create a new subscription Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot index 87ff57f43..f4cecd713 100644 --- a/SOL002/VNFIndicator-API/IndividualVNFindicator.robot +++ b/SOL002/VNFIndicator-API/IndividualVNFindicator.robot @@ -163,7 +163,7 @@ Get Individual Indicator for a VNF instance Log This resource represents a VNF indicator related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} + GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -171,7 +171,7 @@ Get Individual Indicator for a VNF instance with invalid indicator identifier Log Trying to perform a negative get, using wrong identifier Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${erroneousIndicatorId} + GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${erroneousIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -179,7 +179,7 @@ Send POST Request for individual indicator in VNF instance Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} + POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -187,7 +187,7 @@ Send PUT Request for individual indicator in VNF instance Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} + PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -195,7 +195,7 @@ Send PATCH Request for individual indicator in VNF instance Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} + PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -203,7 +203,7 @@ Send DELETE Request for individual indicator in VNF instance Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} + DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -244,7 +244,7 @@ Get Individual Indicator Log This resource represents a VNF indicator related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${indicatorId} + GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -252,7 +252,7 @@ Get Individual Indicator with invalid indicator identifier Log Trying to perform a negative get, using wrong identifier Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${erroneousIndicatorId} + GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${erroneousIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -260,7 +260,7 @@ Send POST Request for individual indicator Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} + POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -268,7 +268,7 @@ Send PUT Request for individual indicator Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${indicatorId} + PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -276,7 +276,7 @@ Send PATCH Request for individual indicator Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${indicatorId} + PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -284,7 +284,7 @@ Send DELETE Request for individual indicator Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${indicatorId} + DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -292,5 +292,5 @@ Check PostCondition Individual Indicator exist Log This resource represents a VNF indicator related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} + GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} Integer response status 200 \ No newline at end of file diff --git a/SOL002/VNFIndicator-API/Subscriptions.robot b/SOL002/VNFIndicator-API/Subscriptions.robot index 1ed601330..fd458fbb6 100644 --- a/SOL002/VNFIndicator-API/Subscriptions.robot +++ b/SOL002/VNFIndicator-API/Subscriptions.robot @@ -146,7 +146,7 @@ Get VNF Indicators Subscriptions Log Trying to get the list of subscriptions Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -154,7 +154,7 @@ Get VNF Indicators Subscriptions with filter Log Trying to get the list of subscriptions using filters Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${POS_FILTER} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${POS_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} @@ -162,7 +162,7 @@ Get VNF Indicators Subscriptions with invalid filter Log Trying to get the list of subscriptions using filters with wrong attribute name Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${NEG_FILTER} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${NEG_FILTER} ${output}= Output response Set Suite Variable ${response} ${output} @@ -170,7 +170,7 @@ Get VNF Indicators Subscriptions with invalid resource endpoint Log Trying to perform a request on a Uri which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscription + GET ${apiRoot}/${apiName}/${apiVersion}/subscription ${output}= Output response Set Suite Variable ${response} ${output} @@ -180,7 +180,7 @@ Send Post Request for VNF Indicator Subscription Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${body}= Get File jsons/subscriptions.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} + POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${output}= Output response Set Suite Variable ${response} ${output} Run Keyword If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 1 @@ -190,7 +190,7 @@ Send Put Request for VNF Indicator Subscriptions Log Trying to create a new subscription ${body}= Get File jsons/subscriptions.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions + PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -198,7 +198,7 @@ Send Patch Request for VNF Indicator Subscriptions Log Trying to create a new subscription ${body}= Get File jsons/subscriptions.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions + PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -206,7 +206,7 @@ Send Delete Request for VNF Indicator Subscriptions Log Trying to create a new subscription ${body}= Get File jsons/subscriptions.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions + DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -240,7 +240,7 @@ Check Postcondition VNF Indicator Subscription Is Set Log Trying to get the subscription Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${response['body']['id']} + GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 200 diff --git a/SOL002/VNFIndicator-API/VNFIndicators.robot b/SOL002/VNFIndicator-API/VNFIndicators.robot index 0b05ea627..bc6dbd9c9 100644 --- a/SOL002/VNFIndicator-API/VNFIndicators.robot +++ b/SOL002/VNFIndicator-API/VNFIndicators.robot @@ -177,7 +177,7 @@ Get all VNF indicators Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators + Get ${apiRoot}/${apiName}/${apiVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -186,7 +186,7 @@ Get VNF indicators with filter Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators?${POS_FIELDS} + Get ${apiRoot}/${apiName}/${apiVersion}/indicators?${POS_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} @@ -195,7 +195,7 @@ Get VNF indicators with invalid filter Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators?${NEG_FIELDS} + Get ${apiRoot}/${apiName}/${apiVersion}/indicators?${NEG_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} @@ -205,7 +205,7 @@ Get all VNF indicators with malformed authorization token Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Authorization": "${BAD_AUTHORIZATION}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators + Get ${apiRoot}/${apiName}/${apiVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -215,7 +215,7 @@ Get all VNF indicators with expired or revoked authorization token Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Authorization": "${NEG_AUTHORIZATION}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators + Get ${apiRoot}/${apiName}/${apiVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -224,7 +224,7 @@ Get all VNF indicators without authorization token Log The GET method queries multiple VNF indicators omitting token Set Headers {"Accept": "${ACCEPT_JSON}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators + Get ${apiRoot}/${apiName}/${apiVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -233,7 +233,7 @@ Get all VNF indicators with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicator + Get ${apiRoot}/${apiName}/${apiVersion}/indicator ${output}= Output response Set Suite Variable ${response} ${output} @@ -241,7 +241,7 @@ Send POST Request for all VNF indicators log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators + Post ${apiRoot}/${apiName}/${apiVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -249,7 +249,7 @@ Send PUT Request for all VNF indicators log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators + Post ${apiRoot}/${apiName}/${apiVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -257,7 +257,7 @@ Send PATCH Request for all VNF indicators log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators + Post ${apiRoot}/${apiName}/${apiVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -265,7 +265,7 @@ Send DELETE Request for all VNF indicators log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators + Post ${apiRoot}/${apiName}/${apiVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot index df5458c16..11f83e45b 100644 --- a/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot +++ b/SOL002/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot @@ -142,7 +142,7 @@ Get all indicators for a VNF instance Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} + GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -150,7 +150,7 @@ Get all indicators for a VNF instance with filter Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}?${POS_FIELDS} + GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}?${POS_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} @@ -158,7 +158,7 @@ Get all indicators for a VNF instance with invalid filter Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}?${NEG_FIELDS} + GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}?${NEG_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} @@ -166,7 +166,7 @@ Get all indicators for a VNF instance with invalid resource identifier Log Trying to perform a negative get, using wrong identifier Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${erroneousVnfInstanceId} + GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${erroneousVnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -174,7 +174,7 @@ Send POST Request for indicators in VNF instance Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} + POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -182,7 +182,7 @@ Send PUT Request for indicators in VNF instance Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} + PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -190,7 +190,7 @@ Send PATCH Request for indicators in VNF instance Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} + PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -198,7 +198,7 @@ Send DELETE Request for indicators in VNF instance Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} + DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -234,7 +234,7 @@ Check Postcondition Indicators for VNF instance Exist Log Check Postcondition Indicators for VNF instance Exist Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} + GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} Should Be Equal ${response['status']} 200 Check LINK in Header diff --git a/SOL002/VNFIndicator-API/environment/variables.txt b/SOL002/VNFIndicator-API/environment/variables.txt index 22f32a1fb..58dff1e61 100644 --- a/SOL002/VNFIndicator-API/environment/variables.txt +++ b/SOL002/VNFIndicator-API/environment/variables.txt @@ -12,7 +12,7 @@ ${EM-VNF_SCHEMA} https ${ACCEPT_JSON} application/json ${AUTH_USAGE} 1 ${apiRoot} / -${apiMajorVersion} v1 +${apiVersion} v1 ${apiName} vnfind -- GitLab From 8d895f6901b876563170f71a87cc297cc606e563 Mon Sep 17 00:00:00 2001 From: uihassan Date: Wed, 14 Oct 2020 11:12:37 +0500 Subject: [PATCH 06/11] added majorApiVersion and remove issues --- SOL003/VNFIndicator-API/ApiVersion.robot | 10 +-- .../VNFIndicatorsKeywords.robot | 90 +++++++++---------- .../environment/variables.txt | 2 +- 3 files changed, 51 insertions(+), 51 deletions(-) diff --git a/SOL003/VNFIndicator-API/ApiVersion.robot b/SOL003/VNFIndicator-API/ApiVersion.robot index 856e31ed0..7dfc38510 100644 --- a/SOL003/VNFIndicator-API/ApiVersion.robot +++ b/SOL003/VNFIndicator-API/ApiVersion.robot @@ -169,35 +169,35 @@ DELETE API Version POST API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/v1/api_version + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} GET API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/v1/api_version + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PUT API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/v1/api_version + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} PATCH API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/v1/api_version + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} DELETE API Version with apiMajorVersion Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/v1/api_version + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_version ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot index bc3c1d00d..d39f925d5 100644 --- a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot +++ b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot @@ -20,7 +20,7 @@ Get All VNF Indicators Subscriptions Log Trying to get the list of subscriptions Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} # Integer response status 200 @@ -36,7 +36,7 @@ Get VNF Indicators Subscriptions with filter Log Trying to get the list of subscriptions using filters Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ok} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${filter_ok} ${output}= Output response Set Suite Variable ${response} ${output} # Integer response status 200 @@ -52,7 +52,7 @@ Get VNF Indicators Subscriptions with invalid filter Log Trying to get the list of subscriptions using filters with wrong attribute name Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ko} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${filter_ko} ${output}= Output response Set Suite Variable ${response} ${output} # Integer response status 400 @@ -69,7 +69,7 @@ Get VNF Indicators Subscriptions with invalid resource endpoint Log Trying to perform a request on a Uri which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscription + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscription ${output}= Output response Set Suite Variable ${response} ${output} # Integer response status 404 @@ -86,7 +86,7 @@ Get VNF Indicators Subscriptions with invalid authentication token Log Trying to perform a negative get, using wrong authorization bearer Pass Execution If ${AUTH_USAGE} == 0 Skipping test as VNFM is not supporting authentication Set Headers {"Accept": "${ACCEPT_JSON}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} # Integer response status 401 @@ -106,7 +106,7 @@ Send Post Request for VNF Indicator Subscription ${template}= Get File jsons/subscriptions.json ${body}= Format String ${template} callback=${callback} {callback_subscribe}=${callback_subscribe} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} ${output}= Output response Set Suite Variable ${response} ${output} Run Keyword If ${VNFM_CHECKS_NOTIF_ENDPOINT} == 1 @@ -129,7 +129,7 @@ Send Post Request for Duplicated VNF indicator Subscription ${template}= Get File jsons/subscriptions.json ${body}= Format String ${template} callback=${callback} {callback_subscribe}=${callback_subscribe} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body} ${output}= Output response Set Suite Variable ${response} ${output} # Integer response status 201 @@ -146,7 +146,7 @@ Send Put Request for VNF Indicator Subscriptions Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -155,7 +155,7 @@ Send Patch Request for VNF Indicator Subscriptions Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -164,7 +164,7 @@ Send Delete Request for VNF Indicator Subscriptions Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -201,7 +201,7 @@ Check Postcondition VNF Indicator Subscription Is Set Log Trying to get the subscription Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - Run Keyword If Should Not Be Equal As Strings ${location} Location GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${response['body']['id']} + Run Keyword If Should Not Be Equal As Strings ${location} Location GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${response['body']['id']} Run Keyword If Should Be Equal As Strings ${location} Location GET ${response['headers']['Location']} ${output}= Output response Set Suite Variable ${response} ${output} @@ -232,7 +232,7 @@ Get all VNF indicators Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} Set Suite Variable ${vnfIndicators} ${response['body']} @@ -242,7 +242,7 @@ Get VNF indicators with filter Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators?${POS_FIELDS} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators?${POS_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} @@ -251,7 +251,7 @@ Get VNF indicators with invalid filter Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators?${NEG_FIELDS} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators?${NEG_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} @@ -261,7 +261,7 @@ Get all VNF indicators with malformed authorization token Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Authorization": "${BAD_AUTHORIZATION}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -271,7 +271,7 @@ Get all VNF indicators with expired or revoked authorization token Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Authorization": "${NEG_AUTHORIZATION}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -280,7 +280,7 @@ Get all VNF indicators without authorization token Log The GET method queries multiple VNF indicators omitting token Set Headers {"Accept": "${ACCEPT_JSON}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -289,7 +289,7 @@ Get all VNF indicators with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/indicators + Get ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -297,7 +297,7 @@ Send POST Request for all VNF indicators log Trying to perform a POST. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/indicators + Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -305,7 +305,7 @@ Send PUT Request for all VNF indicators log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/indicators + Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -313,7 +313,7 @@ Send PATCH Request for all VNF indicators log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/indicators + Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -321,7 +321,7 @@ Send DELETE Request for all VNF indicators log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept":"${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/indicators + Post ${apiRoot}/${apiName}/${apiMajorVersion}/indicators ${output}= Output response Set Suite Variable ${response} ${output} @@ -341,7 +341,7 @@ Get all indicators for a VNF instance Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -349,7 +349,7 @@ Get all indicators for a VNF instance with filter Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}?${POS_FIELDS} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}?${POS_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} @@ -357,7 +357,7 @@ Get all indicators for a VNF instance with invalid filter Log This resource represents VNF indicators related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}?${NEG_FIELDS} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}?${NEG_FIELDS} ${output}= Output response Set Suite Variable ${response} ${output} @@ -365,7 +365,7 @@ Get all indicators for a VNF instance with invalid resource identifier Log Trying to perform a negative get, using wrong identifier Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${erroneousVnfInstanceId} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${erroneousVnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -373,7 +373,7 @@ Send POST Request for indicators in VNF instance Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -381,7 +381,7 @@ Send PUT Request for indicators in VNF instance Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -389,7 +389,7 @@ Send PATCH Request for indicators in VNF instance Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -397,7 +397,7 @@ Send DELETE Request for indicators in VNF instance Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -409,7 +409,7 @@ Get Individual Indicator for a VNF instance Log This resource represents a VNF indicator related to a VNF instance. Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -417,7 +417,7 @@ Get Individual Indicator for a VNF instance with invalid indicator identifier Log Trying to perform a negative get, using wrong identifier Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${erroneousIndicatorId} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${erroneousIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -425,7 +425,7 @@ Send POST Request for individual indicator in VNF instance Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${notAllowedIndicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -433,7 +433,7 @@ Send PUT Request for individual indicator in VNF instance Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PUT ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -441,7 +441,7 @@ Send PATCH Request for individual indicator in VNF instance Log Trying to perform a PATCH. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - PATCH ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -449,7 +449,7 @@ Send DELETE Request for individual indicator in VNF instance Log Trying to perform a DELETE. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/indicators/${vnfInstanceId}/${indicatorId} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/indicators/${vnfInstanceId}/${indicatorId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -471,7 +471,7 @@ GET Individual VNF Indicator Subscription Log Trying to get a given subscription identified by subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -479,7 +479,7 @@ GET Individual VNF Indicator Subscription with invalid resource identifier Log Trying to perform a request on a subscriptionID which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -487,7 +487,7 @@ Send Delete Request for Individual VNF Indicator Subscription Log Trying to perform a DELETE on a subscriptionId Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -495,14 +495,14 @@ Send Delete Request for Individual VNF Indicator Subscription with invalid resou Log Trying to perform a DELETE on a subscriptionId which doesn't exist Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post Request for Individual VNF Indicator Subscription Log Trying to create a new subscription Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -510,20 +510,20 @@ Send Put Request for Individual VNF Indicator Subscription Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + PUT ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Patch Request for Individual VNF Indicator Subscription Log Trying to create a new subscription Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} - PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} + PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL003/VNFIndicator-API/environment/variables.txt b/SOL003/VNFIndicator-API/environment/variables.txt index cc906c8a3..6cc6ab92c 100644 --- a/SOL003/VNFIndicator-API/environment/variables.txt +++ b/SOL003/VNFIndicator-API/environment/variables.txt @@ -11,7 +11,7 @@ ${AUTH_USAGE} 1 ${CONTENT_TYPE_JSON} application/json ${apiRoot} / -${apiVersion} v1 +${apiMajorVersion} v1 ${apiName} vnfind ${VNFM_CHECKS_NOTIF_ENDPOINT} 1 ## If true, during subscription, the FUT performs a get to the notification endpoint -- GitLab From ccb7df1ec468e02c96a8dd6fb6fc68224cb306f9 Mon Sep 17 00:00:00 2001 From: Giacomo Bernini Date: Wed, 21 Oct 2020 11:23:12 +0200 Subject: [PATCH 07/11] fix for issue #121 in SOL003-VNFIndicator-API --- .../IndividualSubscription.robot | 1 - .../IndividualVNFindicator.robot | 1 - SOL003/VNFIndicator-API/Subscriptions.robot | 1 - SOL003/VNFIndicator-API/VNFIndicators.robot | 1 - .../VNFIndicatorsKeywords.robot | 5 ---- .../VnfIndicatorsInVnfInstanceId.robot | 1 - .../environment/individualSubscription.txt | 7 ----- .../environment/individualVnfIndicator.txt | 7 ----- .../environment/subscriptions.txt | 7 ----- .../environment/variables.txt | 27 ++++++++++++++++++- .../environment/vnfIndicatorinVnfInstance.txt | 5 ---- .../environment/vnfIndicators.txt | 5 ---- 12 files changed, 26 insertions(+), 42 deletions(-) delete mode 100644 SOL003/VNFIndicator-API/environment/individualSubscription.txt delete mode 100644 SOL003/VNFIndicator-API/environment/individualVnfIndicator.txt delete mode 100644 SOL003/VNFIndicator-API/environment/subscriptions.txt delete mode 100644 SOL003/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt delete mode 100644 SOL003/VNFIndicator-API/environment/vnfIndicators.txt diff --git a/SOL003/VNFIndicator-API/IndividualSubscription.robot b/SOL003/VNFIndicator-API/IndividualSubscription.robot index 839ed3e9c..cf162f22b 100644 --- a/SOL003/VNFIndicator-API/IndividualSubscription.robot +++ b/SOL003/VNFIndicator-API/IndividualSubscription.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/individualSubscription.txt Resource VNFIndicatorsKeywords.robot Library OperatingSystem Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false diff --git a/SOL003/VNFIndicator-API/IndividualVNFindicator.robot b/SOL003/VNFIndicator-API/IndividualVNFindicator.robot index 52b04e414..916331fbb 100644 --- a/SOL003/VNFIndicator-API/IndividualVNFindicator.robot +++ b/SOL003/VNFIndicator-API/IndividualVNFindicator.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/individualVnfIndicator.txt Resource VNFIndicatorsKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false diff --git a/SOL003/VNFIndicator-API/Subscriptions.robot b/SOL003/VNFIndicator-API/Subscriptions.robot index 18cda29a4..f20c0f888 100644 --- a/SOL003/VNFIndicator-API/Subscriptions.robot +++ b/SOL003/VNFIndicator-API/Subscriptions.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/subscriptions.txt Resource VNFIndicatorsKeywords.robot Library OperatingSystem Library JSONLibrary diff --git a/SOL003/VNFIndicator-API/VNFIndicators.robot b/SOL003/VNFIndicator-API/VNFIndicators.robot index 5eb2cf7b7..66a032edf 100644 --- a/SOL003/VNFIndicator-API/VNFIndicators.robot +++ b/SOL003/VNFIndicator-API/VNFIndicators.robot @@ -2,7 +2,6 @@ Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters Library JSONLibrary -Resource environment/vnfIndicators.txt Resource VNFIndicatorsKeywords.robot Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false diff --git a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot index d39f925d5..1623f460c 100644 --- a/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot +++ b/SOL003/VNFIndicator-API/VNFIndicatorsKeywords.robot @@ -1,10 +1,5 @@ *** Settings *** Resource environment/variables.txt -Resource environment/subscriptions.txt -Resource environment/vnfIndicators.txt -Resource environment/vnfIndicatorinVnfInstance.txt -Resource environment/individualVnfIndicator.txt -Resource environment/individualSubscription.txt Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library MockServerLibrary Library OperatingSystem diff --git a/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot b/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot index c2e54e5dd..0c8b3fffb 100644 --- a/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot +++ b/SOL003/VNFIndicator-API/VnfIndicatorsInVnfInstanceId.robot @@ -1,7 +1,6 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters -Resource environment/vnfIndicatorinVnfInstance.txt Resource VNFIndicatorsKeywords.robot Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false diff --git a/SOL003/VNFIndicator-API/environment/individualSubscription.txt b/SOL003/VNFIndicator-API/environment/individualSubscription.txt deleted file mode 100644 index a85388af9..000000000 --- a/SOL003/VNFIndicator-API/environment/individualSubscription.txt +++ /dev/null @@ -1,7 +0,0 @@ -*** Variables *** -${subscriptionId} 17563e75-0e14-4bd7-94b4-6bbb869c79aa -${erroneousSubscriptionId} erroneousSubscriptionId -${newSubscriptionId} newSubsciptionId -${response} httpresponse -${origResponse} httpresponse - diff --git a/SOL003/VNFIndicator-API/environment/individualVnfIndicator.txt b/SOL003/VNFIndicator-API/environment/individualVnfIndicator.txt deleted file mode 100644 index 010a634eb..000000000 --- a/SOL003/VNFIndicator-API/environment/individualVnfIndicator.txt +++ /dev/null @@ -1,7 +0,0 @@ -*** Variables *** -${vnfInstanceId} 80b0deba-c398-445b-bef0-ac0fe733e3d0 -${indicatorId} 34e70855-a9d3-4fef-aece-76a3cd266ec8 -${notAllowedIndicatorId} notAllowedId -${erroneousIndicatorId} erroneousIndicatorId -${response}= httpresponse - diff --git a/SOL003/VNFIndicator-API/environment/subscriptions.txt b/SOL003/VNFIndicator-API/environment/subscriptions.txt deleted file mode 100644 index 5dea0892b..000000000 --- a/SOL003/VNFIndicator-API/environment/subscriptions.txt +++ /dev/null @@ -1,7 +0,0 @@ -*** Variables *** -${filter_ok} callbackUri=${callbackUri} -${filter_ko} erroneousFilter=erroneous -${callbackUri} http://172.22.1.7:9091/vnfind/subscriptions -${total_polling_time} 2 min -${polling_interval} 10 sec - diff --git a/SOL003/VNFIndicator-API/environment/variables.txt b/SOL003/VNFIndicator-API/environment/variables.txt index 6cc6ab92c..9fb63250b 100644 --- a/SOL003/VNFIndicator-API/environment/variables.txt +++ b/SOL003/VNFIndicator-API/environment/variables.txt @@ -35,4 +35,29 @@ ${notification_response} [] ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar ${callback} http://172.22.1.7:${callback_port} -${callback_subscribe} /vnfind/subscribes \ No newline at end of file +${callback_subscribe} /vnfind/subscribes + + +${subscriptionId} 17563e75-0e14-4bd7-94b4-6bbb869c79aa +${erroneousSubscriptionId} erroneousSubscriptionId +${newSubscriptionId} newSubsciptionId +${origResponse} httpresponse + + +${vnfInstanceId} 80b0deba-c398-445b-bef0-ac0fe733e3d0 +${indicatorId} 34e70855-a9d3-4fef-aece-76a3cd266ec8 +${notAllowedIndicatorId} notAllowedId +${erroneousIndicatorId} erroneousIndicatorId + + +${filter_ok} callbackUri=${callbackUri} +${filter_ko} erroneousFilter=erroneous + + +${erroneousVnfInstanceId} erroneousVnfInstanceId +${POS_FIELDS} name=vnfIndicator +${NEG_FIELDS} wrongName=any_value + + +${SEPERATOR} = +${VAR_SEPERATOR} & \ No newline at end of file diff --git a/SOL003/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt b/SOL003/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt deleted file mode 100644 index 13ef83d69..000000000 --- a/SOL003/VNFIndicator-API/environment/vnfIndicatorinVnfInstance.txt +++ /dev/null @@ -1,5 +0,0 @@ -*** Variables *** -${vnfInstanceId} 80b0deba-c398-445b-bef0-ac0fe733e3d0 -${erroneousVnfInstanceId} erroneousVnfInstanceId -${POS_FIELDS} name=vnfIndicator -${NEG_FIELDS} wrongName=any_value diff --git a/SOL003/VNFIndicator-API/environment/vnfIndicators.txt b/SOL003/VNFIndicator-API/environment/vnfIndicators.txt deleted file mode 100644 index b4ca7ceaa..000000000 --- a/SOL003/VNFIndicator-API/environment/vnfIndicators.txt +++ /dev/null @@ -1,5 +0,0 @@ -*** Variables *** -${POS_FIELDS} name=vnfIndicator&vnfInstanceId=80b0deba-c398-445b-bef0-ac0fe733e3d0 -${NEG_FIELDS} wrongName=wrongValue -${SEPERATOR} = -${VAR_SEPERATOR} & \ No newline at end of file -- GitLab From 81c1a51fcf84199c64587b8d77c79b55acc069f0 Mon Sep 17 00:00:00 2001 From: uihassan Date: Fri, 6 Nov 2020 15:28:48 +0500 Subject: [PATCH 08/11] New Resource NotificationConsumer added --- SOL003/VNFIndicator-API/environment/variables.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SOL003/VNFIndicator-API/environment/variables.txt b/SOL003/VNFIndicator-API/environment/variables.txt index 9fb63250b..5d4253fc2 100644 --- a/SOL003/VNFIndicator-API/environment/variables.txt +++ b/SOL003/VNFIndicator-API/environment/variables.txt @@ -60,4 +60,6 @@ ${NEG_FIELDS} wrongName=any_value ${SEPERATOR} = -${VAR_SEPERATOR} & \ No newline at end of file +${VAR_SEPERATOR} & + +${callbackResp} localhost \ No newline at end of file -- GitLab From 62bd77e76b7d876270cde52a4cc2cef968aecb2b Mon Sep 17 00:00:00 2001 From: uihassan Date: Fri, 6 Nov 2020 15:33:20 +0500 Subject: [PATCH 09/11] files added --- .../NotificationConsumer.robot | 46 +++++++++++++++++++ .../VnfIndicatorValueChangeNotification.json | 13 ++++++ 2 files changed, 59 insertions(+) create mode 100644 SOL003/VNFIndicator-API/NotificationConsumer.robot create mode 100644 SOL003/VNFIndicator-API/jsons/VnfIndicatorValueChangeNotification.json diff --git a/SOL003/VNFIndicator-API/NotificationConsumer.robot b/SOL003/VNFIndicator-API/NotificationConsumer.robot new file mode 100644 index 000000000..fff07559f --- /dev/null +++ b/SOL003/VNFIndicator-API/NotificationConsumer.robot @@ -0,0 +1,46 @@ +*** Settings *** +Library String +Library JSONSchemaLibrary schemas/ +Resource environment/variables.txt +Library OperatingSystem +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +VNF Indicator Value Change Notification + [Documentation] Test ID: 7.3.6.7.1 + ... Test title: VNF Indicator Value Change Notification + ... Test objective: The objective is to test that the POST request triggers VNF Indicator Value Change Notification. + ... Pre-conditions: A VNF is instantiated, and a subscription for indicator value change notifications is available in the VNFM. + ... Reference: Clause 8.4.7.3.1 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Post VNF Indicator Value Change Notification + Check HTTP Response Status Code Is 204 + +*** Keywords *** +Check resource existence and get CallbackUri + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId} + Integer response status 200 + Validate Json response body VnfIndicatorSubscription.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Post VNF Indicator Value Change Notification + log Trying to perform a POST to get notification + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${template} = Get File jsons/VnfIndicatorValueChangeNotification.json + ${body}= Format String ${template} subscriptionId=${subscriptionId} indicatorId=indicatorId vnfInstanceId=${vnfInstanceId} + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} diff --git a/SOL003/VNFIndicator-API/jsons/VnfIndicatorValueChangeNotification.json b/SOL003/VNFIndicator-API/jsons/VnfIndicatorValueChangeNotification.json new file mode 100644 index 000000000..c6dd2a1cc --- /dev/null +++ b/SOL003/VNFIndicator-API/jsons/VnfIndicatorValueChangeNotification.json @@ -0,0 +1,13 @@ +{{ + "id":"", + "notificationType":"VnfIndicatorValueChangeNotification", + "subscriptionId":"{subscriptionId}", + "timeStamp":"", + "vnfIndicatorId":"{indicatorId} ", + "value":"", + "vnfInstanceId":"{vnfInstanceId}", + "_links":{{ + "vnfInstance":"", + "subscription":"" + }} +}} -- GitLab From 49b652269a77bd5d7ac62ac25c95d54c99a4d081 Mon Sep 17 00:00:00 2001 From: uihassan Date: Fri, 6 Nov 2020 15:52:53 +0500 Subject: [PATCH 10/11] fix added --- SOL003/VNFIndicator-API/NotificationConsumer.robot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SOL003/VNFIndicator-API/NotificationConsumer.robot b/SOL003/VNFIndicator-API/NotificationConsumer.robot index fff07559f..3fccae93e 100644 --- a/SOL003/VNFIndicator-API/NotificationConsumer.robot +++ b/SOL003/VNFIndicator-API/NotificationConsumer.robot @@ -40,7 +40,7 @@ Post VNF Indicator Value Change Notification Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} ${template} = Get File jsons/VnfIndicatorValueChangeNotification.json - ${body}= Format String ${template} subscriptionId=${subscriptionId} indicatorId=indicatorId vnfInstanceId=${vnfInstanceId} + ${body}= Format String ${template} subscriptionId=${subscriptionId} indicatorId=${indicatorId} vnfInstanceId=${vnfInstanceId} Post ${callbackResp} ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} -- GitLab From fe61c4c24c1984cb5c9a0248bf97c494bf4a0cd0 Mon Sep 17 00:00:00 2001 From: Najam UI Hassan Date: Wed, 18 Nov 2020 08:48:36 +0100 Subject: [PATCH 11/11] Update ApiVersion.robot --- SOL003/VNFIndicator-API/ApiVersion.robot | 424 +++++++++++------------ 1 file changed, 212 insertions(+), 212 deletions(-) diff --git a/SOL003/VNFIndicator-API/ApiVersion.robot b/SOL003/VNFIndicator-API/ApiVersion.robot index 7dfc38510..bcb0549b0 100644 --- a/SOL003/VNFIndicator-API/ApiVersion.robot +++ b/SOL003/VNFIndicator-API/ApiVersion.robot @@ -1,213 +1,213 @@ -*** Settings *** - -Resource environment/variables.txt - -Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false -Library DependencyLibrary -Library JSONLibrary -Library JSONSchemaLibrary schemas/ - -*** Test Cases *** -POST API Version - Method not implemented - [Documentation] Test ID: 7.3.6.7.1 - ... Test title: POST API version - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version - [Documentation] Test ID: 7.3.6.7.2 - ... Test title: GET API Version - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version - Method not implemented - [Documentation] Test ID: 7.3.6.7.3 - ... Test title: PUT API Version - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version - Method not implemented - [Documentation] Test ID: 7.3.6.7.4 - ... Test title: PATCH API Version - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version - Method not implemented - [Documentation] Test ID: 7.3.6.7.5 - ... Test title: DELETE API Version - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -POST API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.6.7.6 - ... Test title: POST API version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that POST method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - POST API Version - Check HTTP Response Status Code Is 405 - -GET API Version with apiMajorVerion - [Documentation] Test ID: 7.3.6.7.7 - ... Test title: GET API Version with apiMajorVerion - ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - GET API Version - Check HTTP Response Status Code Is 200 - Check HTTP Response Body Json Schema Is ApiVersionInformation - -PUT API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.6.7.8 - ... Test title: PUT API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PUT method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PUT API Version - Check HTTP Response Status Code Is 405 - -PATCH API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.6.7.9 - ... Test title: PATCH API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that PATCH method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - PATCH API Version - Check HTTP Response Status Code Is 405 - -DELETE API Version with apiMajorVerion - Method not implemented - [Documentation] Test ID: 7.3.6.7.10 - ... Test title: DELETE API Version with apiMajorVerion - Method not implemented - ... Test objective: The objective is to test that DELETE method is not implemented - ... Pre-conditions: none - ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 - ... Config ID: Config_prod_VNFM - ... Applicability: none - ... Post-Conditions: none - DELETE API Version - Check HTTP Response Status Code Is 405 - -*** Keywords *** -POST API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -POST API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -GET API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PUT API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -PATCH API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -DELETE API Version with apiMajorVersion - Set Headers {"Accept":"${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_version - ${outputResponse}= Output response - Set Global Variable ${response} ${outputResponse} - -Check HTTP Response Status Code Is - [Arguments] ${expected_status} - Should Be Equal As Strings ${response['status']} ${expected_status} - Log Status code validated - -Check HTTP Response Body Json Schema Is - [Arguments] ${input} - ${schema} = Catenate ${input} .schema.json - Validate Json ${schema} ${response['body']} +*** Settings *** + +Resource environment/variables.txt + +Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 7.3.6.7.1 + ... Test title: POST API version - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 7.3.6.7.2 + ... Test title: GET API Version + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version - Method not implemented + [Documentation] Test ID: 7.3.6.7.3 + ... Test title: PUT API Version - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 7.3.6.7.4 + ... Test title: PATCH API Version - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 7.3.6.7.5 + ... Test title: DELETE API Version - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +POST API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.6.7.6 + ... Test title: POST API version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.1 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 7.3.6.7.7 + ... Test title: GET API Version with apiMajorVerion + ... Test objective: The objective is to test that GET method successfully return ApiVersionInformation + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.2 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET API Version + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is ApiVersionInformation + +PUT API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.6.7.8 + ... Test title: PUT API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.3 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.6.7.9 + ... Test title: PATCH API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.4 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version with apiMajorVerion - Method not implemented + [Documentation] Test ID: 7.3.6.7.10 + ... Test title: DELETE API Version with apiMajorVerion - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 9.3.3.3.5 - ETSI GS NFV-SOL 013 v2.7.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE API Version with apiMajorVersion + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/api_versions + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check HTTP Response Status Code Is + [Arguments] ${expected_status} + Should Be Equal As Strings ${response['status']} ${expected_status} + Log Status code validated + +Check HTTP Response Body Json Schema Is + [Arguments] ${input} + ${schema} = Catenate ${input} .schema.json + Validate Json ${schema} ${response['body']} Log Json Schema Validation OK \ No newline at end of file -- GitLab