-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for 'show vrf all detail' parser reflecting interface changes
- Loading branch information
Showing
2 changed files
with
193 additions
and
0 deletions.
There are no files selected for viewing
94 changes: 94 additions & 0 deletions
94
src/genie/libs/parser/iosxr/tests/ShowVrfAllDetail/cli/equal/golden_output_4_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,94 @@ | ||
expected_output = { | ||
"TEST_1": { | ||
"address_family": { | ||
"ipv4 unicast": { | ||
"route_target": { | ||
"1234:5678": {"route_target": "1234:5678", "rt_type": "import"}, | ||
"8765:4321": {"route_target": "8765:4321", "rt_type": "export"}, | ||
} | ||
}, | ||
"ipv6 unicast": {}, | ||
}, | ||
"description": "not set", | ||
"interfaces": [ | ||
"GigabitEthernet0/0/0/0.2", | ||
"Gi0/0/0/0.1", | ||
"GigabitEthernet0/0/0/1", | ||
"Gi0/0/0/4", | ||
"TenGigE0/0/0/0.1", | ||
"TenGigabitEthernet0/0/0/0.2", | ||
"Te0/0/0/0.3", | ||
], | ||
"route_distinguisher": "10.10.10.10:10", | ||
"vrf_mode": "regular", | ||
}, | ||
"TEST_2": { | ||
"address_family": { | ||
"ipv4 unicast": { | ||
"route_target": { | ||
"1111:2222": {"route_target": "1111:2222", "rt_type": "import"}, | ||
"2222:1111": {"route_target": "2222:1111", "rt_type": "export"}, | ||
} | ||
}, | ||
"ipv6 unicast": {}, | ||
}, | ||
"description": "not set", | ||
"interfaces": [ | ||
"FortyGigE0/0/0/0.1", | ||
"FortyGigabitEthernet0/0/0/0.2", | ||
"Fo0/0/0/0.3", | ||
"FortyGigE0/0/0/1", | ||
"FortyGigabitEthernet0/0/0/2", | ||
"Fo0/0/0/3", | ||
"HundredGigE0/0/0/0.1", | ||
"HundredGigabitEthernet0/0/0/0.2", | ||
"Hu0/0/0/0.3", | ||
"HundredGigE0/0/0/1", | ||
"HundredGigabitEthernet0/0/0/2", | ||
"Hu0/0/0/3", | ||
], | ||
"route_distinguisher": "1.2.3.4:5", | ||
"vrf_mode": "regular", | ||
}, | ||
"TEST_3": { | ||
"address_family": { | ||
"ipv4 unicast": { | ||
"route_target": { | ||
"13285:56891": {"route_target": "13285:56891", "rt_type": "export"}, | ||
"7984:4657": {"route_target": "7984:4657", "rt_type": "import"}, | ||
} | ||
}, | ||
"ipv6 unicast": {}, | ||
}, | ||
"description": "not set", | ||
"interfaces": [ | ||
"Bundle-Ether0", | ||
"Bundle-Ethernet1", | ||
"BE2", | ||
"Loopback1", | ||
"Lo0", | ||
"Null0", | ||
"Nu1", | ||
"MgmtEth0/RP0/CPU0/0", | ||
"ManagementEthernet1/RP0/CPU0/0", | ||
"MgmtEth0/0/3", | ||
], | ||
"route_distinguisher": "5.4.3.2:1", | ||
"vrf_mode": "regular", | ||
}, | ||
"TEST_4": { | ||
"address_family": { | ||
"ipv4 unicast": { | ||
"route_target": { | ||
"1111:1111": {"route_target": "1111:1111", "rt_type": "export"}, | ||
"7985:4654": {"route_target": "7985:4654", "rt_type": "import"}, | ||
} | ||
}, | ||
"ipv6 unicast": {}, | ||
}, | ||
"description": "not set", | ||
"interfaces": ["POS0/0/0/0", "PacketOverSonet0/0/0/1", "PoS0/0/0/2"], | ||
"route_distinguisher": "1.1.1.1:1", | ||
"vrf_mode": "regular", | ||
}, | ||
} |
99 changes: 99 additions & 0 deletions
99
src/genie/libs/parser/iosxr/tests/ShowVrfAllDetail/cli/equal/golden_output_4_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,99 @@ | ||
VRF TEST_1; RD 10.10.10.10:10; VPN ID not set | ||
VRF mode: Regular | ||
Description not set | ||
Interfaces: | ||
GigabitEthernet0/0/0/0.2 | ||
Gi0/0/0/0.1 | ||
GigabitEthernet0/0/0/1 | ||
Gi0/0/0/4 | ||
TenGigE0/0/0/0.1 | ||
TenGigabitEthernet0/0/0/0.2 | ||
Te0/0/0/0.3 | ||
Address family IPV4 Unicast | ||
Import VPN route-target communities: | ||
RT:1234:5678 | ||
Export VPN route-target communities: | ||
RT:8765:4321 | ||
No import route policy | ||
No export route policy | ||
Address family IPV6 Unicast | ||
No import VPN route-target communities | ||
No export VPN route-target communities | ||
No import route policy | ||
No export route policy | ||
|
||
VRF TEST_2; RD 1.2.3.4:5; VPN ID not set | ||
VRF mode: Regular | ||
Description not set | ||
Interfaces: | ||
FortyGigE0/0/0/0.1 | ||
FortyGigabitEthernet0/0/0/0.2 | ||
Fo0/0/0/0.3 | ||
FortyGigE0/0/0/1 | ||
FortyGigabitEthernet0/0/0/2 | ||
Fo0/0/0/3 | ||
HundredGigE0/0/0/0.1 | ||
HundredGigabitEthernet0/0/0/0.2 | ||
Hu0/0/0/0.3 | ||
HundredGigE0/0/0/1 | ||
HundredGigabitEthernet0/0/0/2 | ||
Hu0/0/0/3 | ||
Address family IPV4 Unicast | ||
Import VPN route-target communities: | ||
RT:1111:2222 | ||
Export VPN route-target communities: | ||
RT:2222:1111 | ||
No import route policy | ||
No export route policy | ||
Address family IPV6 Unicast | ||
No import VPN route-target communities | ||
No export VPN route-target communities | ||
No import route policy | ||
No export route policy | ||
|
||
VRF TEST_3; RD 5.4.3.2:1; VPN ID not set | ||
VRF mode: Regular | ||
Description not set | ||
Interfaces: | ||
Bundle-Ether0 | ||
Bundle-Ethernet1 | ||
BE2 | ||
Loopback1 | ||
Lo0 | ||
Null0 | ||
Nu1 | ||
MgmtEth0/RP0/CPU0/0 | ||
ManagementEthernet1/RP0/CPU0/0 | ||
MgmtEth0/0/3 | ||
Address family IPV4 Unicast | ||
Import VPN route-target communities: | ||
RT:7984:4657 | ||
Export VPN route-target communities: | ||
RT:13285:56891 | ||
No import route policy | ||
No export route policy | ||
Address family IPV6 Unicast | ||
No import VPN route-target communities | ||
No export VPN route-target communities | ||
No import route policy | ||
No export route policy | ||
|
||
VRF TEST_4; RD 1.1.1.1:1; VPN ID not set | ||
VRF mode: Regular | ||
Description not set | ||
Interfaces: | ||
POS0/0/0/0 | ||
PacketOverSonet0/0/0/1 | ||
PoS0/0/0/2 | ||
Address family IPV4 Unicast | ||
Import VPN route-target communities: | ||
RT:7985:4654 | ||
Export VPN route-target communities: | ||
RT:1111:1111 | ||
No import route policy | ||
No export route policy | ||
Address family IPV6 Unicast | ||
No import VPN route-target communities | ||
No export VPN route-target communities | ||
No import route policy | ||
No export route policy |