diff options
author | Jack Lucas <jflucas@research.att.com> | 2017-10-20 15:36:12 +0000 |
---|---|---|
committer | Jack Lucas <jflucas@research.att.com> | 2017-10-20 15:37:17 +0000 |
commit | e44dae66714b5ddb21cf2af17e83681c3bb1249d (patch) | |
tree | bebd639f1fbe9db9aec6f6baed2da2202259bf59 /lib/cloudify.js | |
parent | 8ff6ed5596ac9d5591d1e9c16c50e632ae91ccc1 (diff) |
Fix logging errorsv1.1.01.0.0-ONAP1.0.0-Amsterdam
Change-Id: Ibb5182e7eff9a1c2d079da28a46d09cb2c700592
Issue-Id: DCAEGEN2-171
Signed-off-by: Jack Lucas <jflucas@research.att.com>
Diffstat (limited to 'lib/cloudify.js')
-rw-r--r-- | lib/cloudify.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/cloudify.js b/lib/cloudify.js index 303134a..23e779a 100644 --- a/lib/cloudify.js +++ b/lib/cloudify.js @@ -76,6 +76,8 @@ var delay = function(dtime) { // Get current status of a workflow execution const getExecutionStatus = function(execution_id, mainReq) { + /* Defense: Some callers do not supply mainReq */ + mainReq = mainReq || {}; var reqOptions = { method : "GET", uri : cfyAPI + "/executions/" + execution_id @@ -86,6 +88,8 @@ const getExecutionStatus = function(execution_id, mainReq) { // Poll for the result of a workflow execution until it's done var getWorkflowResult = function(execution_id, mainReq) { + /* Defense: Some callers do not supply mainReq */ + mainReq = mainReq || {}; logger.debug(mainReq.dcaeReqId, "Getting workflow result for execution id: " + execution_id); // Function for testing if workflow is finished @@ -158,6 +162,8 @@ var getWorkflowResult = function(execution_id, mainReq) { // bare start of a workflow execution against a deployment const startWorkflowExecution = function(mainReq, deployment_id, workflow_id, parameters) { + /* Defense: Some callers do not supply mainReq */ + mainReq = mainReq || {}; // Set up the HTTP POST request var reqOptions = { method : "POST", |