From fb89f47f0b8188122d3aee0365fd4807602d38f7 Mon Sep 17 00:00:00 2001 From: hammad zafar Date: Tue, 9 Mar 2021 19:46:31 +0500 Subject: [PATCH 1/2] new resources added in NFVICapacityInformation-API --- .../ApiVersion.robot | 125 +++++ .../CapacityThresholds.robot | 131 +++++ .../IndividualCapacityThreshold.robot | 105 ++++ ...ndividualVIMsNFVICapacityInformation.robot | 90 ++++ .../NFVICapacityInformation.robot | 194 +++++++ .../NFVICapacityInformationKeywords.robot | 500 ++++++++++++++++++ .../NotificationConsumer.robot | 77 +++ .../environment/variables.txt | 95 ++++ .../jsons/CapacityShortageNotification.json | 21 + .../jsons/CapacityThresholdModifications.json | 3 + .../jsons/CreateCapacityThresholdRequest.json | 15 + .../schemas/CapacityThreshold.schema.json | 144 +++++ .../schemas/CapacityThresholds.schema.json | 148 ++++++ .../schemas/NfviCapacityInfo.schema.json | 143 +++++ .../schemas/NfviCapacityInfos.schema.json | 147 +++++ .../schemas/ProblemDetails.schema.json | 32 ++ 16 files changed, 1970 insertions(+) create mode 100644 SOL005/NFVICapacityInformation-API/ApiVersion.robot create mode 100644 SOL005/NFVICapacityInformation-API/CapacityThresholds.robot create mode 100644 SOL005/NFVICapacityInformation-API/IndividualCapacityThreshold.robot create mode 100644 SOL005/NFVICapacityInformation-API/IndividualVIMsNFVICapacityInformation.robot create mode 100644 SOL005/NFVICapacityInformation-API/NFVICapacityInformation.robot create mode 100644 SOL005/NFVICapacityInformation-API/NFVICapacityInformationKeywords.robot create mode 100644 SOL005/NFVICapacityInformation-API/NotificationConsumer.robot create mode 100644 SOL005/NFVICapacityInformation-API/environment/variables.txt create mode 100644 SOL005/NFVICapacityInformation-API/jsons/CapacityShortageNotification.json create mode 100644 SOL005/NFVICapacityInformation-API/jsons/CapacityThresholdModifications.json create mode 100644 SOL005/NFVICapacityInformation-API/jsons/CreateCapacityThresholdRequest.json create mode 100644 SOL005/NFVICapacityInformation-API/schemas/CapacityThreshold.schema.json create mode 100644 SOL005/NFVICapacityInformation-API/schemas/CapacityThresholds.schema.json create mode 100644 SOL005/NFVICapacityInformation-API/schemas/NfviCapacityInfo.schema.json create mode 100644 SOL005/NFVICapacityInformation-API/schemas/NfviCapacityInfos.schema.json create mode 100644 SOL005/NFVICapacityInformation-API/schemas/ProblemDetails.schema.json diff --git a/SOL005/NFVICapacityInformation-API/ApiVersion.robot b/SOL005/NFVICapacityInformation-API/ApiVersion.robot new file mode 100644 index 000000000..7a3b7f8b1 --- /dev/null +++ b/SOL005/NFVICapacityInformation-API/ApiVersion.robot @@ -0,0 +1,125 @@ +*** Settings *** +Resource NFVICapacityInformationKeywords.robot + +*** Test Cases *** +POST API Version - Method not implemented + [Documentation] Test ID: 5.3.6.1.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 v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version + [Documentation] Test ID: 5.3.6.1.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 v3.3.1 + ... Config ID: Config_prod_NFVO + ... 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: 5.3.6.1.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 v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + PUT API Version + Check HTTP Response Status Code Is 405 + +PATCH API Version - Method not implemented + [Documentation] Test ID: 5.3.6.1.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 v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + PATCH API Version + Check HTTP Response Status Code Is 405 + +DELETE API Version - Method not implemented + [Documentation] Test ID: 5.3.6.1.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 v3.3.1 + ... Config ID: Config_prod_NFVO + ... 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: 5.3.6.1.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 v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + POST API Version + Check HTTP Response Status Code Is 405 + +GET API Version with apiMajorVerion + [Documentation] Test ID: 5.3.6.1.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 v3.3.1 + ... Config ID: Config_prod_NFVO + ... 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: 5.3.6.1.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 v3.3.1 + ... Config ID: Config_prod_NFVO + ... 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: 5.3.6.1.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 v3.3.1 + ... Config ID: Config_prod_NFVO + ... 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: 5.3.6.1.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 v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + DELETE API Version + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NFVICapacityInformation-API/CapacityThresholds.robot b/SOL005/NFVICapacityInformation-API/CapacityThresholds.robot new file mode 100644 index 000000000..41887777e --- /dev/null +++ b/SOL005/NFVICapacityInformation-API/CapacityThresholds.robot @@ -0,0 +1,131 @@ +*** Settings *** +Resource NFVICapacityInformationKeywords.robot + +*** Test Cases *** +POST Create Capacity Threshold + [Documentation] Test ID: 5.3.6.3.1 + ... Test title: POST Create Capacity Threshold + ... Test objective: The objective is to test that POST method creates a Capacity Threshold + ... Pre-conditions: none + ... Reference: Clause 10.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + POST Create a Capacity Threshold + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is CapacityThreshold + Check HTTP Response Contains Resource URI + +POST Create Capacity Threshold - Unprocessible Entity + [Documentation] Test ID: 5.3.6.3.2 + ... Test title: POST Create Capacity Threshold - Unprocessible Entity + ... Test objective: The objective is to test that POST method creates a Capacity Threshold + ... Pre-conditions: none + ... Reference: Clause 10.4.4.3.1 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + POST Create a Capacity Threshold - Unreachable URI + Check HTTP Response Status Code Is 422 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET Capacity Thresholds + [Documentation] Test ID: 5.3.6.3.3 + ... Test title: GET Capacity Thresholds + ... Test objective: The objective is to GET Capacity Thresholds objects + ... Pre-conditions: none + ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Capacity Thresholds + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is CapacityThresholds + +GET Capacity Thresholds - Filter + [Documentation] Test ID: 5.3.6.3.4 + ... Test title: GET Capacity Thresholds - Filter + ... Test objective: The objective is to GET Capacity Thresholds objects using filter + ... Pre-conditions: none + ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Capacity Thresholds using filter + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is CapacityThresholds + +GET Capacity Thresholds Bad Request Invalid attribute-based filtering parameters + [Documentation] Test ID: 5.3.6.3.5 + ... Test title: GET Capacity Thresholds Bad Request Invalid attribute-based filtering parameters + ... Test objective: The objective is to get information about Capacity Thresholds with Invalid attribute-based filtering parameters + ... Pre-conditions: none + ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Capacity Thresholds using invalid filter + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET Capacity Thresholds - Bad Request Response too Big + [Documentation] Test ID: 5.3.6.3.6 + ... Test title: GET Capacity Thresholds - Bad Request Response too Big + ... Test objective: The objective is test that the retrieval of existing Capacity Thresholds list fails because response is too big, and perform the JSON schema validation of the failed operation HTTP response. + ... Pre-conditions: none + ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: NFVO does not support paged response. + ... Post-Conditions: none + GET Capacity Thresholds without Paging support + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET Capacity Thresholds as Paged Response + [Documentation] Test ID: 5.3.6.3.7 + ... Test title: GET Capacity Thresholds as Paged Response + ... Test objective: The objective is to test that GET method retrieves the list of existing Capacity Thresholds as paged response. + ... Pre-conditions: none + ... Reference: Clause 10.4.4.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: NFVO supports paged response. + ... Post-Conditions: none + GET Capacity Thresholds with Paging support + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Contains Link + +PUT Capacity Thresholds - Method not implemented + [Documentation] Test ID: 5.3.6.3.8 + ... Test title: PUT Capacity Thresholds - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 10.4.4.3.3 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + PUT Capacity Thresholds + Check HTTP Response Status Code Is 405 + +PATCH Capacity Thresholds - Method not implemented + [Documentation] Test ID: 5.3.6.3.9 + ... Test title: PATCH Capacity Thresholds - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 10.4.4.3.4 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + PATCH Capacity Thresholds + Check HTTP Response Status Code Is 405 + +DELETE Capacity Thresholds - Method not implemented + [Documentation] Test ID: 5.3.6.3.10 + ... Test title: DELETE Capacity Thresholds - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 10.4.4.3.5 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + DELETE Capacity Thresholds + Check HTTP Response Status Code Is 405 diff --git a/SOL005/NFVICapacityInformation-API/IndividualCapacityThreshold.robot b/SOL005/NFVICapacityInformation-API/IndividualCapacityThreshold.robot new file mode 100644 index 000000000..fc3f2003e --- /dev/null +++ b/SOL005/NFVICapacityInformation-API/IndividualCapacityThreshold.robot @@ -0,0 +1,105 @@ +*** Settings *** +Resource NFVICapacityInformationKeywords.robot + +*** Test Cases *** +POST Individual Capacity Threshold + [Documentation] Test ID: 5.3.6.4.1 + ... Test title: POST Individual Capacity Threshold + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 10.4.5.3.1 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + POST Individual Capacity Threshold + Check HTTP Response Status Code Is 405 + +GET Individual Capacity Thresholds + [Documentation] Test ID: 5.3.6.4.2 + ... Test title: GET Capacity Thresholds + ... Test objective: The objective is to test that GET method reads information about Individual Capacity Threshold + ... Pre-conditions: none + ... Reference: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Individual Capacity Threshold + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is CapacityThresholds + +GET Individual Capacity Thresholds - NOT FOUND + [Documentation] Test ID: 5.3.6.4.3 + ... Test title: GET Capacity Thresholds - NOT FOUND + ... Test objective: The objective is to test that GET method returns an error when using and invalid URI + ... Pre-conditions: none + ... Reference: Clause 10.4.5.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Individual Capacity Threshold - Invalid URI + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails + +PUT Individual Capacity Threshold - Method not implemented + [Documentation] Test ID: 5.3.6.4.4 + ... Test title: PUT Capacity Thresholds - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 10.4.5.3.3 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + PUT Individual Capacity Threshold + Check HTTP Response Status Code Is 405 + +PATCH Individual Capacity Threshold - Success + [Documentation] Test ID: 5.3.6.4.5 + ... Test title: PATCH Individual Capacity Threshold - Success + ... Test objective: The objective is to test that PATCH method successfully modifies an individual Capacity Threshold resource + ... Pre-conditions: none + ... Reference: Clause 10.4.5.3.3 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: Capacity Threshold modified + PATCH Individual Capacity Threshold + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is CapacityThresholds + +PATCH Individual Capacity Threshold - Precondition Failed + [Documentation] Test ID: 5.3.6.4.6 + ... Test title: PATCH Individual Capacity Threshold - Precondition Failed + ... Test objective: The objective is to that the modification of individual Capacity Threshold fails because precondition given in an HTTP request header is not fulfilled due to an ETag mismatch. + ... Pre-conditions: none + ... Reference: Clause 10.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + PATCH Individual Capacity Threshold - ETag Mismatch + Check HTTP Response Status Code Is 412 + Check HTTP Response Body Json Schema Is ProblemDetails + +PATCH Individual Capacity Threshold - Unprocessible Entity + [Documentation] Test ID: 5.3.6.4.7 + ... Test title: PATCH Individual Capacity Threshold - Precondition Failed + ... Test objective: The objective is to that the modification of individual Capacity Threshold fails because callbackUri provided in the request body is unreachable. + ... Pre-conditions: none + ... Reference: Clause 10.4.5.3.4 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + PATCH Individual Capacity Threshold - Unreachable CallbackURI + Check HTTP Response Status Code Is 422 + Check HTTP Response Body Json Schema Is ProblemDetails + +DELETE Individual VNF Snapshot + [Documentation] Test ID: 7.3.1.41.8 + ... Test title: DELETE Individual VNF Snapshot + ... Test objective: The objective is to delete a VNF Snapshot + ... Pre-conditions: none + ... Reference: Clause 5.4.24.3.5 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: VNF Snapshot deleted + DELETE Individual Capacity Threshold + Check HTTP Response Status Code Is 204 + Check Postcondition resource is deleted \ No newline at end of file diff --git a/SOL005/NFVICapacityInformation-API/IndividualVIMsNFVICapacityInformation.robot b/SOL005/NFVICapacityInformation-API/IndividualVIMsNFVICapacityInformation.robot new file mode 100644 index 000000000..048f031cc --- /dev/null +++ b/SOL005/NFVICapacityInformation-API/IndividualVIMsNFVICapacityInformation.robot @@ -0,0 +1,90 @@ +*** Settings *** +Resource NFVICapacityInformationKeywords.robot + +*** Test Cases *** +POST Individual VIMs NFVI Capacity Information - Method not implemented + [Documentation] Test ID: 5.3.6.3.1 + ... Test title: POST Individual VIMs NFVI Capacity Information - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 10.4.3.3.1 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + POST Individual VIMs NFVI Capacity Information + Check HTTP Response Status Code Is 405 + +GET Information about an Individual VIMs NFVI Capacity Information + [Documentation] Test ID: 5.3.6.3.2 + ... Test title: GET Information about an Individual VIMs NFVI Capacity Information + ... Test objective: The objective is to retrieve information about Individual VIMs NFVI Capacity Information + ... Pre-conditions: none + ... Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Individual VIMs NFVI Capacity Information + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is NfviCapacityInfo + +GET Information about an Individual VIMs NFVI Capacity Information using filter query parameter + [Documentation] Test ID: 5.3.6.3.2 + ... Test title: GET Information about an Individual VIMs NFVI Capacity Information using filter query parameter + ... Test objective: The objective is to retrieve information about Individual VIMs NFVI Capacity Information using filter query parameter + ... Pre-conditions: none + ... Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET Individual VIMs NFVI Capacity Information using filter + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is NfviCapacityInfo + +GET Information about an Individual VIMs NFVI Capacity Information - NOT FOUND + [Documentation] Test ID: 5.3.6.3.4 + ... Test title: GET Information about an Individual VIMs NFVI Capacity Information - NOT FOUND + ... Test objective: The objective is to test that the retrieval of Individual VIMs NFVI Capacity Information fails when using an invalid resource identifier. + ... Pre-conditions: none + ... Reference: Clause 10.4.3.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFV-MANO + ... Applicability: none + ... Post-Conditions: none + GET Individual VIMs NFVI Capacity Information with Invalid VIM ID + Check HTTP Response Status Code Is 404 + Check HTTP Response Body Json Schema Is ProblemDetails + +PUT Individual VIMs NFVI Capacity Information - Method not implemented + [Documentation] Test ID: 5.3.6.3.5 + ... Test title: PUT Individual VIMs NFVI Capacity Information - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 10.4.3.3.3 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: VNF Snapshot Package not modified + PUT Individual VIMs NFVI Capacity Information + Check HTTP Response Status Code Is 405 + +PATCH Individual VIMs NFVI Capacity Information - Method Not implemented + [Documentation] Test ID: 5.3.6.3.6 + ... Test title: PATCH Individual VIMs NFVI Capacity Information + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 10.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: VNF Snapshot Package modified + PATCH Individual VIMs NFVI Capacity Information + Check HTTP Response Status Code Is 405 + +DELETE Individual VIMs NFVI Capacity Information - Method Not implemented + [Documentation] Test ID: 5.3.6.3.7 + ... Test title: DELETE Individual VIMs NFVI Capacity Information - Method Not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 10.4.3.3.5 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: VNF Snapshot Package deleted + DELETE Individual VIMs NFVI Capacity Information + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NFVICapacityInformation-API/NFVICapacityInformation.robot b/SOL005/NFVICapacityInformation-API/NFVICapacityInformation.robot new file mode 100644 index 000000000..07113ced8 --- /dev/null +++ b/SOL005/NFVICapacityInformation-API/NFVICapacityInformation.robot @@ -0,0 +1,194 @@ +*** Settings *** +Resource NFVICapacityInformationKeywords.robot + +*** Test Cases *** +POST NFVI Capacity Information - Method not implemented + [Documentation] Test ID: 5.3.6.2.1 + ... Test title: POST NFVI Capacity Information - Method not implemented + ... Test objective: The objective is to test that POST method is not implemented + ... Pre-conditions: none + ... Reference: Clause 10.4.2.3.1 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + POST NFVI Capacity Information + Check HTTP Response Status Code Is 405 + +GET NFVI Capacity Information + [Documentation] Test ID: 5.3.6.2.2 + ... Test title: GET NFVI Capacity Information + ... Test objective: The objective is to GET NFVI Capacity Information objects + ... Pre-conditions: none + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET NFVI Capacity Information + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is NfviCapacityInfos + +GET NFVI Capacity Information - Filter + [Documentation] Test ID: 5.3.6.2.3 + ... Test title: GET NFVI Capacity Information - Filter + ... Test objective: The objective is to GET NFVI Capacity Information objects using filter + ... Pre-conditions: none + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET NFVI Capacity Information with filter + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is NfviCapacityInfos + +GET NFVI Capacity Information Bad Request Invalid attribute-based filtering parameters + [Documentation] Test ID: 5.3.6.2.4 + ... Test title: GET NFVI Capacity Information Bad Request Invalid attribute-based filtering parameters + ... Test objective: The objective is to get information about NFVI Capacity Information with Invalid attribute-based filtering parameters + ... Pre-conditions: none + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET NFVI Capacity Information with bad attribute + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET NFVI Capacity Information Bad Request Invalid attribute selector + [Documentation] Test ID: 5.3.6.2.5 + ... Test title: GET NFVI Capacity Information Bad Request Invalid attribute selector + ... Test objective: The objective is to get information about NFVI Capacity Information with Invalid attribute selector + ... Pre-conditions: none + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET NFVI Capacity Information with bad filter + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET NFVI Capacity Information with "all_fields" attribute selector + [Documentation] Test ID: 5.3.6.2.6 + ... Test title: GET NFVI Capacity Information with "all_fields" attribute selector + ... Test objective: The objective is to query NFVI Capacity Information with "all_fields" attribute selector + ... Pre-conditions: none + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET NFVI Capacity Information with all_fields attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is NfviCapacityInfos + +GET NFVI Capacity Information with "exclude_default" attribute selector + [Documentation] Test ID: 5.3.6.2.7 + ... Test title: GET NFVI Capacity Information with "exclude_default" attribute selector + ... Test objective: The objective is to query NFVI Capacity Information with "exclude_default" attribute selector + ... Pre-conditions: none + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET NFVI Capacity Information with exclude_default attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is NfviCapacityInfos + +GET NFVI Capacity Information with "fields" attribute selector + [Documentation] Test ID: 5.3.6.2.8 + ... Test title: GET NFVI Capacity Information with "fields" attribute selector + ... Test objective: The objective is to query NFVI Capacity Information with "fields" attribute selector + ... Pre-conditions: none + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET NFVI Capacity Information with fields attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is NfviCapacityInfos + +GET NFVI Capacity Information with "exclude_default" and "fields" attribute selector + [Documentation] Test ID: 5.3.6.2.9 + ... Test title: GET NFVI Capacity Information with "exclude_default" and "fields" attribute selector + ... Test objective: The objective is to query NFVI Capacity Information with "exclude_default" and "fields" attribute selector + ... Pre-conditions: none + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET NFVI Capacity Information with exclude_default and fields attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is NfviCapacityInfos + +GET NFVI Capacity Information with "exclude_fields" attribute selector + [Documentation] Test ID: 5.3.6.2.10 + ... Test title: GET NFVI Capacity Information with "exclude_fields" attribute selector + ... Test objective: The objective is to query NFVI Capacity Information with "exclude_fields" attribute selector + ... Pre-conditions: none + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + GET NFVI Capacity Information with exclude_fields attribute selector + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is NfviCapacityInfos + +GET NFVI Capacity Information - Bad Request Response too Big + [Documentation] Test ID: 5.3.6.2.11 + ... Test title: GET NFVI Capacity Information - Bad Request Response too Big + ... Test objective: The objective is test that the retrieval of existing NFVI Capacity Information list fails because response is too big, and perform the JSON schema validation of the failed operation HTTP response. + ... Pre-conditions: none + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: NFVO does not support paged response. + ... Post-Conditions: none + GET NFVI Capacity Information without Paging support + Check HTTP Response Status Code Is 400 + Check HTTP Response Body Json Schema Is ProblemDetails + +GET NFVI Capacity Information as Paged Response + [Documentation] Test ID: 5.3.6.2.12 + ... Test title: GET NFVI Capacity Information as Paged Response + ... Test objective: The objective is to test that GET method retrieves the list of existing NFVI Capacity Information as paged response. + ... Pre-conditions: none + ... Reference: Clause 10.4.2.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: NFVO supports paged response. + ... Post-Conditions: none + GET NFVI Capacity Information with Paging support + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Contains Link + +PUT NFVI Capacity Information - Method not implemented + [Documentation] Test ID: 5.3.6.2.13 + ... Test title: PUT NFVI Capacity Information - Method not implemented + ... Test objective: The objective is to test that PUT method is not implemented + ... Pre-conditions: none + ... Reference: Clause 10.4.2.3.3 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + PUT NFVI Capacity Information + Check HTTP Response Status Code Is 405 + +PATCH NFVI Capacity Information - Method not implemented + [Documentation] Test ID: 5.3.6.2.14 + ... Test title: PATCH NFVI Capacity Information - Method not implemented + ... Test objective: The objective is to test that PATCH method is not implemented + ... Pre-conditions: none + ... Reference: Clause 10.4.2.3.4 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + PATCH NFVI Capacity Information + Check HTTP Response Status Code Is 405 + +DELETE NFVI Capacity Information - Method not implemented + [Documentation] Test ID: 5.3.6.2.15 + ... Test title: DELETE NFVI Capacity Information - Method not implemented + ... Test objective: The objective is to test that DELETE method is not implemented + ... Pre-conditions: none + ... Reference: Clause 10.4.2.3.5 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + DELETE NFVI Capacity Information + Check HTTP Response Status Code Is 405 diff --git a/SOL005/NFVICapacityInformation-API/NFVICapacityInformationKeywords.robot b/SOL005/NFVICapacityInformation-API/NFVICapacityInformationKeywords.robot new file mode 100644 index 000000000..994af7b62 --- /dev/null +++ b/SOL005/NFVICapacityInformation-API/NFVICapacityInformationKeywords.robot @@ -0,0 +1,500 @@ +*** Settings *** +Resource environment/variables.txt +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library DependencyLibrary +Library JSONLibrary +Library JSONSchemaLibrary schemas/ +Library OperatingSystem +Library String + +*** Keywords *** +POST API Version + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + 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 SEPARATOR= ${input} .schema.json + Validate Json ${schema} ${response['body']} + Log Json Schema Validation OK + +POST NFVI Capacity Information + Log Trying to perform a POST. This method should not be implemented. + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type":"${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET NFVI Capacity Information + Log The GET method queries information about NFVI Capacity Information. + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET NFVI Capacity Information with filter + Log The GET method queries information about NFVI Capacity Information. + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos?${POS_FILTER} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET NFVI Capacity Information with bad attribute + Log The GET method queries information about NFVI Capacity Information. + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos?attribute_not_exist=some_value + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET NFVI Capacity Information with bad filter + Log The GET method queries information about NFVI Capacity Information. + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos?fields=wrong_field + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET NFVI Capacity Information with all_fields attribute selector + Log Query status information about NFVI Capacity Information, using fields + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos?all_fields + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NFVI Capacity Information with exclude_default attribute selector + Log Query status information about NFVI Capacity Information using fields + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos?exclude_default + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NFVI Capacity Information with fields attribute selector + Log Query status information about NFVI Capacity Information, using fields + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos?fields=${fields} + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NFVI Capacity Information with exclude_default and fields attribute selector + Log Query status information about NFVI Capacity Information, using fields + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos?fields=${fields}&exclude_default + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NFVI Capacity Information with exclude_fields attribute selector + Log Query status information about NFVI Capacity Information, using fields + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos?exclude_fields=${fields} + ${output}= Output response + Set Suite Variable ${response} ${output} + +GET NFVI Capacity Information without Paging support + Run Keyword If ${PAGING_SUPPORTED} == 0 GET NFVI Capacity Information + +GET NFVI Capacity Information with Paging support + Run Keyword If ${PAGING_SUPPORTED} == 1 GET NFVI Capacity Information + +Check HTTP Response Header Contains Link + ${linkURL}= Get Value From Json ${response['headers']} $..Link + Should Not Be Empty ${linkURL} + +PUT NFVI Capacity Information + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH NFVI Capacity Information + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE NFVI Capacity Information + Log Trying to perform a DELETE. This method should not be implemented + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST Individual VIMs NFVI Capacity Information + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos/${vimId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET Individual VIMs NFVI Capacity Information + log Trying to get information about an Individual VIMs NFVI Capacity Information + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos/${vimId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET Individual VIMs NFVI Capacity Information using filter + log Trying to get information about an Individual VIMs NFVI Capacity Information + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos/${vimId}?${POS_FILTER} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET Individual VIMs NFVI Capacity Information with Invalid VIM ID + log Trying to get information about an Individual VIMs NFVI Capacity Information + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshot_packages/${invalidVimId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT Individual VIMs NFVI Capacity Information + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos/${vimId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH Individual VIMs NFVI Capacity Information + log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos/${vimId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE Individual VIMs NFVI Capacity Information + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos/${vimId} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST Create a Capacity Threshold + Log Trying to POST create a new capacity threshold. + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/CreateCapacityThresholdRequest.json + ${body}= Format String ${template} callback_uri=${callback_uri} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/capacity_thresholds ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST Create a Capacity Threshold - Unreachable URI + Log Trying to POST create a new capacity threshold using an unreachable callbackUri in the request body + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template}= Get File jsons/CreateCapacityThresholdRequest.json + ${body}= Format String ${template} callback_uri=${unreachable_callback_uri} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/capacity_thresholds ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check HTTP Response Contains Resource URI + ${ResourceURI}= Get Value From Json ${response['headers']} $..Location + Should Not Be Empty ${ResourceURI} + +GET Capacity Thresholds + log Trying to get information about multiple Capacity Thresholds + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/capacity_thresholds + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET Capacity Thresholds using filter + log Trying to get information about multiple Capacity Thresholds using filtering parameters + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/capacity_thresholds?${POS_FILTER} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET Capacity Thresholds using invalid filter + log Trying to get information about multiple Capacity Thresholds using invalid filtering parameters + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/capacity_thresholds?${NEG_FILTER} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET Capacity Thresholds without Paging support + Run Keyword If ${PAGING_SUPPORTED} == 0 GET Capacity Thresholds + +GET Capacity Thresholds with Paging support + Run Keyword If ${PAGING_SUPPORTED} == 1 GET Capacity Thresholds + +PUT Capacity Thresholds + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/capacity_thresholds + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH Capacity Thresholds + log Trying to perform a PATCH. This method should not be implemented + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/capacity_thresholds + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE Capacity Thresholds + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/capacity_thresholds + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +POST Individual Capacity Threshold + log Trying to perform a POST. This method should not be implemented + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Post ${apiRoot}/${apiName}/${apiMajorVersion}/capacity_thresholds/${capacityThreshold} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET Individual Capacity Threshold + log Trying to get information about an Individual Capacity Threshold + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/capacity_thresholds/${capacityThreshold} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET Individual Capacity Threshold - Invalid URI + log Trying to get information about an Individual Capacity Threshold + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/capacity_thresholds/${invalid_capacityThreshold} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT Individual Capacity Threshold + log Trying to perform a PUT. This method should not be implemented + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${apiRoot}/${apiName}/${apiMajorVersion}/capacity_thresholds/${capacityThreshold} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH Individual Capacity Threshold + log Trying to perform a PATCH to modify callback URI for an individual Capacity Threshold + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} + Set Headers {"If-Match": "${original_etag}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/CapacityThresholdModificationRequest.json + ${body}= Format String ${template} callback_uri=${new_callback_uri} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/capacity_thresholds/${capacityThreshold} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH Individual Capacity Threshold - ETag mismatch + log Trying to perform a PATCH to modify individual VNF snapshot + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} + Set Headers {"If-Match": "${invalid_etag}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/CapacityThresholdModificationRequest.json + ${body}= Format String ${template} callback_uri=${new_callback_uri} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/capacity_thresholds/${capacityThreshold} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH Individual Capacity Threshold - Unreachable CallbackURI + log Trying to perform a PATCH to modify individual VNF snapshot + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} + Set Headers {"If-Match": "${invalid_etag}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${template} = Get File jsons/CapacityThresholdModificationRequest.json + ${body}= Format String ${template} callback_uri=${unreachable_callback_uri} + Patch ${apiRoot}/${apiName}/${apiMajorVersion}/capacity_thresholds/${capacityThreshold} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE Individual Capacity Threshold + log Trying to DELETE an Individual Capacity Threshold + Set Headers {"Accept":"${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${apiRoot}/${apiName}/${apiMajorVersion}/capacity_thresholds/${capacityThreshold} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +Check Postcondition resource is deleted + GET Individual Capacity Threshold + Check HTTP Response Status Code Is 404 + +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_HEADER}":"${AUTHORIZATION_TOKEN}"} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/capacity_thresholds/${capacityThreshold} + Integer response status 200 + Validate Json response body CapacityThreshold.schema.json + Set Global Variable ${callbackResp} response body callbackUri + +POST Capacity Shortage Notification + log Trying to perform a POST to deliver notification. + Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + ${body} = Get File jsons/CapacityShortageNotification.json + Post ${callbackResp} ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET reach the notification endpoint + Log Trying to reach the notification endpoint using GET method. + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${callbackResp} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +GET reach an unreachable notification endpoint + Log Trying to reach the notification endpoint using GET method. + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + GET ${unreachable_callbackuri} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PUT notification endpoint + Log Trying to perform a PUT. This method should not be implemented. + Set Headers {"Accept": "${ACCEPT_JSON}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} + Put ${callbackResp} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +PATCH notification endpoint + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + Patch ${callbackResp} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + +DELETE notification endpoint + 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_HEADER}":"${AUTHORIZATION_TOKEN}"} + Delete ${callbackResp} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} diff --git a/SOL005/NFVICapacityInformation-API/NotificationConsumer.robot b/SOL005/NFVICapacityInformation-API/NotificationConsumer.robot new file mode 100644 index 000000000..456a7e3ab --- /dev/null +++ b/SOL005/NFVICapacityInformation-API/NotificationConsumer.robot @@ -0,0 +1,77 @@ +*** Settings *** +Resource NFVICapacityInformationKeywords.robot +Suite Setup Check resource existence and get CallbackUri + +*** Test Cases *** +Capacity Shortage Notification + [Documentation] Test ID: 5.3.6.5.1 + ... Test title: Capacity Shortage Notification + ... Test objective: The objective is to test that Capacity Shortage Notification is delivered with success to the notification consumer. + ... Pre-conditions: The consumer has already created an Individual Capacity Threshold resource + ... Reference: Clause 10.4.6.3.1 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + POST Capacity Shortage Notification + Check HTTP Response Status Code Is 204 + +Test the Notification Endpoint - Successful + [Documentation] Test ID: 5.3.6.5.2 + ... Test title: Test the Notification Endpoint - Successful + ... Test objective: The objective is to test the Notification Endpoint provided by the notification consumer. + ... Pre-conditions: The consumer has already created an Individual Capacity Threshold resource + ... Reference: Clause 10.4.6.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + Get reach the notification endpoint + Check HTTP Response Status Code Is 204 + +Test the Notification Endpoint - UNREACHABLE + [Documentation] Test ID: 5.3.6.5.3 + ... Test title: Test the Notification Endpoint - UNREACHABLE + ... Test objective: The objective is to test the Notification Endpoint provided by the notification consumer. + ... Pre-conditions: The consumer has already created an Individual Capacity Threshold resource + ... Reference: Clause 10.4.6.3.2 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: The notification endpoint is unreachable by the API producer. + ... Post-Conditions: none + GET reach an unreachable notification endpoint + Check HTTP Response Status Code Is 422 + Check HTTP Response Body Json Schema Is ProblemDetails + +PUT Notification endpoint - Method Not Implemented + [Documentation] Test ID: 5.3.6.5.4 + ... Test title: PUT Notification endpoint - Method Not Implemented + ... Test objective: The objective is to test the PUT method for Notification Endpoint provided by the consumer is not implemented. + ... Pre-conditions: A notification endpoint is provided by the API consumer upon subscription. + ... Reference: Clause 10.4.6.3.3 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + PUT notification endpoint + Check HTTP Response Status Code Is 405 + +PATCH Notification endpoint - Method Not Implemented + [Documentation] Test ID: 5.3.6.5.5 + ... Test title: PATCH Notification endpoint - Method Not Implemented + ... Test objective: The objective is to test the PATCH method for Notification Endpoint provided by the consumer is not implemented. + ... Pre-conditions: A notification endpoint is provided by the API consumer upon subscription. + ... Reference: Clause 10.4.6.3.4 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + PATCH notification endpoint + Check HTTP Response Status Code Is 405 + +DELETE Notification endpoint - Method Not Implemented + [Documentation] Test ID: 5.3.6.5.6 + ... Test title: DELETE Notification endpoint - Method Not Implemented + ... Test objective: The objective is to test the DELETE method for Notification Endpoint provided by the consumer is not implemented. + ... Pre-conditions: A notification endpoint is provided by the API consumer upon subscription. + ... Reference: Clause 10.4.6.3.5 - ETSI GS NFV-SOL 005 [3] v3.3.1 + ... Config ID: Config_prod_Notif_Endpoint + ... Applicability: none + ... Post-Conditions: none + DELETE notification endpoint + Check HTTP Response Status Code Is 405 \ No newline at end of file diff --git a/SOL005/NFVICapacityInformation-API/environment/variables.txt b/SOL005/NFVICapacityInformation-API/environment/variables.txt new file mode 100644 index 000000000..8bd8df1ce --- /dev/null +++ b/SOL005/NFVICapacityInformation-API/environment/variables.txt @@ -0,0 +1,95 @@ +*** Variables *** +${NFVO_HOST} localhost # Hostname of the NFVO +${NFVO_PORT} 8081 # Listening port of the NFVO +${NFVO_SCHEMA} https +${AUTHORIZATION_HEADER} Authorization +${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 +${ACCEPT_JSON} application/json +${AUTH_USAGE} 1 +${CONTENT_TYPE_JSON} application/json +${NEG_AUTHORIZATION} Bearer negativetoken +${NFVO_FIELDS} 1 + +${CONTENT_TYPE_PATCH} application/merge-patch+json + +${original_etag} 1234 +${invalid_etag} 4321 + +${apiRoot} / +${apiMajorVersion} v1 +${apiName} nfvici + +${NFVO_CHECKS_NOTIF_ENDPOINT} 1 ## If true, during subscription, the FUT performs a get to the notification endpoint + +${NFVO_ALLOWS_DUPLICATE_SUBS} 1 + +${PAGING_SUPPORTED} 1 + +${response} httpresponse + +${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar + +${callback_uri} http://localhost +${callback_port} 9091 +${callback_endpoint} /endpoint +${callback_endpoint_fwd} /endpoint/check +${callback_endpoint_error} /endpoint_404 +${sleep_interval} 20s +${total_polling_time} 2 min +${polling_interval} 10 sec +${new_callback_uri} http://newcallbackuri/for/modifications +${unreachable_callback_uri} http://unreachable/endpoint + +${notification_request} [] +${notification_response} [] + +${NFVO_non-MANO_OK} 1 # If 1 means that non-MANO artifacts are supported by the NFVO +${non_mano_artifact_sets} + + +${subscriptionId} f3ae6df7-07e1-47c9-8924-9ebe10343586 +${erroneousSubscriptionId} 442e3ee5-0499-4849-9b31-eb91ce1638f1 # Not existing ID on the subscriptions +${newSubscriptionId} newSubsciptionId + +${origResponse} httpresponse + +${filter_ok} callbackUri=http://172.22.1.7:9091/vnfpkgm/subscriptions +${filter_ko} nfvId=f9f130e4-05eb-4082-a676-4c97d13a883d # Not existant filter attribute-based +${SEPERATOR} = + + +${ACCEPT_PLAIN} text/plain +${CONTENT_TYPE_PLAIN} text/plain +${vnfPkgPlainVNFD} c26ad7fb-072b-48c4-a663-7d71646d9e98 # The VNF Pakcage contains a VNFD which is a Single Plain File +${ACCEPT_ZIP} application/zip +${ACCEPT_OCTET} application/octet-stream +${CONTENT_TYPE_ZIP} application/zip +${vnfPkgZipVNFD} f5b220d4-6177-4ebb-a554-a43311e16075 # The VNF Package contains a VNFD composed by multiple files +${erroneousVnfPkgId} erroneousVnfPackageId # Given ID for vnfPkg not present in database +${vndIdZipVnfd} f5b220d4-6177-4ebb-a554-a43311e16075 + + +${artifactPath} artifactPath +${CONTENT_TYPE_OCTET} application/octet-stream +${NFVO_RANGE_OK} 1 # If 1 means that Range is supported by the NFVO +${range} bytes=0-1023 +${full_size} 2000 # Size of the requested artifact to be downloaded via partial downloads +${erroneousRange} bytes=10000000-1000000000 # Requesting a out of range number of bytes +${vnfPackageOctetStreamId} octetStreamPkgId +${vnfdOctetStreamId} octetStreamVnfdId +${vndEncryptedArtifactID} encryptedId + + +${length} 1024 + +${POS_FILTER} vimId=41fdd38a-3d4c-465c-83e0-f80e014425f8 ,resourceType=VR_COMPUTE # Positive case, suing compiant fields name for filtering get request +${NEG_FILTER} nfvId=41fdd38a-3d4c-465c-83e0-f80e014425f8 # Negative case, using wrong name of field +${fields} softwareImages,additionalArtifacts +${VAR_SEPERATOR} & + +${callbackResp} localhost + +${vimId} +${invalidVimId} +${capacityThreshold} +${invalid_capacityThreshold} \ No newline at end of file diff --git a/SOL005/NFVICapacityInformation-API/jsons/CapacityShortageNotification.json b/SOL005/NFVICapacityInformation-API/jsons/CapacityShortageNotification.json new file mode 100644 index 000000000..2e46728e9 --- /dev/null +++ b/SOL005/NFVICapacityInformation-API/jsons/CapacityShortageNotification.json @@ -0,0 +1,21 @@ +{ + "id": "", + "notificationType": "", + "thresholdId": "", + "timeStamp": "", + "objectInstanceId": "", + "direction": "UP", + "capacityInformation": + { + "resourceType": "VR_COMPUTE", + "capacityMeasurementName": "name", + "totalCapacity": "", + "allocatedCapacity": "", + "availableCapacity": "" + }, + "_links": + { + "objectInstance": "", + "threshold": "" + } +} \ No newline at end of file diff --git a/SOL005/NFVICapacityInformation-API/jsons/CapacityThresholdModifications.json b/SOL005/NFVICapacityInformation-API/jsons/CapacityThresholdModifications.json new file mode 100644 index 000000000..797c012d2 --- /dev/null +++ b/SOL005/NFVICapacityInformation-API/jsons/CapacityThresholdModifications.json @@ -0,0 +1,3 @@ +{ + "callbackUri": "{callback_uri}" +} \ No newline at end of file diff --git a/SOL005/NFVICapacityInformation-API/jsons/CreateCapacityThresholdRequest.json b/SOL005/NFVICapacityInformation-API/jsons/CreateCapacityThresholdRequest.json new file mode 100644 index 000000000..97466ab2f --- /dev/null +++ b/SOL005/NFVICapacityInformation-API/jsons/CreateCapacityThresholdRequest.json @@ -0,0 +1,15 @@ +{ + "objectInstanceId": "objectInstanceId", + "criteria": [ + { + "capacityMetric": + { + "resourceType": "VR_COMPUTE", + "capacityMeasurementName": "string", + "capacityType": "TOTAL" + }, + "thresholdType": "SIMPLE" + } + ], + "callbackUri": "{callback_uri}" +} \ No newline at end of file diff --git a/SOL005/NFVICapacityInformation-API/schemas/CapacityThreshold.schema.json b/SOL005/NFVICapacityInformation-API/schemas/CapacityThreshold.schema.json new file mode 100644 index 000000000..054a4e7fd --- /dev/null +++ b/SOL005/NFVICapacityInformation-API/schemas/CapacityThreshold.schema.json @@ -0,0 +1,144 @@ +{ + "type": "object", + "description": "This type represents a capacity threshold. It shall comply with the provisions defined in table 10.5.2.8-1.\n", + "required": [ + "id", + "objectInstanceId", + "criteria", + "callbackUri", + "_links" + ], + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "objectInstanceId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "subObjectInstanceIds": { + "description": "Identifiers of the sub-object instances of the measured object instance associate with this capacity threshold.\nIf this attribute is absent, measurements are taken for all sub-object instances of the measured object instance.\n", + "type": "array", + "items": { + "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance. Representation: string of variable length.\n", + "type": "string" + } + }, + "criteria": { + "type": "object", + "description": "This type represents criteria that define a capacity threshold.\nIt shall comply with the provisions defined in table 10.5.3.3-1.\n", + "required": [ + "capacityMetric", + "thresholdType" + ], + "properties": { + "capacityMetric": { + "description": "Defines the capacity metric for which the threshold applies.\n", + "type": "object", + "required": [ + "resourceType", + "capacityMeasurementName", + "capacityType" + ], + "properties": { + "resourceType": { + "type": "string", + "description": "The enumeration NfviCapacityResourceTypeEnumeration shall comply with the provisions in table 10.5.4.3-1.\n* VR_COMPUTE: For virtualised compute resource.\n* VR_NETWORK: For virtualised network resource.\n* VR_STORAGE: For virtualised storage resource.\n* HOST_COMPUTE: For host compute resource.\n", + "enum": [ + "VR_COMPUTE", + "VR_NETWORK", + "VR_STORAGE", + "HOST_COMPUTE" + ] + }, + "capacityMeasurementName": { + "description": "Name of the capacity measurement. Different resource types can have different associated capacity measurements,\ntypically associated to different sub-types of the resource type.\n", + "type": "string" + }, + "capacityType": { + "description": "The type of capacity for the threshold.\nPermitted values:\n-\tTOTAL: for total capacity.\n-\tALLOCATED: for allocated/used capacity.\n-\tRESERVED: for reserved capacity.\n-\tAVAILABLE: for available capacity.\n", + "type": "string", + "enum": [ + "TOTAL", + "ALLOCATED", + "RESERVED", + "AVAILABLE" + ] + } + } + }, + "thresholdType": { + "description": "Type of capacity threshold. This attribute determines which other attributes are present in the data structure.\nPermitted values:\n-\tSIMPLE: Single-valued static threshold.\nIn the present document, simple thresholds are defined. The definition of additional threshold types is left\nfor future specification.\n", + "type": "string", + "enum": [ + "SIMPLE" + ] + }, + "simpleThresholdDetails": { + "description": "Details of a simple threshold. Shall be present if thresholdType=\"SIMPLE\".\n", + "type": "array", + "items": { + "type": "object", + "required": [ + "thresholdValue", + "hysteresis" + ], + "properties": { + "thresholdValue": { + "description": "The threshold value. Shall be represented as a floating point number.\n", + "type": "number" + }, + "hysteresis": { + "description": "The hysteresis of the threshold.\nShall be represented as a non-negative floating point number.\nA notification with crossing direction \"UP\" will be generated if the measured value reaches or\nexceeds \"thresholdValue\" + \"hysteresis\". A notification with crossing direction \"DOWN\" will be\ngenerated if the measured value reaches or undercuts \"thresholdValue\" - \"hysteresis\".\nThe hysteresis is defined to prevent storms of threshold crossing notifications.\nWhen processing a request to create a threshold, implementations should enforce a suitable minimum\nvalue for this attribute (e.g. override the value or reject the request).\n", + "type": "number" + } + } + } + } + } + }, + "callbackUri": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string", + "format": "uri" + }, + "_links": { + "type": "object", + "description": "Links for this resource.\n", + "required": [ + "self" + ], + "properties": { + "self": { + "description": "This type represents a link to a resource.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "URI of a resource referenced from a notification. Should be an absolute URI (i.e. a URI that contains {apiRoot}), however, may be a relative URI (i.e. a URI where the {apiRoot} part is omitted) if the {apiRoot} information is not available.\n", + "type": "string", + "format": "url" + } + } + }, + "object": { + "description": "This type represents a link to a resource.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "URI of a resource referenced from a notification. Should be an absolute URI (i.e. a URI that contains {apiRoot}), however, may be a relative URI (i.e. a URI where the {apiRoot} part is omitted) if the {apiRoot} information is not available.\n", + "type": "string", + "format": "url" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/SOL005/NFVICapacityInformation-API/schemas/CapacityThresholds.schema.json b/SOL005/NFVICapacityInformation-API/schemas/CapacityThresholds.schema.json new file mode 100644 index 000000000..9d2084db1 --- /dev/null +++ b/SOL005/NFVICapacityInformation-API/schemas/CapacityThresholds.schema.json @@ -0,0 +1,148 @@ +{ + "type": "array", + "items": + { + "type": "object", + "description": "This type represents a capacity threshold. It shall comply with the provisions defined in table 10.5.2.8-1.\n", + "required": [ + "id", + "objectInstanceId", + "criteria", + "callbackUri", + "_links" + ], + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "objectInstanceId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "subObjectInstanceIds": { + "description": "Identifiers of the sub-object instances of the measured object instance associate with this capacity threshold.\nIf this attribute is absent, measurements are taken for all sub-object instances of the measured object instance.\n", + "type": "array", + "items": { + "description": "An identifier maintained by the VIM or other resource provider. It is expected to be unique within the VIM instance. Representation: string of variable length.\n", + "type": "string" + } + }, + "criteria": { + "type": "object", + "description": "This type represents criteria that define a capacity threshold.\nIt shall comply with the provisions defined in table 10.5.3.3-1.\n", + "required": [ + "capacityMetric", + "thresholdType" + ], + "properties": { + "capacityMetric": { + "description": "Defines the capacity metric for which the threshold applies.\n", + "type": "object", + "required": [ + "resourceType", + "capacityMeasurementName", + "capacityType" + ], + "properties": { + "resourceType": { + "type": "string", + "description": "The enumeration NfviCapacityResourceTypeEnumeration shall comply with the provisions in table 10.5.4.3-1.\n* VR_COMPUTE: For virtualised compute resource.\n* VR_NETWORK: For virtualised network resource.\n* VR_STORAGE: For virtualised storage resource.\n* HOST_COMPUTE: For host compute resource.\n", + "enum": [ + "VR_COMPUTE", + "VR_NETWORK", + "VR_STORAGE", + "HOST_COMPUTE" + ] + }, + "capacityMeasurementName": { + "description": "Name of the capacity measurement. Different resource types can have different associated capacity measurements,\ntypically associated to different sub-types of the resource type.\n", + "type": "string" + }, + "capacityType": { + "description": "The type of capacity for the threshold.\nPermitted values:\n-\tTOTAL: for total capacity.\n-\tALLOCATED: for allocated/used capacity.\n-\tRESERVED: for reserved capacity.\n-\tAVAILABLE: for available capacity.\n", + "type": "string", + "enum": [ + "TOTAL", + "ALLOCATED", + "RESERVED", + "AVAILABLE" + ] + } + } + }, + "thresholdType": { + "description": "Type of capacity threshold. This attribute determines which other attributes are present in the data structure.\nPermitted values:\n-\tSIMPLE: Single-valued static threshold.\nIn the present document, simple thresholds are defined. The definition of additional threshold types is left\nfor future specification.\n", + "type": "string", + "enum": [ + "SIMPLE" + ] + }, + "simpleThresholdDetails": { + "description": "Details of a simple threshold. Shall be present if thresholdType=\"SIMPLE\".\n", + "type": "array", + "items": { + "type": "object", + "required": [ + "thresholdValue", + "hysteresis" + ], + "properties": { + "thresholdValue": { + "description": "The threshold value. Shall be represented as a floating point number.\n", + "type": "number" + }, + "hysteresis": { + "description": "The hysteresis of the threshold.\nShall be represented as a non-negative floating point number.\nA notification with crossing direction \"UP\" will be generated if the measured value reaches or\nexceeds \"thresholdValue\" + \"hysteresis\". A notification with crossing direction \"DOWN\" will be\ngenerated if the measured value reaches or undercuts \"thresholdValue\" - \"hysteresis\".\nThe hysteresis is defined to prevent storms of threshold crossing notifications.\nWhen processing a request to create a threshold, implementations should enforce a suitable minimum\nvalue for this attribute (e.g. override the value or reject the request).\n", + "type": "number" + } + } + } + } + } + }, + "callbackUri": { + "description": "String formatted according to IETF RFC 3986.\n", + "type": "string", + "format": "uri" + }, + "_links": { + "type": "object", + "description": "Links for this resource.\n", + "required": [ + "self" + ], + "properties": { + "self": { + "description": "This type represents a link to a resource.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "URI of a resource referenced from a notification. Should be an absolute URI (i.e. a URI that contains {apiRoot}), however, may be a relative URI (i.e. a URI where the {apiRoot} part is omitted) if the {apiRoot} information is not available.\n", + "type": "string", + "format": "url" + } + } + }, + "object": { + "description": "This type represents a link to a resource.\n", + "type": "object", + "required": [ + "href" + ], + "properties": { + "href": { + "description": "URI of a resource referenced from a notification. Should be an absolute URI (i.e. a URI that contains {apiRoot}), however, may be a relative URI (i.e. a URI where the {apiRoot} part is omitted) if the {apiRoot} information is not available.\n", + "type": "string", + "format": "url" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/SOL005/NFVICapacityInformation-API/schemas/NfviCapacityInfo.schema.json b/SOL005/NFVICapacityInformation-API/schemas/NfviCapacityInfo.schema.json new file mode 100644 index 000000000..79d4b1eb6 --- /dev/null +++ b/SOL005/NFVICapacityInformation-API/schemas/NfviCapacityInfo.schema.json @@ -0,0 +1,143 @@ +{ + "type": "object", + "description": "This type defines the format of the NFVI capacity information. The type shall comply with the provisions defined\nin Table 10.5.2.4-1.\n", + "required": [ + "id", + "vimId", + "capacityInfoPerZone" + ], + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "vimId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "capacityInfoPerZone": { + "description": "Capacity information on a per resource zone basis under control by the associated VIM.\n", + "type": "array", + "items": { + "type": "object", + "description": "This type defines the format of the NFVI capacity information on a per resource zone basis.\nThe type shall comply with the provisions defined in table 10.5.2.5-1.\n", + "required": [ + "capacityMeasurements" + ], + "properties": { + "resourceZoneId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "capacityMeasurements": { + "description": "Capacity measurement on a per resource type basis.\n", + "type": "array", + "items": { + "type": "object", + "description": "This type defines the format of the NFVI capacity information on a per resource type basis.\nThe type shall comply with the provisions defined in table 10.5.2.6-1.\n", + "required": [ + "resourceType", + "capacityMeasurementName", + "totalCapacity", + "allocatedCapacity", + "availableCapacity" + ], + "properties": { + "resourceType": { + "type": "string", + "description": "The enumeration NfviCapacityResourceTypeEnumeration shall comply with the provisions in table 10.5.4.3-1.\n* VR_COMPUTE: For virtualised compute resource.\n* VR_NETWORK: For virtualised network resource.\n* VR_STORAGE: For virtualised storage resource.\n* HOST_COMPUTE: For host compute resource.\n", + "enum": [ + "VR_COMPUTE", + "VR_NETWORK", + "VR_STORAGE", + "HOST_COMPUTE" + ] + }, + "capacityMeasurementName": { + "description": "Name of the capacity measurement. Different resource types can have different associated capacity measurements,\ntypically associated to different sub-types of the resource type.\nThe present document and referred documents do not specify the capacity measurements, thus the capacity\nmeasurement names are not specified in the present document version.\n", + "type": "string" + }, + "totalCapacity": { + "description": "The total capacity.\n", + "type": "object" + }, + "allocatedCapacity": { + "description": "The allocated/used capacity.\n", + "type": "object" + }, + "reservedCapacity": { + "description": "The reserved capacity. Shall be present if the capacity measurement relates to a resource type and\n(and sub-type) that is reservable.\n", + "type": "object" + }, + "availableCapacity": { + "description": "The available capacity.\n", + "type": "object" + } + } + } + } + } + } + }, + "totalCapacityInfo": { + "type": "object", + "description": "This type defines the format of the NFVI capacity information on a per resource type basis.\nThe type shall comply with the provisions defined in table 10.5.2.6-1.\n", + "required": [ + "resourceType", + "capacityMeasurementName", + "totalCapacity", + "allocatedCapacity", + "availableCapacity" + ], + "properties": { + "resourceType": { + "type": "string", + "description": "The enumeration NfviCapacityResourceTypeEnumeration shall comply with the provisions in table 10.5.4.3-1.\n* VR_COMPUTE: For virtualised compute resource.\n* VR_NETWORK: For virtualised network resource.\n* VR_STORAGE: For virtualised storage resource.\n* HOST_COMPUTE: For host compute resource.\n", + "enum": [ + "VR_COMPUTE", + "VR_NETWORK", + "VR_STORAGE", + "HOST_COMPUTE" + ] + }, + "capacityMeasurementName": { + "description": "Name of the capacity measurement. Different resource types can have different associated capacity measurements,\ntypically associated to different sub-types of the resource type.\nThe present document and referred documents do not specify the capacity measurements, thus the capacity\nmeasurement names are not specified in the present document version.\n", + "type": "string" + }, + "totalCapacity": { + "description": "The total capacity.\n", + "type": "object" + }, + "allocatedCapacity": { + "description": "The allocated/used capacity.\n", + "type": "object" + }, + "reservedCapacity": { + "description": "The reserved capacity. Shall be present if the capacity measurement relates to a resource type and\n(and sub-type) that is reservable.\n", + "type": "object" + }, + "availableCapacity": { + "description": "The available capacity.\n", + "type": "object" + } + } + }, + "timeInterval": { + "type": "object", + "description": "This type defines the format of a time interval. The type shall comply with the provisions defined in table 10.5.2.7-1.\n", + "required": [ + "aTime" + ], + "properties": { + "aTime": { + "description": "Date-time stamp. Representation: String formatted according toas defined by the date-time production in IETF RFC 3339.\n", + "format": "date-time" + }, + "bTime": { + "description": "Date-time stamp. Representation: String formatted according toas defined by the date-time production in IETF RFC 3339.\n", + "format": "date-time" + } + } + } + } +} \ No newline at end of file diff --git a/SOL005/NFVICapacityInformation-API/schemas/NfviCapacityInfos.schema.json b/SOL005/NFVICapacityInformation-API/schemas/NfviCapacityInfos.schema.json new file mode 100644 index 000000000..f8329b950 --- /dev/null +++ b/SOL005/NFVICapacityInformation-API/schemas/NfviCapacityInfos.schema.json @@ -0,0 +1,147 @@ +{ + "type": "array", + "items": + { + "type": "object", + "description": "This type defines the format of the NFVI capacity information. The type shall comply with the provisions defined\nin Table 10.5.2.4-1.\n", + "required": [ + "id", + "vimId", + "capacityInfoPerZone" + ], + "properties": { + "id": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "vimId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "capacityInfoPerZone": { + "description": "Capacity information on a per resource zone basis under control by the associated VIM.\n", + "type": "array", + "items": { + "type": "object", + "description": "This type defines the format of the NFVI capacity information on a per resource zone basis.\nThe type shall comply with the provisions defined in table 10.5.2.5-1.\n", + "required": [ + "capacityMeasurements" + ], + "properties": { + "resourceZoneId": { + "description": "An identifier with the intention of being globally unique.\n", + "type": "string" + }, + "capacityMeasurements": { + "description": "Capacity measurement on a per resource type basis.\n", + "type": "array", + "items": { + "type": "object", + "description": "This type defines the format of the NFVI capacity information on a per resource type basis.\nThe type shall comply with the provisions defined in table 10.5.2.6-1.\n", + "required": [ + "resourceType", + "capacityMeasurementName", + "totalCapacity", + "allocatedCapacity", + "availableCapacity" + ], + "properties": { + "resourceType": { + "type": "string", + "description": "The enumeration NfviCapacityResourceTypeEnumeration shall comply with the provisions in table 10.5.4.3-1.\n* VR_COMPUTE: For virtualised compute resource.\n* VR_NETWORK: For virtualised network resource.\n* VR_STORAGE: For virtualised storage resource.\n* HOST_COMPUTE: For host compute resource.\n", + "enum": [ + "VR_COMPUTE", + "VR_NETWORK", + "VR_STORAGE", + "HOST_COMPUTE" + ] + }, + "capacityMeasurementName": { + "description": "Name of the capacity measurement. Different resource types can have different associated capacity measurements,\ntypically associated to different sub-types of the resource type.\nThe present document and referred documents do not specify the capacity measurements, thus the capacity\nmeasurement names are not specified in the present document version.\n", + "type": "string" + }, + "totalCapacity": { + "description": "The total capacity.\n", + "type": "object" + }, + "allocatedCapacity": { + "description": "The allocated/used capacity.\n", + "type": "object" + }, + "reservedCapacity": { + "description": "The reserved capacity. Shall be present if the capacity measurement relates to a resource type and\n(and sub-type) that is reservable.\n", + "type": "object" + }, + "availableCapacity": { + "description": "The available capacity.\n", + "type": "object" + } + } + } + } + } + } + }, + "totalCapacityInfo": { + "type": "object", + "description": "This type defines the format of the NFVI capacity information on a per resource type basis.\nThe type shall comply with the provisions defined in table 10.5.2.6-1.\n", + "required": [ + "resourceType", + "capacityMeasurementName", + "totalCapacity", + "allocatedCapacity", + "availableCapacity" + ], + "properties": { + "resourceType": { + "type": "string", + "description": "The enumeration NfviCapacityResourceTypeEnumeration shall comply with the provisions in table 10.5.4.3-1.\n* VR_COMPUTE: For virtualised compute resource.\n* VR_NETWORK: For virtualised network resource.\n* VR_STORAGE: For virtualised storage resource.\n* HOST_COMPUTE: For host compute resource.\n", + "enum": [ + "VR_COMPUTE", + "VR_NETWORK", + "VR_STORAGE", + "HOST_COMPUTE" + ] + }, + "capacityMeasurementName": { + "description": "Name of the capacity measurement. Different resource types can have different associated capacity measurements,\ntypically associated to different sub-types of the resource type.\nThe present document and referred documents do not specify the capacity measurements, thus the capacity\nmeasurement names are not specified in the present document version.\n", + "type": "string" + }, + "totalCapacity": { + "description": "The total capacity.\n", + "type": "object" + }, + "allocatedCapacity": { + "description": "The allocated/used capacity.\n", + "type": "object" + }, + "reservedCapacity": { + "description": "The reserved capacity. Shall be present if the capacity measurement relates to a resource type and\n(and sub-type) that is reservable.\n", + "type": "object" + }, + "availableCapacity": { + "description": "The available capacity.\n", + "type": "object" + } + } + }, + "timeInterval": { + "type": "object", + "description": "This type defines the format of a time interval. The type shall comply with the provisions defined in table 10.5.2.7-1.\n", + "required": [ + "aTime" + ], + "properties": { + "aTime": { + "description": "Date-time stamp. Representation: String formatted according toas defined by the date-time production in IETF RFC 3339.\n", + "format": "date-time" + }, + "bTime": { + "description": "Date-time stamp. Representation: String formatted according toas defined by the date-time production in IETF RFC 3339.\n", + "format": "date-time" + } + } + } + } + } +} \ No newline at end of file diff --git a/SOL005/NFVICapacityInformation-API/schemas/ProblemDetails.schema.json b/SOL005/NFVICapacityInformation-API/schemas/ProblemDetails.schema.json new file mode 100644 index 000000000..c6156efbe --- /dev/null +++ b/SOL005/NFVICapacityInformation-API/schemas/ProblemDetails.schema.json @@ -0,0 +1,32 @@ +{ + "description": "The definition of the general \"ProblemDetails\" data structure from IETF RFC 7807 [19] is reproduced in this structure. Compared to the general framework defined in IETF RFC 7807 [19], the \"status\" and \"detail\" attributes are mandated to be included by the present document, to ensure that the response contains additional textual information about an error. IETF RFC 7807 [19] foresees extensibility of the \"ProblemDetails\" type. It is possible that particular APIs in the present document, or particular implementations, define extensions to define additional attributes that provide more information about the error. The description column only provides some explanation of the meaning to Facilitate understanding of the design. For a full description, see IETF RFC 7807 [19].\n", + "type": "object", + "required": [ + "status", + "detail" + ], + "properties": { + "type": { + "description": "A URI reference according to IETF RFC 3986 [5] that identifies the problem type. It is encouraged that the URI provides human-readable documentation for the problem (e.g. using HTML) when dereferenced. When this member is not present, its value is assumed to be \"about:blank\".\n", + "type": "string", + "format": "URI" + }, + "title": { + "description": "A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization. If type is given and other than \"about:blank\", this attribute shall also be provided. A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see [RFC7231], Section 3.4).\n", + "type": "string" + }, + "status": { + "description": "The HTTP status code for this occurrence of the problem. The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.\n", + "type": "integer" + }, + "detail": { + "description": "A human-readable explanation specific to this occurrence of the problem.\n", + "type": "string" + }, + "instance": { + "description": "A URI reference that identifies the specific occurrence of the problem. It may yield further information if dereferenced.\n", + "type": "string", + "format": "URI" + } + } +} \ No newline at end of file -- GitLab From 76a9f756e6f9128ec915ccc4b7e402562fe07c10 Mon Sep 17 00:00:00 2001 From: hammad zafar Date: Wed, 10 Mar 2021 17:37:02 +0500 Subject: [PATCH 2/2] minor fix for filter and fields query parameters in GET keywords --- .../NFVICapacityInformationKeywords.robot | 14 +++++++------- .../environment/variables.txt | 6 ++++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/SOL005/NFVICapacityInformation-API/NFVICapacityInformationKeywords.robot b/SOL005/NFVICapacityInformation-API/NFVICapacityInformationKeywords.robot index 994af7b62..1efc69be4 100644 --- a/SOL005/NFVICapacityInformation-API/NFVICapacityInformationKeywords.robot +++ b/SOL005/NFVICapacityInformation-API/NFVICapacityInformationKeywords.robot @@ -113,7 +113,7 @@ GET NFVI Capacity Information with filter Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos?${POS_FILTER} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos?${POS_FILTER_info} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -131,7 +131,7 @@ GET NFVI Capacity Information with bad filter Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos?fields=wrong_field + GET ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos?${NEG_FILTER} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -155,7 +155,7 @@ GET NFVI Capacity Information with fields attribute selector Log Query status information about NFVI Capacity Information, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos?fields=${fields} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos?fields=${fields_capacityInfo} ${output}= Output response Set Suite Variable ${response} ${output} @@ -163,7 +163,7 @@ GET NFVI Capacity Information with exclude_default and fields attribute selector Log Query status information about NFVI Capacity Information, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos?fields=${fields}&exclude_default + GET ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos?fields=${fields_capacityInfo}&exclude_default ${output}= Output response Set Suite Variable ${response} ${output} @@ -171,7 +171,7 @@ GET NFVI Capacity Information with exclude_fields attribute selector Log Query status information about NFVI Capacity Information, using fields Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - GET ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos?exclude_fields=${fields} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos?exclude_fields=${fields_capacityInfo} ${output}= Output response Set Suite Variable ${response} ${output} @@ -232,7 +232,7 @@ GET Individual VIMs NFVI Capacity Information using filter Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos/${vimId}?${POS_FILTER} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/nfvi_capacity_infos/${vimId}?${POS_FILTER_info} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -311,7 +311,7 @@ GET Capacity Thresholds using filter Set Headers {"Accept":"${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} - Get ${apiRoot}/${apiName}/${apiMajorVersion}/capacity_thresholds?${POS_FILTER} + Get ${apiRoot}/${apiName}/${apiMajorVersion}/capacity_thresholds?${POS_FILTER_threshold} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL005/NFVICapacityInformation-API/environment/variables.txt b/SOL005/NFVICapacityInformation-API/environment/variables.txt index 8bd8df1ce..c27cc8636 100644 --- a/SOL005/NFVICapacityInformation-API/environment/variables.txt +++ b/SOL005/NFVICapacityInformation-API/environment/variables.txt @@ -82,9 +82,11 @@ ${vndEncryptedArtifactID} encryptedId ${length} 1024 -${POS_FILTER} vimId=41fdd38a-3d4c-465c-83e0-f80e014425f8 ,resourceType=VR_COMPUTE # Positive case, suing compiant fields name for filtering get request +${POS_FILTER_info} vimId=41fdd38a-3d4c-465c-83e0-f80e014425f8 ,resourceType=VR_COMPUTE # Positive case, suing compiant fields name for filtering get request +${POS_FILTER_threshold} id=41fdd38a-3d4c-465c-83e0-f80e014425f8 # Positive case, suing compiant fields name for filtering get request ${NEG_FILTER} nfvId=41fdd38a-3d4c-465c-83e0-f80e014425f8 # Negative case, using wrong name of field -${fields} softwareImages,additionalArtifacts +${fields_capacityInfo} timeInterval +${fields_capacityThreshold} subObjectInstanceIds ${VAR_SEPERATOR} & ${callbackResp} localhost -- GitLab