本文整理匯總了Python中generator_introspect_utils.VerificationGenerator.get_uve方法的典型用法代碼示例。如果您正苦於以下問題:Python VerificationGenerator.get_uve方法的具體用法?Python VerificationGenerator.get_uve怎麽用?Python VerificationGenerator.get_uve使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類generator_introspect_utils.VerificationGenerator
的用法示例。
在下文中一共展示了VerificationGenerator.get_uve方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: verify_vm_uve_cache
# 需要導入模塊: from generator_introspect_utils import VerificationGenerator [as 別名]
# 或者: from generator_introspect_utils.VerificationGenerator import get_uve [as 別名]
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