def verify_vm_uve_cache(self, vm_id, delete=False):
     try:
         vg = VerificationGenerator('127.0.0.1', self._http_port)
         vm_uves = vg.get_uve('UveVirtualMachineAgentTrace')
     except Exception as e:
         self._logger.info('Failed to get vm uves: %s' % (e))
         return False
     else:
         if vm_uves is None:
             self._logger.info('vm uve list empty')
             return False
         self._logger.info('%s' % (str(vm_uves)))
         vm_uve = self.find_vm_entry(vm_uves, vm_id)
         if vm_uve is None:
             return False
         if delete is True:
             try:
                 return vm_uve['data']['UveVirtualMachineAgent']['deleted'] \
                                 == 'true'
             except:
                 return False
         else:
             try:
                 return vm_uve['data']['UveVirtualMachineAgent']['deleted'] \
                                == 'false'
             except:
                 return True
     return False
 def verify_vm_uve_cache(self, vm_id, delete=False):
     try:
         vg = VerificationGenerator('127.0.0.1', self._http_port)
         vm_uves = vg.get_uve('UveVirtualMachineAgent')
     except Exception as e:
         self._logger.info('Failed to get vm uves: %s' % (e))
         return False
     else:
         if vm_uves is None:
             self._logger.info('vm uve list empty')
             return False
         self._logger.info('%s' % (str(vm_uves)))
         vm_uve = self.find_vm_entry(vm_uves, vm_id)
         if vm_uve is None:
             return False
         if delete is True:
             try:
                 return vm_uve['deleted'] \
                                 == 'true'
             except:
                 return False
         else:
             try:
                 return vm_uve['deleted'] \
                                == 'false'
             except:
                 return True
     return False
 def verify_on_setup(self):
     try:
         vg = VerificationGenerator("127.0.0.1", self._http_port)
         conn_status = vg.get_collector_connection_status()
     except:
         return False
     else:
         return conn_status["status"] == "Established"
Ejemplo n.º 4
0
 def verify_on_setup(self):
     try:
         vg = VerificationGenerator('127.0.0.1', self._http_port)
         conn_status = vg.get_collector_connection_status()
     except:
         return False
     else:
         return conn_status['status'] == "Established"
 def verify_on_setup(self):
     try:
         vg = VerificationGenerator('127.0.0.1', self._http_port, \
                         self._sandesh_config)
         conn_status = vg.get_collector_connection_status()
     except:
         return False
     else:
         return conn_status['status'] == "Established"
 def verify_on_setup(self):
     try:
         vg = VerificationGenerator(socket.getfqdn("127.0.0.1"), self._http_port, \
                         self._sandesh_config)
         conn_status = vg.get_collector_connection_status()
     except:
         return False
     else:
         return conn_status['status'] == "Established"