aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cloudify.js
diff options
context:
space:
mode:
authorAlex Shatov <alexs@att.com>2018-08-03 14:39:33 -0400
committerAlex Shatov <alexs@att.com>2018-08-03 14:39:33 -0400
commita5739ab3e9f7f97652e6814233abeee51f28db5e (patch)
tree71004a89bed1bbf7e247a12e66efcfe1438c206b /lib/cloudify.js
parentd8a51f22ef4723240d18a03708275689f822b42f (diff)
3.0.0 new dataflow on policy-update and catchup
- external version 3.0.0 - internal version 5.0.0 for API and code - changed API and functionality - new dataflow - new dataflow between policy-handler and deployment-handler on policy-update and catchup = GET /policy - returns the deployed policy_ids+versions and policy-filters = PUT /policy updates policies on deployed components = new message format for policy-update and catchup = matching by policy_id+version and policy_filter_id only - removed POST to /policy - the obsolete API = removed the 'smart' matching of the policies by policy-filter -- it is done by the policy-handler now Coverage summary Statements : 77.06% ( 870/1129 ) Branches : 53.55% ( 264/493 ) Functions : 78.53% ( 150/191 ) Lines : 77.45% ( 862/1113 ) Change-Id: I5409f32e1acd4870f1d74b466902a796fa10f6c7 Signed-off-by: Alex Shatov <alexs@att.com> Issue-ID: DCAEGEN2-492
Diffstat (limited to 'lib/cloudify.js')
-rw-r--r--lib/cloudify.js14
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/cloudify.js b/lib/cloudify.js
index 2db460a..053bdb8 100644
--- a/lib/cloudify.js
+++ b/lib/cloudify.js
@@ -67,14 +67,6 @@ ExeQueue.prototype.nextExecution = function(deployment_id) {
const exeQueue = new ExeQueue();
exports.exeQueue = exeQueue;
-// Delay function--returns a promise that's resolved after 'dtime'
-// milliseconds.`
-var delay = function(dtime) {
- return new Promise(function(resolve, reject) {
- setTimeout(resolve, dtime);
- });
-};
-
// Get current status of a workflow execution
const getExecutionStatus = function(req, execution_id) {
var reqOptions = {
@@ -407,8 +399,8 @@ exports.getNodeInstances = function (mainReq, on_next_node_instances, offset) {
const runQueuedExecution = function(mainReq, deployment_id, workflow_id, parameters, waitedCount) {
mainReq = mainReq || {};
var execution_id;
- var exe_deployment_str = " deployment_id " + deployment_id + " to " + workflow_id
- + " with params(" + JSON.stringify(parameters || {}) + ")";
+ const exe_deployment_str = " deployment_id " + deployment_id + " to " + workflow_id
+ + " with params(" + JSON.stringify(parameters || {}) + ")";
startWorkflowExecution(mainReq, deployment_id, workflow_id, parameters)
.then(function(result) {
logger.info(mainReq.dcaeReqId, "result of start the execution for" + exe_deployment_str + ": " + JSON.stringify(result));
@@ -461,7 +453,7 @@ const runQueuedExecution = function(mainReq, deployment_id, workflow_id, paramet
exports.executeOperation = function (mainReq, deployment_id, operation, operation_kwargs, node_instance_ids) {
const workflow_id = "execute_operation";
- var parameters = {
+ const parameters = {
'operation': operation,
'operation_kwargs': operation_kwargs,
'node_instance_ids': node_instance_ids,