Exemplo n.º 1
0
def test_standby_tor_kill_bgpd_upstream(
        upper_tor_host, lower_tor_host, send_server_to_t1_with_action,
        toggle_all_simulator_ports_to_upper_tor, kill_bgpd):
    '''
    Case: Server -> ToR -> T1 (Standby ToR BGP Down)
    Action: Shutdown all BGP sessions on the standby ToR
    Expectation:
        Verify packet flow after the standby ToR (B) loses BGP sessions
        ToR A DBs indicate active, ToR B DBs indicate standby
        T1 switch receives packet from the active ToR (A), and not the standby ToR (B)
    '''
    send_server_to_t1_with_action(upper_tor_host,
                                  verify=True,
                                  action=lambda: kill_bgpd(lower_tor_host))
    verify_tor_states(expected_active_host=upper_tor_host,
                      expected_standby_host=lower_tor_host)
Exemplo n.º 2
0
def test_standby_tor_kill_bgpd_downstream_active(
        upper_tor_host, lower_tor_host, send_t1_to_server_with_action,
        toggle_all_simulator_ports_to_upper_tor, kill_bgpd,
        tunnel_traffic_monitor):
    '''
    Case: T1 -> Active ToR -> Server (Standby ToR BGP Down)
    Action: Shutdown all BGP sessions on the standby ToR
    Expectation:
        Verify packet flow after the standby ToR (B) loses BGP sessions
        T1 switch receives no IP-in-IP packet; server receives packet
    '''
    with tunnel_traffic_monitor(lower_tor_host, existing=False):
        send_t1_to_server_with_action(upper_tor_host,
                                      verify=True,
                                      action=lambda: kill_bgpd(lower_tor_host))
    verify_tor_states(expected_active_host=upper_tor_host,
                      expected_standby_host=lower_tor_host)
Exemplo n.º 3
0
def test_active_tor_kill_bgpd_downstream_standby(
        upper_tor_host, lower_tor_host, send_t1_to_server_with_action,
        toggle_all_simulator_ports_to_upper_tor, kill_bgpd,
        tunnel_traffic_monitor):
    '''
    Case: T1 -> Standby ToR -> Server (Active ToR BGP Down)
    Action: Shutdown all BGP sessions on the active ToR
    Expectation:
        Verify packet flow after the active ToR (A) loses BGP sessions
        Verify ToR A standby, ToR B active
        Verify traffic interruption is < 1 second
    '''
    send_t1_to_server_with_action(lower_tor_host,
                                  verify=True,
                                  delay=MUX_SIM_ALLOWED_DISRUPTION_SEC,
                                  action=lambda: kill_bgpd(upper_tor_host))
    verify_tor_states(expected_active_host=lower_tor_host,
                      expected_standby_host=upper_tor_host)
Exemplo n.º 4
0
def test_active_tor_kill_bgpd_upstream(upper_tor_host, lower_tor_host,
                                       send_server_to_t1_with_action,
                                       toggle_all_simulator_ports_to_upper_tor,
                                       kill_bgpd):
    '''
    Case: Server -> ToR -> T1 (Active ToR BGP Down)
    Action: Shutdown all BGP sessions on the active ToR
    Expectation:
        Verify packet flow after the active ToR (A) loses BGP sessions
        ToR A DBs indicate standby, ToR B DBs indicate active
        T1 switch receives packet from the initial standby ToR (B) and not the active ToR (A)
        Verify traffic interruption < threshold
    '''
    send_server_to_t1_with_action(upper_tor_host,
                                  verify=True,
                                  delay=MUX_SIM_ALLOWED_DISRUPTION_SEC,
                                  action=lambda: kill_bgpd(upper_tor_host))
    verify_tor_states(expected_active_host=lower_tor_host,
                      expected_standby_host=upper_tor_host)
Exemplo n.º 5
0
def test_active_tor_kill_bgpd_downstream_standby(
        upper_tor_host, lower_tor_host, send_t1_to_server_with_action,
        toggle_all_simulator_ports_to_upper_tor, kill_bgpd,
        tunnel_traffic_monitor):
    '''
    Case: T1 -> Standby ToR -> Server (Active ToR BGP Down)
    Action: Shutdown all BGP sessions on the active ToR
    Expectation:
        Verify packet flow after the active ToR (A) loses BGP sessions
        T1 switch continues to receive IP-in-IP traffic, from lower to upper ToR
        No switchover occurs
        verify traffic interruption is < 1 second
    '''
    with tunnel_traffic_monitor(lower_tor_host, existing=True):
        send_t1_to_server_with_action(lower_tor_host,
                                      verify=True,
                                      delay=1,
                                      action=lambda: kill_bgpd(upper_tor_host))
    verify_tor_states(expected_active_host=upper_tor_host,
                      expected_standby_host=lower_tor_host)