当前位置: 首页>>代码示例>>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;未经允许,请勿转载。