Test table ID move to a VRF and the removal of the VRF.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
]
}
],
+ "10.0.0.0/24": [
+ {
+ "protocol": "static",
+ "vrfName": "default",
+ "installed": true,
+ "table": 1,
+ "nexthops": [
+ {
+ "fib": true,
+ "unreachable": true,
+ "blackhole": true,
+ "active": true
+ }
+ ]
+ }
+ ],
+ "10.1.0.0/24": [
+ {
+ "protocol": "static",
+ "vrfName": "default",
+ "installed": true,
+ "table": 1,
+ "nexthops": [
+ {
+ "fib": true,
+ "ip": "192.168.211.254",
+ "interfaceName": "r1-eth1",
+ "active": true
+ }
+ ]
+ }
+ ],
"10.2.0.0/24": null,
"10.3.0.0/24": null,
"192.168.210.0/24": null,
blackhole default
+blackhole 10.0.0.0/24 proto XXXX metric 20
+10.1.0.0/24 via 192.168.211.254 dev r1-eth1 proto XXXX metric 20
]
}
],
+ "10.0.0.0/24": [
+ {
+ "protocol": "static",
+ "vrfName": "RED",
+ "installed": true,
+ "table": 1,
+ "nexthops": [
+ {
+ "fib": true,
+ "unreachable": true,
+ "blackhole": true,
+ "active": true
+ }
+ ]
+ }
+ ],
+ "10.1.0.0/24": [
+ {
+ "protocol": "static",
+ "vrfName": "RED",
+ "installed": true,
+ "table": 1,
+ "nexthops": [
+ {
+ "fib": true,
+ "ip": "192.168.211.254",
+ "interfaceName": "r1-eth1",
+ "vrf": "default",
+ "active": true
+ }
+ ]
+ }
+ ],
"10.2.0.0/24": [
{
"protocol": "static",
blackhole default
+blackhole 10.0.0.0/24 proto XXXX metric 20
+10.1.0.0/24 via 192.168.211.254 dev r1-eth1 proto XXXX metric 20
10.2.0.0/24 via 192.168.210.254 dev r1-eth0 proto XXXX metric 20
10.3.0.0/24 via 192.168.212.254 dev r1-eth2 proto XXXX metric 20
192.168.210.0/24 dev r1-eth0 proto XXXX scope link src 192.168.210.1
step("Add routes in table 1")
r1.run("ip route add blackhole default table {}".format(table_id))
+ r1.vtysh_cmd(
+ """
+configure terminal
+ ip route 10.0.0.0/24 blackhole table {}
+ ip route 10.1.0.0/24 192.168.211.254 nexthop-vrf default table {}
+""".format(
+ table_id, table_id
+ )
+ )
+
json_file = "{}/r1/v4_route_table_1_no_vrf.json".format(CWD)
expected = json.loads(open(json_file).read())
test_func = partial(