summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2018-11-13 16:24:28 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2018-11-13 16:24:28 +0800
commit28cfac52c5ac104daf92ab9b041f80461165857e (patch)
tree5105050dc7cbaf852e31151ab9c07b6de9352a84
parentfcfd1c6e016883adb7ea92dab119b247ee5bce2f (diff)
Fix ns term logic
Change-Id: Iad588af1924f45e49bcb82c161280b98fb8914aa Issue-ID: VFC-1163 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r--lcm/ns/views/term_ns_view.py2
-rw-r--r--lcm/pub/utils/jobutil.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/lcm/ns/views/term_ns_view.py b/lcm/ns/views/term_ns_view.py
index a8c9a42d..aa9a8644 100644
--- a/lcm/ns/views/term_ns_view.py
+++ b/lcm/ns/views/term_ns_view.py
@@ -45,7 +45,7 @@ class TerminateNSView(APIView):
termination_type = ignore_case_get(request.data, 'terminationType')
graceful_termination_timeout = ignore_case_get(request.data, 'gracefulTerminationTimeout')
- job_id = JobUtil.create_job("VNF", JOB_TYPE.TERMINATE_VNF, ns_instance_id)
+ job_id = JobUtil.create_job("NS", JOB_TYPE.TERMINATE_NS, ns_instance_id)
TerminateNsService(ns_instance_id, termination_type, graceful_termination_timeout, job_id).start()
resp_serializer = NsOperateJobSerializer(data={'jobId': job_id})
diff --git a/lcm/pub/utils/jobutil.py b/lcm/pub/utils/jobutil.py
index 69fa2866..30c7b444 100644
--- a/lcm/pub/utils/jobutil.py
+++ b/lcm/pub/utils/jobutil.py
@@ -30,7 +30,7 @@ JOB_STATUS = enum(PROCESSING=0, FINISH=1)
JOB_MODEL_STATUS = enum(STARTED='started', PROCESSING='processing', FINISHED='finished', ERROR='error',
TIMEOUT='timeout')
JOB_TYPE = enum(CREATE_VNF="create vnf", TERMINATE_VNF="terminate vnf", GRANT_VNF="grant vnf", MANUAL_SCALE_VNF="manual scale vnf",
- HEAL_VNF="heal vnf")
+ HEAL_VNF="heal vnf", TERMINATE_NS="terminate ns")
class JobUtil(object):