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 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib') 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 = []; -- cgit 1.2.3-korg