From ef6beaad0aff2a99c6af065d25a60d8054ead39b Mon Sep 17 00:00:00 2001 From: Alex Shatov Date: Tue, 13 Mar 2018 17:38:02 -0400 Subject: on /policy APIs return server_instance_uuid - that will allow the policy-handler to identify the change of deployment-handler instance and send the catch_up message to bring all the policies up to date - proper jira ticket Change-Id: I53f99ea8316f506ab999fb6183952409ecb6e53b Signed-off-by: Alex Shatov Issue-ID: DCAEGEN2-389 --- lib/policy.js | 8 ++++++-- package.json | 2 +- pom.xml | 2 +- version.properties | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/policy.js b/lib/policy.js index b91e5fd..d471cff 100644 --- a/lib/policy.js +++ b/lib/policy.js @@ -63,7 +63,10 @@ function policyUpdate(req, res, next) { /** * reply to and free up the policy_handler */ - res.json({}); + const response = {"requestID": req.dcaeReqId}; + response.started = new Date(); + response.server_instance_uuid = process.mainModule.exports.config.server_instance_uuid; + res.json(response); policy_update.latest_policies = JSON.parse(policy_update.latest_policies); policy_update.removed_policies = JSON.parse(policy_update.removed_policies); @@ -274,8 +277,9 @@ function policyUpdate(req, res, next) { */ function getComponentPoliciesFromCloudify(req, res, next) { logger.debug(req.dcaeReqId, "getComponentPoliciesFromCloudify " + req.originalUrl); - const response = {"requestId": req.dcaeReqId}; + const response = {"requestID": req.dcaeReqId}; response.started = new Date(); + response.server_instance_uuid = process.mainModule.exports.config.server_instance_uuid; response.node_instance_ids = []; response.component_policies = []; response.component_policy_filters = []; diff --git a/package.json b/package.json index d7d20e7..b239f5e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "onap-dcae-deployment-handler", - "version": "4.3.1", + "version": "4.3.2", "description": "ONAP DCAE Deployment Handler", "main": "deployment-handler.js", "dependencies": { diff --git a/pom.xml b/pom.xml index 23de193..3b27781 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property. org.onap.dcaegen2.platform deployment-handler dcaegen2-platform-deployment-handler - 2.0.1-SNAPSHOT + 2.0.2-SNAPSHOT http://maven.apache.org UTF-8 diff --git a/version.properties b/version.properties index ee9f646..a75c90e 100644 --- a/version.properties +++ b/version.properties @@ -1,6 +1,6 @@ major=2 minor=0 -patch=1 +patch=2 base_version=${major}.${minor}.${patch} release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg