aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2017-11-30 09:20:11 +0800
committeryunlong ying <ying.yunlong@zte.com.cn>2017-12-04 02:04:35 +0000
commit07df7c82edc93b8f1003b3a5a91d427955961282 (patch)
tree0e7bc9d993a0d3f70f5629f4f1debab1251e497b
parentbca34c9785fbb496fad02284ea2bb7f8f326aa84 (diff)
Remove rollback when nf csar exists
Change-Id: I002ffc38634c63cbffb7ad8781fb20813c606b65 Issue-ID: VFC-600 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn> (cherry picked from commit 1b95ed65a13ef5c5abc391755b407e05d2e6682a)
-rw-r--r--catalog/packages/nf_package.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/catalog/packages/nf_package.py b/catalog/packages/nf_package.py
index 5b4a9a76..f97c6ceb 100644
--- a/catalog/packages/nf_package.py
+++ b/catalog/packages/nf_package.py
@@ -108,7 +108,9 @@ class NfDistributeThread(threading.Thread):
JobUtil.add_job_status(self.job_id, 5, "Start CSAR(%s) distribute." % self.csar_id)
if VnfPackageModel.objects.filter(vnfPackageId=self.csar_id):
- raise CatalogException("NF CSAR(%s) already exists." % self.csar_id)
+ err_msg = "NF CSAR(%s) already exists." % self.csar_id
+ JobUtil.add_job_status(self.job_id, JOB_ERROR, err_msg)
+ return
artifact = sdc.get_artifact(sdc.ASSETTYPE_RESOURCES, self.csar_id)
local_path = os.path.join(CATALOG_ROOT_PATH, self.csar_id)