From 2e418dcb84134695a2669ddbe76d1513742bce77 Mon Sep 17 00:00:00 2001 From: Shadi Haidar Date: Mon, 15 Apr 2019 09:37:43 -0400 Subject: Enhance DH uninstall workflow Make force uninstall configurable and set ignore_failure to true in order to have the uninstall execution complete as much as possible Coverage summary Statements : 80.79% ( 997/1234 ) Branches : 58.06% ( 306/527 ) Functions : 81.13% ( 172/212 ) Lines : 81.3% ( 987/1214 ) Issue-ID: DCAEGEN2-1439 Change-Id: I5f0cd55c4d5eeead9bb2874f83bb4db1809fbc8d Signed-off-by: Shadi Haidar --- lib/cloudify.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib') diff --git a/lib/cloudify.js b/lib/cloudify.js index 49c26dd..e0683bf 100644 --- a/lib/cloudify.js +++ b/lib/cloudify.js @@ -138,6 +138,12 @@ const startWorkflowExecution = function(mainReq, deployment_id, workflow_id, par "deployment_id" : deployment_id, "workflow_id" : workflow_id }; + + if ( workflow_id === 'uninstall' ) { + body.force = (mainReq.query.force_uninstall === 'true') || false; + parameters = {"ignore_failure":"true"} + } + if (parameters) {body.parameters = parameters;} // Make the POST request -- cgit 1.2.3-korg