aboutsummaryrefslogtreecommitdiffstats
path: root/lib/policy.js
diff options
context:
space:
mode:
authorAlex Shatov <alexs@att.com>2018-03-13 17:38:02 -0400
committerAlex Shatov <alexs@att.com>2018-03-13 17:38:02 -0400
commitef6beaad0aff2a99c6af065d25a60d8054ead39b (patch)
tree81fee9ac699bcf05ede66e3d273e4d6053972df3 /lib/policy.js
parent5035caeacb65e7d871730beca04877c37d1f76f8 (diff)
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 <alexs@att.com> Issue-ID: DCAEGEN2-389
Diffstat (limited to 'lib/policy.js')
-rw-r--r--lib/policy.js8
1 files changed, 6 insertions, 2 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 = [];