diff --git a/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot b/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot index d02951365b798aa08277dc4d84b79909d8069a21..411d03f7b0685787060ab6b4de8cdea63763b3cd 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualPmJob.robot @@ -1,6 +1,7 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters +Resource VNFPerformanceManagementKeywords.robot Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library OperatingSystem @@ -13,7 +14,7 @@ GET individual VNF Performance Job ... Test title: Get individual VNF Performance Job ... Test objective: The objective is to test the retrieval of an individual VNF performance monitoring job and perform a JSON schema and content validation of the collected job data structure ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -28,7 +29,7 @@ GET individual VNF Performance Job with invalid resource identifier ... Test title: Get individual VNF Performance Job with invalid resource identifier ... Test objective: The objective is to test that the retrieval of an individual VNF performance monitoring job fails when using an invalid resource identifier, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -41,7 +42,7 @@ DELETE Individual VNF Performance Job ... Test title: Delete Individual VNF Performance Job ... Test objective: The objective is to test the deletion of an individual VNF performance monitoring job ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Job is no more available in the VNFM @@ -54,7 +55,7 @@ DELETE Individual VNF Performance Job with invalid resource identifier ... Test title: Delete individual VNF Performance Job with invalid resource identifier ... Test objective: The objective is to test that the deletion of an individual VNF performance monitoring job fails when using an invalid resource identifier, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -67,7 +68,7 @@ POST Individual VNF Performance Job - Method not implemented ... Test title: POST Individual VNF Performance Job - method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new VNF Performance Monitoring Job ... Pre-conditions: none - ... Reference: Clause 6.4.3.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.3.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -79,7 +80,7 @@ PUT Individual VNF Performance Job - Method not implemented ... Test title: PUT Individual VNF Performance Job - method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing VNF Performance Monitoring Job ... Pre-conditions: none - ... Reference: Clause 6.4.3.3.3 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.3.3.3 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -91,7 +92,7 @@ PATCH Individual VNF Performance Job ... Test title: PATCH Individual VNF Performance Job ... Test objective: The objective is to test that PATCH method allows to modify an exsisting individual PM job resource. ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -105,7 +106,7 @@ PATCH Individual VNF Performance Job - Precondition failed ... Test title: PATCH Individual VNF Performance Job - Precondition failed ... Test objective: The objective is to attempt to Modify an individual alarm resource, where the precondition was not met ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Job is not modified by the operation @@ -119,18 +120,43 @@ PATCH Individual VNF Performance Job - UNPROCESSABLE CONTENT ... Test title: PATCH Individual VNF Performance Job - UNPROCESSABLE CONTENT ... Test objective: The objective is to test that PATCH method cannot modify an exsisting individual PM job resource when the callback URI provided in the Request body is unreachable by the VNFM. ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNFM cannot reach the Notification endpoint. ... Post-Conditions: none Send Patch request for individual VNF Performance Job with Unreachable Callback URI Check HTTP Response Status Code Is 422 Check HTTP Response Body Json Schema Is ProblemDetails +DELETE Individual VNF Performance Job with permitted authorization scope + [Documentation] Test ID: 6.3.3.2.10 + ... Test title: Delete Individual VNF Performance Job with permitted authorization scope + ... Test objective: The objective is to test the deletion of an individual VNF performance monitoring job with permitted authorization scope + ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. + ... Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v4.5.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: The VNF Performance Job is no more available in the VNFM + Send Delete request for individual VNF Performance Job with permitted authorization scope + Check HTTP Response Status Code Is 204 + Check Postcondition VNF Pm Job is Deleted +DELETE Individual VNF Performance Job with NOT permitted authorization scope + [Documentation] Test ID: 6.3.3.2.11 + ... Test title: Delete Individual VNF Performance Job with NOT permitted authorization scope + ... Test objective: The objective is to test the deletion of an individual VNF performance monitoring job with NOT permitted authorization scope + ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. + ... Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 002 [2] v4.5.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: The VNF Performance Job is no more available in the VNFM + Send Delete request for individual VNF Performance Job with not permitted authorization scope + Check HTTP Response Status Code Is 403 + Check HTTP Response Body Json Schema Is ProblemDetails *** Keywords *** GET individual VNF Performance Job Log Trying to get a Pm Job present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${output}= Output response @@ -139,6 +165,7 @@ GET individual VNF Performance Job GET individual VNF Performance Job with invalid resource identifier Log Trying to perform a negative get, using erroneous PM Job identifier Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${erroneousPmJobId} ${output}= Output response @@ -147,6 +174,7 @@ GET individual VNF Performance Job with invalid resource identifier Send Delete request for individual VNF Performance Job Log Trying to delete an existing PM Job Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${output}= Output response @@ -155,6 +183,7 @@ Send Delete request for individual VNF Performance Job Send Delete request for individual VNF Performance Job with invalid resource identifier Log Trying to perform a negative delete, using erroneous PM Job identifier Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${erroneousPmJobId} ${output}= Output response @@ -163,6 +192,7 @@ Send Delete request for individual VNF Performance Job with invalid resource ide Send Post request for individual VNF Performance Job Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${newPmJobId} ${output}= Output response @@ -171,6 +201,7 @@ Send Post request for individual VNF Performance Job Send Put request for individual VNF Performance Job Log Trying to perform a POST (method should not be implemented) Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response @@ -180,7 +211,9 @@ Send Put request for individual VNF Performance Job Set Suite Variable ${response} ${output} Send Patch request for individual VNF Performance Job - Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} + Set Headers {"Version": "${API_VERSION}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/PMJobModification.json @@ -190,7 +223,9 @@ Send Patch request for individual VNF Performance Job Set Suite Variable ${response} ${output} Send Patch request for individual VNF Performance Job with Unreachable Callback URI - Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} + Set Headers {"Version": "${API_VERSION}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/PMJobModification.json diff --git a/SOL002/VNFPerformanceManagement-API/IndividualReport.robot b/SOL002/VNFPerformanceManagement-API/IndividualReport.robot index f5c8ccb2c27d08d5ade9b84b92905f7d0b03d483..dded85442606b55d4c65765ffe418cb34f14b705 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualReport.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualReport.robot @@ -1,6 +1,7 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters +Resource VNFPerformanceManagementKeywords.robot Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -10,7 +11,7 @@ Get Individual Performance Report ... Test title: Get Individual Performance Report ... Test objective: The objective is to test the retrieval of an individual VNF performance report associated to a monitoring job and perform a JSON schema validation of the collected report data structure ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM. - ... Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -23,7 +24,7 @@ Get Individual Performance Report with invalid resource endpoint ... Test title: Get Individual Performance Report with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of an individual VNF performance report associated to a monitoring job fails when using an invalid resource endpoint ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM. - ... Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -36,7 +37,7 @@ POST Individual Performance Report - Method not implemented ... Test title: POST Individual Performance Report - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new VNF performance report within a monitoring job ... Pre-conditions: none - ... Reference: Clause 6.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.4.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -48,7 +49,7 @@ PUT Individual Performance Report - Method not implemented ... Test title: PUT Individual Performance Report - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing VNF performance report within a monitoring job ... Pre-conditions: none - ... Reference: Clause 6.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.4.3.3 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -60,7 +61,7 @@ PATCH Individual Performance Report - Method not implemented ... Test title: PATCH Individual Performance Report - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify an existing VNF performance report within a monitoring job ... Pre-conditions: none - ... Reference: Clause 6.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.4.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -72,17 +73,42 @@ DELETE Individual Performance Report - Method not implemented ... Test title: DELETE Individual Performance Report - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to delete an existing VNF performance report within a monitoring job ... Pre-conditions: none - ... Reference: Clause 6.4.4.3.5 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.4.3.5 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none Send Delete request for Individual Performance Report Check HTTP Response Status Code Is 405 +Get Individual Performance Report with permitted authorization scope + [Documentation] Test ID: 6.3.3.3.7 + ... Test title: Get Individual Performance Report with permitted authorization scope + ... Test objective: The objective is to test the retrieval of an individual VNF performance report associated to a monitoring job and perform a JSON schema validation of the collected report data structure with permitted authorization scope + ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM. + ... Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get Individual Performance Report with permitted authorization scope + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PerformanceReport +Get Individual Performance Report with NOT permitted authorization scope + [Documentation] Test ID: 6.3.3.3.8 + ... Test title: Get Individual Performance Report with NOT permitted authorization scope + ... Test objective: The objective is to test the retrieval of an individual VNF performance report associated to a monitoring job and perform a JSON schema validation of the collected report data structure with NOT permitted authorization scope + ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance reports are set for a monitoring job in the VNFM. + ... Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + Get Individual Performance Report with not permitted authorization scope + Check HTTP Response Status Code Is 403 + Check HTTP Response Body Json Schema Is ProblemDetails *** Keywords *** Get Individual Performance Report Log Trying to get a performance report present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response @@ -91,6 +117,7 @@ Get Individual Performance Report Get Individual Performance Report with invalid resource endpoint Log Trying to get a performance report with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${erroneousReportId} ${output}= Output response @@ -137,6 +164,7 @@ Check Postcondition VNF Individual Performance Report Exists Check Postcondition VNF Individual Performance Report is not Created Log Trying to get a new report Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${newReportId} ${output}= Output response diff --git a/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot b/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot index 2f4a25f48a3df7d1e6bd361014360575276a2f57..252516ad2d5345463eee1bb7316f620261330d7a 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot @@ -1,6 +1,7 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters +Resource VNFPerformanceManagementKeywords.robot Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library OperatingSystem @@ -12,7 +13,7 @@ GET Individual Threshold ... Test title: GET Individual Threshold ... Test objective: The objective is to test the retrieval of an individual VNF performance threshold and perform a JSON schema and content validation of the collected threshold data structure ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -27,7 +28,7 @@ GET Individual Threshold with invalid resource identifier ... Test title: GET Individual Threshold with invalid resource identifier ... Test objective: The objective is to test that the retrieval of an individual VNF performance threshold fails when using an invalid resource identifier ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -40,7 +41,7 @@ DELETE Individual Threshold ... Test title: DELETE Individual Threshold ... Test objective: The objective is to test the deletion of an individual VNF performance threshold ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Threshold is not available anymore in the VNFM @@ -53,7 +54,7 @@ DELETE Individual Threshold with invalid resource identifier ... Test title: DELETE Individual Threshold with invalid resource identifier ... Test objective: The objective is to test the deletion of an individual VNF performance threshold ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.6.3.5 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -66,7 +67,7 @@ POST Individual Threshold - Method not implemented ... Test title: POST Individual Threshold - Method not implemented ... Test objective: The objective is to test that POST method is not allowed to create a new VNF Performance Threshold ... Pre-conditions: none - ... Reference: Clause 6.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.6.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Threshold is not created on the VNFM @@ -78,7 +79,7 @@ PUT Individual Threshold - Method not implemented ... Test title: PUT Individual Threshold - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to update an existing VNF Performance threshold ... Pre-conditions: none - ... Reference: Clause 6.4.6.3.3 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.6.3.3 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -90,7 +91,7 @@ PATCH Individual Threshold ... Test title: PATCH Individual Threshold ... Test objective: The objective is to test that PATCH method allows to modify an Individual threshold resource. ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Threshold is not modified by the operation @@ -104,7 +105,7 @@ PATCH Individual Threshold - Precondition failed ... Test title: PATCH Individual Threshold - Preconition failed ... Test objective: The objective is to attempt to modify an individual threshold resource, where the precondition was not met. ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Job is not modified by the operation @@ -118,7 +119,7 @@ PATCH Individual Threshold - UNPROCESSABLE CONTENT ... Test title: PATCH Individual Threshold - UNPROCESSABLE CONTENT ... Test objective: The objective is to test that PATCH method cannot modify an exsisting individual PM job resource when the callback URI provided in the Request body is unreachable by the VNFM. ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNFM cannot reach the Notification endpoint. ... Post-Conditions: The VNF Performance Threshold is not modified by the operation @@ -126,11 +127,38 @@ PATCH Individual Threshold - UNPROCESSABLE CONTENT Check HTTP Response Status Code Is 422 Check HTTP Response Body Json Schema Is ProblemDetails Check Postcondition VNF Performance Threshold is Unmodified (Implicit) +GET Individual Threshold with permitted authorization scope + [Documentation] Test ID: 6.3.3.5.10 + ... Test title: GET Individual Threshold with permitted authorization scope + ... Test objective: The objective is to test the retrieval of an individual VNF performance threshold and perform a JSON schema and content validation of the collected threshold data structure with permitted authorization scope + ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. + ... Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET Individual VNF Performance Threshold with permitted authorization scope + Check HTTP Response Status Code Is 200 + Check HTTP Response Header Contains ETag and Last-Modified + Check HTTP Response Body Json Schema Is Threshold + Check HTTP Response Body Threshold Identifier matches the requested Threshold +GET Individual Threshold with NOT permitted authorization scope + [Documentation] Test ID: 6.3.3.5.11 + ... Test title: GET Individual Threshold with NOT permitted authorization scope + ... Test objective: The objective is to test the retrieval of an individual VNF performance threshold and perform a JSON schema and content validation of the collected threshold data structure with not permitted authorization scope + ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. + ... Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET Individual VNF Performance Threshold with not permitted authorization scope + Check HTTP Response Status Code Is 403 + Check HTTP Response Body Json Schema Is ProblemDetails *** Keywords *** GET Individual VNF Performance Threshold Log Trying to get a Threhsold present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response @@ -139,6 +167,7 @@ GET Individual VNF Performance Threshold GET individual VNF Performance Threshold with invalid resource identifier Log Trying to get a Threhsold with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${erroneousThresholdId} ${output}= Output response @@ -168,13 +197,15 @@ Send Post request for individual VNF Performance Threshold Send Put request for individual VNF Performance Threshold Log Trying to perform a PUT. This method should not be supported. Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Patch request for individual VNF Performance Threshold - Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} @@ -187,7 +218,8 @@ Send Patch request for individual VNF Performance Threshold Set Suite Variable ${response} ${output} Send Patch request for individual VNF Performance Threshold with Unreachable Callback URI - Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} diff --git a/SOL002/VNFPerformanceManagement-API/NotificationEndpoint.robot b/SOL002/VNFPerformanceManagement-API/NotificationEndpoint.robot index 64f9d32c7c874a8f7136fec5e41d055b7a7e7432..fb266385b0ed6f741262513756962418232891dd 100644 --- a/SOL002/VNFPerformanceManagement-API/NotificationEndpoint.robot +++ b/SOL002/VNFPerformanceManagement-API/NotificationEndpoint.robot @@ -13,7 +13,7 @@ VNF Performance Information Availability Notification ... Test title: VNF Performance Information Availability Notification ... Test objective: The objective is to test that VNF Performance Information Availability Notification is delivered with success to the notification consumer ... Pre-conditions: A VNF performance job is created, and a subscription for information availability notifications is available in the VNFM. - ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none @@ -25,7 +25,7 @@ VNF Threshold Crossed Notification ... Test title: VNF Threshold Crossed Notification ... Test objective: The objective is to test that VNF Threshold Crossed Notification is delivered with success to the notification consumer ... Pre-conditions: A VNF performance job is created, and a subscription for Threshold Crossed Notification is available in the VNFM. - ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none @@ -34,7 +34,9 @@ VNF Threshold Crossed Notification *** Keywords *** Check resource existence and get CallbackUri - Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} + Set Headers {"Version": "${API_VERSION}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} @@ -50,7 +52,8 @@ Check HTTP Response Status Code Is Post VNF Performance Information Availability Notification log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template} = Get File jsons/PerformanceInformationAvaliableNotification.json @@ -61,7 +64,8 @@ Post VNF Performance Information Availability Notification Post VNF Threshold Crossed Notification log Trying to perform a POST to get notification - Set Headers {"Accept":"${ACCEPT_JSON}"} + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template} = Get File jsons/ThresholdCrossedNotification.json diff --git a/SOL002/VNFPerformanceManagement-API/Notifications.robot b/SOL002/VNFPerformanceManagement-API/Notifications.robot index ea973feef5f810e243ddd2c0de9c8c038ab3547c..a34c4bb2e57a1812da1753e428b1923b42810e92 100644 --- a/SOL002/VNFPerformanceManagement-API/Notifications.robot +++ b/SOL002/VNFPerformanceManagement-API/Notifications.robot @@ -17,7 +17,7 @@ VNF Performance Information Availability Notification ... Test title: VNF Performance Information Availability Notification ... Test objective: The objective is to test the dispatch of VNF Performance Information Availability Notification when new VNF performance information is available in the NFVO, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A VNF performance job is created, and a subscription for information availability notifications is available in the VNFM. - ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -30,7 +30,7 @@ VNF Threshold Crossed Notification ... Test title: VNF Threshold Crossed Notification ... Test objective: The objective is to test the dispatch of VNF Threshold Crossed Notification when a previously set VNF performance metric threshold is crossed, and perform a JSON schema and content validation of the delivered notification. The action that triggers the notification under test is an explicit test step, but it is not performed by the test system. ... Pre-conditions: A VNF performance job is created, and a threshold subscription is available in the VNFM. - ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none diff --git a/SOL002/VNFPerformanceManagement-API/PMJobs.robot b/SOL002/VNFPerformanceManagement-API/PMJobs.robot index 044df0cca398520cb22171ea8d2a4c7aa25d22ca..7022751742e556e0279d6527f707fd06d537385a 100644 --- a/SOL002/VNFPerformanceManagement-API/PMJobs.robot +++ b/SOL002/VNFPerformanceManagement-API/PMJobs.robot @@ -1,6 +1,7 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters +Resource VNFPerformanceManagementKeywords.robot Library JSONLibrary Library OperatingSystem Library String @@ -12,7 +13,7 @@ GET all VNF Performance Monitoring Jobs ... Test title: GET all VNF Performance Monitoring Jobs ... Test objective: The objective is to test the retrieval of all the available VNF performance monitoring jobs and perform a JSON schema and content validation of the collected jobs data structure ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -25,7 +26,7 @@ GET VNF Performance Monitoring Jobs with attribute-based filter ... Test title: GET all VNF Performance Monitoring Jobs with attribute-based filter ... Test objective: The objective is to test the retrieval of VNF performance monitoring jobs using attribute-based filter, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued attribute-based filter ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -39,7 +40,7 @@ GET all VNF Performance Monitoring Jobs with all_fields attribute selector ... Test title: GET all VNF Performance Monitoring Jobs with all_fields attribute selector ... Test objective: The objective is to test the retrieval of all VNF performance monitoring jobs all_fields attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued all_fileds selector ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 4.3.3.2.1, 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 4.3.3.2.1, 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -53,7 +54,7 @@ GET all VNF Performance Monitoring Jobs with exclude_default attribute selector ... Test title: GET all VNF Performance Monitoring Jobs with exclude_default attribute selector ... Test objective: The objective is to test the retrieval of all VNF performance monitoring jobs exclude_default attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued exclude_default selector ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 4.3.3.2.1, 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 4.3.3.2.1, 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -67,7 +68,7 @@ GET all VNF Performance Monitoring Jobs with fields attribute selector ... Test title: GET all VNF Performance Monitoring Jobs with fields attribute selector ... Test objective: The objective is to test the retrieval of all VNF performance monitoring jobs fields attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued fields selector ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 4.3.3.2.1, 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 4.3.3.2.1, 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNFM supports the use of exclude_fields attribute selector ... Post-Conditions: none @@ -81,7 +82,7 @@ GET all VNF Performance Monitoring Jobs with exclude_fields attribute selector ... Test title: GET all VNF Performance Monitoring Jobs with exclude_fields attribute selector ... Test objective: The objective is to test the retrieval of all VNF performance monitoring jobs exclude_fields attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued exclude_fields selector ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 4.3.3.2.1, 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 4.3.3.2.1, 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNFM supports the use of exclude_fields attribute selector ... Post-Conditions: none @@ -95,7 +96,7 @@ GET VNF Performance Monitoring Jobs with invalid attribute-based filter ... Test title: GET VNF Performance Monitoring Jobs with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of VNF performance monitoring jobs fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -108,7 +109,7 @@ GET VNF Performance Monitoring Jobs with invalid resource endpoint ... Test title: GET VNF Performance Monitoring Jobs with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of VNF performance monitoring jobs fails when using invalid resource endpoint, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -121,7 +122,7 @@ POST Create new VNF Performance Monitoring Job - SUCCESSFUL ... Test title: POST Create a new VNF Performance Monitoring Job - SUCCESSFUL ... Test objective: The objective is to test that the POST method creates a new VNF performance monitoring job and perform the JSON schema validation of the returned job data structure ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Job is successfully created on the VNFM @@ -135,7 +136,7 @@ PUT all VNF Performance Monitoring Jobs - Method not implemented ... Test title: PUT all VNF Performance Monitoring Jobs - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify VNF Performance Monitoring Jobs ... Pre-conditions: none - ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -147,7 +148,7 @@ PATCH all VNF Performance Monitoring Jobs - Method not implemented ... Test title: PATCH all VNF Performance Monitoring Jobs - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to update VNF Performance Monitoring Jobs ... Pre-conditions: none - ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -159,7 +160,7 @@ DELETE all VNF Performance Monitoring Jobs - Method not implemented ... Test title: DELETE all VNF Performance Monitoring Jobs - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to update VNF Performance Monitoring Jobs ... Pre-conditions: none - ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -171,7 +172,7 @@ GET VNF Performance Monitoring Jobs to get Paged Response ... Test title: GET VNF Performance Monitoring Jobs to get Paged Response ... Test objective: The objective is to test the retrieval of VNF performance monitoring jobs to get Paged response. ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -184,7 +185,7 @@ GET VNF Performance Monitoring Jobs for Bad Request Response too big ... Test title: GET VNF Performance Monitoring Jobs for Bad Request Response too big ... Test objective: The objective is to test that GET method fail retrieving status information about VNF Performance Monitoring when Response is too big, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -197,7 +198,7 @@ GET all VNF Performance Monitoring Jobs with exclude_default and fields attribut ... Test title: GET all VNF Performance Monitoring Jobs with exclude_default and fields attribute selector ... Test objective: The objective is to test the retrieval of all VNF performance monitoring jobs with exclude_default and fields attribute selector, perform a JSON schema validation of the collected jobs data structure, and verify that the retrieved information matches the issued exclude_default selector ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 4.3.3.2.1, 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 4.3.3.2.1, 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -210,18 +211,43 @@ POST Create new VNF Performance Monitoring Job - UNPROCESSABLE CONTENT ... Test title: POST Create a new VNF Performance Monitoring Job - UNPROCESSABLE CONTENT ... Test objective: The objective is to test that the POST method cannot create a new VNF performance monitoring job when the callback URI provided in the Request body is unreachable by the VNFM. ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.2.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNFM cannot reach the Notification endpoint. ... Post-Conditions: none Send Post Request Create new VNF Performance Monitoring Job with Unreachable Callback URI Check HTTP Response Status Code Is 422 Check HTTP Response Body Json Schema Is ProblemDetails - +GET all VNF Performance Monitoring Jobs with permitted authorization scope + [Documentation] Test ID: 6.3.3.1.17 + ... Test title: GET all VNF Performance Monitoring Jobs with permitted authorization scope + ... Test objective: The objective is to test the retrieval of all the available VNF performance monitoring jobs and perform a JSON schema and content validation of the collected jobs data structure with permitted authorization scope + ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET all VNF Performance Monitoring Jobs with permitted authorization scope + Check HTTP Response Status Code Is 200 + Check HTTP Response Body Json Schema Is PmJobs +GET all VNF Performance Monitoring Jobs with NOT permitted authorization scope + [Documentation] Test ID: 6.3.3.1.18 + ... Test title: GET all VNF Performance Monitoring Jobs with not permitted authorization scope + ... Test objective: The objective is to test the retrieval of all the available VNF performance monitoring jobs and perform a JSON schema and content validation of the collected jobs data structure with not permitted authorization scope + ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: none + GET all VNF Performance Monitoring Jobs with not permitted authorization scope + Check HTTP Response Status Code Is 403 + Check HTTP Response Body Json Schema Is ProblemDetails + *** Keywords *** GET all VNF Performance Monitoring Jobs Log Trying to get all PM Jobs present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response @@ -230,6 +256,7 @@ GET all VNF Performance Monitoring Jobs GET VNF Performance Monitoring Jobs with attribute-based filter Log Trying to get all PM Jobs present in the VNFM, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?${POS_FILTER} ${output}= Output response @@ -238,6 +265,7 @@ GET VNF Performance Monitoring Jobs with attribute-based filter GET VNF Performance Monitoring Jobs with all_fields attribute selector Log Trying to get all PM Jobs present in the VNFM, using 'all_fields' filter Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?all_fields ${output}= Output response @@ -246,6 +274,7 @@ GET VNF Performance Monitoring Jobs with all_fields attribute selector GET VNF Performance Monitoring Jobs with exclude_default attribute selector Log Trying to get all VNF Packages present in the VNFM, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?exclude_default ${output}= Output response @@ -255,6 +284,7 @@ GET VNF Performance Monitoring Jobs with fields attribute selector Log Trying to get all VNF Packages present in the VNFM, using filter params Pass Execution If ${FIELD_USAGE} == 0 Skipping test as VNFM is not supporting 'fields' Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?fields=${fields} ${output}= Output response @@ -263,6 +293,7 @@ GET VNF Performance Monitoring Jobs with fields attribute selector GET VNF Performance Monitoring Jobs with exclude_default and fields attribute selector Log Trying to get all VNF Packages present in the VNFM, using filter params Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?fields=${fields}&exclude_default ${output}= Output response @@ -272,6 +303,7 @@ GET VNF Performance Monitoring Jobs with exclude_fields attribute selector Log Trying to get all VNF Packages present in the VNFM, using filter params Pass Execution If ${FIELD_USAGE} == 0 Skipping test as VNFM is not supporting 'fields' Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?fields=${fields} ${output}= Output response @@ -280,6 +312,7 @@ GET VNF Performance Monitoring Jobs with exclude_fields attribute selector GET VNF Performance Monitoring Jobs with invalid attribute-based filter Log Trying to get all PM Jobs present in the VNFM, using an erroneous filter param Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs?${NEG_FILTER} ${output}= Output response @@ -288,6 +321,7 @@ GET VNF Performance Monitoring Jobs with invalid attribute-based filter GET VNF Performance Monitoring Jobs with invalid resource endpoint Log Trying to perform a GET on a erroneous URI Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_job # wrong URI /pm_job instead of /pm_jobs ${output}= Output response @@ -296,6 +330,7 @@ GET VNF Performance Monitoring Jobs with invalid resource endpoint Send Post Request Create new VNF Performance Monitoring Job Log Creating a new PM Job Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/CreatePmJobRequest.json @@ -307,6 +342,7 @@ Send Post Request Create new VNF Performance Monitoring Job Send Post Request Create new VNF Performance Monitoring Job with Unreachable Callback URI Log Creating a new PM Job Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/CreatePmJobRequest.json @@ -318,6 +354,7 @@ Send Post Request Create new VNF Performance Monitoring Job with Unreachable Cal Send PUT Request for all VNF Performance Monitoring Jobs Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response @@ -326,6 +363,7 @@ Send PUT Request for all VNF Performance Monitoring Jobs Send PATCH Request for all VNF Performance Monitoring Jobs Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response @@ -334,6 +372,7 @@ Send PATCH Request for all VNF Performance Monitoring Jobs Send DELETE Request for all VNF Performance Monitoring Jobs Log Trying to perform a PUT. This method should not be implemented Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${output}= Output response @@ -342,6 +381,7 @@ Send DELETE Request for all VNF Performance Monitoring Jobs Check Postcondition PmJob Exists Log Checking that Pm Job exists Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${response['body']['id']} ${output}= Output response diff --git a/SOL002/VNFPerformanceManagement-API/Thresholds.robot b/SOL002/VNFPerformanceManagement-API/Thresholds.robot index cd718e26fc369723320d77e43d314e3b401f65ad..35acea2c34b3fcf78a2adb88bba46252d3c16a9b 100644 --- a/SOL002/VNFPerformanceManagement-API/Thresholds.robot +++ b/SOL002/VNFPerformanceManagement-API/Thresholds.robot @@ -1,6 +1,7 @@ *** Settings *** Library JSONSchemaLibrary schemas/ Resource environment/variables.txt # Generic Parameters +Resource VNFPerformanceManagementKeywords.robot Library JSONLibrary Library String Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false @@ -12,7 +13,7 @@ GET All Performance Thresholds ... Test title: GET All Performance Thresholds ... Test objective: The objective is to test the retrieval of all the available VNF performance thresholds and perform a JSON schema validation of the collected thresholds data structure ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -25,7 +26,7 @@ GET Performance Thresholds with attribute-based filter ... Test title: GET Performance Thresholds with attribute-based filter ... Test objective: The objective is to test the retrieval of all the available VNF performance thresholds when using attribute-based filters, perform a JSON schema validation of the collected thresholds data structure, and verify that the retrieved information matches the issued attribute-based filter ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -39,7 +40,7 @@ GET Performance Thresholds with invalid attribute-based filter ... Test title: GET Performance Thresholds with invalid attribute-based filter ... Test objective: The objective is to test that the retrieval of VNF performance thresholds fails when using invalid attribute-based filter, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -52,7 +53,7 @@ GET Performance Thresholds with invalid resource endpoint ... Test title: GET Performance Thresholds with invalid resource endpoint ... Test objective: The objective is to test that the retrieval of VNF performance thresholds fails when using invalid resource endpoint, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -65,7 +66,7 @@ POST Create new Performance Threshold ... Test title: POST Create new Performance Threshold ... Test objective: The objective is to test that the POST method creates a new VNF performance threshold and perform the JSON schema validation of the returned threshold data structure ... Pre-conditions: A VNF instance is instantiated. - ... Reference: Clause 6.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Threshold is successfully created on the VNFM @@ -80,7 +81,7 @@ PUT Performance Thresholds - Method not implemented ... Test title: PUT Performance Thresholds - Method not implemented ... Test objective: The objective is to test that PUT method is not allowed to modify VNF Performance Thresholds ... Pre-conditions: none - ... Reference: Clause 6.4.5.3.3 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.5.3.3 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -92,7 +93,7 @@ PATCH Performance Thresholds - Method not implemented ... Test title: PATCH Performance Thresholds - Method not implemented ... Test objective: The objective is to test that PATCH method is not allowed to modify VNF Performance Thresholds ... Pre-conditions: none - ... Reference: Clause 6.4.5.3.4 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.5.3.4 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -104,7 +105,7 @@ DELETE Performance Thresholds - Method not implemented ... Test title: DELETE Performance Thresholds - Method not implemented ... Test objective: The objective is to test that DELETE method is not allowed to update VNF Performance Thresholds ... Pre-conditions: none - ... Reference: Clause 6.4.5.3.5 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.5.3.5 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -116,7 +117,7 @@ GET Performance Thresholds with Paged Response ... Test title: GET Performance Thresholds with Paged Response ... Test objective: The objective is to test the retrieval of all the available VNF performance thresholds with Paged response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -129,7 +130,7 @@ GET Performance Thresholds for Bad Request Response too big ... Test title: GET Performance Thresholds for Bad Request Response too big ... Test objective: The objective is to test that the retrieval of VNF performance thresholds fails when response is too big, and perform the JSON schema validation of the failed operation HTTP response ... Pre-conditions: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -142,19 +143,46 @@ POST Create new Performance Threshold - UNPROCESSABLE CONTENT ... Test title: POST Create new Performance Threshold - UNPROCESSABLE CONTENT ... Test objective: The objective is to test that the POST method does not create a new VNF performance threshold when the callback URI provided in the Request body is unreachable by the VNFM. ... Pre-conditions: A VNF instance is instantiated. - ... Reference: Clause 6.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v4.4.1 + ... Reference: Clause 6.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNFM cannot reach the Notification endpoint. ... Post-Conditions: none Send Post Request Create new Performance Threshold with Unreachable Callback URI Check HTTP Response Status Code Is 422 Check HTTP Response Body Json Schema Is ProblemDetails +POST Create new Performance Threshold with permitted authorization scope + [Documentation] Test ID: 6.3.3.4.12 + ... Test title: POST Create new Performance Threshold with permitted authorization scope + ... Test objective: The objective is to test that the POST method creates a new VNF performance threshold and perform the JSON schema validation of the returned threshold data structure when the authorization scope is permitted + ... Pre-conditions: A VNF instance is instantiated. + ... Reference: Clause 6.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: The VNF Performance Threshold is successfully created on the VNFM + Send Post Request Create new Performance Threshold with permitted authorization scope + Check HTTP Response Status Code Is 201 + Check HTTP Response Body Json Schema Is Threshold + Check HTTP Response Header Contains Location + Check Postcondition Threshold Exists +POST Create new Performance Threshold with NOT permitted authorization scope + [Documentation] Test ID: 6.3.3.4.13 + ... Test title: POST Create new Performance Threshold with permitted authorization scope + ... Test objective: The objective is to test that the POST method creates a new VNF performance threshold and perform the JSON schema validation of the returned threshold data structure when the authorization scope is not permitted + ... Pre-conditions: A VNF instance is instantiated. + ... Reference: Clause 6.4.5.3.1 - ETSI GS NFV-SOL 002 [2] v4.5.1 + ... Config ID: Config_prod_VNFM + ... Applicability: none + ... Post-Conditions: The VNF Performance Threshold is successfully created on the VNFM + Send Post Request Create new Performance Threshold with not permitted authorization scope + Check HTTP Response Status Code Is 403 + Check HTTP Response Body Json Schema Is ProblemDetails *** Keywords *** GET all Performance Thresholds Log Trying to get all thresholds present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response @@ -163,6 +191,7 @@ GET all Performance Thresholds GET Performance Thresholds with attribute-based filter Log Trying to get thresholds present in the VNFM with filter Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds?${FILTER_OK} ${output}= Output response @@ -171,6 +200,7 @@ GET Performance Thresholds with attribute-based filter GET Performance Thresholds with invalid attribute-based filter Log Trying to get thresholds present in the VNFM with invalid filter Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds?${FILTER_KO} ${output}= Output response @@ -179,6 +209,7 @@ GET Performance Thresholds with invalid attribute-based filter GET VNF Performance Thresholds with invalid resource endpoint Log Trying to get thresholds present in the VNFM with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/threshold ${output}= Output response @@ -188,6 +219,7 @@ Send Post Request Create new Performance Threshold Log Creating a new THreshold Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${template}= Get File jsons/CreateThresholdRequest.json ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} callback_uri=${callback_uri}:${callback_port} @@ -199,6 +231,7 @@ Send Post Request Create new Performance Threshold with Unreachable Callback URI Log Creating a new THreshold Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${template}= Get File jsons/CreateThresholdRequest.json ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} callback_uri=${unreachable_callback_uri}:${callback_port} @@ -210,6 +243,7 @@ Send PUT Request for all Performance Thresholds Log PUT THresholds Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} PUT ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response @@ -219,6 +253,7 @@ Send PATCH Request for all Performance Thresholds Log PUT THresholds Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${output}= Output response @@ -234,6 +269,7 @@ Send DELETE Request for all Performance Thresholds Check Postcondition Threshold Exists Log Checking that Threshold exists Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${response['body']['id']} ${output}= Output response diff --git a/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot b/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot index 8651f5c8edc68ec3fd674690e33e1601bf286f8d..b4097348f3cd294fe103004a0e8ad6fa9674f9dc 100644 --- a/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot +++ b/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot @@ -10,6 +10,7 @@ Library JSONLibrary Library Collections Library JSONSchemaLibrary schemas/ Library Process +Library jwt *** Keywords *** @@ -246,6 +247,7 @@ Check Postcondition VNF Performance Subscription is Unmodified (Implicit) Check Postcondition VNF Performance Subscription is not Created Log Trying to get a new subscription Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${newSubscriptionId} ${output}= Output response @@ -296,6 +298,7 @@ Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subsc Check Postcondition VNF Performance Subscription Is Set Log Check Postcondition subscription exist Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${response['body']['id']} ${output}= Output response Set Suite Variable ${response} ${output} @@ -352,3 +355,121 @@ Check Notification Endpoint Check LINK in Header ${linkURL}= Get Value From Json ${response['headers']} $..Link Should Not Be Empty ${linkURL} +JWT Encode + [Arguments] ${payload} ${key} ${algorithm} + ${encoded}= Evaluate jwt.encode(${payload}, ${key}, ${algorithm}) + [Return] ${encoded} +GET all VNF Performance Monitoring Jobs with permitted authorization scope + Log Trying to get all PM Jobs present in the VNFM with permitted authorization scope + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + ${scope_value}= Create Dictionary scopeValue=${PM_JOBS_SCOPE} + ${authorizationToken}= JWT Encode payload=${scope_value} key='' algorithm=${OAUTH_Encryption_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs + ${output}= Output response + Set Suite Variable ${response} ${output} +GET all VNF Performance Monitoring Jobs with not permitted authorization scope + Log Trying to get all PM Jobs present in the VNFM with not permitted authorization scope + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + ${scope_value}= Create Dictionary scopeValue=${NEG_SCOPE} + ${authorizationToken}= JWT Encode payload=${scope_value} key='' algorithm=${OAUTH_Encryption_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs + ${output}= Output response + Set Suite Variable ${response} ${output} +Send Delete request for individual VNF Performance Job with permitted authorization scope + Log Trying to delete an existing PM Job with permitted authorization scope + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + ${scope_value}= Create Dictionary scopeValue=${PM_JOBS_SCOPE} + ${authorizationToken}= JWT Encode payload=${scope_value} key='' algorithm=${OAUTH_Encryption_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} + ${output}= Output response + Set Suite Variable ${response} ${output} +Send Delete request for individual VNF Performance Job with not permitted authorization scope + Log Trying to delete an existing PM Job with not permitted authorization scope + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + ${scope_value}= Create Dictionary scopeValue=${NEG_SCOPE} + ${authorizationToken}= JWT Encode payload=${scope_value} key='' algorithm=${OAUTH_Encryption_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + DELETE ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} + ${output}= Output response + Set Suite Variable ${response} ${output} +Get Individual Performance Report with permitted authorization scope + Log Trying to get a performance report present in the VNFM with permitted authorization scope + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + ${scope_value}= Create Dictionary scopeValue=${PM_JOBS_SCOPE} + ${authorizationToken}= JWT Encode payload=${scope_value} key='' algorithm=${OAUTH_Encryption_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} + ${output}= Output response + Set Suite Variable ${response} ${output} +Get Individual Performance Report with not permitted authorization scope + Log Trying to get a performance report present in the VNFM with not permitted authorization scope + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + ${scope_value}= Create Dictionary scopeValue=${NEG_SCOPE} + ${authorizationToken}= JWT Encode payload=${scope_value} key='' algorithm=${OAUTH_Encryption_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId}/reports/${reportId} + ${output}= Output response + Set Suite Variable ${response} ${output} +Send Post Request Create new Performance Threshold with permitted authorization scope + Log Creating a new THreshold with permitted authorization scope + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + ${scope_value}= Create Dictionary scopeValue=${THRESHOLDS_SCOPE} + ${authorizationToken}= JWT Encode payload=${scope_value} key='' algorithm=${OAUTH_Encryption_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + ${template}= Get File jsons/CreateThresholdRequest.json + ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} callback_uri=${callback_uri}:${callback_port} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} +Send Post Request Create new Performance Threshold with not permitted authorization scope + Log Creating a new THreshold with not permitted authorization scope + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + ${scope_value}= Create Dictionary scopeValue=${NEG_SCOPE} + ${authorizationToken}= JWT Encode payload=${scope_value} key='' algorithm=${OAUTH_Encryption_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + ${template}= Get File jsons/CreateThresholdRequest.json + ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} callback_uri=${callback_uri}:${callback_port} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${body} + ${output}= Output response + Set Suite Variable ${response} ${output} +GET Individual VNF Performance Threshold with permitted authorization scope + Log Trying to get a Threhsold present in the VNFM with permitted authorization scope + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + ${scope_value}= Create Dictionary scopeValue=${THRESHOLDS_SCOPE} + ${authorizationToken}= JWT Encode payload=${scope_value} key='' algorithm=${OAUTH_Encryption_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} + ${output}= Output response + Set Suite Variable ${response} ${output} +GET Individual VNF Performance Threshold with not permitted authorization scope + Log Trying to get a Threhsold present in the VNFM with not permitted authorization scope + Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Version": "${API_VERSION}"} + Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} + ${scope_value}= Create Dictionary scopeValue=${NEG_SCOPE} + ${authorizationToken}= JWT Encode payload=${scope_value} key='' algorithm=${OAUTH_Encryption_ALGORITHM} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${authorizationToken}"} + GET ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} + ${output}= Output response + Set Suite Variable ${response} ${output} \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/environment/variables.txt b/SOL002/VNFPerformanceManagement-API/environment/variables.txt index 927b59b9ba51b41e781bb8415b9b753db8eafd93..e641301df0fc257e485eb873289e23161c63d4ce 100644 --- a/SOL002/VNFPerformanceManagement-API/environment/variables.txt +++ b/SOL002/VNFPerformanceManagement-API/environment/variables.txt @@ -16,6 +16,12 @@ ${AUTHORIZATION_HEADER} Authorization ${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 ${AUTH_USAGE} 1 +${PM_JOBS_SCOPE} vnfpm:v1:pm_jobs +${THRESHOLDS_SCOPE} vnfpm:v1:thresholds +${NEG_SCOPE} vnfpm:v1:invalid +${OAUTH_Encryption_ALGORITHM} HS256 +${API_VERSION} 2.12.0 + ${HEADER_TEST_SUPPORTED} 0 ${VNFM_CHECKS_NOTIF_ENDPOINT} 1