diff --git a/SOL002/VNFPerformanceManagement-API/IndividualReport.robot b/SOL002/VNFPerformanceManagement-API/IndividualReport.robot index 9a8f99a2c674618c29cfee19770d6bbec6e72c9c..1148dffdc73e4b5149c6cc4c6ba01df59f0694ff 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualReport.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualReport.robot @@ -87,7 +87,7 @@ DELETE Individual Performance Report - Method not implemented Get Individual Performance Report Log Trying to get a performance report present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -95,21 +95,21 @@ 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}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${erroneousReportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for Individual Performance Report Log Trying to create new performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${newReportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for Individual Performance Report Log Trying to update performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -119,7 +119,7 @@ Send Put request for Individual Performance Report Send Patch request for Individual Performance Report Log Trying to update performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -129,7 +129,7 @@ Send Patch request for Individual Performance Report Send Delete request for Individual Performance Report Log Trying to delete performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot b/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot index 1a68cdce9f44f0d19583cfa4b1e962ce4316dbbc..9df58168bcd6b0bf3a2fed34acfd4d8f6a3318f8 100644 --- a/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL002/VNFPerformanceManagement-API/IndividualThreshold.robot @@ -101,7 +101,7 @@ PATCH Individual Threshold - Method not implemented GET Individual VNF Performance Threshold Log Trying to get a Threhsold present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -109,28 +109,28 @@ 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}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${erroneousThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Threshold Log Trying to delete a Threhsold in the VNFM - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Threshold with invalid resource identifier Log Trying to delete a Threhsold in the VNFM with invalid id - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds/${erroneousThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual VNF Performance Threshold Log Trying to create new threshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/thresholds/${newThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -138,7 +138,7 @@ Send Post request for individual VNF Performance Threshold Send Put request for individual VNF Performance Threshold Log Trying to PUT threshold Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -149,7 +149,7 @@ Send Put request for individual VNF Performance Threshold Send Patch request for individual VNF Performance Threshold Log Trying to PUT threshold Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} diff --git a/SOL002/VNFPerformanceManagement-API/Thresholds.robot b/SOL002/VNFPerformanceManagement-API/Thresholds.robot index 50552ec4f6393fef8355c172c7bd8f2a1b627431..bcb6017f300be824c4103a1d8aa5737cd3ba3fe6 100644 --- a/SOL002/VNFPerformanceManagement-API/Thresholds.robot +++ b/SOL002/VNFPerformanceManagement-API/Thresholds.robot @@ -142,7 +142,7 @@ GET Performance Thresholds for Bad Request Response too big GET all Performance Thresholds Log Trying to get all thresholds present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} @@ -150,7 +150,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}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_OK} ${output}= Output response Set Suite Variable ${response} ${output} @@ -158,7 +158,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}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_KO} ${output}= Output response Set Suite Variable ${response} ${output} @@ -166,14 +166,14 @@ 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}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/threshold ${output}= Output response Set Suite Variable ${response} ${output} Send Post Request Create new Performance Threshold Log Creating a new THreshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${request}= Get File jsons/CreateThresholdRequest.json @@ -183,7 +183,7 @@ Send Post Request Create new Performance Threshold Send PUT Request for all Performance Thresholds Log PUT THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} PUT ${apiRoot}/${apiName}/${apiVersion}/thresholds @@ -192,7 +192,7 @@ Send PUT Request for all Performance Thresholds Send PATCH Request for all Performance Thresholds Log PUT THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/thresholds @@ -201,7 +201,7 @@ Send PATCH Request for all Performance Thresholds Send DELETE Request for all Performance Thresholds Log DELETE THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot b/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot index f131a7216dabe157583c6bce2608ce869e2626bd..4599d7620ba0773efc88cec071187f22931826a2 100644 --- a/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot +++ b/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot @@ -19,7 +19,7 @@ Get all VNF Performance Subscriptions ... request and response data structures, and response codes. Set headers {"Accept": "application/json"} Set headers {"Content-Type": "application/json"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -38,7 +38,7 @@ Get all VNF Performance Subscriptions ... This method shall follow the provisions specified in the tables 6.4.7.3.2-1 and 6.4.7.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ok} ${output}= Output response Set Suite Variable ${response} ${output} @@ -58,7 +58,7 @@ Get VNF Performance Subscriptions with invalid attribute-based filters ... This method shall follow the provisions specified in the tables 6.4.7.3.2-1 and 6.4.7.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ko} ${output}= Output response Set Suite Variable ${response} ${output} @@ -77,7 +77,7 @@ Get VNF Performance Subscriptions with invalid resource endpoint ... This method shall follow the provisions specified in the tables 6.4.7.3.2-1 and 6.4.7.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscription ${output}= Output response Set Suite Variable ${response} ${output} @@ -103,7 +103,7 @@ Send Post Request for VNF Performance Subscription ... the existing subscription resource with the same filter and callbackUri). Set headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ${body_request}= Get File jsons/subscriptions.json POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body_request} ${output}= Output response diff --git a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index 18bd70bcf2fff4d4052f80dc8acae6f2d2bfa299..a9004c95799f504f61f8a8d96eaad4a59de70d56 100644 --- a/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL003/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -522,8 +522,7 @@ Send DELETE Request for VNFD in individual VNF Package Check Postcondition VNFD Exist Log Checking that vnf pacakge still exists - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Set Headers {"Accept": "${ACCEPT_ZIP}"} + Set Headers {"Accept": "${ACCEPT_PLAIN}, ${ACCEPT_ZIP}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd Check HTTP Response Status Code Is 200 @@ -713,13 +712,13 @@ Send Delete request for individual VNF Package Subscription with invalid resourc Set Suite Variable ${response} ${output} Send Post request for individual VNF Package Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for individual VNF Package Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -728,7 +727,7 @@ Send Put request for individual VNF Package Subscription Set Suite Variable ${response} ${output} Send Patch request for individual VNF Package Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} diff --git a/SOL003/VNFPerformanceManagement-API/IndividualReport.robot b/SOL003/VNFPerformanceManagement-API/IndividualReport.robot index 6a4de49d01024870148d270a4e370759df061bfa..f76c30ccbbbd3d313b992d489afcca86a5385d3e 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualReport.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualReport.robot @@ -87,7 +87,7 @@ DELETE Individual Performance Report - Method not implemented Get Individual Performance Report Log Trying to get a performance report present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -95,21 +95,21 @@ 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}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${erroneousReportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for Individual Performance Report Log Trying to create new performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${newReportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for Individual Performance Report Log Trying to update performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -119,7 +119,7 @@ Send Put request for Individual Performance Report Send Patch request for Individual Performance Report Log Trying to update performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -129,7 +129,7 @@ Send Patch request for Individual Performance Report Send Delete request for Individual Performance Report Log Trying to delete performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot b/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot index 18988757a40504d0f9c3e1c1831f6fcffc39878f..fa6e6cd9746108890e6375c932194cb14df46e13 100644 --- a/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot +++ b/SOL003/VNFPerformanceManagement-API/IndividualThreshold.robot @@ -101,7 +101,7 @@ PATCH Individual Threshold - Method not implemented GET Individual VNF Performance Threshold Log Trying to get a Threhsold present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -109,28 +109,28 @@ 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}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${erroneousThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Threshold Log Trying to delete a Threhsold in the VNFM - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Threshold with invalid resource identifier Log Trying to delete a Threhsold in the VNFM with invalid id - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds/${erroneousThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual VNF Performance Threshold Log Trying to create new threshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/thresholds/${newThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -138,7 +138,7 @@ Send Post request for individual VNF Performance Threshold Send Put request for individual VNF Performance Threshold Log Trying to PUT threshold Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -149,7 +149,7 @@ Send Put request for individual VNF Performance Threshold Send Patch request for individual VNF Performance Threshold Log Trying to PUT threshold Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} diff --git a/SOL003/VNFPerformanceManagement-API/Thresholds.robot b/SOL003/VNFPerformanceManagement-API/Thresholds.robot index c1d7f0471034775accc4c29334e405181bc027a9..fcdf5a5b7cb13c779e6bf379639066e2d8c2267a 100644 --- a/SOL003/VNFPerformanceManagement-API/Thresholds.robot +++ b/SOL003/VNFPerformanceManagement-API/Thresholds.robot @@ -140,7 +140,7 @@ GET Performance Thresholds - Bad Request Response too Big GET all Performance Thresholds Log Trying to get all thresholds present in the VNFM Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} @@ -148,7 +148,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}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_OK} ${output}= Output response Set Suite Variable ${response} ${output} @@ -156,7 +156,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}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_KO} ${output}= Output response Set Suite Variable ${response} ${output} @@ -164,14 +164,14 @@ 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}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/threshold ${output}= Output response Set Suite Variable ${response} ${output} Send Post Request Create new Performance Threshold Log Creating a new THreshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} ${request}= Get File jsons/CreateThresholdRequest.json @@ -181,7 +181,7 @@ Send Post Request Create new Performance Threshold Send PUT Request for all Performance Thresholds Log PUT THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} PUT ${apiRoot}/${apiName}/${apiVersion}/thresholds @@ -190,7 +190,7 @@ Send PUT Request for all Performance Thresholds Send PATCH Request for all Performance Thresholds Log PUT THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/thresholds @@ -199,7 +199,7 @@ Send PATCH Request for all Performance Thresholds Send DELETE Request for all Performance Thresholds Log DELETE THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL003/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot b/SOL003/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot index a7a2ac66e5cae1e1af9944f1f7b118280890a427..01f72fce8166cfeccde32dc4247897fafd7d5d87 100644 --- a/SOL003/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot +++ b/SOL003/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot @@ -19,7 +19,7 @@ Get all VNF Performance Subscriptions ... request and response data structures, and response codes. Set headers {"Accept": "application/json"} Set headers {"Content-Type": "application/json"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -38,7 +38,7 @@ Get all VNF Performance Subscriptions ... This method shall follow the provisions specified in the tables 6.4.7.3.2-1 and 6.4.7.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ok} ${output}= Output response Set Suite Variable ${response} ${output} @@ -58,7 +58,7 @@ Get VNF Performance Subscriptions with invalid attribute-based filters ... This method shall follow the provisions specified in the tables 6.4.7.3.2-1 and 6.4.7.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions?${filter_ko} ${output}= Output response Set Suite Variable ${response} ${output} @@ -77,7 +77,7 @@ Get VNF Performance Subscriptions with invalid resource endpoint ... This method shall follow the provisions specified in the tables 6.4.7.3.2-1 and 6.4.7.3.2-2 for URI query parameters, ... request and response data structures, and response codes. Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscription ${output}= Output response Set Suite Variable ${response} ${output} @@ -103,7 +103,7 @@ Send Post Request for VNF Performance Subscription ... the existing subscription resource with the same filter and callbackUri). Set headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ${body_request}= Get File jsons/subscriptions.json POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body_request} ${output}= Output response @@ -134,7 +134,7 @@ Send Post Request for Duplicated VNF Performance Subscription ... the existing subscription resource with the same filter and callbackUri). Set headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ${body_request}= Get File jsons/subscriptions.json POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body_request} ${output}= Output response @@ -155,7 +155,7 @@ Send Post Request for Duplicated VNF Performance Subscription Send Put Request for VNF Performance Subscriptions [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in Clause 6.4.7.3.3. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PUT ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -165,7 +165,7 @@ Send Put Request for VNF Performance Subscriptions Send Patch Request for VNF Performance Subscriptions [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in Clause 6.4.7.3.4. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -175,7 +175,7 @@ Send Patch Request for VNF Performance Subscriptions Send Delete Request for VNF Performance Subscriptions [Documentation] This method is not supported. When this method is requested on this resource, the VNFM shall return a "405 Method ... Not Allowed" response as defined in Clause 6.4.7.3.5. - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${output}= Output response Set Suite Variable ${response} ${output} @@ -184,40 +184,40 @@ Send Delete Request for VNF Performance Subscriptions Get Individual VNF Performance Subscription Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} GET individual VNF Performance Subscription with invalid resource identifier Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Subscription Set headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual VNF Performance Subscription with invalid resource identifier Log Trying to delete a subscription in the VNFM with invalid id - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${erroneousSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual VNF Performance Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for individual VNF Performance Threshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -226,7 +226,7 @@ Send Put request for individual VNF Performance Threshold Set Suite Variable ${response} ${output} Send Patch request for individual VNF Performance Threshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} diff --git a/SOL005/NSDManagement-API/IndividualNSDescriptor.robot b/SOL005/NSDManagement-API/IndividualNSDescriptor.robot index 2ff40359ef50c4867f8ffc10cc39ba13fab7df26..47a1aa7a0819a1783dbf8a19da3fe9f205e49d38 100644 --- a/SOL005/NSDManagement-API/IndividualNSDescriptor.robot +++ b/SOL005/NSDManagement-API/IndividualNSDescriptor.robot @@ -94,7 +94,7 @@ Enable Individual Network Service Descriptor with conflict due to onboarding sta Check HTTP Response Status Code Is 409 Check HTTP Response Body Json Schema Is ProblemDetails - Enable Individual Network Service Descriptor with HTTP Etag precondition failure +Enable Individual Network Service Descriptor with HTTP Etag precondition failure [Documentation] Test ID: 5.3.1.2.7 ... Test title: Enable Individual Network Service Descriptor with HTTP Etag precondition failure ... Test objective: The objective is to test that the retrieval of an Network Service Descriptor fails due to a precondition failure when using an uncorrect Http Etag identified. diff --git a/SOL005/NSDManagement-API/NSDManagementKeywords.robot b/SOL005/NSDManagement-API/NSDManagementKeywords.robot index 9304e5e069b767abe1985d5eb2a73dbfc3cd0329..eb27f2b78c9a40c203e7682888a7c27b73d75a3a 100644 --- a/SOL005/NSDManagement-API/NSDManagementKeywords.robot +++ b/SOL005/NSDManagement-API/NSDManagementKeywords.robot @@ -4,13 +4,14 @@ Resource environment/subscriptions.txt Resource environment/nsDescriptors.txt # Specific nsDescriptors Parameters Resource environment/pnfDescriptors.txt # Specific pnfDescriptors Parameters Resource environment/individualSubscription.txt -Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false +Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library MockServerLibrary Library OperatingSystem Library BuiltIn Library JSONLibrary Library Collections Library JSONSchemaLibrary schemas/ +Library RequestsLibrary Library Process Library String @@ -65,7 +66,7 @@ Get all Network Service Descriptors Information without authorization token Get all Network Service Descriptors Information with expired or revoked authorization token Pass Execution If ${AUTH_USAGE} == 0 Skipping test as it is not supporting authentication - Log The GET method queries using invalid token + Log The GET method queries using invalid token Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Authorization": "${NEG_AUTHORIZATION}"} Log Execute Query and validate response @@ -203,7 +204,6 @@ GET Individual Network Service Descriptor Information with invalid resource iden Integer response status 404 ${output}= Output response Set Suite Variable ${response} ${output} - Set Suite Variable ${usageState} ${response['body']['nsdUsageState']} Send PATCH to disable Individual Network Service Descriptor Log Trying to perform a PATCH. As prerequisite the nsdInfo shall be in enabled operational state @@ -223,6 +223,7 @@ Check Postcondition Network Service Descriptor is in operational state Check Postcondition Network Service Descriptor usage state is unmodified (Implicit) Log Checking postcondition use status + Check PostCondition GET Individual Network Service Descriptor Information Should Be Equal As Strings ${response['body']['nsdUsageState']} ${usageState} Send PATCH to enable Individual Network Service Descriptor @@ -333,14 +334,13 @@ Get NSD Content in Zip Format Log Trying to get a NSD present in the NFVO Catalogue Set Headers {"Accept": "${ACCEPT_ZIP}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content + GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdDownloadableZip}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} Get single file NSD Content in Plain or Zip Format Log Trying to get a NSD present in the NFVO Catalogue - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Set Headers {"Accept": "${ACCEPT_ZIP}"} + Set Headers {"Accept": "${ACCEPT_ZIP}, ${ACCEPT_PLAIN}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdPlain}/nsd_content ${output}= Output response @@ -348,10 +348,9 @@ Get single file NSD Content in Plain or Zip Format Get multi file NSD Content in Plain or Zip Format Log Trying to get a VNFD from a given NSD Management present in the NFVO Catalogue - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Set Headers {"Accept": "${ACCEPT_ZIP}"} + Set Headers {"Accept": "${ACCEPT_ZIP}, ${ACCEPT_PLAIN}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content + GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdDownloadableZip}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} @@ -359,14 +358,13 @@ Get multi file NSD Content in Plain Format Log Trying to get a negative case performing a get on a NSD present in the NFVO Catalogue. Accept will be text/plain but NSD is composed my multiple files. Set Headers {"Accept": "${ACCEPT_PLAIN}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content + GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdDownloadableZip}/nsd_content ${output}= Output response Set Suite Variable ${response} ${output} Get NSD Content with invalid resource identifier Log Trying to perform a negative get, using an erroneous package ID - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Set Headers {"Accept": "${ACCEPT_ZIP}"} + Set Headers {"Accept": "${ACCEPT_ZIP}, ${ACCEPT_PLAIN}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${erroneous_nsdInfoId}/nsd_content ${output}= Output response @@ -374,8 +372,7 @@ Get NSD Content with invalid resource identifier Get NSD Content with conflict due to onboarding state Log Trying to get a VNFD from a given NSD Management present in the NFVO Catalogue - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Set Headers {"Accept": "${ACCEPT_ZIP}"} + Set Headers {"Accept": "${ACCEPT_ZIP}, ${ACCEPT_PLAIN}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${notOnboardedNsdInfoId}/nsd_content ${output}= Output response @@ -402,48 +399,39 @@ GET NSD Content with invalid Range Request Set Suite Variable ${response} ${output} Send PUT Request to upload NSD Content as zip file in asynchronous mode - Log Trying to perform a PUT. This method upload the content of a NSD - Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File ${contentZipFile} - PUT ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content ${body} - ${response}= Output response body - Should Be Empty ${response} - ${output}= Output response - Set Suite Variable ${response} ${output} + Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_JSON}", "Content-Type": "application/zip", "Authorization": "${AUTHORIZATION}"} verify=False + ${body}= Get Binary File ${contentZipFile} + ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content data=${body} + Should Be Empty ${response.text} + ${response}= Create Dictionary status=${response.status_code} + Set Suite Variable ${response} ${response} + Send PUT Request to upload NSD Content as plain text file in asynchronous mode Log Trying to perform a PUT. This method upload the content of a NSD - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_PLAIN}", "Authorization": "${AUTHORIZATION}", "Content-Type": "text/plain"} verify=False ${body}= Get File ${contentPlainFile} - PUT ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdPlain}/nsd_content ${body} - ${response}= Output response body - Should Be Empty ${response} - ${output}= Output response - Set Suite Variable ${response} ${output} + ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdPlain}/nsd_content data=${body} + Should Be Empty ${response.text} + ${response}= Create Dictionary status=${response.status_code} + Set Suite Variable ${response} ${response} Send PUT Request to upload NSD Content as zip file in synchronous mode - Log Trying to perform a PUT. This method upload the content of a NSD - Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File ${contentZipFile} - PUT ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content ${body} - ${response}= Output response body - Should Be Empty ${response} - ${output}= Output response - Set Suite Variable ${response} ${output} + Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_JSON}", "Content-Type": "application/zip", "Authorization": "${AUTHORIZATION}"} verify=False + ${body}= Get Binary File ${contentZipFile} + ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content data=${body} + Should Be Empty ${response.text} + ${response}= Create Dictionary status=${response.status_code} + Set Suite Variable ${response} ${response} Send PUT Request to upload NSD Content as plain text file in synchronous mode Log Trying to perform a PUT. This method upload the content of a NSD - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_PLAIN}", "Authorization": "${AUTHORIZATION}", "Content-Type": "text/plain"} verify=False ${body}= Get File ${contentPlainFile} - PUT ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdPlain}/nsd_content ${body} - ${response}= Output response body - Should Be Empty ${response} - ${output}= Output response - Set Suite Variable ${response} ${output} + ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdPlain}/nsd_content data=${body} + Should Be Empty ${response.text} + ${response}= Create Dictionary status=${response.status_code} + Set Suite Variable ${response} ${response} Check Post Condition NSD Content has been Uploaded Log Checking NsdOnboardingNotification Recieved @@ -463,12 +451,12 @@ Check Postcondition NSD Content is uploaded and available in the NFVO Send PUT Request to upload NSD Content with conflict due to onboarding state Log Trying to perform a PUT. This method upload the content of a NSD - Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} + Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_ZIP}", "Content-Type": "application/zip", "Authorization": "${AUTHORIZATION}"} verify=False ${body}= Get Binary File ${contentZipFile} - PUT ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${creatingNsdInfoId}/nsd_content ${body} - ${output}= Output response - Set Suite Variable ${response} ${output} + ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoIdZip}/nsd_content data=${body} + Log ${response} + ${response}= Create Dictionary status=${response.status_code} headers=${response.headers} body=${response.json()} + Set Suite Variable ${response} ${response} Send POST Request for NSD Content Pass Execution If ${testOptionalMethods} == 0 optional methods are not implemented on the FUT. Skipping test. @@ -653,7 +641,6 @@ GET Individual PNF Descriptor Information with invalid resource identifier Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${erroneous_pnfdInfoId} - Integer response status 404 ${output}= Output response Set Suite Variable ${response} ${output} @@ -742,14 +729,13 @@ Get PNFD Content with conflict due to onboarding state Send PUT Request to upload PNFD Content as plain text file Log Trying to perform a PUT. This method upload the content of a PNFD - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File ${contentFilePnfd} - PUT ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoId}/pnfd_content ${body} - ${response}= Output response body - Should Be Empty ${response} - ${output}= Output response - Set Suite Variable ${response} ${output} + Create Session pnfd ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_PLAIN}", "Content-Type": "${ACCEPT_PLAIN}", "Authorization": "${AUTHORIZATION}"} verify=False + ${body}= Get Binary File ${contentZipFile} + ${response}= Put Request pnfd ${apiRoot}/${apiName}/${apiVersion}/pnf_descriptors/${pnfdInfoUpld}/pnfd_content data=${body} + Should Be Empty ${response.text} + ${response}= Create Dictionary status=${response.status_code} + Set Suite Variable ${response} ${response} + Send PUT Request to upload PNFD Content with conflict due to onboarding state Log Trying to perform a PUT. This method upload the content of a PNFD @@ -830,7 +816,8 @@ Send Post Request for NSD Management Subscription Log Trying to create a new subscription Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File jsons/subscriptions.json + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} notifCallbackUri=${notifCallbackUri} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${output}= Output response @@ -843,7 +830,8 @@ Send Post Request for Duplicated NSD Management Subscription Log Trying to create a subscription with an already created content Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File jsons/subscriptions.json + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} notifCallbackUri=${notifCallbackUri} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${output}= Output response @@ -895,6 +883,7 @@ Check HTTP Response Body Json Schema Is [Arguments] ${input} Should Contain ${response['headers']['Content-Type']} application/json ${schema} = Catenate SEPARATOR= ${input} .schema.json + Log ${response['body']} Validate Json ${schema} ${response['body']} Log Json Schema Validation OK @@ -910,7 +899,8 @@ Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filte Check HTTP Response Body NsdmSubscription Attributes Values Match the Issued Subscription Log Check Response matches subscription - ${body}= Get File jsons/subscriptions.json + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} notifCallbackUri=${notifCallbackUri} ${subscription}= evaluate json.loads('''${body}''') json Should Be Equal As Strings ${response['body']['callbackUri']} ${subscription['callbackUri']} @@ -937,7 +927,8 @@ Check Postcondition Subscription Resource Returned in Location Header Is Availab ${result}= Output response body Validate Json NsdmSubscription.schema.json ${result} Log Validated NsdmSubscription schema - ${body}= Get File jsons/subscriptions.json + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} notifCallbackUri=${notifCallbackUri} ${subscription}= evaluate json.loads('''${body}''') json Should Be Equal ${result['callbackUri']} ${subscription['callbackUri']} Log Validated Issued subscription is same as original @@ -980,13 +971,13 @@ Send Delete request for individual NSD Management Subscription with invalid reso Set Suite Variable ${response} ${output} Send Post request for individual NSD Management Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for individual NSD Management Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -995,7 +986,7 @@ Send Put request for individual NSD Management Subscription Set Suite Variable ${response} ${output} Send Patch request for individual NSD Management Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -1056,4 +1047,6 @@ Check PostCondition GET Individual Network Service Descriptor Information Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${nsdInfoId} - Should Be Equal As Strings ${response['status']} 200 \ No newline at end of file + Should Be Equal As Strings ${response['status']} 200 + ${output}= Output response + Set Suite Variable ${response} ${output} diff --git a/SOL005/NSDManagement-API/environment/subscriptions.txt b/SOL005/NSDManagement-API/environment/subscriptions.txt index d8c0411021732e5676a5aa65e2dc168a37e48d82..72c529236af0533e95b114b5053e4fa3bc8eb0be 100644 --- a/SOL005/NSDManagement-API/environment/subscriptions.txt +++ b/SOL005/NSDManagement-API/environment/subscriptions.txt @@ -1,4 +1,5 @@ *** Variables *** -${filter_ok} callbackUri=http://172.22.1.7:9091/nsd/subscriptions +${notifCallbackUri} http://172.22.1.7:9091/nsd/subscriptions +${filter_ok} callbackUri=${notifCallbackUri} ${filter_ko} nfvId=f9f130e4-05eb-4082-a676-4c97d13a883d # Not existant filter attribute-based ${SEPERATOR} = \ No newline at end of file diff --git a/SOL005/NSDManagement-API/environment/variables.txt b/SOL005/NSDManagement-API/environment/variables.txt index 9de189269667ca498646849674ee0e05086a72e0..fec623ceda19a6bd1dd369912432276ce39254b7 100644 --- a/SOL005/NSDManagement-API/environment/variables.txt +++ b/SOL005/NSDManagement-API/environment/variables.txt @@ -17,7 +17,7 @@ ${NFVO_AUTH_USAGE} 1 ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar ${callback_port} 9091 -${callback_uri} http://172.22.1.7:${callback_port} +${callback_uri} http://172.21.248.145 ${callback_endpoint} /nsd/subscriptions ${callback_endpoint_error} /subs_404 ${callback_endpoint_fwd} /endpoint/check diff --git a/SOL005/NSDManagement-API/files/pnfdContent.zip b/SOL005/NSDManagement-API/files/pnfdContent.zip new file mode 100644 index 0000000000000000000000000000000000000000..16151601c098de41c91ba4301540a3bfb355cbdb Binary files /dev/null and b/SOL005/NSDManagement-API/files/pnfdContent.zip differ diff --git a/SOL005/NSDManagement-API/jsons/subscriptions.json b/SOL005/NSDManagement-API/jsons/subscriptions.json index c77b51999214233c08d34136b13b83f06821654a..92a9db1b03b5a34472817ea7475b3872da41b3c3 100644 --- a/SOL005/NSDManagement-API/jsons/subscriptions.json +++ b/SOL005/NSDManagement-API/jsons/subscriptions.json @@ -1,3 +1,3 @@ { - "callbackUri": "http://172.22.1.7:9091/nsd/subscriptions" + "callbackUri": "{notifCallbackUri}" } \ No newline at end of file diff --git a/SOL005/NSDManagement-API/schemas/NsdInfoModification.schema.json b/SOL005/NSDManagement-API/schemas/NsdInfoModification.schema.json index c3af950e49aff1d545514e9f71b1c67c41d3957d..01296fd74d7ee8221084f33bfd6a6c9d13981dee 100644 --- a/SOL005/NSDManagement-API/schemas/NsdInfoModification.schema.json +++ b/SOL005/NSDManagement-API/schemas/NsdInfoModification.schema.json @@ -11,12 +11,8 @@ ] }, "userDefinedData": { - "description": "Modifications of the userDefinedData attribute in NsdInfo data type. See note. If present, these modifications shall be applied according to the rules of JSON Merge PATCH (see IETF RFC 7396 [25]). NOTE- At least one of the attributes - nsdOperationalState and userDefinedData - shall be present.\n", - "type": "array", - "items": { - "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159. \n", - "type": "object" - } + "description": "This type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key- value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 7159. \n", + "type": "object" } } } \ No newline at end of file diff --git a/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot b/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot index a1c10db6a5c0504d3e697641b594b19db5dccdf0..f2df28a614fc7856a64900bc72d285b58993c240 100644 --- a/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot +++ b/SOL005/NSFaultManagement-API/NSFMOperationKeywords.robot @@ -7,7 +7,8 @@ Library OperatingSystem #Suite Teardown Terminate All Processes kill=true Library MockServerLibrary Library Process -Library Collections +Library Collections +Library String *** Keywords *** Create Sessions @@ -212,7 +213,8 @@ POST Subscription Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/fmSubscriptionRequest.json + ${template}= Get File jsons/fmSubscriptionRequest.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -223,7 +225,8 @@ Post Create subscription - DUPLICATION Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/fmSubscriptionRequest.json + ${template}= Get File jsons/fmSubscriptionRequest.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -234,7 +237,8 @@ Post Create subscription - NO-DUPLICATION Set Headers {"Accept": "${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/fmSubscriptionRequest.json + ${template}= Get File jsons/fmSubscriptionRequest.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL005/NSFaultManagement-API/NotificationEndpoint.robot b/SOL005/NSFaultManagement-API/NotificationEndpoint.robot index 650bb2a7a631d04b9e0e05515800f3b1de972161..5c97d192abab8f81b465801ad0b0ad9f3427f70e 100644 --- a/SOL005/NSFaultManagement-API/NotificationEndpoint.robot +++ b/SOL005/NSFaultManagement-API/NotificationEndpoint.robot @@ -115,7 +115,8 @@ Configure Notification Alarm List Rebuilt Handler ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Alarm Handler @@ -125,7 +126,8 @@ Configure Notification Alarm Handler ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Alarm Cleareance Handler @@ -135,7 +137,8 @@ Configure Notification Alarm Cleareance Handler ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL005/NSFaultManagement-API/jsons/fmSubscriptionRequest.json b/SOL005/NSFaultManagement-API/jsons/fmSubscriptionRequest.json index 0f22fd8bbfc47a3584d8fa0ab6fdea372ebd79c7..e9a8b3b0120b63ec56eaa8e2330b2f9f14f8c08d 100644 --- a/SOL005/NSFaultManagement-API/jsons/fmSubscriptionRequest.json +++ b/SOL005/NSFaultManagement-API/jsons/fmSubscriptionRequest.json @@ -1,10 +1,10 @@ -{ - "filter": { - "nsInstanceSubscriptionFilter": { +{{ + "filter": {{ + "nsInstanceSubscriptionFilter": {{ "notificationTypes": [ "AlarmNotification" ] - } - }, - "callbackUri": "http://127.0.0.1/subscribe" -} \ No newline at end of file + }} + }}, + "callbackUri": "{callback_uri}{callback_endpoint}" +}} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot b/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot index 9092991e18f3d77c9af4d5c115d96e77bf383ecd..f2b9dad22a116e610b55be51851a81337e16dfc5 100644 --- a/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/CreateNSInstanceWorkflow.robot @@ -21,7 +21,17 @@ NS Instance Creation POST New nsInstance Check HTTP Response Status Code Is 201 Check HTTP Response Header Contains Location - Check HTTP Response Body Json Schema Is NsIdentifierCreationNotification - Check resource not_instantiated + Check HTTP Response Body Json Schema Is NsInstance + Check resource not_instantiated 1 - \ No newline at end of file +NS Instance Creation with DISABLED Network Service Descriptor + [Documentation] Test ID: 5.3.2.18.2 + ... Test title: NS Instance Creation with DISABLED Network Service Descriptor + ... Test objective: The objective is to test the workflow for Creating a NS instance with a disabled NSD + ... Pre-conditions: One or more Network Service Descriptors are onboarded in the NFVO in disabled operational state. + ... Reference: Clauses 6.4.2.3.1 and 5.4.3.3.4 - ETSI GS NFV-SOL 005 [3] v2.6.1 + ... Config ID: Config_prod_NFVO + ... Applicability: none + ... Post-Conditions: none + POST New nsInstance with DISABLED nsd + Check HTTP Response Status Code Is 409 \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/DeleteNSInstanceWorkflow.robot b/SOL005/NSLifecycleManagement-API/DeleteNSInstanceWorkflow.robot index 480600cca790a8577baa6e5f49fb261f2baac2d6..21767cc1795586a4993695c9adf9f6b2ec89d156 100644 --- a/SOL005/NSLifecycleManagement-API/DeleteNSInstanceWorkflow.robot +++ b/SOL005/NSLifecycleManagement-API/DeleteNSInstanceWorkflow.robot @@ -19,5 +19,4 @@ NS Instance Deletion Check resource not_instantiated DELETE IndividualNSInstance Check HTTP Response Status Code Is 204 - Check HTTP Response Body Json Schema Is NsIdentifierDeletionNotification - Check Instance Deleted \ No newline at end of file + Check Postcondition NS instance is deleted diff --git a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot index a11b0047ca9246ff98ed24e72cd80bfc0d1f37b4..30952bc57c23b648502a2f9c9ee0f3639e555b5a 100644 --- a/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot +++ b/SOL005/NSLifecycleManagement-API/NSLCMOperationKeywords.robot @@ -7,6 +7,7 @@ Library JSONSchemaLibrary schemas/ Library OperatingSystem Library MockServerLibrary Library Collections +Library String *** Keywords *** Initialize System @@ -15,8 +16,7 @@ Initialize System Create Mock Session ${callback_uri}:${callback_port} Check Operation Occurrence Id - ${occid}= Get Value From Json ${response['headers']['Location']} ${response} - Set Global Variable @{nsLcmOpOccId} ${occid} + Set Global Variable @{nsLcmOpOccId} ${response['headers']['Location']} Should Not Be Empty ${nsLcmOpOccId} Create Sessions @@ -83,6 +83,8 @@ Check Operation Notification ${json}= Get File schemas/${element}.schema.json Configure Notification Forward ${element} ${callback_endpoint} ${callback_endpoint_fwd} Configure Notification Status Handler ${callback_endpoint_fwd} ${status} + ${BODY}= evaluate json.dumps(${json}) json + &{notification_request}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON" body=${BODY} Wait Until Keyword Succeeds 2 min 10 sec Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} Clear Requests ${callback_endpoint_fwd} @@ -97,29 +99,40 @@ Configure Notification Forward Configure Notification Status Handler [Arguments] ${endpoint} ${status}="" - Run Keyword If ${status}!="" set to dictionary ${json["notificationStatus"]} dp=${status} + ${json}= evaluate {"notificationStatus": {}} + Run Keyword If '${status}' != "" set to dictionary ${json["notificationStatus"]} dp=${status} ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle ${endpoint} &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{headers} = Create Dictionary "Content-Type"="application/json" + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check resource operationState is [Arguments] ${state} String ${response['body']['operationState']} ${state} - -Check resource instantiated + +Check resource Instantiated + Wait Until Keyword Succeeds 2 min 10 sec Probe resource Instantiated + +Probe resource Instantiated Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} String response body nsState INSTANTIATED - + Check resource not_instantiated + Wait Until Keyword Succeeds 2 min 10 sec Probe resource not_instantiated + +Probe resource not_instantiated + [Arguments] ${fresh_resource}=0 Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Log ${fresh_resource} + ${instanceId}= Set Variable If ${fresh_resource} == 0 ${nsInstanceId} ${response['body']['id']} + Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${instanceId} String response body nsState NOT_INSTANTIATED Check operation resource state is FAILED_TEMP @@ -148,7 +161,8 @@ Launch another LCM operation Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/scaleNsToLevelRequest.json + ${template}= Get File jsons/scaleNsToLevelRequest.json + ${body}= Format String ${template} instantiationLevelId=${instantiationLevelId} Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/scale_to_level ${body} Integer response status 202 @@ -163,7 +177,7 @@ Check Postcondition NS Instance is not created Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nonExistentNsId} Integer response status 404 Check HTTP Response Status Code Is @@ -176,19 +190,20 @@ Check Postcondition NS Instance is deleted Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Get ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${disabledNsdId} Integer response status 404 Check Postcondition NS Instance is not modified GET IndividualNSInstance ${resp_dict}= evaluate json.loads('''${response['body']}''') json - ${body}= Get File jsons/CreateNsRequest.json + ${template}= Get File jsons/CreateNsRequest.json + ${body}= Format String ${template} nsdId=${nsdId} nsInstanceName=${nsInstanceName} vimAccountId=${vimAccountId} nsInstanceDescription=${nsInstanceDescription} Dictionaries Should Be Equal ${resp_dict} ${body} values=True Check HTTP Response Header Contains [Arguments] ${HEADER_TOCHECK} Should Contain ${response['headers']} ${HEADER_TOCHECK} - Log Header is present + Log Header is present Check HTTP Response Body Json Schema Is [Arguments] ${input} @@ -214,11 +229,23 @@ POST New nsInstance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/CreateNsRequest.json + ${template}= Get File jsons/CreateNsRequest.json + ${body}= Format String ${template} nsdId=${nsdId} nsInstanceName=${nsInstanceName} vimAccountId=${vimAccountId} nsInstanceDescription=${nsInstanceDescription} Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} +POST New nsInstance with DISABLED nsd + Log Create NS instance by POST to ${apiRoot}/${apiName}/${apiVersion}/ns_instances + Set Headers {"Accept":"${ACCEPT}"} + Set Headers {"Content-Type": "${CONTENT_TYPE}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} + ${template}= Get File jsons/CreateNsRequest.json + ${body}= Format String ${template} nsdId=${disabledNsdId} nsInstanceName=${nsInstanceName} vimAccountId=${vimAccountId} nsInstanceDescription=${nsInstanceDescription} + Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances ${body} + ${outputResponse}= Output response + Set Global Variable ${response} ${outputResponse} + GET NsInstances Log Query NS The GET method queries information about multiple NS instances. Set Headers {"Accept":"${ACCEPT}"} @@ -308,7 +335,7 @@ POST IndividualNSInstance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId} + Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nonExistentNsId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -396,7 +423,8 @@ GET Instantiate NSInstance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/InstantiateNsRequest.json + ${template}= Get File jsons/InstantiateNs.json + ${body}= Format String ${template} nsFlavourId=${nsFlavourId} vimAccountId=${vimAccountId} nsdId=${nsdId} Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/instantiate ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -440,7 +468,8 @@ POST scale nsInstance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/ScaleNsRequest.json + ${template}= Get File jsons/ScaleNs.json + ${body}= Format String ${template} scaleType=${scaleType} scaleTimeout=${scaleTimeout} scaleVnfType=${scaleVnfType} scaleGroupDescriptor=${scaleGroupDescriptor} scaleMemberVnfIndex=${scaleMemberVnfIndex} Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/scale ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -484,7 +513,8 @@ POST Update NSInstance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/UpdateNsRequest.json + ${template}= Get File jsons/UpdateNsRequest.json + ${body}= Format String ${template} vnfUpdateType=${vnfUpdateType} Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/update ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -528,7 +558,8 @@ POST Heal NSInstance Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/HealNsRequest.json + ${template}= Get File jsons/HealNsRequest.json + ${body}= Format String ${template} nsDegreeHealing=${nsDegreeHealing} Post ${apiRoot}/${apiName}/${apiVersion}/ns_instances/${nsInstanceId}/heal ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -699,7 +730,7 @@ GET Individual NS LCM OP Occurrence Set Headers {"Accept":"${ACCEPT}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} Log Execute Query and validate response - Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} + Get ${apiRoot}/${apiName}/${apiVersion}/ns_lcm_op_occs/${nsLcmOpOccId} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -915,7 +946,8 @@ POST subscriptions Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/LccnSubscriptionRequest.json + ${template}= Get File jsons/LccnSubscriptionRequest.json + ${body}= Format String ${template} callbackUri=${callback_uri} callbackEndpoint=${callback_endpoint} callbackPort=${callback_port} nsdId=${nsdId} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -926,7 +958,8 @@ POST subscriptions DUPLICATION Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/LccnSubscriptionRequest.json + ${template}= Get File jsons/LccnSubscriptionRequest.json + ${body}= Format String ${template} callbackUri=${callback_uri} callbackEndpoint=${callback_endpoint} callbackPort=${callback_port} nsdId=${nsdId} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} @@ -937,7 +970,8 @@ POST subscriptions NO DUPLICATION Set Headers {"Accept":"${ACCEPT}"} Set Headers {"Content-Type": "${CONTENT_TYPE}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization":"${AUTHORIZATION}"} - ${body}= Get File jsons/LccnSubscriptionRequest.json + ${template}= Get File jsons/LccnSubscriptionRequest.json + ${body}= Format String ${template} callbackUri=${callback_uri} callbackEndpoint=${callback_endpoint} callbackPort=${callback_port} nsdId=${nsdId} Post ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${outputResponse}= Output response Set Global Variable ${response} ${outputResponse} diff --git a/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot b/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot index 628bbdf57b3a0af9dea8a04bb1dd1ad3541b44c5..e17087e22ee1bf3cb56997c8b9af0453580ad121 100644 --- a/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot +++ b/SOL005/NSLifecycleManagement-API/NotificationEndpoint.robot @@ -98,7 +98,8 @@ Configure Notification NS LCM Operation Occurrence Start Handler ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{headers}= Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check NS LCM Operation Occurrence Result Notification Http POST Request Body Json Schema Is @@ -120,7 +121,8 @@ Configure Notification NS LCM Operation Occurrence Result Handler ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{headers}= Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check NS Identifier Creation Notification Http POST Request Body Json Schema Is @@ -142,7 +144,8 @@ Configure Notification NS Identifier Creation Handler ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{headers}= Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check NS Identifier Deletion Notification Http POST Request Body Json Schema Is @@ -164,7 +167,8 @@ Configure Notification NS Identifier Deletion Handler ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{headers}= Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Check NS LCM Operation Occurrence Start Notification Http POST Request Body notificationStatus attribute Is diff --git a/SOL005/NSLifecycleManagement-API/environment/variables.txt b/SOL005/NSLifecycleManagement-API/environment/variables.txt index 94a133ae40765be6092abcd73f89f7db450a59b9..d58f1074ffc0bfb9f49d6496ef34523b5f49c84a 100644 --- a/SOL005/NSLifecycleManagement-API/environment/variables.txt +++ b/SOL005/NSLifecycleManagement-API/environment/variables.txt @@ -17,10 +17,16 @@ ${apiVersion} v1 ${AUTH_USAGE} 1 ${WRONG_AUTHORIZATION} Bearer XXXXXWRONGXXXXX ${nsInstanceId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f +${nsdId} 58a7beb6-aa89-405e-bd90-7d276b967c03 +${disabledNsdId} fca7c896-a7d0-4ff8-865e-f5c8ee2fd1c3 +${nonExistentNsId} nonExistent ${ConflictNsInstanceId} 007c111c-e602-4afa-8e13-962fb5a7d81d ${nsInstanceName} Test-nsInstance ${nsInstanceDescription} description ns ${nsInstanceDescription_Update} Updated description ns +${nsFlavourId} 0 +${nsDegreeHealing} HEAL_RESTORE +${vimAccountId} 931f6a4d-6a97-43f3-a6f0-13853ef577ea ${SINGLE_FILE_VNFD} 1 # If VNFD is PLAIN TEXT ${ACCEPT_PLAIN} text/plain ${ACCEPT_ZIP} application/zip @@ -38,9 +44,17 @@ ${subscriptionId} 6fc3539c-e602-4afa-8e13-962fb5a7d81f ${VnfLcmOperationOccurrenceNotification} {} ${VnfIdentifierCreationNotification} {} ${VnfIdentifierDeletionNotification} {} +${vnfUpdateType} ADD_VNF +${instantiationLevelId} myNextLevel + +${scaleType} SCALE_VNF +${scaleTimeout} 1 +${scaleVnfType} SCALE_IN +${scaleGroupDescriptor} myScalingGroup +${scaleMemberVnfIndex} 1 -${callback_uri} http://localhost ${callback_port} 9091 +${callback_uri} http://localhost:${callback_port} ${callback_endpoint} /endpoint ${callback_endpoint_fwd} /endpoint/check ${callback_endpoint_error} /endpoint_404 @@ -48,8 +62,8 @@ ${sleep_interval} 20s ${total_polling_time} 2 min ${polling_interval} 10 sec -${notification_request} [] -${notification_response} [] +${notification_request} {} +${notification_response} {} ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies.jar @@ -60,4 +74,4 @@ ${Etag_modified}= a modified etag ${NEG_FILTER} attribute_not_exist=some_value ${NEG_SELECTOR} fields=wrong_field -${json} {} \ No newline at end of file +${json} {"notificationStatus": ""} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/CreateNsRequest.json b/SOL005/NSLifecycleManagement-API/jsons/CreateNsRequest.json index eb879873a2ec8a5686bc32f29c4c76ef5233ef84..a8026a8109ee679fc97c2e00eafd76e493fb0216 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/CreateNsRequest.json +++ b/SOL005/NSLifecycleManagement-API/jsons/CreateNsRequest.json @@ -1,24 +1,6 @@ -{ -"CreateNsRequest": { - "type": "object", - "required": [ - "nsdId", - "nsName", - "nsDescription" - ], - "properties": { - "nsdId": { - "description": "Identifier of the NSD that defines the NS instance to be created.\n", - "$ref": "SOL005_def.yaml#/definitions/Identifier" - }, - "nsName": { - "description": "Human-readable name of the NS instance to be created.\n", - "type": "string" - }, - "nsDescription": { - "description": "Human-readable description of the NS instance to be created.\n", - "type": "string" - } - } - } -} \ No newline at end of file +{{ + "nsdId": "{nsdId}", + "nsName": "{nsInstanceName}", + "vimAccountId": "{vimAccountId}", + "nsDescription": "{nsInstanceDescription}" +}} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/HealNsRequest.json b/SOL005/NSLifecycleManagement-API/jsons/HealNsRequest.json index 2922dc4a1b0749186d777ae1735226a9196dcb56..b8fa38ecbc2d25eb246284ccf08446a2dc9a68a3 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/HealNsRequest.json +++ b/SOL005/NSLifecycleManagement-API/jsons/HealNsRequest.json @@ -1,3 +1,3 @@ -{ - "degreeHealing": "HEAL_RESTORE" -} \ No newline at end of file +{{ + "degreeHealing": "{nsDegreeHealing}" +}} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/InstantiateNs.json b/SOL005/NSLifecycleManagement-API/jsons/InstantiateNs.json new file mode 100644 index 0000000000000000000000000000000000000000..cd352b53aea790ae550c2bd44facee8d805cdd0e --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/jsons/InstantiateNs.json @@ -0,0 +1,5 @@ +{{ + "nsdId": "{nsdId}", + "nsName": "postmanNS", + "vimAccountId": "{vimAccountId}" +}} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/LccnSubscriptionRequest.json b/SOL005/NSLifecycleManagement-API/jsons/LccnSubscriptionRequest.json index 091cc0cdb4c87e448f4ff5862a7db94009c328f7..d655f7ff4a155dbc00c1b038d89b07025a9e54b8 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/LccnSubscriptionRequest.json +++ b/SOL005/NSLifecycleManagement-API/jsons/LccnSubscriptionRequest.json @@ -1,10 +1,10 @@ -{ - "filter": { - "nsInstanceSubscriptionFilter": { +{{ + "filter": {{ + "nsInstanceSubscriptionFilter": {{ "nsdIds": [ - "6fc3539c-e602-4afa-8e13-962fb5a7d81f" + "{nsdId}" ] - } - }, - "callbackUri": "http://127.0.0.1/subscribe" -} \ No newline at end of file + }} + }}, + "callbackUri": "{callbackUri}:{callbackPort}{callbackEndpoint}" +}} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/ScaleNs.json b/SOL005/NSLifecycleManagement-API/jsons/ScaleNs.json new file mode 100644 index 0000000000000000000000000000000000000000..39d410cfd850b83ca62502e92146a32242934c2b --- /dev/null +++ b/SOL005/NSLifecycleManagement-API/jsons/ScaleNs.json @@ -0,0 +1,11 @@ +{{ + "scaleType": "{scaleType}", + "timeout_ns_scale": {scaleTimeout}, + "scaleVnfData": {{ + "scaleVnfType": "{scaleVnfType}", + "scaleByStepData": {{ + "scaling-group-descriptor": "{scaleGroupDescriptor}", + "member-vnf-index": "{scaleMemberVnfIndex}" + }} + }} +}} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/TerminateNsRequest.json b/SOL005/NSLifecycleManagement-API/jsons/TerminateNsRequest.json index a65d7d3b024c779688898bec5213ae81e4664ea7..65e326002f3be2d7c61ece501943eb87c7496400 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/TerminateNsRequest.json +++ b/SOL005/NSLifecycleManagement-API/jsons/TerminateNsRequest.json @@ -1,3 +1,4 @@ { - "terminationTime": "2021-04-12T23:20:50.52Z" + "timeout_ns_terminate": 1, + "autoremove": false } \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/UpdateNsRequest.json b/SOL005/NSLifecycleManagement-API/jsons/UpdateNsRequest.json index 64a2c0f4c92a484b3509044a5d4298a701effedd..336075de401be9e5b45d32555f44b27b3fa12fc0 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/UpdateNsRequest.json +++ b/SOL005/NSLifecycleManagement-API/jsons/UpdateNsRequest.json @@ -1,3 +1,3 @@ -{ - "updateType": "ADD_VNF" -} \ No newline at end of file +{{ + "updateType": "{vnfUpdateType}" +}} \ No newline at end of file diff --git a/SOL005/NSLifecycleManagement-API/jsons/scaleNsToLevelRequest.json b/SOL005/NSLifecycleManagement-API/jsons/scaleNsToLevelRequest.json index 1c39a7bb51571dfc2af274795d0bc9d932eccafd..ca0ea8d3fea407220ef2b6537ab9be062994a73b 100644 --- a/SOL005/NSLifecycleManagement-API/jsons/scaleNsToLevelRequest.json +++ b/SOL005/NSLifecycleManagement-API/jsons/scaleNsToLevelRequest.json @@ -1,3 +1,3 @@ -{ - "instantiationLevelId": "myNextLevel" -} \ No newline at end of file +{{ + "instantiationLevelId": "{instantiationLevelId}" +}} \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot b/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot index fd2302fac9211f4673b259cd6a8ca50c1d3c57b6..fcf0c3523429b9e4883b7ada66a2ac9db2d3a79d 100644 --- a/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot +++ b/SOL005/NSPerformanceManagement-API/NSPerformanceManagementKeywords.robot @@ -89,7 +89,8 @@ Send Post Request Create new NS Performance Monitoring Job Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/CreatePmJobRequest.json + ${template}= Get File jsons/CreatePmJobRequest.json + ${body}= Format String ${template} pmJobId=${pmJobId} POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -273,7 +274,7 @@ Check HTTP Response Body Pm Job Identifier matches the requested Pm Job Get Individual Performance Report Log Trying to get a performance report present in the NFVO Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -281,21 +282,21 @@ 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}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${erroneousReportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for Individual Performance Report Log Trying to create new performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${newReportId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for Individual Performance Report Log Trying to update performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -305,7 +306,7 @@ Send Put request for Individual Performance Report Send Patch request for Individual Performance Report Log Trying to update performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -315,7 +316,7 @@ Send Patch request for Individual Performance Report Send Delete request for Individual Performance Report Log Trying to delete performance report - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/pm_jobs/${pmJobId}/reports/${reportId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -343,7 +344,7 @@ Check Postcondition NS Individual Performance Report is Unmodified (Implicit) GET all Performance Thresholds Log Trying to get all thresholds present in the NFVO Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} @@ -351,7 +352,7 @@ GET all Performance Thresholds GET Performance Thresholds with attribute-based filter Log Trying to get thresholds present in the NFVO with filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_OK_Threshold} ${output}= Output response Set Suite Variable ${response} ${output} @@ -359,7 +360,7 @@ GET Performance Thresholds with attribute-based filter GET Performance Thresholds with invalid attribute-based filter Log Trying to get thresholds present in the NFVO with invalid filter Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds?${FILTER_KO} ${output}= Output response Set Suite Variable ${response} ${output} @@ -367,24 +368,25 @@ GET Performance Thresholds with invalid attribute-based filter GET NS performance Thresholds with invalid resource endpoint Log Trying to get thresholds present in the NFVO with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/threshold ${output}= Output response Set Suite Variable ${response} ${output} Send Post Request Create new Performance Threshold Log Creating a new THreshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${request}= Get File jsons/CreateThresholdRequest.json + ${template}= Get File jsons/CreateThresholdRequest.json + ${body}= Format String ${template} pmJobId=${pmJobId} POST ${apiRoot}/${apiName}/${apiVersion}/thresholds ${request} ${output}= Output response Set Suite Variable ${response} ${output} Send PUT Request for all Performance Thresholds Log PUT THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} PUT ${apiRoot}/${apiName}/${apiVersion}/thresholds @@ -393,7 +395,7 @@ Send PUT Request for all Performance Thresholds Send PATCH Request for all Performance Thresholds Log PUT THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/thresholds @@ -402,7 +404,7 @@ Send PATCH Request for all Performance Thresholds Send DELETE Request for all Performance Thresholds Log DELETE THresholds - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds ${output}= Output response Set Suite Variable ${response} ${output} @@ -430,7 +432,7 @@ Check HTTP Response Body Thresholds match the requested attribute-based filter GET Individual NS performance Threshold Log Trying to get a Threhsold present in the NFVO Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -438,28 +440,28 @@ GET Individual NS performance Threshold GET individual NS performance Threshold with invalid resource identifier Log Trying to get a Threhsold with invalid resource endpoint Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${erroneousThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual NS performance Threshold Log Trying to delete a Threhsold in the NFVO - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Delete request for individual NS performance Threshold with invalid resource identifier Log Trying to delete a Threhsold in the NFVO with invalid id - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} DELETE ${apiRoot}/${apiName}/${apiVersion}/thresholds/${erroneousThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} Send Post request for individual NS performance Threshold Log Trying to create new threshold - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/thresholds/${newThresholdId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -467,7 +469,7 @@ Send Post request for individual NS performance Threshold Send Put request for individual NS performance Threshold Log Trying to PUT threshold Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -478,7 +480,7 @@ Send Put request for individual NS performance Threshold Send Patch request for individual NS performance Threshold Log Trying to PUT threshold Set Headers {"Accept": "${ACCEPT_JSON}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/thresholds/${thresholdId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -576,8 +578,9 @@ Send Post Request for NS Performance Subscription Set headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body_request}= Get File jsons/subscriptions.json - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body_request} + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} + POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${output}= Output response Set Suite Variable ${response} ${output} Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} == 1 @@ -597,8 +600,9 @@ Send Post Request for Duplicated NS Performance Subscription Set headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Set headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body_request}= Get File jsons/subscriptions.json - POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body_request} + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} + POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${output}= Output response Set Suite Variable ${response} ${output} Run Keyword If ${NFVO_CHECKS_NOTIF_ENDPOINT} @@ -663,7 +667,8 @@ Check HTTP Response Body Subscriptions Match the requested Attribute-Based Filte Check HTTP Response Body PmSubscription Attributes Values Match the Issued Subscription Log Check Response matches subscription - ${body}= Get File jsons/subscriptions.json + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} ${subscription}= evaluate json.loads('''${body}''') json Should Be Equal ${response['body']['callbackUri']} ${subscription['callbackUri']} @@ -690,7 +695,8 @@ Check Postcondition Subscription Resource URI Returned in Location Header Is Ava ${result}= Output response body Validate Json PmSubscriptions.schema.json ${result} Log Validated PmSubscriptions schema - ${body}= Get File jsons/subscriptions.json + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} ${subscription}= evaluate json.loads('''${body}''') json Should Be Equal ${result['callbackUri']} ${subscription['callbackUri']} Log Validated Issued subscription is same as original @@ -733,13 +739,13 @@ Send Delete request for individual NS Performance Subscription with invalid reso Set Suite Variable ${response} ${output} Send Post request for individual NS Performance Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for individual NS Performance Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -748,7 +754,7 @@ Send Put request for individual NS Performance Subscription Set Suite Variable ${response} ${output} Send Patch request for individual NS Performance Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -792,8 +798,9 @@ Create Sessions Check Notification Endpoint - &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} diff --git a/SOL005/NSPerformanceManagement-API/Notifications.robot b/SOL005/NSPerformanceManagement-API/Notifications.robot index fcc032436e9e733cee6bddd93e7f7a47acbd82b2..a24cbc2a7d377b99dfd3db1e9b4cc5fbbbdefa85 100644 --- a/SOL005/NSPerformanceManagement-API/Notifications.robot +++ b/SOL005/NSPerformanceManagement-API/Notifications.robot @@ -87,7 +87,8 @@ Configure Notification Performance Information Available Handler ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Threshold Crossed Handler @@ -97,7 +98,8 @@ Configure Notification Threshold Crossed Handler ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Forward diff --git a/SOL005/NSPerformanceManagement-API/environment/variables.txt b/SOL005/NSPerformanceManagement-API/environment/variables.txt index 64de1566ed183475beac88efd2a969031e80397f..ca012fa80eb88beef9c3c1f9d0a8d256950ae40d 100644 --- a/SOL005/NSPerformanceManagement-API/environment/variables.txt +++ b/SOL005/NSPerformanceManagement-API/environment/variables.txt @@ -26,5 +26,9 @@ ${sleep_interval} 20s ${total_polling_time} 2 min ${polling_interval} 10 sec - -${response} +${performanceMetric} cpu_util +${thresholdType} SIMPLE +${thresholdValue} 10 +${hysteresis} 50 +${collectionPeriod} 10 +${reportingPeriod} 30 \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/jsons/CreatePmJobRequest.json b/SOL005/NSPerformanceManagement-API/jsons/CreatePmJobRequest.json index 75549f534008035d1c44877387a37021e764c190..506e254752a4e030563c24468c28586b5882e3ac 100644 --- a/SOL005/NSPerformanceManagement-API/jsons/CreatePmJobRequest.json +++ b/SOL005/NSPerformanceManagement-API/jsons/CreatePmJobRequest.json @@ -1,9 +1,9 @@ -{ - "objectInstanceIds": ["1f50d68b-82e8-4deb-bd40-c934d4d1ac0a"], - "criteria": { - "performanceMetric": [], +{{ + "objectInstanceIds": ["{pmJobId}"], + "criteria": {{ + "performanceMetric": "{performanceMetric}", "performanceMetricGroup": [], - "collectionPeriod": 10, - "reportingPeriod": 30 - } -} \ No newline at end of file + "collectionPeriod": {collectionPeriod}, + "reportingPeriod": {reportingPeriod} + }} +}} \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/jsons/CreateThresholdRequest.json b/SOL005/NSPerformanceManagement-API/jsons/CreateThresholdRequest.json index 1e58c2bac513f36d37597e8f11bbe06d68b664cc..e5b0b975cef2efe7690becfdb99ae08b1dcd2c71 100644 --- a/SOL005/NSPerformanceManagement-API/jsons/CreateThresholdRequest.json +++ b/SOL005/NSPerformanceManagement-API/jsons/CreateThresholdRequest.json @@ -1,12 +1,11 @@ -{ - "objectInstanceIds" : "1f50d68b-82e8-4deb-bd40-c934d4d1ac0a", - "criteria" : { - "performanceMetric": "cpu_util", - "thresholdType": "SIMPLE", - "simpleThresholdDetails": { - "thresholdValue": 10, - "hysteresis": 50 - } - - } -} \ No newline at end of file +{{ + "objectInstanceIds" : "{pmJobId}", + "criteria" : {{ + "performanceMetric": "{performanceMetric}", + "thresholdType": "{thresholdType}", + "simpleThresholdDetails": {{ + "thresholdValue": {thresholdValue}, + "hysteresis": {hysteresis} + }} + }} +}} \ No newline at end of file diff --git a/SOL005/NSPerformanceManagement-API/jsons/subscriptions.json b/SOL005/NSPerformanceManagement-API/jsons/subscriptions.json index 6293d99d2b56eb51db7fdd6c23884ffb69af0077..3ca4fc25ae9b33163639f7041e3f50efe537c320 100644 --- a/SOL005/NSPerformanceManagement-API/jsons/subscriptions.json +++ b/SOL005/NSPerformanceManagement-API/jsons/subscriptions.json @@ -1,6 +1,6 @@ -{ - "callbackUri": "http://172.22.1.7:9091/nspm/subscriptions", - "filter": { +{{ + "callbackUri": "{callback_uri}{callback_endpoint}", + "filter": {{ "notificationTypes": ["ThresholdCrossedNotification"] - } -} \ No newline at end of file + }} +}} \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/IndividualVNFPackage.robot b/SOL005/VNFPackageManagement-API/IndividualVNFPackage.robot index 8e8d887c0f0d03c7fa720b8405b805e7606c8515..bf7219775d48d10cb7e5f60648168450fd6dd7c4 100644 --- a/SOL005/VNFPackageManagement-API/IndividualVNFPackage.robot +++ b/SOL005/VNFPackageManagement-API/IndividualVNFPackage.robot @@ -121,7 +121,7 @@ DELETE Individual VNF Package ... Applicability: none ... Post-Conditions: The VNF Package is not available anymore in the NFVO Send DELETE Request for individual VNF Package - Check HTTP Response Status Code Is 405 + Check HTTP Response Status Code Is 204 Check Postcondition VNF Package is Deleted DELETE Individual VNF Package in operational state ENABLED diff --git a/SOL005/VNFPackageManagement-API/Notifications.robot b/SOL005/VNFPackageManagement-API/Notifications.robot index fefa8c79b87dab95993f0b2d24020e8a1e4fbca7..a839527429b0f8d818cde52d0e422f34bc03496c 100644 --- a/SOL005/VNFPackageManagement-API/Notifications.robot +++ b/SOL005/VNFPackageManagement-API/Notifications.robot @@ -119,8 +119,10 @@ Configure Notification Onboarding Handler ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} + Set Suite Variable ${notification_request} ${notification_request} Configure Notification Delete Handler [Arguments] ${endpoint} ${type} ${change} @@ -129,7 +131,8 @@ Configure Notification Delete Handler ${BODY}= evaluate json.dumps(${json}) json Log Creating mock request and response to handle status notification &{notification_request}= Create Mock Request Matcher POST ${endpoint} body_type="JSON" body=${BODY} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Configure Notification Change Status Handler diff --git a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot index ff83f44c601054446ece0a46dc88e86295f28a65..d715bcb23a4c7d29451cfd77a37eb02691a796c3 100644 --- a/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot +++ b/SOL005/VNFPackageManagement-API/VNFPackageManagementKeywords.robot @@ -11,6 +11,7 @@ Resource environment/vnfPackageArtifacts.txt Resource environment/individualSubscription.txt Library OperatingSystem Library JSONLibrary +Library RequestsLibrary Library REST ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} ssl_verify=false Library Process Library MockServerLibrary @@ -173,7 +174,7 @@ GET all VNF Packages with invalid resource endpoint Log Trying to perform a GET on a erroneous URI Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - GET ${apiRoot}/${apiName}/${apiVersion}/vnf_package + GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${erroneousVnfPkgId} ${output}= Output response Set Suite Variable ${response} ${output} @@ -266,7 +267,7 @@ Send PATCH to disable Individual VNF Package Log Trying to perform a PATCH. As prerequisite the nsdInfo shall be in enabled operational state Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File jsons/NsdInfoModificationDisable.json + ${body}= Get File jsons/VnfPkgInfoModificationsDisabled.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId} ${body} ${output}= Output response @@ -281,7 +282,7 @@ Send PATCH to enable Individual VNF Package Log Trying to perform a PATCH. As prerequisite the nsdInfo shall be in disabled operational state Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File jsons/NsdInfoModificationEnable.json + ${body}= Get File jsons/VnfPkgInfoModifications.json Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} PATCH ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId} ${body} ${output}= Output response @@ -387,7 +388,7 @@ Get VNFD in Individual VNF Package with conflict due to onboarding state Send POST Request for VNFD in individual VNF Package Log Trying to perform a POST. This method should not be implemented - Set Headers {"Accept": "${ACCEPT_ZIP}"} + Set Headers {"Accept": "${ACCEPT_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/vnfd ${output}= Output response @@ -419,10 +420,11 @@ Send DELETE Request for VNFD in individual VNF Package Check Postcondition VNFD Exist Log Checking that vnf pacakge still exists - Set Headers {"Accept": "${ACCEPT_PLAIN}"} - Set Headers {"Accept": "${ACCEPT_ZIP}"} + Set Headers {"Accept": "${ACCEPT_PLAIN}, ${ACCEPT_ZIP}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgZipVNFD}/vnfd + ${output}= Output response + Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 200 GET Individual VNF Package Content @@ -503,14 +505,13 @@ Send PUT Request for individual VNF Package Content Send PUT Request to upload VNF Package Content Log Trying to perform a PUT. This method upload the content of a NSD - Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get Binary File files/vnfPackage.zip - PUT ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${newVnfPackageId}/package_content ${body} - ${response}= Output response body - Should Be Empty ${response} - ${output}= Output response - Set Suite Variable ${response} ${output} + Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_ZIP}", "Content-Type": "application/zip", "Authorization": "${AUTHORIZATION}"} verify=False + ${body}= Get Binary File files/hackfest_gateway_vnfd-1.0.tar.gz + ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${newVnfPackageId}/package_content data=${body} + Should Be Empty ${response.text} + ${response}= Create Dictionary status=${response.status_code} + Set Suite Variable ${response} ${response} + Check Postcondition VNF Package Content is uploaded and available in the NFVO Log Trying to get a VNF Package Content @@ -521,12 +522,12 @@ Check Postcondition VNF Package Content is uploaded and available in the NFVO Send PUT Request to upload VNF Package Content with conflict due to onboarding state Log Trying to perform a PUT. This method upload the content of a NSD - Set Headers {"Accept": "${ACCEPT_ZIP}"} - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get Binary File files/vnfPackage.zip - PUT ${apiRoot}/${apiName}/${apiVersion}/ns_descriptors/${creatingVnfPackageId}/nsd_content ${body} - ${output}= Output response - Set Suite Variable ${response} ${output} + Create Session nbi ${NFVO_SCHEMA}://${NFVO_HOST}:${NFVO_PORT} headers={"Accept": "${ACCEPT_ZIP}", "Content-Type": "application/zip", "Authorization": "${AUTHORIZATION}"} verify=False + ${body}= Get Binary File files/hackfest_gateway_vnfd-1.0.tar.gz + ${response}= Put Request nbi ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${creatingVnfPackageId}/package_content data=${body} + Should Be Empty ${response.text} + ${response}= Create Dictionary status=${response.status_code} + Set Suite Variable ${response} ${response} Send PATCH Request for individual VNF Package Content Log Trying to perform a PATCH (method should not be implemented) @@ -630,16 +631,19 @@ Send DELETE Request for individual VNF Package Artifact Check Postcondition VNF Package Artifact Exist Log Checking that vnf pacakge still exists - Set Headers {"Accept": "${ACCEPT_JSON}"} + Set Headers {"Accept": "${ACCEPT_PLAIN}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPackageId}/artifacts/${artifactPath} + ${output}= Output response + Set Suite Variable ${response} ${output} Check HTTP Response Status Code Is 200 Send POST Request to upload VNF Package Content from URI Log Trying to perform a POST. The POST method provides the information for the NFVO to get the content of a VNF package. Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/UploadVnfPkgFromUriRequest.json + ${template}= Get File jsons/UploadVnfPkgFromUriRequest.json + ${body}= Format String ${template} vnfPkgUri=${vnfPkgUri} POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${vnfPkgViaUriId}/package_content/upload_from_uri ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -648,7 +652,8 @@ Send POST Request to upload VNF Package Content from URI with conflict due to on Log Trying to perform a POST. The POST method provides the information for the NFVO to get the content of a VNF package. Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} - ${body}= Get File jsons/UploadVnfPkgFromUriRequest.json + ${template}= Get File jsons/UploadVnfPkgFromUriRequest.json + ${body}= Format String ${template} vnfPkgUri=${vnfPkgUri} POST ${apiRoot}/${apiName}/${apiVersion}/vnf_packages/${creatingVnfPkgViaUriId}/package_content/upload_from_uri ${body} ${output}= Output response Set Suite Variable ${response} ${output} @@ -728,7 +733,8 @@ Send Post Request for VNF Package Subscription Log Trying to create a new subscription Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File jsons/subscriptions.json + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} vnfPkgId=${vnfPkgId} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${output}= Output response @@ -740,7 +746,8 @@ Send Post Request for Duplicated VNF Package Subscription Log Trying to create a subscription with an already created content Set Headers {"Accept": "${ACCEPT_JSON}"} Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} - ${body}= Get File jsons/subscriptions.json + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} vnfPkgId=${vnfPkgId} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body} ${output}= Output response @@ -776,7 +783,8 @@ Check Postcondition VNF Package Subscriptions Exists Check HTTP Response Body PkgmSubscription Attributes Values Match the Issued Subscription Log Check Response matches subscription - ${body}= Get File jsons/subscriptions.json + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} vnfPkgId=${vnfPkgId} ${subscription}= evaluate json.loads('''${body}''') json Should Be Equal ${response['body']['callbackUri']} ${subscription['callbackUri']} @@ -806,7 +814,8 @@ Check Postcondition Subscription Resource Returned in Location Header Is Availab ${result}= Output response body Validate Json PkgmSubscription.schema.json ${result} Log Validated PkgmSubscription schema - ${body}= Get File jsons/subscriptions.json + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} vnfPkgId=${vnfPkgId} ${subscription}= evaluate json.loads('''${body}''') json Should Be Equal ${result['callbackUri']} ${subscription['callbackUri']} Log Validated Issued subscription is same as original @@ -849,13 +858,13 @@ Send Delete request for individual VNF Package Subscription with invalid resourc Set Suite Variable ${response} ${output} Send Post request for individual VNF Package Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${newSubscriptionId} ${output}= Output response Set Suite Variable ${response} ${output} Send Put request for individual VNF Package Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -864,7 +873,7 @@ Send Put request for individual VNF Package Subscription Set Suite Variable ${response} ${output} Send Patch request for individual VNF Package Subscription - Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": ${AUTHORIZATION}"} + Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} GET ${apiRoot}/${apiName}/${apiVersion}/subscriptions/${subscriptionId} ${origOutput}= Output response Set Suite Variable ${origResponse} ${origOutput} @@ -896,7 +905,7 @@ Create Sessions Create Mock Session ${callback_uri}:${callback_port} Check HTTP Response Status Code Is - [Arguments] ${expected_status} + [Arguments] ${expected_status} Should Be Equal As Strings ${response['status']} ${expected_status} Log Status code validated @@ -921,14 +930,16 @@ Check HTTP Response Body Subscription Identifier matches the requested Subscript Check Notification Endpoint &{notification_request}= Create Mock Request Matcher GET ${callback_endpoint} - &{notification_response}= Create Mock Response headers="Content-Type: application/json" status_code=204 + &{headers} = Create Dictionary Content-Type=application/json + &{notification_response}= Create Mock Response headers=${headers} status_code=204 Create Mock Expectation ${notification_request} ${notification_response} Wait Until Keyword Succeeds ${total_polling_time} ${polling_interval} Verify Mock Expectation ${notification_request} Clear Requests ${callback_endpoint} Check HTTP Response Body Matches the Subscription Log Check Response matches subscription - ${body}= Get File jsons/subscriptions.json + ${template}= Get File jsons/subscriptions.json + ${body}= Format String ${template} callback_uri=${callback_uri} callback_endpoint=${callback_endpoint} vnfPkgId=${vnfPkgId} ${subscription}= evaluate json.loads('''${body}''') json Should Be Equal As Strings ${response['body']['callbackUri']} ${subscription['callbackUri']} diff --git a/SOL005/VNFPackageManagement-API/environment/variables.txt b/SOL005/VNFPackageManagement-API/environment/variables.txt index 80469cdfead4dc91b9668e91d26b19968ed0f798..349e8767a9f1a1c4c6b001d6e5c714ee28f8ebb0 100644 --- a/SOL005/VNFPackageManagement-API/environment/variables.txt +++ b/SOL005/VNFPackageManagement-API/environment/variables.txt @@ -34,4 +34,4 @@ ${NFVO_CHECKS_NOTIF_ENDPOINT} 1 ${response} ${notification_request} [] -${notification_response} [] +${notification_response} {} diff --git a/SOL005/VNFPackageManagement-API/environment/vnfPackageArtifacts.txt b/SOL005/VNFPackageManagement-API/environment/vnfPackageArtifacts.txt index 4acfbd727d6a975eb3da974c81a9cb1f7b7e397f..c1ab9f57fc8d2e7620f0415440c931abb811dd63 100644 --- a/SOL005/VNFPackageManagement-API/environment/vnfPackageArtifacts.txt +++ b/SOL005/VNFPackageManagement-API/environment/vnfPackageArtifacts.txt @@ -1,5 +1,5 @@ *** Variables *** -${artifactPath} artifactPath +${artifactPath} icons/osm.png ${CONTENT_TYPE_OCTET} application/octet-stream ${NFVO_RANGE_OK} 1 # If 1 means that Range is supported by the NFVO ${range} bytes=0-1023 diff --git a/SOL005/VNFPackageManagement-API/environment/vnfPackageContentViaUri.txt b/SOL005/VNFPackageManagement-API/environment/vnfPackageContentViaUri.txt index 9cb902861d34f0dc7c909832c489dc7a8cea5309..53981f9536954fb5ae90ce9155bb220ae681a789 100644 --- a/SOL005/VNFPackageManagement-API/environment/vnfPackageContentViaUri.txt +++ b/SOL005/VNFPackageManagement-API/environment/vnfPackageContentViaUri.txt @@ -1,4 +1,4 @@ *** Variables *** ${vnfPkgViaUriId} 788106a2-d692-44f3-a86d-384f0ce35e42 ${creatingVnfPkgViaUriId} d246ccdd-71aa-402f-b256-6a80ee54be3d - +${vnfPkgUri} http://localhost/content.zip diff --git a/SOL005/VNFPackageManagement-API/jsons/UploadVnfPkgFromUriRequest.json b/SOL005/VNFPackageManagement-API/jsons/UploadVnfPkgFromUriRequest.json index f76054e5fa6e0350cc2cafcff459bff2a88daab4..68534020426dcc0ab9cebe61a6e2e62a26718be6 100644 --- a/SOL005/VNFPackageManagement-API/jsons/UploadVnfPkgFromUriRequest.json +++ b/SOL005/VNFPackageManagement-API/jsons/UploadVnfPkgFromUriRequest.json @@ -1,3 +1,3 @@ -{ -"addressInformation": "http://localhost/content.zip" -} \ No newline at end of file +{{ + "addressInformation": "{vnfPkgUri}" +}} \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/jsons/subscriptions.json b/SOL005/VNFPackageManagement-API/jsons/subscriptions.json index 4314ec0cee75d792059a04637926c589958f59a2..124004374232fc30da00625bcc01555365e8ddc9 100644 --- a/SOL005/VNFPackageManagement-API/jsons/subscriptions.json +++ b/SOL005/VNFPackageManagement-API/jsons/subscriptions.json @@ -1,6 +1,6 @@ -{ - "callbackUri": "http://127.0.0.1/subscribe", - "filter": { - "vnfPkgId": ["491ed430-67f5-4c6c-b78e-797f5d718868"] - } -} \ No newline at end of file +{{ + "callbackUri": "{callback_uri}{callback_endpoint}", + "filter": {{ + "vnfPkgId": ["{vnfPkgId}"] + }} +}} \ No newline at end of file diff --git a/SOL005/VNFPackageManagement-API/schemas/VnfPackageChangeNotification.schema.json b/SOL005/VNFPackageManagement-API/schemas/VnfPackageChangeNotification.schema.json index 7db3fe98c9a79d01dd1369f1a2266ec7079de6f3..2932cf93f2cde9a92d201ee5a98580f4574ed6ef 100644 --- a/SOL005/VNFPackageManagement-API/schemas/VnfPackageChangeNotification.schema.json +++ b/SOL005/VNFPackageManagement-API/schemas/VnfPackageChangeNotification.schema.json @@ -1,5 +1,5 @@ { - "description": "This type represents a VNF package management notification, which informs the receiver of a change of the status in an on-boarded VNF package. Only changes in the \"operationalState\" attribute of an on-boarded VNF package and the deletion of the VNF package will be reported. Change in the \"usageState\" and \"onboardingState\" attributes are not reported. The notification shall comply with the provisions defined in Table 9.5.2.9-1. The support of this notification is mandatory. The notification shall be triggered by the NFVO when there is a change in the status of an onboarded VNF package, as follows. • The \"operationalState\" attribute of a VNF package has changed, and the \"onboardingState\" attribute of the package has the value \"ONBOARDED\". • The on-boarded VNF package has been deleted.\n", + "description": "This type represents a VNF package management notification, which informs the receiver of a change of the status in an on-boarded VNF package. Only changes in the \"operationalState\" attribute of an on-boarded VNF package and the deletion of the VNF package will be reported. Change in the \"usageState\" and \"onboardingState\" attributes are not reported. The notification shall comply with the provisions defined in Table 9.5.2.9-1. The support of this notification is mandatory. The notification shall be triggered by the NFVO when there is a change in the status of an onboarded VNF package, as follows. The \"operationalState\" attribute of a VNF package has changed, and the \"onboardingState\" attribute of the package has the value \"ONBOARDED\". The on-boarded VNF package has been deleted.\n", "type": "object", "required": [ "id",