]> git.proxmox.com Git - mirror_ifupdown2.git/commit
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>
Tue, 5 Apr 2016 04:37:53 +0000 (21:37 -0700)
commite8b2d486775072edcfb8f56259f35c94628314f8
tree163ae5a5c41a0b8694c546706726538ab8218481
parentc523bc944d1ecffed2dcacffd6b5e48ece08722c
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