-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for ShowBgpAddressFamily with arguments
- Loading branch information
Showing
3 changed files
with
287 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
...enie/libs/parser/iosxr/tests/ShowBgpAddressFamily/cli/equal/golden_output2_arguments.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,5 @@ | ||
{ | ||
"address_family": "ipv6 all", | ||
"community": "1234:1234", | ||
"exact_match": "exact_match" | ||
} |
240 changes: 240 additions & 0 deletions
240
src/genie/libs/parser/iosxr/tests/ShowBgpAddressFamily/cli/equal/golden_output2_expected.py
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,240 @@ | ||
expected_output = { | ||
'address_family': { | ||
'ipv6_all': { | ||
'bgp_table_version': 5530, | ||
'generic_scan_interval': 60, | ||
'local_as': 1234, | ||
'non_stop_routing': True, | ||
'nsr_initial_init_ver_status': 'reached', | ||
'nsr_initial_initsync_version': '7', | ||
'nsr_issu_sync_group_versions': '5530/0', | ||
'route_distinguisher': { | ||
'1234:1234': { | ||
'prefix': { | ||
'2001:0db8:85a3:0:0:0:0:1403::/48': { | ||
'index': { | ||
1: { | ||
'locprf': '0', | ||
'next_hop': '192.0.2.1', | ||
'origin_codes': 'i', | ||
'path': '0', | ||
'status_codes': '*>i', | ||
'weight': '100', | ||
}, | ||
2: { | ||
'locprf': '0', | ||
'next_hop': '192.0.2.1', | ||
'origin_codes': 'i', | ||
'path': '0', | ||
'status_codes': '*i', | ||
'weight': '100', | ||
}, | ||
}, | ||
}, | ||
'2001:0db8:85a3::/64': { | ||
'index': { | ||
1: { | ||
'locprf': '0', | ||
'next_hop': '192.0.2.1', | ||
'origin_codes': 'i', | ||
'path': '0', | ||
'status_codes': '*>i', | ||
'weight': '100', | ||
}, | ||
2: { | ||
'locprf': '0', | ||
'next_hop': '192.0.2.1', | ||
'origin_codes': 'i', | ||
'path': '0', | ||
'status_codes': '*i', | ||
'weight': '100', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
'1234:2505005': { | ||
'prefix': { | ||
'2001:0db8:85a3:0:0:0:0:6:10:205::/112': { | ||
'index': { | ||
1: { | ||
'locprf': '100', | ||
'metric': '4294967295', | ||
'next_hop': '192.0.2.2', | ||
'origin_codes': 'i', | ||
'path': '65031', | ||
'status_codes': '*>i', | ||
'weight': '0', | ||
}, | ||
2: { | ||
'locprf': '100', | ||
'metric': '4294967295', | ||
'next_hop': '192.0.2.2', | ||
'origin_codes': 'i', | ||
'path': '65031', | ||
'status_codes': '*i', | ||
'weight': '0', | ||
}, | ||
}, | ||
}, | ||
'2001:0db8:85a3:0:0:0:0:6:192:168:201::/112': { | ||
'index': { | ||
1: { | ||
'locprf': '100', | ||
'metric': '4294967295', | ||
'next_hop': '192.0.2.2', | ||
'origin_codes': 'i', | ||
'path': '65031', | ||
'status_codes': '*>i', | ||
'weight': '0', | ||
}, | ||
2: { | ||
'locprf': '100', | ||
'metric': '4294967295', | ||
'next_hop': '192.0.2.2', | ||
'origin_codes': 'i', | ||
'path': '65031', | ||
'status_codes': '*i', | ||
'weight': '0', | ||
}, | ||
}, | ||
}, | ||
'2001:0db8:85a3:0:0:0:0:6:195:113:123:128:0/112': { | ||
'index': { | ||
1: { | ||
'locprf': '100', | ||
'metric': '4294967295', | ||
'next_hop': '192.0.2.2', | ||
'origin_codes': 'i', | ||
'path': '65031', | ||
'status_codes': '*>i', | ||
'weight': '0', | ||
}, | ||
2: { | ||
'locprf': '100', | ||
'metric': '4294967295', | ||
'next_hop': '192.0.2.2', | ||
'origin_codes': 'i', | ||
'path': '65031', | ||
'status_codes': '*i', | ||
'weight': '0', | ||
}, | ||
}, | ||
}, | ||
'2001:0db8:85a3:0:0:0:0:6:195:113:123:80/125': { | ||
'index': { | ||
1: { | ||
'locprf': '100', | ||
'metric': '4294967295', | ||
'next_hop': '192.0.2.2', | ||
'origin_codes': 'i', | ||
'path': '65031', | ||
'status_codes': '*>i', | ||
'weight': '0', | ||
}, | ||
2: { | ||
'locprf': '100', | ||
'metric': '4294967295', | ||
'next_hop': '192.0.2.2', | ||
'origin_codes': 'i', | ||
'path': '65031', | ||
'status_codes': '*i', | ||
'weight': '0', | ||
}, | ||
}, | ||
}, | ||
'2001:0db8:85a3:0:0:0:0:6:195:113:123:96:0/112': { | ||
'index': { | ||
1: { | ||
'locprf': '100', | ||
'metric': '4294967295', | ||
'next_hop': '192.0.2.2', | ||
'origin_codes': 'i', | ||
'path': '65031', | ||
'status_codes': '*>i', | ||
'weight': '0', | ||
}, | ||
2: { | ||
'locprf': '100', | ||
'metric': '4294967295', | ||
'next_hop': '192.0.2.2', | ||
'origin_codes': 'i', | ||
'path': '65031', | ||
'status_codes': '*i', | ||
'weight': '0', | ||
}, | ||
}, | ||
}, | ||
'2001:0db8:85a3:0:0:0:0:6::10/127': { | ||
'index': { | ||
1: { | ||
'locprf': '0', | ||
'next_hop': '192.0.2.2', | ||
'origin_codes': 'i', | ||
'path': '0', | ||
'status_codes': '*>i', | ||
'weight': '100', | ||
}, | ||
2: { | ||
'locprf': '0', | ||
'next_hop': '192.0.2.2', | ||
'origin_codes': 'i', | ||
'path': '0', | ||
'status_codes': '*i', | ||
'weight': '100', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
'1234:2505118': { | ||
'prefix': { | ||
'2001:0db8:85a3:0:0:0:0:18::/56': { | ||
'index': { | ||
1: { | ||
'locprf': '100', | ||
'next_hop': '203.0.113.7', | ||
'origin_codes': 'i', | ||
'path': '0', | ||
'status_codes': '*>i', | ||
'weight': '100', | ||
}, | ||
2: { | ||
'locprf': '100', | ||
'next_hop': '203.0.113.7', | ||
'origin_codes': 'i', | ||
'path': '0', | ||
'status_codes': '*i', | ||
'weight': '100', | ||
}, | ||
}, | ||
}, | ||
'2001:0db8:85a3:0:0:0:0:1e08::/48': { | ||
'index': { | ||
1: { | ||
'locprf': '100', | ||
'next_hop': '203.0.113.7', | ||
'origin_codes': 'i', | ||
'path': '0', | ||
'status_codes': '*>i', | ||
'weight': '100', | ||
}, | ||
2: { | ||
'locprf': '100', | ||
'next_hop': '203.0.113.7', | ||
'origin_codes': 'i', | ||
'path': '0', | ||
'status_codes': '*i', | ||
'weight': '100', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
'router_identifier': '192.168.1.1', | ||
'scan_interval': 60, | ||
'table_state': 'active', | ||
}, | ||
}, | ||
} |
42 changes: 42 additions & 0 deletions
42
src/genie/libs/parser/iosxr/tests/ShowBgpAddressFamily/cli/equal/golden_output2_output.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,42 @@ | ||
RP/0/RSP0/CPU0:router# show bgp ivp6 all community 1234:1234 exact-match | ||
Address Family: VPNv6 Unicast | ||
----------------------------- | ||
|
||
BGP router identifier 192.168.1.1, local AS number 1234 | ||
BGP generic scan interval 60 secs | ||
Non-stop routing is enabled | ||
BGP table state: Active | ||
Table ID: 0x0 | ||
BGP main routing table version 5530 | ||
BGP NSR Initial initsync version 7 (Reached) | ||
BGP NSR/ISSU Sync-Group versions 5530/0 | ||
BGP scan interval 60 secs | ||
|
||
Status codes: s suppressed, d damped, h history, * valid, > best i - internal, r RIB-failure, S stale, N Nexthop-discard | ||
Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path | ||
Route Distinguisher: 1234:1234 | ||
Route Distinguisher Version: 53 | ||
*>i2001:0db8:85a3::/64 192.0.2.1 0 100 0 i | ||
* i 192.0.2.1 0 100 0 i | ||
*>i2001:0db8:85a3:0:0:0:0:1403::/48 192.0.2.1 0 100 0 i | ||
* i 192.0.2.1 0 100 0 i | ||
Route Distinguisher: 1234:2505005 | ||
Route Distinguisher Version: 54 | ||
*>i2001:0db8:85a3:0:0:0:0:6::10/127 192.0.2.2 0 100 0 i | ||
* i 192.0.2.2 0 100 0 i | ||
*>i2001:0db8:85a3:0:0:0:0:6:195:113:123:80/125 192.0.2.2 4294967295 100 0 65031 i | ||
* i 192.0.2.2 4294967295 100 0 65031 i | ||
*>i2001:0db8:85a3:0:0:0:0:6:10:205::/112 192.0.2.2 4294967295 100 0 65031 i | ||
* i 192.0.2.2 4294967295 100 0 65031 i | ||
*>i2001:0db8:85a3:0:0:0:0:6:192:168:201::/112 192.0.2.2 4294967295 100 0 65031 i | ||
* i 192.0.2.2 4294967295 100 0 65031 i | ||
*>i2001:0db8:85a3:0:0:0:0:6:195:113:123:96:0/112 192.0.2.2 4294967295 100 0 65031 i | ||
* i 192.0.2.2 4294967295 100 0 65031 i | ||
*>i2001:0db8:85a3:0:0:0:0:6:195:113:123:128:0/112 192.0.2.2 4294967295 100 0 65031 i | ||
* i 192.0.2.2 4294967295 100 0 65031 i | ||
Route Distinguisher: 1234:2505118 | ||
Route Distinguisher Version: 49 | ||
*>i2001:0db8:85a3:0:0:0:0:18::/56 203.0.113.7 100 100 0 i | ||
* i 203.0.113.7 100 100 0 i | ||
*>i2001:0db8:85a3:0:0:0:0:1e08::/48 203.0.113.7 100 100 0 i | ||
* i 203.0.113.7 100 100 0 i |