Changes in vimconn_vmware.py:Fixed Bug ID 120 VMWARE Connector: Alter ‘instance-scena... 40/840/1
authorbhangare <sbhangare@vmware.com>
Sat, 24 Dec 2016 10:54:51 +0000 (02:54 -0800)
committerbhangare <sbhangare@vmware.com>
Tue, 27 Dec 2016 09:43:35 +0000 (01:43 -0800)
Signed-off-by: bhangare <sbhangare@vmware.com>
vimconn_vmware.py

index 02222a8..3ec4d14 100644 (file)
@@ -620,7 +620,7 @@ class vimconnector(vimconn.vimconnector):
                 errormsg = ''
                 vcd_network = self.get_vcd_network(network_uuid=net)
                 if vcd_network is not None and vcd_network:
-                    if vcd_network['status'] == 1:
+                    if vcd_network['status'] == '1':
                         status = 'ACTIVE'
                     else:
                         status = 'DOWN'
@@ -629,7 +629,7 @@ class vimconnector(vimconn.vimconnector):
                     errormsg = 'Network not found.'
 
                 dict_entry[net] = {'status': status, 'error_msg': errormsg,
-                                   'vm_info': yaml.safe_dump(vcd_network)}
+                                   'vim_info': yaml.safe_dump(vcd_network)}
         except:
             self.logger.debug("Error in refresh_nets_status")
             self.logger.debug(traceback.format_exc())
@@ -2426,4 +2426,4 @@ class vimconnector(vimconn.vimconnector):
             if response.status_code == requests.codes.ok:
                 return response.content
 
-        return None
\ No newline at end of file
+        return None