當前位置: 首頁>>代碼示例>>Python>>正文


Python generator_introspect_utils.VerificationGenerator類代碼示例

本文整理匯總了Python中generator_introspect_utils.VerificationGenerator的典型用法代碼示例。如果您正苦於以下問題:Python VerificationGenerator類的具體用法?Python VerificationGenerator怎麽用?Python VerificationGenerator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了VerificationGenerator類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: verify_vm_uve_cache

 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
開發者ID:anju078,項目名稱:contrail-controller,代碼行數:28,代碼來源:generator_fixture.py

示例2: verify_on_setup

 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"
開發者ID:npchandran,項目名稱:contrail-controller,代碼行數:8,代碼來源:generator_fixture.py

示例3: verify_on_setup

 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"
開發者ID:cijohnson,項目名稱:contrail-controller,代碼行數:9,代碼來源:generator_fixture.py


注:本文中的generator_introspect_utils.VerificationGenerator類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。