Skip to content

Commit b702567

Browse files
committed
Add test for 'show vrf all detail' parser reflecting interface changes
1 parent 2fb8f3d commit b702567

File tree

2 files changed

+193
-0
lines changed

2 files changed

+193
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
expected_output = {
2+
"TEST_1": {
3+
"address_family": {
4+
"ipv4 unicast": {
5+
"route_target": {
6+
"1234:5678": {"route_target": "1234:5678", "rt_type": "import"},
7+
"8765:4321": {"route_target": "8765:4321", "rt_type": "export"},
8+
}
9+
},
10+
"ipv6 unicast": {},
11+
},
12+
"description": "not set",
13+
"interfaces": [
14+
"GigabitEthernet0/0/0/0.2",
15+
"Gi0/0/0/0.1",
16+
"GigabitEthernet0/0/0/1",
17+
"Gi0/0/0/4",
18+
"TenGigE0/0/0/0.1",
19+
"TenGigabitEthernet0/0/0/0.2",
20+
"Te0/0/0/0.3",
21+
],
22+
"route_distinguisher": "10.10.10.10:10",
23+
"vrf_mode": "regular",
24+
},
25+
"TEST_2": {
26+
"address_family": {
27+
"ipv4 unicast": {
28+
"route_target": {
29+
"1111:2222": {"route_target": "1111:2222", "rt_type": "import"},
30+
"2222:1111": {"route_target": "2222:1111", "rt_type": "export"},
31+
}
32+
},
33+
"ipv6 unicast": {},
34+
},
35+
"description": "not set",
36+
"interfaces": [
37+
"FortyGigE0/0/0/0.1",
38+
"FortyGigabitEthernet0/0/0/0.2",
39+
"Fo0/0/0/0.3",
40+
"FortyGigE0/0/0/1",
41+
"FortyGigabitEthernet0/0/0/2",
42+
"Fo0/0/0/3",
43+
"HundredGigE0/0/0/0.1",
44+
"HundredGigabitEthernet0/0/0/0.2",
45+
"Hu0/0/0/0.3",
46+
"HundredGigE0/0/0/1",
47+
"HundredGigabitEthernet0/0/0/2",
48+
"Hu0/0/0/3",
49+
],
50+
"route_distinguisher": "1.2.3.4:5",
51+
"vrf_mode": "regular",
52+
},
53+
"TEST_3": {
54+
"address_family": {
55+
"ipv4 unicast": {
56+
"route_target": {
57+
"13285:56891": {"route_target": "13285:56891", "rt_type": "export"},
58+
"7984:4657": {"route_target": "7984:4657", "rt_type": "import"},
59+
}
60+
},
61+
"ipv6 unicast": {},
62+
},
63+
"description": "not set",
64+
"interfaces": [
65+
"Bundle-Ether0",
66+
"Bundle-Ethernet1",
67+
"BE2",
68+
"Loopback1",
69+
"Lo0",
70+
"Null0",
71+
"Nu1",
72+
"MgmtEth0/RP0/CPU0/0",
73+
"ManagementEthernet1/RP0/CPU0/0",
74+
"MgmtEth0/0/3",
75+
],
76+
"route_distinguisher": "5.4.3.2:1",
77+
"vrf_mode": "regular",
78+
},
79+
"TEST_4": {
80+
"address_family": {
81+
"ipv4 unicast": {
82+
"route_target": {
83+
"1111:1111": {"route_target": "1111:1111", "rt_type": "export"},
84+
"7985:4654": {"route_target": "7985:4654", "rt_type": "import"},
85+
}
86+
},
87+
"ipv6 unicast": {},
88+
},
89+
"description": "not set",
90+
"interfaces": ["POS0/0/0/0", "PacketOverSonet0/0/0/1", "PoS0/0/0/2"],
91+
"route_distinguisher": "1.1.1.1:1",
92+
"vrf_mode": "regular",
93+
},
94+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
VRF TEST_1; RD 10.10.10.10:10; VPN ID not set
2+
VRF mode: Regular
3+
Description not set
4+
Interfaces:
5+
GigabitEthernet0/0/0/0.2
6+
Gi0/0/0/0.1
7+
GigabitEthernet0/0/0/1
8+
Gi0/0/0/4
9+
TenGigE0/0/0/0.1
10+
TenGigabitEthernet0/0/0/0.2
11+
Te0/0/0/0.3
12+
Address family IPV4 Unicast
13+
Import VPN route-target communities:
14+
RT:1234:5678
15+
Export VPN route-target communities:
16+
RT:8765:4321
17+
No import route policy
18+
No export route policy
19+
Address family IPV6 Unicast
20+
No import VPN route-target communities
21+
No export VPN route-target communities
22+
No import route policy
23+
No export route policy
24+
25+
VRF TEST_2; RD 1.2.3.4:5; VPN ID not set
26+
VRF mode: Regular
27+
Description not set
28+
Interfaces:
29+
FortyGigE0/0/0/0.1
30+
FortyGigabitEthernet0/0/0/0.2
31+
Fo0/0/0/0.3
32+
FortyGigE0/0/0/1
33+
FortyGigabitEthernet0/0/0/2
34+
Fo0/0/0/3
35+
HundredGigE0/0/0/0.1
36+
HundredGigabitEthernet0/0/0/0.2
37+
Hu0/0/0/0.3
38+
HundredGigE0/0/0/1
39+
HundredGigabitEthernet0/0/0/2
40+
Hu0/0/0/3
41+
Address family IPV4 Unicast
42+
Import VPN route-target communities:
43+
RT:1111:2222
44+
Export VPN route-target communities:
45+
RT:2222:1111
46+
No import route policy
47+
No export route policy
48+
Address family IPV6 Unicast
49+
No import VPN route-target communities
50+
No export VPN route-target communities
51+
No import route policy
52+
No export route policy
53+
54+
VRF TEST_3; RD 5.4.3.2:1; VPN ID not set
55+
VRF mode: Regular
56+
Description not set
57+
Interfaces:
58+
Bundle-Ether0
59+
Bundle-Ethernet1
60+
BE2
61+
Loopback1
62+
Lo0
63+
Null0
64+
Nu1
65+
MgmtEth0/RP0/CPU0/0
66+
ManagementEthernet1/RP0/CPU0/0
67+
MgmtEth0/0/3
68+
Address family IPV4 Unicast
69+
Import VPN route-target communities:
70+
RT:7984:4657
71+
Export VPN route-target communities:
72+
RT:13285:56891
73+
No import route policy
74+
No export route policy
75+
Address family IPV6 Unicast
76+
No import VPN route-target communities
77+
No export VPN route-target communities
78+
No import route policy
79+
No export route policy
80+
81+
VRF TEST_4; RD 1.1.1.1:1; VPN ID not set
82+
VRF mode: Regular
83+
Description not set
84+
Interfaces:
85+
POS0/0/0/0
86+
PacketOverSonet0/0/0/1
87+
PoS0/0/0/2
88+
Address family IPV4 Unicast
89+
Import VPN route-target communities:
90+
RT:7985:4654
91+
Export VPN route-target communities:
92+
RT:1111:1111
93+
No import route policy
94+
No export route policy
95+
Address family IPV6 Unicast
96+
No import VPN route-target communities
97+
No export VPN route-target communities
98+
No import route policy
99+
No export route policy

0 commit comments

Comments
 (0)