|
| 1 | +# bgp_facts |
| 2 | + |
| 3 | +- [Overview](#overview) |
| 4 | +- [Examples](#examples) |
| 5 | +- [Arguments](#arguments) |
| 6 | +- [Expected Output](#expected-output) |
| 7 | + |
| 8 | +## Overview |
| 9 | +Retreives BGP information using Quagga |
| 10 | + |
| 11 | +## Examples |
| 12 | +``` |
| 13 | +def test_fun(duthosts, rand_one_dut_hostname): |
| 14 | + duthost = duthosts[rand_one_dut_hostname] |
| 15 | +
|
| 16 | + bgp_facts = duthost.bgp_facts() |
| 17 | +``` |
| 18 | + |
| 19 | +## Arguments |
| 20 | +- `nump_npus` - number of network processing units |
| 21 | + - Required: `False` |
| 22 | + - Type: `Integer` |
| 23 | + - Default: `1` |
| 24 | +- `instance_id` - ASIC instance id for desired ASIC (for multi-asic devies) |
| 25 | + - Required: `False` |
| 26 | + - Type: `Integer` |
| 27 | + |
| 28 | +## Expected Output |
| 29 | +Returns dictionary with information on BGP configuration. The dictionary hierarchy is described below, with each indentation describing a sub-dictionary: |
| 30 | + |
| 31 | +- `ansible_facts` |
| 32 | + - `bgp_statistics` - Dictionary describing general BGP stats |
| 33 | + - `ipv4_idle` - Number of ipv4 BGP neighbors in an idle state |
| 34 | + - `ipv6_idle` - Number of ipv6 BGP neighbors in an idle state |
| 35 | + - `ipv4_admin_down` - Number of ipv4 BGP neighbors with a `down` admin state |
| 36 | + - `ipv6_admin_down` - Number of ipv6 BGP neighbors with a `down` admin state |
| 37 | + - `ipv4` - Number of ipv4 BGP neighbors |
| 38 | + - `ipv6` - Number of ipv6 neighbors |
| 39 | + - `bgp_neighbors` - Dictionary that maps BGP ip to information on neighbor |
| 40 | + - `{BGP_IP}` - Dictionary that provides information on specified neighbor |
| 41 | + - `remote AS` - neighbor's remote ASN |
| 42 | + - `description` - Neighbor name |
| 43 | + - `admin` - admin status |
| 44 | + - `accepted prefixes` - number of accepted prefixes |
| 45 | + - `message statistics` - Dictionary with statistics on messages send and received |
| 46 | + - `Capability` |
| 47 | + - `rcvd` - Number of received capability messages |
| 48 | + - `sent` - Number of sent capability messages |
| 49 | + - `Notifications` |
| 50 | + - `rcvd` - Number of received notifications messages |
| 51 | + - `sent` - Number of sent notifications messages |
| 52 | + - `Route Refresh` |
| 53 | + - `rcvd` - Number of received route refresh messages |
| 54 | + - `sent` - Number of sent route refresh messages |
| 55 | + - `Keepalives` |
| 56 | + - `rcvd` - Number of received keepalive messages |
| 57 | + - `sent` - Number of sent keepalive messages |
| 58 | + - `Opens` |
| 59 | + - `rcvd` - Number of received open messages |
| 60 | + - `sent` - Number of sent open messages |
| 61 | + - `Total` |
| 62 | + - `rcvd` - Total number of received messages |
| 63 | + - `sent` - Total number of messages sent |
| 64 | + - `capabilities` - Dictioanry mapping capability message to how many times it was sent |
| 65 | + - `{CAPABILITY_MSG}` - number of times specified message was sent |
| 66 | + - `peer group` - name of peer group |
| 67 | + - `state` - state of BGP neighbor |
| 68 | + - `connections established` - Number of connections established by neighbor |
| 69 | + - `connections dropped` - Number of connections dropped by neighbor |
| 70 | + - `mrai` - Minimal route advertisement interval |
| 71 | + - `ip_version`: type of ip version for neighbor |
| 72 | + - `local AS`: local AS number |
| 73 | + - `remote routerid` |
0 commit comments