aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cloudify.js
diff options
context:
space:
mode:
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",