From: ying.yunlong Date: Thu, 9 Feb 2017 08:28:20 +0000 (+0800) Subject: Decomposition instantiation process X-Git-Tag: release/mercury~124^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=92e6a03c204c17100a786da0746ff513d475001b;p=vfc%2Fgvnfm%2Fvnflcm.git Decomposition instantiation process Change-Id: I4579af8d50ad18901564cd8546a060b16ca1486c Issue-Id: GVNFM-7 Signed-off-by: ying.yunlong --- 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 similarity index 97% rename from lcm/lcm/nf/vnfs/create_vnfs.py rename to 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