Provides BGP routing info from Quagga using VTYSH cli.
def test_fun(duthosts, rand_one_dut_hostname, tbinfo):
duthost = duthosts[rand_one_dut_hostname]
bgp_route_neigh = duthost.bgp_route(neighbor="10.0.0.59", direction="adv")
-
direction
- to restict retrieving bgp neighbor advertise or received routes- Required:
False
, unlessneighbor
argument is provided. - Choices:
adv
- Advertisingrec
- Receiving
- Type:
String
- Required:
-
neighbor
- restirct retrieving routing information from bgp neighbor. bgp neighbor address is expected to follow this option- Required:
False
- Default:
None
- Type:
String
- Required:
-
prefix
- bgp prefix to be retrieved from show ip bgp- Required:
False
- Default:
None
- Type:
String
- Required:
Returns a dictionary containing information on the bgp route given the provided arguments.The dictionary hierarchy is described below, with each indentation describing a sub-dictionary:
ansible_facts
- Route map infobgp_route_neiadv
- BGP route information for advertised routes. Only present ifneighbor
anddirection='adv'
is specified.neighbor
- BGP IP for chosen neighbor{route-ip}
- IP for node in route tableorigin
- origin source for routei
for Internal Gateway Protocol ore
for External Gateway Protocolweigh
- tie breaker used to determine best pathnexthop
- nexthop configured for neighboraspath
- aspath configured for neighbor