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, unlessneighborargument 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 ifneighboranddirection='adv'is specified.neighbor- BGP IP for chosen neighbor{route-ip}- IP for node in route tableorigin- origin source for routeifor Internal Gateway Protocol orefor External Gateway Protocolweigh- tie breaker used to determine best pathnexthop- nexthop configured for neighboraspath- aspath configured for neighbor