Reduce duplication around DeleteCompositeApp calls 61/113661/1
authorIgor D.C <igor.duarte.cardoso@intel.com>
Thu, 8 Oct 2020 02:54:54 +0000 (02:54 +0000)
committerIgor D.C <igor.duarte.cardoso@intel.com>
Thu, 8 Oct 2020 02:58:14 +0000 (02:58 +0000)
commite68d9d5ae2b6e5f1126de3e99773bc4057211403
tree4936a137f0897b4b74a8fb44efc5f8e6e6754355
parent1a41ef5db1a69926ba00edd8ad27e949b3f0a276
Reduce duplication around DeleteCompositeApp calls

DCM's apply function had a lot of error handling code that cleans up
the AppContext if something goes wrong while adding to AppContext.

Most of that handling was using multiline duplicate code with the only
change being in the log/error strings. This commit attempts to reuse
all that error handling code and make it easier to follow main code.

Issue-ID: MULTICLOUD-1143
Change-Id: I3a35387b1ed46279c1b973dbd852352276ff5cc8
Signed-off-by: Igor D.C <igor.duarte.cardoso@intel.com>
src/dcm/pkg/module/apply.go