def providers():
    """Ensure the infra providers are set up and get list of hosts"""
    try:
        setup_a_provider(prov_class="infra")
    except Exception:
        pytest.skip("It's not possible to set up any providers, therefore skipping")
    pytest.sel.force_navigate("infrastructure_providers")
    search.ensure_no_filter_applied()
Exemple #2
0
def vms():
    """Ensure the infra providers are set up and get list of vms"""
    sel.force_navigate("infrastructure_providers")
    for provider in providers.setup_infrastructure_providers():
        provider.validate()
    sel.force_navigate("infra_vms")
    search.ensure_no_filter_applied()
    return virtual_machines.get_all_vms()
Exemple #3
0
def hosts():
    """Ensure the infra providers are set up and get list of hosts"""
    sel.force_navigate("infrastructure_providers")
    for provider in providers.setup_infrastructure_providers():
        provider.validate()
    sel.force_navigate("infrastructure_hosts")
    search.ensure_no_filter_applied()
    return host.get_all_hosts()
def vms():
    """Ensure the infra providers are set up and get list of vms"""
    sel.force_navigate("infrastructure_providers")
    for provider in providers.setup_infrastructure_providers():
        provider.validate()
    sel.force_navigate("infra_vms")
    search.ensure_no_filter_applied()
    return virtual_machines.get_all_vms()
def hosts():
    """Ensure the infra providers are set up and get list of hosts"""
    sel.force_navigate("infrastructure_providers")
    for provider in providers.setup_infrastructure_providers():
        provider.validate()
    sel.force_navigate("infrastructure_hosts")
    search.ensure_no_filter_applied()
    return host.get_all_hosts()
def vms():
    """Ensure the infra providers are set up and get list of vms"""
    try:
        setup_a_provider(prov_class="infra", required_keys=["large"])
    except Exception:
        pytest.skip("It's not possible to set up any providers, therefore skipping")
    navigate_to(Vm, 'VMsOnly')
    search.ensure_no_filter_applied()
    return virtual_machines.get_all_vms()
def test_quick_search_without_filter(request, providers):
    pytest.sel.force_navigate("infrastructure_providers")
    search.ensure_no_filter_applied()
    assert_no_cfme_exception()
    # Make sure that we empty the regular search field after the test
    request.addfinalizer(search.ensure_normal_search_empty)
    # Filter this host only
    search.normal_search(fauxfactory.gen_alphanumeric())
    assert_no_cfme_exception()
Exemple #8
0
def test_quick_search_without_filter(request, providers):
    sel.force_navigate("infrastructure_providers")
    search.ensure_no_filter_applied()
    assert_no_cfme_exception()
    # Make sure that we empty the regular search field after the test
    request.addfinalizer(search.ensure_normal_search_empty)
    # Filter this host only
    search.normal_search(fauxfactory.gen_alphanumeric())
    assert_no_cfme_exception()
Exemple #9
0
def providers():
    """Ensure the infra providers are set up and get list of hosts"""
    try:
        setup_a_provider(prov_type="infra")
    except Exception:
        pytest.skip(
            "It's not possible to set up any providers, therefore skipping")
    sel.force_navigate("infrastructure_providers")
    search.ensure_no_filter_applied()
def vms():
    """Ensure the infra providers are set up and get list of vms"""
    try:
        setup_a_provider(prov_type="infra", required_keys="large")
    except Exception:
        pytest.skip("It's not possible to set up any providers, therefore skipping")
    sel.force_navigate("infra_vms")
    search.ensure_no_filter_applied()
    return virtual_machines.get_all_vms()
def hosts():
    """Ensure the infra providers are set up and get list of hosts"""
    try:
        setup_a_provider(prov_class="infra")
    except Exception:
        pytest.skip("It's not possible to set up any providers, therefore skipping")
    navigate_to(Host, 'All')
    search.ensure_no_filter_applied()
    return host.get_all_hosts()
def test_quick_search_without_filter(request, providers):
    sel.force_navigate("infrastructure_providers")
    search.ensure_no_filter_applied()
    assert_no_cfme_exception()
    # Make sure that we empty the regular search field after the test
    request.addfinalizer(search.ensure_normal_search_empty)
    # Filter this host only
    search.normal_search(generate_random_string())
    assert_no_cfme_exception()
def vms():
    """Ensure the infra providers are set up and get list of vms"""
    try:
        setup_a_provider(prov_type="infra", required_keys="large")
    except Exception:
        pytest.skip(
            "It's not possible to set up any providers, therefore skipping")
    pytest.sel.force_navigate("infra_vms")
    search.ensure_no_filter_applied()
    return virtual_machines.get_all_vms()
def setup_cleanup_search():
    """Navigate to InfraProvider, clear search on setup and teardown"""
    navigate_to(InfraProvider, 'All')
    search.ensure_no_filter_applied()

    yield

    # cleanup after test
    search.ensure_no_filter_applied()
    search.ensure_advanced_search_closed()
def setup_cleanup_search():
    """Navigate to InfraProvider, clear search on setup and teardown"""
    navigate_to(InfraProvider, 'All')
    search.ensure_no_filter_applied()

    yield

    # cleanup after test
    search.ensure_no_filter_applied()
    search.ensure_advanced_search_closed()
def test_quick_search_without_filter(hosts, hosts_with_vm_count, host_with_median_vm):
    sel.force_navigate("infrastructure_hosts")
    search.ensure_no_filter_applied()
    assert_no_cfme_exception()
    median_host, median_vm_count = host_with_median_vm
    # Filter this host only
    search.normal_search(median_host)
    assert_no_cfme_exception()
    # Check it is there
    all_hosts_visible = host.get_all_hosts(do_not_navigate=True)
    assert len(all_hosts_visible) == 1 and median_host in all_hosts_visible
