Check whether the state of the bgp session matches a specified state for a list of bgp neighbors.
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")])
neigh_ips
- List of neighbor BGP IPs that are being checked against thestate
param- 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:
True
if all neighbors in neigh_ips
match the state
param, False
otherwise