Refactor vim api call common logic
authorfujinhua <fu.jinhua@zte.com.cn>
Tue, 21 Feb 2017 05:56:35 +0000 (13:56 +0800)
committerfujinhua <fu.jinhua@zte.com.cn>
Tue, 21 Feb 2017 05:56:35 +0000 (13:56 +0800)
Change-Id: I4abbc394c3fc0db4f52eab6d5492823b9bf633ab
Issue-Id: GVNFM-30
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
lcm/lcm/pub/vimapi/api.py

index 721ab70..51d00e4 100644 (file)
@@ -20,7 +20,7 @@ from .exceptions import VimException
 VIM_DRIVER_BASE_URL = "openoapi/multivim/v1"
 
 def call(vim_id, tenant_id, res, method, data=''):
-    if data and not isinstance(a, (str, unicode)):
+    if data and not isinstance(data, (str, unicode)):
         data = json.JSONEncoder().encode(data)
     url = "{base_url}/{vim_id}{tenant_id}/{res}".format(
         base_url=VIM_DRIVER_BASE_URL,