mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
Added ifupdown2 support for vxlan-ageing config
Ticket: CM-5105 Reviewed By: roopa Testing Done: tested configs before and after change We needed a configuration option to add vxlan-ageing to ifupdown2 configs. This patch adds the option to change the vxlan-ageing timer currently set with "ip link" commands. (cherry picked from commit 9832462c365bd2b900b98f5675d407d1b11c4a95) Conflicts: packages/ifupdown2/addons/vxlan.py packages/ifupdown2/ifupdownaddons/iproute2.py
This commit is contained in:
@@ -71,12 +71,15 @@ class iproute2(utilsBase):
|
||||
vattrs = {'vxlanid' : citems[i+2],
|
||||
'svcnode' : [],
|
||||
'remote' : [],
|
||||
'ageing' : citems[i+2],
|
||||
'learning': 'on'}
|
||||
for j in range(i+2, len(citems)):
|
||||
if citems[j] == 'local':
|
||||
vattrs['local'] = citems[j+1]
|
||||
elif citems[j] == 'svcnode':
|
||||
vattrs['svcnode'].append(citems[j+1])
|
||||
elif citems[j] == 'ageing':
|
||||
vattrs['ageing'].append(citems[j+1])
|
||||
elif citems[j] == 'nolearning':
|
||||
vattrs['learning'] = 'off'
|
||||
# get vxlan peer nodes
|
||||
@@ -487,7 +490,8 @@ class iproute2(utilsBase):
|
||||
localtunnelip=None,
|
||||
svcnodeips=None,
|
||||
remoteips=None,
|
||||
learning='on'):
|
||||
learning='on',
|
||||
ageing=None):
|
||||
if svcnodeips and remoteips:
|
||||
raise Exception("svcnodeip and remoteip is mutually exclusive")
|
||||
args = ''
|
||||
@@ -496,9 +500,11 @@ class iproute2(utilsBase):
|
||||
if svcnodeips:
|
||||
for s in svcnodeips:
|
||||
args += ' svcnode %s' %s
|
||||
if ageing:
|
||||
args += ' ageing %s' %ageing
|
||||
if learning == 'off':
|
||||
args += ' nolearning'
|
||||
|
||||
|
||||
if self.link_exists(name):
|
||||
cmd = 'link set dev %s type vxlan dstport %d' %(name, VXLAN_UDP_PORT)
|
||||
else:
|
||||
|
Reference in New Issue
Block a user