diff options
Diffstat (limited to 'gvnfmadapter')
-rw-r--r-- | gvnfmadapter/driver/interfaces/tests.py | 5 | ||||
-rw-r--r-- | gvnfmadapter/driver/interfaces/views.py | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/gvnfmadapter/driver/interfaces/tests.py b/gvnfmadapter/driver/interfaces/tests.py index 29cb918..9dece6a 100644 --- a/gvnfmadapter/driver/interfaces/tests.py +++ b/gvnfmadapter/driver/interfaces/tests.py @@ -119,10 +119,11 @@ class InterfacesTest(TestCase): r1 = [0, json.JSONEncoder().encode(vnfm_info), "200"] r2 = [0, json.JSONEncoder().encode(job_info), "200"] job_ret = [0, json.JSONEncoder().encode(job_status_info), "200"] - mock_call_req.side_effect = [r1, r2, r1, job_ret, r1, r2] + r3 = [0, json.JSONEncoder().encode(None), "200"] + mock_call_req.side_effect = [r1, r2, r1, job_ret, r1, r3] response = self.client.post("/api/gvnfmdriver/v1/ztevnfmid/vnfs/2/terminate") self.assertEqual(status.HTTP_204_NO_CONTENT, response.status_code) - self.assertEqual(job_info, response.data) + self.assertEqual(None, response.data) @mock.patch.object(restcall, 'call_req') def test_query_vnf(self, mock_call_req): diff --git a/gvnfmadapter/driver/interfaces/views.py b/gvnfmadapter/driver/interfaces/views.py index 50e8d36..b2eab99 100644 --- a/gvnfmadapter/driver/interfaces/views.py +++ b/gvnfmadapter/driver/interfaces/views.py @@ -115,7 +115,7 @@ class VnfTermInfo(APIView): resp = do_terminatevnf(vnfm_id, vnfInstanceId, input_data) logger.debug("terminate_vnf: response data=[%s]", resp) - jobId = ignorcase_get(resp, "vnfLcOpId") + jobId = ignorcase_get(resp, "jobId") gracefulTerminationTimeout = ignorcase_get(request.data, "gracefulTerminationTimeout") logger.debug("wait4job: vnfm_id=[%s],jobId=[%s],gracefulTerminationTimeout=[%s]", vnfm_id, jobId, gracefulTerminationTimeout) |