예제 #1
0
def reboot_agents(sleep_secs):
    stop_midolman_agents()
    await_ports(active=False)
    check_all_midolman_hosts(alive=False)

    time.sleep(sleep_secs)

    start_midolman_agents()
    await_ports(active=True)
    check_all_midolman_hosts(alive=True)
예제 #2
0
def reboot_agents(sleep_secs):
    stop_midolman_agents()
    await_ports(active=False)
    check_all_midolman_hosts(alive=False)

    time.sleep(sleep_secs)

    start_midolman_agents()
    await_ports(active=True)
    check_all_midolman_hosts(alive=True)
예제 #3
0
def reboot_agents(sleep_secs):
    midonet_api = get_midonet_api()
    stop_midolman_agents()
    time.sleep(5)
    check_all_midolman_hosts(midonet_api, alive=False)

    time.sleep(sleep_secs)

    start_midolman_agents()
    time.sleep(30)
    check_all_midolman_hosts(midonet_api, alive=True)
예제 #4
0
def reboot_agents(sleep_secs):
    midonet_api = get_midonet_api()
    stop_midolman_agents()
    time.sleep(5)
    check_all_midolman_hosts(midonet_api, alive=False)

    time.sleep(sleep_secs)

    start_midolman_agents()
    time.sleep(30)
    check_all_midolman_hosts(midonet_api, alive=True)
예제 #5
0
def setup():
    # disable ipv6 to avoid mac learning with automatically sent
    # ipv6 packets e.g. autoconf upon "ip link set up"
    subprocess.call(
        ['sysctl -w net.ipv6.conf.default.disable_ipv6=1 >/dev/null'],
        shell=True)

    check_all_midolman_hosts(True)

    clear_physical_topology()
    clear_virtual_topology_for_tenants(
        tenant_name_prefix=TEST_TENANT_NAME_PREFIX)
예제 #6
0
def setup():
    # disable ipv6 to avoid mac learning with automatically sent
    # ipv6 packets e.g. autoconf upon "ip link set up"
    subprocess.call(
        ['sysctl -w net.ipv6.conf.default.disable_ipv6=1 >/dev/null'],
        shell=True)

    check_all_midolman_hosts(True)

    clear_physical_topology()
    clear_virtual_topology_for_tenants(
            tenant_name_prefix=TEST_TENANT_NAME_PREFIX)
예제 #7
0
def setup_package():
    """
    Setup method at the tests module level (init)
    :return:
    """
    # Read configuration
    conf_file = os.getenv('MDTS_CONF_FILE', 'mdts.conf')
    config = SafeConfigParser()
    config.read(conf_file)

    # TODO: Check all services (not only midolman) are online

    check_all_midolman_hosts(True)
예제 #8
0
def test_host_status():
    """
    Title: Test host status update

    Scenario:
    When: The test starts up,
    Then: check if all Midolman agents are alive,
    Then: stops all Midolman agents,
    Then: check if all Midolman agents are now dead,
    Then: restarts all Midolman agetns,
    And: check again if all Midolman agents are alive,
    """
    check_all_midolman_hosts(alive=True)

    stop_midolman_agents()
    time.sleep(5)
    check_all_midolman_hosts(alive=False)

    start_midolman_agents()
    time.sleep(30)
    check_all_midolman_hosts(alive=True)
def test_host_status():
    """
    Title: Test host status update

    Scenario:
    When: The test starts up,
    Then: check if all Midolman agents are alive,
    Then: stops all Midolman agents,
    Then: check if all Midolman agents are now dead,
    Then: restarts all Midolman agetns,
    And: check again if all Midolman agents are alive,
    """
    check_all_midolman_hosts(alive=True)

    stop_midolman_agents()
    time.sleep(5)
    check_all_midolman_hosts(alive=False)

    start_midolman_agents()
    time.sleep(30)
    check_all_midolman_hosts(alive=True)