mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
addons: vrf: handle auto table ids for dhcp slaves
Ticket: CM-9921 Reviewed By: trivial Testing Done: Tested with table id auto for management vrf I have recently added special handling for vrf slaves with dhcp. And missed handling of vrf-table auto for such slaves. This patch fixes auto when bringing up vrf masters for dhcp vrf slaves Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This commit is contained in:
@@ -217,7 +217,15 @@ class vrf(moduleBase):
|
||||
for mobj in vrf_master_objs:
|
||||
vrf_table = mobj.get_attr_value_first('vrf-table')
|
||||
if vrf_table:
|
||||
if vrf_table == 'auto':
|
||||
vrf_table = self._get_avail_vrf_table_id()
|
||||
if not vrf_table:
|
||||
self.log_error('%s: unable to get an auto table id'
|
||||
%mobj.name)
|
||||
self.logger.info('%s: table id auto: selected table id %s\n'
|
||||
%(mobj.name, vrf_table))
|
||||
self._up_vrf_dev(mobj, vrf_table, False)
|
||||
break
|
||||
self.ipcmd.link_set(ifacename, 'master', vrfname)
|
||||
return
|
||||
|
||||
|
Reference in New Issue
Block a user