summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/policy.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/policy.js b/lib/policy.js
index 305500b..b91e5fd 100644
--- a/lib/policy.js
+++ b/lib/policy.js
@@ -274,7 +274,7 @@ function policyUpdate(req, res, next) {
*/
function getComponentPoliciesFromCloudify(req, res, next) {
logger.debug(req.dcaeReqId, "getComponentPoliciesFromCloudify " + req.originalUrl);
- var response = {"requestId": req.dcaeReqId};
+ const response = {"requestId": req.dcaeReqId};
response.started = new Date();
response.node_instance_ids = [];
response.component_policies = [];
@@ -295,7 +295,7 @@ function getComponentPoliciesFromCloudify(req, res, next) {
if (node_instance.runtime_properties.policies) {
Object.keys(node_instance.runtime_properties.policies).forEach(policy_id => {
++policies_count;
- var policy = node_instance.runtime_properties.policies[policy_id];
+ const policy = node_instance.runtime_properties.policies[policy_id];
policy.component_id = node_instance.id;
policy.deployment_id = node_instance.deployment_id;
response.component_policies.push(policy);
@@ -305,14 +305,15 @@ function getComponentPoliciesFromCloudify(req, res, next) {
Object.keys(node_instance.runtime_properties.policy_filters).forEach(policy_filter => {
++policy_filters_count;
policy_filter = node_instance.runtime_properties.policy_filters[policy_filter];
- policy.component_id = node_instance.id;
- policy.deployment_id = node_instance.deployment_id;
+ policy_filter.component_id = node_instance.id;
+ policy_filter.deployment_id = node_instance.deployment_id;
response.component_policy_filters.push(policy_filter);
});
}
if (policies_count + policy_filters_count) {
response.node_instance_ids.push({
"node_instance_id" : node_instance.id,
+ "deployment_id" : node_instance.deployment_id,
"policies_count" : policies_count,
"policy_filters_count" : policy_filters_count
});