本文整理汇总了Python中cfme.common.provider.BaseProvider类的典型用法代码示例。如果您正苦于以下问题:Python BaseProvider类的具体用法?Python BaseProvider怎么用?Python BaseProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BaseProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: has_no_infra_providers
def has_no_infra_providers():
""" Clears all infrastructure providers from an appliance
This is a destructive fixture. It will clear all infrastructure managements systems from
the current appliance.
"""
BaseProvider.clear_providers_by_class(InfraProvider, validate=True)
示例2: load_details
def load_details(self, refresh=False):
"""Call super class `load_details` and load `db_id` if not set"""
BaseProvider.load_details(self, refresh=refresh)
if not self.db_id or refresh:
tmp_provider = _db_select_query(
name=self.name, type='ManageIQ::Providers::Hawkular::MiddlewareManager').first()
self.db_id = tmp_provider.id
示例3: has_no_providers
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()
示例4: has_no_containers_providers
def has_no_containers_providers():
""" Clears all containers providers from an appliance
This is a destructive fixture. It will clear all container managements systems from
the current appliance.
"""
BaseProvider.clear_providers_by_class(ContainersProvider, validate=True)
示例5: has_no_container_providers
def has_no_container_providers():
""" Clears all container providers from an appliance
This is a destructive fixture. It will clear all container managements systems from
the current appliance.
"""
BaseProvider.clear_provider_by_type(BaseProvider.type_mapping['container'], validate=True)
示例6: handle_provider
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()
示例7: test_providers_discovery
def test_providers_discovery(request, provider):
"""Tests provider discovery
Metadata:
test_flag: crud
"""
provider.discover()
flash.assert_message_match('Infrastructure Providers: Discovery successfully initiated')
request.addfinalizer(lambda: BaseProvider.clear_provider_by_type(InfraProvider))
wait_for_a_provider()
示例8: a_provider
def a_provider(request):
BaseProvider.clear_providers()
prov_filter = ProviderFilter(classes=[InfraProvider])
return setup_one_or_skip(request, filters=[prov_filter])
示例9: clean_setup_provider
def clean_setup_provider(request, provider):
BaseProvider.clear_providers()
setup_or_skip(request, provider)
yield
BaseProvider.clear_providers()
示例10: clean_setup_provider
def clean_setup_provider(request, has_no_providers_modscope, setup_provider_modscope,
provider):
yield
BaseProvider.clear_providers()
示例11: has_no_providers_modscope
def has_no_providers_modscope(request):
BaseProvider.clear_providers()
示例12: has_no_middleware_providers
def has_no_middleware_providers():
"""Clear all middleware providers."""
BaseProvider.clear_providers_by_class(MiddlewareProvider, validate=True)
示例13: has_no_providers
def has_no_providers(request):
BaseProvider.clear_providers()
示例14: has_no_middleware_providers
def has_no_middleware_providers():
"""Clear all middleware providers."""
BaseProvider.clear_provider_by_type(BaseProvider.type_mapping['middleware'], validate=True)
示例15: any_provider_session
def any_provider_session():
BaseProvider.clear_providers() # To make it clean
providers.setup_a_provider(validate=True, check_existing=True)