Retreives BGP information using Quagga
def test_fun(duthosts, rand_one_dut_hostname):
duthost = duthosts[rand_one_dut_hostname]
bgp_facts = duthost.bgp_facts()
nump_npus
- number of network processing units- Required:
False
- Type:
Integer
- Default:
1
- Required:
instance_id
- ASIC instance id for desired ASIC (for multi-asic devies)- Required:
False
- Type:
Integer
- Required:
Returns dictionary with information on BGP configuration. The dictionary hierarchy is described below, with each indentation describing a sub-dictionary:
ansible_facts
bgp_statistics
- Dictionary describing general BGP statsipv4_idle
- Number of ipv4 BGP neighbors in an idle stateipv6_idle
- Number of ipv6 BGP neighbors in an idle stateipv4_admin_down
- Number of ipv4 BGP neighbors with adown
admin stateipv6_admin_down
- Number of ipv6 BGP neighbors with adown
admin stateipv4
- Number of ipv4 BGP neighborsipv6
- Number of ipv6 neighbors
bgp_neighbors
- Dictionary that maps BGP ip to information on neighbor{BGP_IP}
- Dictionary that provides information on specified neighborremote AS
- neighbor's remote ASNdescription
- Neighbor nameadmin
- admin statusaccepted prefixes
- number of accepted prefixesmessage statistics
- Dictionary with statistics on messages send and receivedCapability
rcvd
- Number of received capability messagessent
- Number of sent capability messages
Notifications
rcvd
- Number of received notifications messagessent
- Number of sent notifications messages
Route Refresh
rcvd
- Number of received route refresh messagessent
- Number of sent route refresh messages
Keepalives
rcvd
- Number of received keepalive messagessent
- Number of sent keepalive messages
Opens
rcvd
- Number of received open messagessent
- Number of sent open messages
Total
rcvd
- Total number of received messagessent
- Total number of messages sent
capabilities
- Dictioanry mapping capability message to how many times it was sent{CAPABILITY_MSG}
- number of times specified message was sent
peer group
- name of peer groupstate
- state of BGP neighborconnections established
- Number of connections established by neighborconnections dropped
- Number of connections dropped by neighbormrai
- Minimal route advertisement intervalip_version
: type of ip version for neighborlocal AS
: local AS numberremote routerid