Exemplo n.º 1
0
def test_standby_tor_reboot_downstream_active(
        upper_tor_host, lower_tor_host, send_t1_to_server_with_action,
        toggle_all_simulator_ports_to_upper_tor, reboot_tor,
        wait_for_device_reachable):
    """
    Send downstream traffic to the active ToR and reboot the standby ToR.
    Confirm no switchover occurred and no disruption
    """
    send_t1_to_server_with_action(upper_tor_host,
                                  verify=True,
                                  action=lambda: reboot_tor(lower_tor_host))
    wait_for_device_reachable(lower_tor_host)
    verify_tor_states(expected_active_host=upper_tor_host,
                      expected_standby_host=lower_tor_host)
Exemplo n.º 2
0
def test_active_tor_reboot_downstream_standby(
        upper_tor_host, lower_tor_host, send_t1_to_server_with_action,
        toggle_all_simulator_ports_to_upper_tor, reboot_tor,
        wait_for_device_reachable):
    """
    Send downstream traffic to the standby ToR and reboot the active ToR.
    Confirm switchover occurred and disruption lasts < 1 second
    """
    send_t1_to_server_with_action(lower_tor_host,
                                  verify=True,
                                  delay=MUX_SIM_ALLOWED_DISRUPTION_SEC,
                                  action=lambda: reboot_tor(upper_tor_host))
    wait_for_device_reachable(upper_tor_host)
    verify_tor_states(expected_active_host=lower_tor_host,
                      expected_standby_host=upper_tor_host)
Exemplo n.º 3
0
def test_active_tor_reboot_upstream(upper_tor_host, lower_tor_host,
                                    send_server_to_t1_with_action,
                                    toggle_all_simulator_ports_to_upper_tor,
                                    reboot_tor, wait_for_device_reachable):
    """
    Send upstream traffic and reboot the active ToR. Confirm switchover
    occurred and disruption lasts < 1 second
    """
    send_server_to_t1_with_action(upper_tor_host,
                                  verify=True,
                                  delay=1,
                                  action=lambda: reboot_tor(upper_tor_host))
    wait_for_device_reachable(upper_tor_host)
    verify_tor_states(expected_active_host=lower_tor_host,
                      expected_standby_host=upper_tor_host)
Exemplo n.º 4
0
def test_standby_tor_reboot_upstream(upper_tor_host, lower_tor_host,
                                     send_server_to_t1_with_action,
                                     toggle_all_simulator_ports_to_upper_tor,
                                     toggle_lower_tor_pdu,
                                     wait_for_device_reachable):
    """
    Send upstream traffic and reboot the standby ToR. Confirm no switchover
    occurred and no disruption
    """
    send_server_to_t1_with_action(upper_tor_host,
                                  verify=True,
                                  action=toggle_lower_tor_pdu,
                                  stop_after=60)
    wait_for_device_reachable(lower_tor_host)
    verify_tor_states(expected_active_host=upper_tor_host,
                      expected_standby_host=lower_tor_host)
Exemplo n.º 5
0
def test_active_tor_reboot_upstream(upper_tor_host, lower_tor_host,
                                    send_server_to_t1_with_action,
                                    toggle_all_simulator_ports_to_upper_tor,
                                    toggle_upper_tor_pdu,
                                    wait_for_device_reachable):
    """
    Send upstream traffic and reboot the active ToR. Confirm switchover
    occurred and disruption lasts < 1 second
    """
    send_server_to_t1_with_action(upper_tor_host,
                                  verify=True,
                                  delay=MUX_SIM_ALLOWED_DISRUPTION_SEC,
                                  action=toggle_upper_tor_pdu,
                                  stop_after=60)
    wait_for_device_reachable(upper_tor_host)
    verify_tor_states(expected_active_host=lower_tor_host,
                      expected_standby_host=upper_tor_host)