diff --git a/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot b/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot index bda65d8b15f6309e39290fb4f6de286d9f027a51..c927b5124fdcc6e27aef364082cb3971e0baf7c7 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualPmJob.robot @@ -5,6 +5,11 @@ Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library String +Library MockServerLibrary +Library Process + +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true *** Test Cases *** GET individual VNF Performance Job @@ -12,7 +17,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 003 [1] v3.3.1 + ... Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -26,7 +31,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 003 [1] v3.3.1 + ... Reference: Clause 6.4.3.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -39,7 +44,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 003 [1] v3.3.1 + ... Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Job is no more available in the VNFM @@ -52,7 +57,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 ... 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 003 [1] v2.7.1 + ... Reference: Clause 6.4.3.3.5 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -65,7 +70,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: A VNF instance is instantiated - ... Reference: Clause 6.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Reference: Clause 6.4.3.3.1 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -77,7 +82,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: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNFM. - ... Reference: Clause 6.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Reference: Clause 6.4.3.3.3 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -89,7 +94,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 individual performace management 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.4 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: @@ -102,7 +107,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 003 [1] v3.3.1 + ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Job is not modified by the operation @@ -116,7 +121,7 @@ PATCH Individual VNF Performance Job - Unprocessable Entity ... Test title: PATCH Individual VNF Performance Job - Unprocessable Entity ... Test objective: The objective is to test that PATCH method cannot modify an exsisting individual PM job resource when a request contains syntactically correct data but the data cannot be processed. ... 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 003 [1] v3.3.1 + ... Reference: Clause 6.4.3.3.4 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -126,6 +131,11 @@ PATCH Individual VNF Performance Job - Unprocessable Entity *** Keywords *** +Create Sessions + Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance + Wait For Process handle=mockInstance timeout=5s on_timeout=continue + Create Mock Session ${callback_uri}:${callback_port} + GET individual VNF Performance Job Log Trying to get a Pm Job present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_JSON}"} @@ -182,10 +192,17 @@ Send Patch request for individual VNF Performance Job Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/PMJobModifications.json - ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_uri=${callback_endpoint} + ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_endpoint=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the request + Create Mock Expectation ${notification_request} ${notification_response} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} + Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} Send Patch request for individual VNF Performance Job - Etag mismatch Set Headers {"Accept":"${ACCEPT_JSON}"} @@ -193,7 +210,7 @@ Send Patch request for individual VNF Performance Job - Etag mismatch Set Headers {"If-Match": "${invalid_etag}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/PMJobModifications.json - ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_uri=${callback_endpoint} + ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_endpoint=${callback_endpoint} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -204,7 +221,7 @@ Send Patch request for individual VNF Performance Job with unprocessable entity Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/PMJobModifications.json - ${body}= Format String ${template} callback_uri=${unreachable_callback_uri}:${callback_port} + ${body}= Format String ${template} callback_uri=${unreachable_callback_uri} callback_port=${callback_port} callback_endpoint=${callback_endpoint} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs/${pmJobId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL003/VNFPerformanceManagement-API/IndividualReport.robot b/SOL003/VNFPerformanceManagement-API/IndividualReport.robot index f75b0d0f46e786d6aa174b53e3199e041d2afd97..14613c7161d68d3407957d9523723ec16300e5e8 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualReport.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualReport.robot @@ -11,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 003 [1] v3.3.1 + ... Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -24,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 003 [1] v3.3.1 + ... Reference: Clause 6.4.4.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -37,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: A VNF instance is instantiated. - ... Reference: Clause 6.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Reference: Clause 6.4.4.3.1 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -49,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: 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.3 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Reference: Clause 6.4.4.3.3 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -61,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: 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.4 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Reference: Clause 6.4.4.3.4 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -73,7 +73,7 @@ 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: 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.5 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Reference: Clause 6.4.4.3.5 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none diff --git a/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot b/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot index c991eb86381e6ed06a6467810a608e7231e5015f..542dbeb87eaae4f73e7ba40b99225b386b713da4 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot @@ -5,6 +5,11 @@ Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library OperatingSystem Library String +Library Process +Library MockServerLibrary + +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true *** Test Cases *** GET Individual Threshold @@ -12,7 +17,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 003 [1] v3.3.1 + ... Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -26,7 +31,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 003 [1] v3.3.1 + ... Reference: Clause 6.4.6.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -39,7 +44,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 003 [1] v3.3.1 + ... Reference: Clause 6.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Threshold is not available anymore in the VNFM @@ -52,7 +57,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 003 [1] v3.3.1 + ... Reference: Clause 6.4.6.3.5 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -65,7 +70,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: A VNF instance is instantiated - ... Reference: Clause 6.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Reference: Clause 6.4.6.3.1 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -77,7 +82,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: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.6.3.3 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Reference: Clause 6.4.6.3.3 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -89,7 +94,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 003 [1] v3.3.1 + ... Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: @@ -102,7 +107,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 003 [1] v3.3.1 + ... Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -115,7 +120,7 @@ PATCH Individual Threshold - Unprocessible Entity ... Test title: PATCH Individual Threshold - Unprocessible Entity ... Test objective: The objective is to test that PATCH method cannot modify an individual threshold resource when a request contains syntactically correct data but the data cannot be processed. ... 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 003 [1] v3.3.1 + ... Reference: Clause 6.4.6.3.4 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -125,6 +130,11 @@ PATCH Individual Threshold - Unprocessible Entity *** Keywords *** +Create Sessions + Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance + Wait For Process handle=mockInstance timeout=5s on_timeout=continue + Create Mock Session ${callback_uri}:${callback_port} + GET Individual VNF Performance Threshold Log Trying to get a Threhsold present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} @@ -180,9 +190,16 @@ Send Patch request for individual VNF Performance Threshold Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/ThresholdModifications.json ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_uri=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the request + Create Mock Expectation ${notification_request} ${notification_response} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} + Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} Send Patch request for individual VNF Performance Threshold - Etag mismatch Log Trying to PUT threshold @@ -195,7 +212,6 @@ Send Patch request for individual VNF Performance Threshold - Etag mismatch PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} - Send Patch request for individual VNF Performance Threshold with unprocessable entity Log Trying to PATCH threshold @@ -203,7 +219,7 @@ Send Patch request for individual VNF Performance Threshold with unprocessable e Set Headers {"Content-Type": "${CONTENT_TYPE_PATCH}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"} ${template}= Get File jsons/ThresholdModifications.json - ${body}= Format String ${template} callback_uri=${unreachable_callback_uri}:${callback_port} + ${body}= Format String ${template} callback_uri=${callback_uri} callback_port=${callback_port} callback_uri=${callback_endpoint} PATCH ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds/${thresholdId} ${body} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL003/VNFPerformanceManagement-API/NotificationEndpoint.robot b/SOL003/VNFPerformanceManagement-API/NotificationEndpoint.robot index e4130e4407fcb5288c53fc63c7f6bc0820fe3018..b22d7e0e8e8c41003675665bdb172bfc2d41f9a0 100644 --- a/SOL003/VNFPerformanceManagement-API/NotificationEndpoint.robot +++ b/SOL003/VNFPerformanceManagement-API/NotificationEndpoint.robot @@ -13,7 +13,7 @@ Performance Information Available Notification ... Test title: Performance Information Available Notification ... Test objective: The objective is to test that the POST request triggers Performance Information Available Notification. ... Pre-conditions: A VNF performance job is created, and a subscription for performance information available notification is available in the VNFM. - ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none @@ -25,7 +25,7 @@ Threshold Crossed Notification ... Test title: Threshold Crossed Notification ... Test objective: The objective is to test that the POST request triggers Threshold Crossed Notification ... 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 003 [1] v3.3.1 + ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_Notif_Endpoint ... Applicability: none ... Post-Conditions: none diff --git a/SOL003/VNFPerformanceManagement-API/Notifications.robot b/SOL003/VNFPerformanceManagement-API/Notifications.robot index b8c5b3d6f85a5f43bc55ac90cd447036dca8d7e4..7cfc35a22111bf50df5256d1ed2df7314271c629 100644 --- a/SOL003/VNFPerformanceManagement-API/Notifications.robot +++ b/SOL003/VNFPerformanceManagement-API/Notifications.robot @@ -16,7 +16,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 003 [1] v3.3.1 + ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -29,7 +29,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 003 [1] v3.3.1 + ... Reference: Clause 6.4.9.3.1 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none diff --git a/SOL003/VNFPerformanceManagement-API/PMJobs.robot b/SOL003/VNFPerformanceManagement-API/PMJobs.robot index 49c284c4ce1e9898c20f7623bdb23334115d54b9..b7cf83befc2c582e79980663b73d8c8941b84e4d 100644 --- a/SOL003/VNFPerformanceManagement-API/PMJobs.robot +++ b/SOL003/VNFPerformanceManagement-API/PMJobs.robot @@ -6,6 +6,11 @@ Library OperatingSystem Library String Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library MockServerLibrary +Library Process + +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true + *** Test Cases *** GET all VNF Performance Monitoring Jobs @@ -13,7 +18,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 003 [1] v3.3.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -27,7 +32,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 003 [1] v3.3.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -41,7 +46,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 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -55,7 +60,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 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -69,7 +74,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 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNFM supports the use of exclude_fields attribute selector ... Post-Conditions: none @@ -83,7 +88,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 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.7.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNFM supports the use of exclude_fields attribute selector ... Post-Conditions: none @@ -97,7 +102,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 003 [1] v3.3.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -110,7 +115,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 ... 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 003 [1] v2.7.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -122,7 +127,7 @@ Create new VNF Performance Monitoring Job ... Test title: Create a new VNF Performance Monitoring Job ... Test objective: The objective is to test the creation of 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 003 [1] v3.3.1 + ... Reference: Clause 6.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Job is successfully created on the VNFM @@ -136,7 +141,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: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -148,7 +153,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: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -160,7 +165,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: A VNF instance is instantiated. One or more VNF performance jobs are set in the VNF. - ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Reference: Clause 6.4.2.3.3 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VE ... Applicability: none ... Post-Conditions: none @@ -173,7 +178,7 @@ GET all VNF Performance Monitoring Jobs as Paged Response ... Test title: GET all VNF Performance Monitoring Jobs as Paged Response ... Test objective: The objective is to test the retrieval of all the available VNF performance monitoring jobs as 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 003 [1] v3.3.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNFM supports response paging for the VNF performance jobs resources ... Post-Conditions: none @@ -186,7 +191,7 @@ GET all VNF Performance Monitoring Jobs as Paged Response with nextpage_opauque_ ... Test title: GET all VNF Performance Monitoring Jobs as Paged Response with nextpage_opauque_marker parameter ... Test objective: The objective is to query information about all the available VNF performance monitoring jobs as a Paged Response and retrieve the next page using the nextpage_opaque_marker parameter ... Pre-conditions: A request for retrieving the available VNF performance monitoring jobs as a paged response has been successfully issued (Test ID 7.3.4.1.13) - ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v2.8.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNFM supports response paging for the VNF performance jobs resources ... Post-Conditions: none @@ -198,7 +203,7 @@ GET VNF Performance Monitoring Jobs - Bad Request Response too Big ... Test title: GET VNF Performance Monitoring Jobs - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of VNF performance monitoring jobs fails because 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 003 [1] v3.3.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -211,7 +216,7 @@ GET all VNF Performance Monitoring Jobs with fields and exclude_default attribut ... Test title: GET all VNF Performance Monitoring Jobs with fields and exclude_default attribute selector ... Test objective: The objective is to test the retrieval of all VNF performance monitoring jobs fields and exclude_default 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 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Reference: Clause 6.4.2.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: The VNFM supports the use of fields and exclude_fields attribute selector ... Post-Conditions: none @@ -225,7 +230,7 @@ POST Create new VNF Performance Monitoring Job - Unprocessable Entity ... Test title: POST Create new VNF Performance Monitoring Job - Unprocessable Entity ... Test objective: The objective is to test the creation of a new VNF performance monitoring job fails when a request contains syntactically correct data but the data cannot be processed. ... Pre-conditions: none - ... Reference: clause 6.4.2.3.1 - ETSI GS NFV-SOL 003 [1] V3.3.1 + ... Reference: clause 6.4.2.3.1 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -234,6 +239,11 @@ POST Create new VNF Performance Monitoring Job - Unprocessable Entity Check HTTP Response Body Json Schema Is ProblemDetails *** Keywords *** +Create Sessions + Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance + Wait For Process handle=mockInstance timeout=5s on_timeout=continue + Create Mock Session ${callback_uri}:${callback_port} + GET all VNF Performance Monitoring Jobs Log Trying to get all PM Jobs present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} @@ -335,10 +345,17 @@ Send Post Request Create new VNF Performance Monitoring Job 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 - ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} + ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} callback_uri=${callback_uri} callback_port=${callback_port} callback_endpoint=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the request + Create Mock Expectation ${notification_request} ${notification_response} POST ${apiRoot}/${apiName}/${apiMajorVersion}/pm_jobs ${body} ${output}= Output response Set Suite Variable ${response} ${output} + Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} Send PUT Request for all VNF Performance Monitoring Jobs Log Trying to perform a PUT. This method should not be implemented diff --git a/SOL003/VNFPerformanceManagement-API/Thresholds.robot b/SOL003/VNFPerformanceManagement-API/Thresholds.robot index 230ae23006ddcb927402aaabec012980df8e65d6..4b8b1a2a0666e4b9697f0ce6b3fb68f801cf385b 100644 --- a/SOL003/VNFPerformanceManagement-API/Thresholds.robot +++ b/SOL003/VNFPerformanceManagement-API/Thresholds.robot @@ -5,6 +5,11 @@ Resource environment/variables.txt # Generic Parameters Library JSONLibrary Library REST ${VNFM_SCHEMA}://${VNFM_HOST}:${VNFM_PORT} ssl_verify=false Library OperatingSystem +Library Process +Library MockServerLibrary + +Suite Setup Create Sessions +Suite Teardown Terminate All Processes kill=true *** Test Cases *** GET All Performance Thresholds @@ -12,7 +17,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 003 [1] v3.3.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -25,7 +30,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 003 [1] v3.3.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -39,7 +44,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 003 [1] v3.3.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -51,7 +56,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 003 [1] v3.3.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -64,7 +69,7 @@ Create new Performance Threshold ... Test title: Create new Performance Threshold ... Test objective: The objective is to test the creation of 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 003 [1] v3.3.1 + ... Reference: Clause 6.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF Performance Threshold is successfully created on the VNFM @@ -79,7 +84,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: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNF. - ... Reference: Clause 6.4.5.3.3 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Reference: Clause 6.4.5.3.3 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -91,7 +96,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: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.4 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Reference: Clause 6.4.5.3.4 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -103,7 +108,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: A VNF instance is instantiated. One or more VNF performance thresholds are set in the VNFM. - ... Reference: Clause 6.4.5.3.5 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Reference: Clause 6.4.5.3.5 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: The VNF performance thresholds are not deleted by the failed operation @@ -116,7 +121,7 @@ GET All Performance Thresholds as Paged Response ... Test title: GET All Performance Thresholds as Paged Response ... Test objective: The objective is to test the retrieval of all the available VNF performance thresholds as a 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 003 [1] v3.3.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -129,7 +134,7 @@ GET Performance Thresholds - Bad Request Response too Big ... Test title: GET Performance Thresholds - Bad Request Response too Big ... Test objective: The objective is to test that the retrieval of VNF performance thresholds fails because 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 003 [1] v3.3.1 + ... Reference: Clause 6.4.5.3.2 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -142,7 +147,7 @@ POST create new Performance Threshold - Unprocessable Entity ... Test title: POST create new Performance Threshold - Unprocessable Entity ... Test objective: The objective is to test that creation of new VNF performance threshold fails when a request contains syntactically correct data but the data cannot be processed. ... Pre-conditions: A VNF instance is instantiated. - ... Reference: Clause 6.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v3.3.1 + ... Reference: Clause 6.4.5.3.1 - ETSI GS NFV-SOL 003 [1] v3.5.1 ... Config ID: Config_prod_VNFM ... Applicability: none ... Post-Conditions: none @@ -151,6 +156,11 @@ POST create new Performance Threshold - Unprocessable Entity Check HTTP Response Body Json Schema Is ProblemDetails *** Keywords *** +Create Sessions + Start Process java -jar ${MOCK_SERVER_JAR} -serverPort ${callback_port} alias=mockInstance + Wait For Process handle=mockInstance timeout=5s on_timeout=continue + Create Mock Session ${callback_uri}:${callback_port} + GET all Performance Thresholds Log Trying to get all thresholds present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} @@ -200,11 +210,17 @@ Send Post Request Create new Performance Threshold with unprocessable entity Set Headers {"Accept": "${ACCEPT_JSON}"} 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} - POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${body} + ${request}= Format String ${template} objectInstanceIds=${objectInstanceIds} callback_uri=${callback_uri} callback_port=${callback_port} callback_uri=${callback_endpoint} + Log Creating mock request and response to handle GET operation on notification endpoint + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{notification_response}= Create Mock Response status_code=204 + Log Issue the request + Create Mock Expectation ${notification_request} ${notification_response} + POST ${apiRoot}/${apiName}/${apiMajorVersion}/thresholds ${request} ${output}= Output response Set Suite Variable ${response} ${output} - + Verify Mock Expectation ${notification_request} + Clear Requests ${callback_endpoint} Send PUT Request for all Performance Thresholds Log PUT THresholds diff --git a/SOL003/VNFPerformanceManagement-API/environment/variables.txt b/SOL003/VNFPerformanceManagement-API/environment/variables.txt index e7d2e7f50e1ecb2741aea6b4c8ec991b36fd379c..2d8ec14a78dfc8f9031cf01b6301b4c25be6919f 100644 --- a/SOL003/VNFPerformanceManagement-API/environment/variables.txt +++ b/SOL003/VNFPerformanceManagement-API/environment/variables.txt @@ -6,7 +6,6 @@ ${VNFM_SCHEMA} https ${AUTHORIZATION_HEADER} Authorization ${AUTHORIZATION_TOKEN} Bearer 0b79bab50daca910b000d4f1a2b675d604257e42 -${NEG_AUTHORIZATION} Bearer negativetoken ${CONTENT_TYPE_JSON} application/json ${CONTENT_TYPE_PATCH} application/merge-patch+json @@ -15,18 +14,15 @@ ${AUTH_USAGE} 1 ${FIELD_USAGE} 1 ${VNFM_CHECKS_NOTIF_ENDPOINT} 1 ## If true, during subscription, the FUT performs a get to the notification endpoint -${VNFM_ALLOWS_DUPLICATE_SUBS} 1 ${apiRoot} / ${apiMajorVersion} v1 ${apiName} vnfpm ${callback_port} 9091 -${callback_uri} http://172.22.1.7:${callback_port} +${callback_uri} http://172.22.1.7 ${unreachable_callback_uri} http://not-reachable-uri ${callback_endpoint} /vnfpm/subscriptions -${callback_endpoint_error} /subs_404 -${sleep_interval} 20s ${total_polling_time} 2 min ${polling_interval} 10 sec @@ -41,7 +37,6 @@ ${pmJobId} 29f4ff6a-be91-4ec8-856e-fcf1e2479e4e ${erroneousPmJobId} erroneousPmJobId ${newPmJobId} newPmJobId ${response}= httpresponse -${OrigResponse}= httpresponse ${thresholdId} 1f50d68b-82e8-4deb-bd40-c934d4d1ac0a diff --git a/SOL003/VNFPerformanceManagement-API/jsons/CreatePmJobRequest.json b/SOL003/VNFPerformanceManagement-API/jsons/CreatePmJobRequest.json index c8abf77c85063a88a6cabd17f8f420284acb2f68..8355d506b62d47dc9ca54307ecaa77d9c61ac53b 100644 --- a/SOL003/VNFPerformanceManagement-API/jsons/CreatePmJobRequest.json +++ b/SOL003/VNFPerformanceManagement-API/jsons/CreatePmJobRequest.json @@ -6,5 +6,5 @@ "collectionPeriod": 10, "reportingPeriod": 30 }}, - "callbackUri": "{callback_uri}" -}} \ No newline at end of file + "callbackUri": "{callback_uri}:{callback_port}{callback_endpoint}" +}} diff --git a/SOL003/VNFPerformanceManagement-API/jsons/CreateThresholdRequest.json b/SOL003/VNFPerformanceManagement-API/jsons/CreateThresholdRequest.json index 645c64fda53063b99ad2ff189f297a41a1ac6a20..9094634bc8e7501e62361a34a28cb42b37cb4ae6 100644 --- a/SOL003/VNFPerformanceManagement-API/jsons/CreateThresholdRequest.json +++ b/SOL003/VNFPerformanceManagement-API/jsons/CreateThresholdRequest.json @@ -9,5 +9,5 @@ }} }}, - "callbackUri": "{callback_uri}" + "callbackUri": "{callback_uri}:{callback_port}{callback_endpoint}" }} \ No newline at end of file diff --git a/SOL003/VNFPerformanceManagement-API/jsons/PmJobModifications.json b/SOL003/VNFPerformanceManagement-API/jsons/PmJobModifications.json index 275f942d93c39a77bbe990ea674eb26c8adcd157..e27b443c77b3093096afb3968428ad72af74a0d8 100644 --- a/SOL003/VNFPerformanceManagement-API/jsons/PmJobModifications.json +++ b/SOL003/VNFPerformanceManagement-API/jsons/PmJobModifications.json @@ -1,3 +1,3 @@ { - "callbackUri": "{callback_uri}" -} \ No newline at end of file + "callbackUri": "{callback_uri}:{callback_port}{callback_endpoint}" +} diff --git a/SOL003/VNFPerformanceManagement-API/jsons/ThresholdModifications.json b/SOL003/VNFPerformanceManagement-API/jsons/ThresholdModifications.json index bcd6f00907cfe3660f1f49fae8d4aabc40bab8c8..e27b443c77b3093096afb3968428ad72af74a0d8 100644 --- a/SOL003/VNFPerformanceManagement-API/jsons/ThresholdModifications.json +++ b/SOL003/VNFPerformanceManagement-API/jsons/ThresholdModifications.json @@ -1,3 +1,3 @@ - { - "callbackUri": "{callback_uri}" -} \ No newline at end of file +{ + "callbackUri": "{callback_uri}:{callback_port}{callback_endpoint}" +}