checkbgpsession_state
October 31, 2022 ยท View on GitHub
Overview
Check whether the state of the bgp session matches a specified state for a list of bgp neighbors.
Examples
def test_fun(duthosts, rand_one_dut_hostname):
duthost = duthosts[rand_one_dut_hostname]
bgp_info = duthost.get_bgp_session_state([unicode("10.0.0.51"), unicode("10.0.0.53")])
Arguments
neigh_ips- List of neighbor BGP IPs that are being checked against thestateparam- Required:
True - Type:
List- Element-Type:
unicode
- Element-Type:
- Required:
state- What state the BGP sessions are expected to be in- Required:
False - Type:
String - Default:
established
- Required:
Expected Output
True if all neighbors in neigh_ips match the state param, False otherwise