From 715654de5385f474122a8ff2074100c16d52d2ee Mon Sep 17 00:00:00 2001 From: Jack Lucas Date: Fri, 30 Mar 2018 16:19:05 -0400 Subject: Update for CM 4.x Change-Id: Idf4ca1de1d2a2fb616cc4eeb0d7d714fd9eb3b0d Issue-ID: DCAEGEN2-255 Signed-off-by: Jack Lucas --- lib/cloudify.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/cloudify.js') 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 -- cgit 1.2.3-korg