def test_quick_search_without_filter(vms, subset_of_vms):
    sel.force_navigate("infra_vms")
    search.ensure_no_filter_applied()
    assert_no_cfme_exception()
    vm = pick(subset_of_vms, 1)[0]
    # Filter this host only
    search.normal_search(vm)
    assert_no_cfme_exception()
    # Check it is there
    all_vms_visible = virtual_machines.get_all_vms(do_not_navigate=True)
    assert len(all_vms_visible) == 1 and vm in all_vms_visible
Exemple #18
0
def test_quick_search_without_filter(vms, subset_of_vms):
    sel.force_navigate("infra_vms")
    search.ensure_no_filter_applied()
    assert_no_cfme_exception()
    vm = pick(subset_of_vms, 1)[0]
    # Filter this host only
    search.normal_search(vm)
    assert_no_cfme_exception()
    # Check it is there
    all_vms_visible = virtual_machines.get_all_vms(do_not_navigate=True)
    assert len(all_vms_visible) == 1 and vm in all_vms_visible
Exemple #19
0
def test_quick_search_without_filter(hosts, hosts_with_vm_count,
                                     host_with_median_vm):
    sel.force_navigate("infrastructure_hosts")
    search.ensure_no_filter_applied()
    assert_no_cfme_exception()
    median_host, median_vm_count = host_with_median_vm
    # Filter this host only
    search.normal_search(median_host)
    assert_no_cfme_exception()
    # Check it is there
    all_hosts_visible = host.get_all_hosts(do_not_navigate=True)
    assert len(all_hosts_visible) == 1 and median_host in all_hosts_visible
def test_quick_search_without_filter(request, hosts, hosts_with_vm_count, host_with_median_vm):
    pytest.sel.force_navigate("infrastructure_hosts")
    search.ensure_no_filter_applied()
    assert_no_cfme_exception()
    median_host, median_vm_count = host_with_median_vm
    # Make sure that we empty the regular search field after the test
    request.addfinalizer(search.ensure_normal_search_empty)
    # Filter this host only
    search.normal_search(median_host)
    assert_no_cfme_exception()
    # Check it is there
    all_hosts_visible = host.get_all_hosts(do_not_navigate=True)
    assert len(all_hosts_visible) == 1 and median_host in all_hosts_visible
Exemple #21
0
def test_quick_search_without_filter(request, hosts, hosts_with_vm_count, host_with_median_vm):
    navigate_to(Host, 'All')
    search.ensure_no_filter_applied()
    assert_no_cfme_exception()
    median_host, median_vm_count = host_with_median_vm
    # Make sure that we empty the regular search field after the test
    request.addfinalizer(search.ensure_normal_search_empty)
    # Filter this host only
    search.normal_search(median_host)
    assert_no_cfme_exception()
    # Check it is there
    all_hosts_visible = host.get_all_hosts(do_not_navigate=True)
    assert len(all_hosts_visible) == 1 and median_host in all_hosts_visible
def test_quick_search_without_filter(request, vms, subset_of_vms):
    navigate_to(Vm, 'VMsOnly')
    search.ensure_no_filter_applied()
    assert_no_cfme_exception()
    vm = sample(subset_of_vms, 1)[0]
    # Make sure that we empty the regular search field after the test
    request.addfinalizer(search.ensure_normal_search_empty)
    # Filter this host only
    search.normal_search(vm)
    assert_no_cfme_exception()
    # Check it is there
    all_vms_visible = virtual_machines.get_all_vms(do_not_navigate=True)
    assert len(all_vms_visible) == 1 and vm in all_vms_visible
def test_quick_search_without_filter(request, vms, subset_of_vms):
    sel.force_navigate("infra_vms")
    search.ensure_no_filter_applied()
    assert_no_cfme_exception()
    vm = sample(subset_of_vms, 1)[0]
    # Make sure that we empty the regular search field after the test
    request.addfinalizer(search.ensure_normal_search_empty)
    # Filter this host only
    search.normal_search(vm)
    assert_no_cfme_exception()
    # Check it is there
    all_vms_visible = virtual_machines.get_all_vms(do_not_navigate=True)
    assert len(all_vms_visible) == 1 and vm in all_vms_visible
def test_data_integrity_for_topology(test_data):
    """ This test verifies that every status box value under Containers Overview is identical to the
    number present on its page.
    """
    navigate_to(ContainersOverview, 'All')
    # We should wait ~2 seconds for the StatusBox population
    # (until we find a better solution)
    time.sleep(2)
    status_box = StatusBox(test_data.name)
    statusbox_value = int(status_box.value())
    navigate_to(test_data.object, 'All')
    if statusbox_value > 0:
        tb.select('Grid View')
        try:
            ensure_no_filter_applied()
        except NoSuchElementException:
            pass
        assert len(list(Quadicon.all())) == statusbox_value
    else:
        assert sel.is_displayed_text('No Records Found.')
def vms(a_provider):
    """Ensure the infra providers are set up and get list of vms"""
    navigate_to(Vm, 'VMsOnly')
    search.ensure_no_filter_applied()
    return virtual_machines.get_all_vms()
def vms(a_provider):
    """Ensure the infra providers are set up and get list of vms"""
    navigate_to(Vm, 'VMsOnly')
    search.ensure_no_filter_applied()
    return virtual_machines.get_all_vms()
def hosts(infra_provider, host_collection):
    navigate_to(host_collection, 'All')
    search.ensure_no_filter_applied()
    return host_collection.all(infra_provider)
def hosts(infra_provider):
    navigate_to(Host, 'All')
    search.ensure_no_filter_applied()
    return host.get_all_hosts()
def hosts(infra_provider):
    navigate_to(Host, 'All')
    search.ensure_no_filter_applied()
    return host.get_all_hosts()