-
Notifications
You must be signed in to change notification settings - Fork 559
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ios get_bgp_neighbors vrf and safi aware (#768)
* get_bgp_neighbors vrf support * afi string contains afi modifier * mocked data, minor changes * afi string with afi modifier * supported afis * mocked data * comments * typo * show arp vrf ios test * black reformated
- Loading branch information
1 parent
5ebc91b
commit 8a03992
Showing
27 changed files
with
2,392 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
test/ios/mocked_data/test_get_arp_table_with_vrf/normal/expected_result.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
[{ | ||
"interface": "Vlan20", | ||
"ip": "172.29.50.1", | ||
"mac": "84:B8:02:76:AC:0E", | ||
"age": 8.0 | ||
}, { | ||
"interface": "Vlan20", | ||
"ip": "172.29.50.2", | ||
"mac": "00:19:07:25:34:4A", | ||
"age": 221.0 | ||
}, { | ||
"interface": "Vlan20", | ||
"ip": "172.29.50.3", | ||
"mac": "00:24:F7:DD:77:41", | ||
"age": 0.0 | ||
}, { | ||
"interface": "Vlan20", | ||
"ip": "172.29.50.10", | ||
"mac": "68:05:CA:12:71:C2", | ||
"age": 37.0 | ||
}, { | ||
"interface": "Vlan41", | ||
"ip": "172.29.52.33", | ||
"mac": "84:B8:02:76:AC:0E", | ||
"age": 61.0 | ||
}, { | ||
"interface": "Vlan41", | ||
"ip": "172.29.52.34", | ||
"mac": "00:24:F7:DD:77:43", | ||
"age": 0.0 | ||
}, { | ||
"interface": "Vlan41", | ||
"ip": "172.29.52.40", | ||
"mac": "A0:99:9B:1C:DF:A7", | ||
"age": 3.0 | ||
}, { | ||
"interface": "Vlan41", | ||
"ip": "192.168.81.34", | ||
"mac": "00:24:F7:DD:77:43", | ||
"age": 0.0 | ||
}] |
9 changes: 9 additions & 0 deletions
9
...mocked_data/test_get_arp_table_with_vrf/normal/show_arp_vrf_TEST___exclude_Incomplete.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Protocol Address Age (min) Hardware Addr Type Interface | ||
Internet 172.29.50.1 8 84b8.0276.ac0e ARPA Vlan20 | ||
Internet 172.29.50.2 221 0019.0725.344a ARPA Vlan20 | ||
Internet 172.29.50.3 - 0024.f7dd.7741 ARPA Vlan20 | ||
Internet 172.29.50.10 37 6805.ca12.71c2 ARPA Vlan20 | ||
Internet 172.29.52.33 61 84b8.0276.ac0e ARPA Vlan41 | ||
Internet 172.29.52.34 - 0024.f7dd.7743 ARPA Vlan41 | ||
Internet 172.29.52.40 3 a099.9b1c.dfa7 ARPA Vlan41 | ||
Internet 192.168.81.34 - 0024.f7dd.7743 ARPA Vlan41 |
59 changes: 59 additions & 0 deletions
59
test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/expected_result.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"global": { | ||
"router_id": "192.168.0.2", | ||
"peers": { | ||
"192.168.0.1": { | ||
"local_as": 1, | ||
"remote_as": 1, | ||
"remote_id": "192.168.0.1", | ||
"is_up": true, | ||
"is_enabled": true, | ||
"description": "iBGP peer nx-osv-1", | ||
"uptime": 2202, | ||
"address_family": { | ||
"ipv4 unicast": { | ||
"received_prefixes": 2, | ||
"accepted_prefixes": 2, | ||
"sent_prefixes": 1 | ||
}, | ||
"ipv6 unicast": { | ||
"received_prefixes": 0, | ||
"accepted_prefixes": 0, | ||
"sent_prefixes": 0 | ||
}, | ||
"ipv4 multicast": { | ||
"received_prefixes": 1, | ||
"accepted_prefixes": 1, | ||
"sent_prefixes": 0 | ||
} | ||
} | ||
}, | ||
"192.168.0.3": { | ||
"local_as": 1, | ||
"remote_as": 1, | ||
"remote_id": "192.168.0.3", | ||
"is_up": true, | ||
"is_enabled": true, | ||
"description": "iBGP peer csr1000v-1", | ||
"uptime": 494, | ||
"address_family": { | ||
"ipv4 unicast": { | ||
"received_prefixes": 1, | ||
"accepted_prefixes": 1, | ||
"sent_prefixes": 1 | ||
}, | ||
"ipv6 unicast": { | ||
"received_prefixes": 2, | ||
"accepted_prefixes": 2, | ||
"sent_prefixes": 0 | ||
}, | ||
"ipv4 multicast": { | ||
"received_prefixes": 0, | ||
"accepted_prefixes": 0, | ||
"sent_prefixes": 0 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_all_summary.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
For address family: IPv4 Unicast | ||
BGP router identifier 192.168.0.2, local AS number 1 | ||
BGP table version is 25, main routing table version 25 | ||
4 network entries using 576 bytes of memory | ||
4 path entries using 320 bytes of memory | ||
3/3 BGP path/bestpath attribute entries using 456 bytes of memory | ||
0 BGP route-map cache entries using 0 bytes of memory | ||
0 BGP filter-list cache entries using 0 bytes of memory | ||
BGP using 1352 total bytes of memory | ||
BGP activity 10/3 prefixes, 18/11 paths, scan interval 60 secs | ||
|
||
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd | ||
192.168.0.1 4 1 46 46 25 0 0 00:36:42 2 | ||
192.168.0.3 4 1 18 16 25 0 0 00:08:14 1 | ||
|
||
For address family: IPv6 Unicast | ||
BGP router identifier 192.168.0.2, local AS number 1 | ||
BGP table version is 1, main routing table version 1 | ||
2 network entries using 336 bytes of memory | ||
2 path entries using 208 bytes of memory | ||
1/0 BGP path/bestpath attribute entries using 152 bytes of memory | ||
0 BGP route-map cache entries using 0 bytes of memory | ||
0 BGP filter-list cache entries using 0 bytes of memory | ||
BGP using 696 total bytes of memory | ||
BGP activity 10/3 prefixes, 18/11 paths, scan interval 60 secs | ||
|
||
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd | ||
192.168.0.1 4 1 46 46 1 0 0 00:36:42 0 | ||
192.168.0.3 4 1 18 16 1 0 0 00:08:14 2 | ||
|
||
For address family: IPv4 Multicast | ||
BGP router identifier 192.168.0.2, local AS number 1 | ||
BGP table version is 1, main routing table version 1 | ||
1 network entries using 144 bytes of memory | ||
1 path entries using 76 bytes of memory | ||
1/0 BGP path/bestpath attribute entries using 152 bytes of memory | ||
0 BGP route-map cache entries using 0 bytes of memory | ||
0 BGP filter-list cache entries using 0 bytes of memory | ||
BGP using 372 total bytes of memory | ||
BGP activity 10/3 prefixes, 18/11 paths, scan interval 60 secs | ||
|
||
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd | ||
192.168.0.1 4 1 46 46 1 0 0 00:36:42 1 | ||
192.168.0.3 4 1 18 16 1 0 0 00:08:14 0 |
1 change: 1 addition & 0 deletions
1
test/ios/mocked_data/test_get_bgp_neighbors/mcast_ipv6/show_bgp_ipv4_mdt_all_neighbors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
Oops, something went wrong.