summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gvnfmadapter/driver/interfaces/tests.py15
-rw-r--r--gvnfmadapter/driver/interfaces/views.py5
2 files changed, 9 insertions, 11 deletions
diff --git a/gvnfmadapter/driver/interfaces/tests.py b/gvnfmadapter/driver/interfaces/tests.py
index 29cb918..1eb72bd 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 50e8d36..0cf46a0 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)