diff --git a/SOL002/VNFPerformanceManagement-API/PMJobs.robot b/SOL002/VNFPerformanceManagement-API/PMJobs.robot index 78883d7579a691f2e928420310e6587f0a940599..27a85112988b2c0f242ddcc474f55a1c2c3aaf9b 100644 --- a/SOL002/VNFPerformanceManagement-API/PMJobs.robot +++ b/SOL002/VNFPerformanceManagement-API/PMJobs.robot @@ -288,7 +288,7 @@ Send Post Request Create new VNF Performance Monitoring Job Set Headers {"Content-Type": "${CONTENT_TYPE_JSON}"} Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"Authorization": "${AUTHORIZATION}"} ${template}= Get File jsons/CreatePmJobRequest.json - ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} callbackuri=${callback_uri} + ${body}= Format String ${template} objectInstanceIds=${objectInstanceIds} callback_uri=${callback_uri} POST ${apiRoot}/${apiName}/${apiVersion}/pm_jobs ${body} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot b/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot index f131a7216dabe157583c6bce2608ce869e2626bd..80ac22c2dbd80475810d1dc633a4061893196874 100644 --- a/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot +++ b/SOL002/VNFPerformanceManagement-API/VNFPerformanceManagementKeywords.robot @@ -1,4 +1,5 @@ *** Settings *** +Library String Resource environment/variables.txt Resource environment/subscriptions.txt Resource environment/individualSubscription.txt @@ -104,7 +105,8 @@ Send Post Request for VNF 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 + ${template}= Get File jsons/subscriptions.json + ${body_request}= Format String ${template} callback_uri=${callback_uri} subscribe=${subscribe} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body_request} ${output}= Output response Set Suite Variable ${response} ${output} @@ -135,7 +137,8 @@ Send Post Request for Duplicated VNF 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 + ${template}= Get File jsons/subscriptions.json + ${body_request}= Format String ${template} callback_uri=${callback_uri} subscribe=${subscribe} POST ${apiRoot}/${apiName}/${apiVersion}/subscriptions ${body_request} ${output}= Output response Set Suite Variable ${response} ${output} diff --git a/SOL002/VNFPerformanceManagement-API/environment/variables.txt b/SOL002/VNFPerformanceManagement-API/environment/variables.txt index debf7b6a0c67158d528098df2cdd506254a9c144..65cab3fbee5625e0ccc7dee0c8af3ec81d63b056 100644 --- a/SOL002/VNFPerformanceManagement-API/environment/variables.txt +++ b/SOL002/VNFPerformanceManagement-API/environment/variables.txt @@ -25,4 +25,6 @@ ${MOCK_SERVER_JAR} ../../../bin/mockserver-netty-5.5.0-jar-with-dependencies. ${response} http-response -${objectInstanceIds} 1f50d68b-82e8-4deb-bd40-c934d4d1ac0a \ No newline at end of file +${objectInstanceIds} 1f50d68b-82e8-4deb-bd40-c934d4d1ac0a + +${subscribe} /subscribe \ No newline at end of file diff --git a/SOL002/VNFPerformanceManagement-API/jsons/subscriptions.json b/SOL002/VNFPerformanceManagement-API/jsons/subscriptions.json index 3fcc4e59bcbcc09b0e5355a1557d439378f1520b..7072ba32639e89b5bd63f5d038ab554aa72bd56a 100644 --- a/SOL002/VNFPerformanceManagement-API/jsons/subscriptions.json +++ b/SOL002/VNFPerformanceManagement-API/jsons/subscriptions.json @@ -1,6 +1,6 @@ -{ - "callbackUri": "http://127.0.0.1/subscribe", - "filter": { +{{ + "callbackUri": "{callback_uri}{subscribe}", + "filter": {{ "notificationTypes": ["ThresholdCrossedNotification"] - } -} \ No newline at end of file + }} +}} \ No newline at end of file