예제 #1
0
def test_standby_tor_heartbeat_failure_downstream_standby(
        toggle_all_simulator_ports_to_upper_tor, upper_tor_host,
        lower_tor_host, send_t1_to_server_with_action, shutdown_tor_heartbeat):
    """
    Send downstream traffic from T1 to the standby ToR and stop the LinkProber module on the standby ToR.
    Confirm no switchover and no disruption.
    """
    send_t1_to_server_with_action(
        lower_tor_host,
        verify=True,
        action=lambda: shutdown_tor_heartbeat(lower_tor_host))
    verify_tor_states(expected_active_host=upper_tor_host,
                      expected_standby_host=lower_tor_host)
예제 #2
0
def test_active_tor_heartbeat_failure_downstream_standby(
        toggle_all_simulator_ports_to_upper_tor, upper_tor_host,
        lower_tor_host, send_t1_to_server_with_action, shutdown_tor_heartbeat):
    """
    Send downstream traffic from T1 to the standby ToR and stop the LinkProber module on the active ToR.
    Confirm switchover and disruption lasts < 1 second.
    """
    send_t1_to_server_with_action(
        lower_tor_host,
        verify=True,
        delay=MUX_SIM_ALLOWED_DISRUPTION_SEC,
        action=lambda: shutdown_tor_heartbeat(upper_tor_host))
    verify_tor_states(expected_active_host=lower_tor_host,
                      expected_standby_host=upper_tor_host)
def test_active_tor_heartbeat_failure_upstream(
        toggle_all_simulator_ports_to_upper_tor, upper_tor_host,
        lower_tor_host, send_server_to_t1_with_action, shutdown_tor_heartbeat):
    """
    Send upstream traffic and stop the LinkProber module on the active ToR.
    Confirm switchover and disruption lasts < 1 second.
    """
    send_server_to_t1_with_action(
        upper_tor_host,
        verify=True,
        delay=1,
        action=lambda: shutdown_tor_heartbeat(upper_tor_host))
    verify_tor_states(expected_active_host=lower_tor_host,
                      expected_standby_host=upper_tor_host)