Exemplo n.º 1
0
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)
Exemplo n.º 2
0
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()
Exemplo n.º 3
0
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)
Exemplo n.º 4
0
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)
Exemplo n.º 5
0
 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
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()
Exemplo n.º 7
0
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()
Exemplo n.º 8
0
def has_no_middleware_providers():
    """Clear all middleware providers."""
    BaseProvider.clear_providers_by_class(MiddlewareProvider, validate=True)
Exemplo n.º 9
0
def has_no_providers_modscope(request):
    BaseProvider.clear_providers()
Exemplo n.º 10
0
def has_no_providers(request):
    BaseProvider.clear_providers()
Exemplo n.º 11
0
def has_no_middleware_providers():
    """Clear all middleware providers."""
    BaseProvider.clear_provider_by_type(BaseProvider.type_mapping['middleware'], validate=True)
Exemplo n.º 12
0
def has_no_providers(request):
    BaseProvider.clear_providers()
Exemplo n.º 13
0
def has_no_providers_modscope(request):
    BaseProvider.clear_providers()
Exemplo n.º 14
0
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])
Exemplo n.º 15
0
def a_provider(request):
    BaseProvider.clear_providers()
    prov_filter = ProviderFilter(classes=[InfraProvider])
    return setup_one_or_skip(request, filters=[prov_filter])
Exemplo n.º 16
0
def clean_setup_provider(request, provider):
    BaseProvider.clear_providers()
    setup_or_skip(request, provider)
    yield
    BaseProvider.clear_providers()
Exemplo n.º 17
0
def clean_setup_provider(request, has_no_providers_modscope,
                         setup_provider_modscope, provider):
    yield
    BaseProvider.clear_providers()
def clean_setup_provider(request, provider):
    BaseProvider.clear_providers()
    setup_or_skip(request, provider)
    yield
    BaseProvider.clear_providers()
def a_provider(request):
    BaseProvider.clear_providers()
    prov_filter = ProviderFilter(classes=[InfraProvider])
    return setup_one_or_skip(request, filters=[prov_filter])
def clean_setup_provider(request, has_no_providers_modscope, setup_provider_modscope,
        provider):
    yield
    BaseProvider.clear_providers()
Exemplo n.º 21
0
def any_provider_session():
    BaseProvider.clear_providers()  # To make it clean
    providers.setup_a_provider(validate=True, check_existing=True)
def delete_providers_after_test():
    yield
    BaseProvider.clear_provider_by_type(InfraProvider)
Exemplo n.º 23
0
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])