diff options
author | 2017-09-23 10:04:56 +0800 | |
---|---|---|
committer | 2017-09-23 03:01:32 +0000 | |
commit | c71d5d39c51c79194e3d9b59ebfd1ac189836a4b (patch) | |
tree | d15d498c0d64bb7ec79bea0010e61aa4ad797cdf /gvnfmadapter | |
parent | 9f52da62cbc61f5443582adb75ac98692bc0d1ed (diff) |
Fix vfc-gvnfmadapter unit tests.
Change-Id: If7ab719fdf9babc7054c9b428b2c79b3c24e94d7
Issue-ID: VFC-438
Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
Diffstat (limited to 'gvnfmadapter')
-rw-r--r-- | gvnfmadapter/driver/interfaces/views.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gvnfmadapter/driver/interfaces/views.py b/gvnfmadapter/driver/interfaces/views.py index a96a510..04fe58e 100644 --- a/gvnfmadapter/driver/interfaces/views.py +++ b/gvnfmadapter/driver/interfaces/views.py @@ -34,10 +34,11 @@ def instantiate_vnf(request, *args, **kwargs): try: logger.debug("instantiate_vnf--post::> %s" % request.data) logger.info("Create vnf begin!") - input_data = {} - input_data["vnfdId"] = ignorcase_get(request.data, "vnfDescriptorId") - input_data["vnfInstanceName"] = ignorcase_get(request.data, "vnfInstanceName") - input_data["vnfInstanceDescription"] = ignorcase_get(request.data, "vnfInstanceDescription") + input_data = { + "vnfdId": ignorcase_get(request.data, "vnfDescriptorId"), + "vnfInstanceName": ignorcase_get(request.data, "vnfInstanceName"), + "vnfInstanceDescription": ignorcase_get(request.data, "vnfInstanceDescription") + } vnfm_id = ignorcase_get(kwargs, "vnfmid") logger.debug("do_createvnf: request data=[%s],input_data=[%s],vnfm_id=[%s]", request.data, input_data, vnfm_id) resp = do_createvnf(vnfm_id, input_data) @@ -46,10 +47,11 @@ def instantiate_vnf(request, *args, **kwargs): logger.debug("Instantiate vnf start!") vnfInstanceId = resp["vnfInstanceId"] - input_data = {} - input_data["flavourId"] = ignorcase_get(request.data, "flavourId") - input_data["extVirtualLinks"] = ignorcase_get(request.data, "extVirtualLink") - input_data["additionalParams"] = ignorcase_get(request.data, "additionalParam") + input_data = { + "flavourId": ignorcase_get(request.data, "flavourId"), + "extVirtualLinks": ignorcase_get(request.data, "extVirtualLink"), + "additionalParams": ignorcase_get(request.data, "additionalParam") + } logger.debug("do_instvnf: vnfInstanceId=[%s],request data=[%s],input_data=[%s],vnfm_id=[%s]", vnfInstanceId, request.data, input_data, vnfm_id) resp = do_instvnf(vnfInstanceId, vnfm_id, input_data) |