summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2017-02-09 16:28:20 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2017-02-09 16:28:20 +0800
commit92e6a03c204c17100a786da0746ff513d475001b (patch)
tree9fdb6d4f7550f0280e5705b97a3d95ef3c06e7ee
parent96b0c6d5c4b6ab583b4ac0081ac7c055651406d5 (diff)
Decomposition instantiation process
Change-Id: I4579af8d50ad18901564cd8546a060b16ca1486c Issue-Id: GVNFM-7 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
-rw-r--r--lcm/lcm/nf/vnfs/views.py3
-rw-r--r--lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py (renamed from lcm/lcm/nf/vnfs/create_vnfs.py)4
2 files changed, 4 insertions, 3 deletions
diff --git a/lcm/lcm/nf/vnfs/views.py b/lcm/lcm/nf/vnfs/views.py
index c47e5004..d1818a5a 100644
--- a/lcm/lcm/nf/vnfs/views.py
+++ b/lcm/lcm/nf/vnfs/views.py
@@ -19,6 +19,7 @@ from rest_framework.response import Response
from rest_framework.views import APIView
from lcm.nf.vnfs.vnf_create.create_vnf_identifier import CreateVnf
+from lcm.nf.vnfs.vnf_create.inst_vnf import InstVnf
from lcm.pub.utils.jobutil import JobUtil
from lcm.pub.utils.values import ignore_case_get
@@ -52,7 +53,7 @@ class InstantiateVnf(APIView):
job_id = JobUtil.create_job('NF', 'CREATE', nf_inst_id)
JobUtil.add_job_status(job_id, 0, "INST_VNF_READY")
- # CreateVnfs(data, nf_inst_id, job_id).start()
+ InstVnf(data, nf_inst_id, job_id).start()
rsp = {"jobId": job_id}
return Response(data=rsp, status=status.HTTP_202_ACCEPTED)
diff --git a/lcm/lcm/nf/vnfs/create_vnfs.py b/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py
index 0dc5216c..258b863b 100644
--- a/lcm/lcm/nf/vnfs/create_vnfs.py
+++ b/lcm/lcm/nf/vnfs/vnf_create/inst_vnf.py
@@ -21,9 +21,9 @@ from lcm.pub.exceptions import NFLCMException
logger = logging.getLogger(__name__)
-class CreateVnfs(Thread):
+class InstVnf(Thread):
def __init__(self, data, nf_inst_id, job_id):
- super(CreateVnfs, self).__init__()
+ super(InstVnf, self).__init__()
self.data = data
self.nf_inst_id = nf_inst_id
self.job_id = job_id