Skip to content

Commit

Permalink
Add test for 'show vrf all detail' parser reflecting interface changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kani999 committed Dec 2, 2024
1 parent e7760fb commit 9fbc972
Show file tree
Hide file tree
Showing 2 changed files with 193 additions and 0 deletions.
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",
},
}
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

0 comments on commit 9fbc972

Please sign in to comment.