aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cloudify.js
diff options
context:
space:
mode:
authorJack Lucas <jflucas@research.att.com>2018-03-30 16:19:05 -0400
committerJack Lucas <jflucas@research.att.com>2018-03-30 17:49:08 -0400
commit715654de5385f474122a8ff2074100c16d52d2ee (patch)
tree323fd301a885c22d6bc9271c5c5b5ff029ff532c /lib/cloudify.js
parent522eeede9c6c4e52acb8576bf91e933753a5b8c9 (diff)
Update for CM 4.x
Change-Id: Idf4ca1de1d2a2fb616cc4eeb0d7d714fd9eb3b0d Issue-ID: DCAEGEN2-255 Signed-off-by: Jack Lucas <jflucas@research.att.com>
Diffstat (limited to 'lib/cloudify.js')
-rw-r--r--lib/cloudify.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/cloudify.js b/lib/cloudify.js
index 0dbb876..c0504af 100644
--- a/lib/cloudify.js
+++ b/lib/cloudify.js
@@ -23,6 +23,8 @@ const FINISHED = [ "terminated", "cancelled", "failed" ];
const RETRY_INTERVAL = 5000; // Every 5 seconds
const MAX_TRIES = 720; // Up to 1 hour
+const TENANT = "default_tenant"; // Tenant name for Cloudify 4.x
+
const doRequest = require('./promise_request').doRequest;
const repeat = require('./repeat');
const admzip = require('adm-zip');
@@ -332,6 +334,12 @@ function addAuthToOptions(reqOptions) {
if (!!cfyAuth && cfyAuth !== "undefined:undefined") {
reqOptions.auth = cfyAuth;
}
+ if (reqOptions.headers) {
+ reqOptions.headers.Tenant = TENANT;
+ }
+ else {
+ reqOptions.headers = {"Tenant" : TENANT};
+ }
}
// Set a logger