Refactor vim api call common logic
[vfc/gvnfm/vnflcm.git] / 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,