本文整理匯總了Python中cfme.common.provider.BaseProvider.clear_providers方法的典型用法代碼示例。如果您正苦於以下問題:Python BaseProvider.clear_providers方法的具體用法?Python BaseProvider.clear_providers怎麽用?Python BaseProvider.clear_providers使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類cfme.common.provider.BaseProvider
的用法示例。
在下文中一共展示了BaseProvider.clear_providers方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: has_no_providers
# 需要導入模塊: from cfme.common.provider import BaseProvider [as 別名]
# 或者: from cfme.common.provider.BaseProvider import clear_providers [as 別名]
def has_no_providers():
""" Clears all management systems from an applicance
This is a destructive fixture. It will clear all managements systems from
the current appliance.
"""
BaseProvider.clear_providers()
示例2: handle_provider
# 需要導入模塊: from cfme.common.provider import BaseProvider [as 別名]
# 或者: from cfme.common.provider.BaseProvider import clear_providers [as 別名]
def handle_provider(provider):
try:
BaseProvider.clear_providers()
providers.setup_provider(provider.key)
except FlashMessageException as e:
e.skip_and_log("Provider failed to set up")
else:
yield
finally:
BaseProvider.clear_providers()
示例3: clean_setup_provider
# 需要導入模塊: from cfme.common.provider import BaseProvider [as 別名]
# 或者: from cfme.common.provider.BaseProvider import clear_providers [as 別名]
def clean_setup_provider(request, has_no_providers_modscope, setup_provider_modscope,
provider):
yield
BaseProvider.clear_providers()
示例4: clean_setup_provider
# 需要導入模塊: from cfme.common.provider import BaseProvider [as 別名]
# 或者: from cfme.common.provider.BaseProvider import clear_providers [as 別名]
def clean_setup_provider(request, provider):
BaseProvider.clear_providers()
setup_or_skip(request, provider)
yield
BaseProvider.clear_providers()
示例5: has_no_providers_modscope
# 需要導入模塊: from cfme.common.provider import BaseProvider [as 別名]
# 或者: from cfme.common.provider.BaseProvider import clear_providers [as 別名]
def has_no_providers_modscope(request):
BaseProvider.clear_providers()
示例6: has_no_providers
# 需要導入模塊: from cfme.common.provider import BaseProvider [as 別名]
# 或者: from cfme.common.provider.BaseProvider import clear_providers [as 別名]
def has_no_providers(request):
BaseProvider.clear_providers()
示例7: a_provider
# 需要導入模塊: from cfme.common.provider import BaseProvider [as 別名]
# 或者: from cfme.common.provider.BaseProvider import clear_providers [as 別名]
def a_provider(request):
BaseProvider.clear_providers()
not_scvmm = ProviderFilter(classes=[SCVMMProvider],
inverted=True) # scvmm doesn't provide events
all_prov = ProviderFilter(classes=[InfraProvider])
return setup_one_or_skip(request, filters=[not_scvmm, all_prov])
示例8: any_provider_session
# 需要導入模塊: from cfme.common.provider import BaseProvider [as 別名]
# 或者: from cfme.common.provider.BaseProvider import clear_providers [as 別名]
def any_provider_session():
BaseProvider.clear_providers() # To make it clean
providers.setup_a_provider(validate=True, check_existing=True)
示例9: a_provider
# 需要導入模塊: from cfme.common.provider import BaseProvider [as 別名]
# 或者: from cfme.common.provider.BaseProvider import clear_providers [as 別名]
def a_provider(request):
BaseProvider.clear_providers()
prov_filter = ProviderFilter(classes=[InfraProvider])
return setup_one_or_skip(request, filters=[prov_filter])