]> git.proxmox.com Git - mirror_ifupdown2.git/commit - ifupdown2/ifupdown/ifupdownmain.py
addons: vrf: redo iproute2 vrf interface map handling
authorRoopa Prabhu <roopa@cumulusnetworks.com>
Thu, 31 Mar 2016 23:09:37 +0000 (16:09 -0700)
committerRoopa Prabhu <roopa@cumulusnetworks.com>
Fri, 1 Apr 2016 04:56:39 +0000 (21:56 -0700)
commit05ac52f075b3097c4952897765c350aabef5b8f8
treeac469cdf2332e386c073b2ba1b35bb40761b2e39
parent0ba04b380335385ec4602c7b9858cffd184138df
addons: vrf: redo iproute2 vrf interface map handling

Ticket: CM-10188, CM-10061
Reviewed By: dsa, nikhil, julien
Testing Done: Tested static routes with vrf names for tables

This patch does the following:
- if a single vrf device is present in the config,
builds the vrf map by reading vrf interfaces from the kernel (with
existing link cache. Builds a shadow vrf only attribute cache)
- reads existing table map and adjusts it if required
- main change is the iproute2 map file on disk is updated
immediately on vrf creation, so that static routes used along with the
vrf slaves can use the vrf name for the table. This also helps dhclient dns
hook script which may use mgmt table name directly.
- cleans up default routes on down

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
addons/vrf.py
ifupdown/ifupdownmain.py
ifupdownaddons/cache.py
ifupdownaddons/iproute2.py