diff options
author | 2018-08-15 07:33:43 +0000 | |
---|---|---|
committer | 2018-08-15 07:33:43 +0000 | |
commit | e65f7b227b393f6e245d95fe510ff7f86067e2ae (patch) | |
tree | 8780a5b510476b5333bc96d3f8f034c4a67e0fb3 /gvnfmadapter | |
parent | 946b29d03664f583eb5f3e31323746907b1d3222 (diff) | |
parent | 54e235a7517b02c2e3df92881a5258825101564d (diff) |
Merge "Deal with gvnfm adapter stuffs."
Diffstat (limited to 'gvnfmadapter')
-rw-r--r-- | gvnfmadapter/driver/interfaces/tests.py | 15 | ||||
-rw-r--r-- | gvnfmadapter/driver/interfaces/views.py | 5 |
2 files changed, 9 insertions, 11 deletions
diff --git a/gvnfmadapter/driver/interfaces/tests.py b/gvnfmadapter/driver/interfaces/tests.py index 4f57096..39c2009 100644 --- a/gvnfmadapter/driver/interfaces/tests.py +++ b/gvnfmadapter/driver/interfaces/tests.py @@ -43,17 +43,16 @@ class InterfacesTest(TestCase): 'createTime': '2016-10-3111: 08: 39', 'description': '' } - job_info = { - "vnfInstanceId": "8", - "jobId": "NF-CREATE-8-b384535c-9f45-11e6-8749-fa163e91c2f9" + create_vnf_resp = { + "id": "8", + # "jobId": "NF-CREATE-8-b384535c-9f45-11e6-8749-fa163e91c2f9" } - vnflcm_info = { - "vnfInstanceId": "8", - "vnfLcOpId": "NF-INST-8-6ffa8083-6705-49b3-ae54-cbd6265fbe7a" + job_info = { + "jobId": "NF-INST-8-6ffa8083-6705-49b3-ae54-cbd6265fbe7a" } r1 = [0, json.JSONEncoder().encode(vnfm_info), "200"] - ret = [0, json.JSONEncoder().encode(job_info), '200'] - ret2 = [0, json.JSONEncoder().encode(vnflcm_info), '200'] + ret = [0, json.JSONEncoder().encode(create_vnf_resp), '200'] + ret2 = [0, json.JSONEncoder().encode(job_info), '200'] mock_call_req.side_effect = [r1, ret, r1, ret2] req_data = { 'vnfInstanceName': 'VFW_f88c0cb7-512a-44c4-bd09-891663f19367', diff --git a/gvnfmadapter/driver/interfaces/views.py b/gvnfmadapter/driver/interfaces/views.py index ae40bb6..1b0f027 100644 --- a/gvnfmadapter/driver/interfaces/views.py +++ b/gvnfmadapter/driver/interfaces/views.py @@ -67,12 +67,11 @@ class VnfInstInfo(APIView): logger.debug("Create vnf end!") logger.debug("Instantiate vnf start!") - vnfInstanceId = resp["vnfInstanceId"] + vnfInstanceId = resp["id"] input_data = { "flavourId": ignorcase_get(requestData, "flavourId"), "extVirtualLinks": ignorcase_get(requestData, "extVirtualLink"), "additionalParams": ignorcase_get(requestData, "additionalParam"), - "vnfmId": vnfm_id } logger.debug("do_instvnf: vnfInstanceId=[%s],request data=[%s],input_data=[%s],vnfm_id=[%s]", vnfInstanceId, request.data, input_data, vnfm_id) @@ -80,7 +79,7 @@ class VnfInstInfo(APIView): logger.debug("do_instvnf: response data=[%s]", resp) resp_data = { "vnfInstanceId": vnfInstanceId, - "jobId": ignorcase_get(resp, "vnfLcOpId") + "jobId": ignorcase_get(resp, "jobId") } logger.debug("Instantiate vnf end!") return Response(data=resp_data, status=status.HTTP_201_CREATED) |