summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormaopengzhang <zhang.maopeng1@zte.com.cn>2018-11-14 16:32:27 +0800
committerFu Jinhua <fu.jinhua@zte.com.cn>2018-11-14 09:12:14 +0000
commit3f33df81ebd27ee06b6e7b129a5beeda51dceb9c (patch)
treeab16a01effcb340bddfc66cb01d758924924ce5e
parent5efbf8748ca225b26e909cef06e2314746fb3e1b (diff)
fix NS update error
fix NS update error in VNFLCM Change-Id: I47f345b6f716758c387291ea546281531ef7d856 Issue-ID: VFC-1185 Signed-off-by: maopengzhang <zhang.maopeng1@zte.com.cn> (cherry picked from commit d31d7c3c00b7facb05a17906e9152ee076d15a03)
-rw-r--r--lcm/lcm/nf/views/heal_vnf_view.py5
-rw-r--r--lcm/lcm/nf/views/operate_vnf_view.py5
2 files changed, 6 insertions, 4 deletions
diff --git a/lcm/lcm/nf/views/heal_vnf_view.py b/lcm/lcm/nf/views/heal_vnf_view.py
index 08daa98f..6b3b3139 100644
--- a/lcm/lcm/nf/views/heal_vnf_view.py
+++ b/lcm/lcm/nf/views/heal_vnf_view.py
@@ -52,8 +52,9 @@ class HealVnfView(APIView):
JobUtil.add_job_status(job_id, 0, "HEAL_VNF_READY")
self.heal_pre_check(instanceid, job_id)
HealVnf(heal_vnf_request_serializer.data, instanceid, job_id).start()
- response = Response(data=None, status=status.HTTP_202_ACCEPTED)
- response["Location"] = "/vnf_lc_ops/%s" % job_id
+ response = Response(data={"jobId": job_id}, status=status.HTTP_202_ACCEPTED)
+ # todo, heal_vnf codes uses job as the status storage, not in VNFLcmOpOccModel.
+ # response["Location"] = "/api/vnflcm/v1/vnf_lc_ops/%s" % lcmopoccid
return response
except NFLCMExceptionNotFound as e:
probDetail = ProblemDetailsSerializer(data={"status": status.HTTP_404_NOT_FOUND, "detail": "VNF Instance not found"})
diff --git a/lcm/lcm/nf/views/operate_vnf_view.py b/lcm/lcm/nf/views/operate_vnf_view.py
index 947e983e..ab8f905b 100644
--- a/lcm/lcm/nf/views/operate_vnf_view.py
+++ b/lcm/lcm/nf/views/operate_vnf_view.py
@@ -52,8 +52,9 @@ class OperateVnfView(APIView):
JobUtil.add_job_status(job_id, 0, "OPERATE_VNF_READY")
self.operate_pre_check(instanceid, job_id)
OperateVnf(operate_vnf_request_serializer.data, instanceid, job_id).start()
- response = Response(data=None, status=status.HTTP_202_ACCEPTED)
- response["Location"] = "/vnf_lc_ops/%s" % job_id
+ response = Response(data={"jobId": job_id}, status=status.HTTP_202_ACCEPTED)
+ # Location todo, it use job as the status storage
+ # response["Location"] = "/api/vnflcm/v1/vnf_lcm_op_occs/%s" % lcmopoccid
return response
except NFLCMExceptionNotFound as e:
probDetail = ProblemDetailsSerializer(data={"status": 404, "detail": "VNF Instance not found"})