summaryrefslogtreecommitdiffstats
path: root/lib/cloudify.js
diff options
context:
space:
mode:
authorJack Lucas <jflucas@research.att.com>2017-10-20 15:36:12 +0000
committerJack Lucas <jflucas@research.att.com>2017-10-20 15:37:17 +0000
commite44dae66714b5ddb21cf2af17e83681c3bb1249d (patch)
treebebd639f1fbe9db9aec6f6baed2da2202259bf59 /lib/cloudify.js
parent8ff6ed5596ac9d5591d1e9c16c50e632ae91ccc1 (diff)
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.js6
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",