diff options
author | 2019-04-15 09:37:43 -0400 | |
---|---|---|
committer | 2019-06-07 12:59:19 -0400 | |
commit | 2e418dcb84134695a2669ddbe76d1513742bce77 (patch) | |
tree | de5b0d80b9ed6f77cce1e5af4c135684e6b3bea3 | |
parent | 23479182b327f082675ff860d56e0d2b379db623 (diff) |
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 <sh1986@att.com>
-rw-r--r-- | deployment-handler-API.yaml | 6 | ||||
-rw-r--r-- | lib/cloudify.js | 6 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | pom.xml | 2 | ||||
-rw-r--r-- | version.properties | 4 |
5 files changed, 16 insertions, 4 deletions
diff --git a/deployment-handler-API.yaml b/deployment-handler-API.yaml index 9359d24..47cf4d6 100644 --- a/deployment-handler-API.yaml +++ b/deployment-handler-API.yaml @@ -213,6 +213,12 @@ paths: in: path type: string required: true + - name: force_uninstall + description: | + Set the "force" boolean flag when performing an uninstall in Cloudify. Optional, if not specified, "false" will be used. + in: query + type: string + required: false responses: 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 diff --git a/package.json b/package.json index 8dff5cf..1029624 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "onap-dcae-deployment-handler", - "version": "6.0.1", + "version": "6.0.2", "description": "ONAP DCAE Deployment Handler", "main": "deployment-handler.js", "dependencies": { @@ -29,7 +29,7 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property. <groupId>org.onap.dcaegen2.platform</groupId> <artifactId>deployment-handler</artifactId> <name>dcaegen2-platform-deployment-handler</name> - <version>4.0.1-SNAPSHOT</version> + <version>4.1.0-SNAPSHOT</version> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> diff --git a/version.properties b/version.properties index 7e4f439..63f7e0d 100644 --- a/version.properties +++ b/version.properties @@ -1,6 +1,6 @@ major=4 -minor=0 -patch=1 +minor=1 +patch=0 base_version=${major}.${minor}.${patch} release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT |