summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-06-24 09:44:01 +0200
committerChristian Poessinger <christian@poessinger.com>2020-06-24 09:44:01 +0200
commit5644809bb4384de8e409042d803d1898124178e1 (patch)
treedd3021820da9ebea584bfcc265582d2af63254e6
parent3caf131cae11d9ed0f81d632afea5ea3e6f8b8d3 (diff)
downloadvyos-1x-5644809bb4384de8e409042d803d1898124178e1.tar.gz
vyos-1x-5644809bb4384de8e409042d803d1898124178e1.zip
ifconfig: vxlan: T2629: append() takes exactly one argument
Commit 9390988709 ("vxlan: T2629: fix multiple configuration issues") called append() on a list and passed two arguments which is invalid. Traceback (most recent call last): File "/usr/libexec/vyos/conf_mode/interfaces-vxlan.py", line 300, in <module> apply(c) File "/usr/libexec/vyos/conf_mode/interfaces-vxlan.py", line 245, in apply v = VXLANIf(vxlan['intf'], **conf) File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 221, in __init__ self._create() File "/usr/lib/python3/dist-packages/vyos/ifconfig/vxlan.py", line 84, in _create cmdline.append('group', 'src_interface') TypeError: append() takes exactly one argument (2 given)
-rw-r--r--python/vyos/ifconfig/vxlan.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/python/vyos/ifconfig/vxlan.py b/python/vyos/ifconfig/vxlan.py
index cd9026bf8..973b4ef05 100644
--- a/python/vyos/ifconfig/vxlan.py
+++ b/python/vyos/ifconfig/vxlan.py
@@ -71,7 +71,7 @@ class VXLANIf(Interface):
}
def _create(self):
- cmdline = ['ifname', 'type', 'vni', 'port']
+ cmdline = ['ifname', 'type', 'vni', 'port']
if self.config['src_address']:
cmdline.append('src_address')
@@ -81,11 +81,13 @@ class VXLANIf(Interface):
if self.config['group'] or self.config['src_interface']:
if self.config['group'] and self.config['src_interface']:
- cmdline.append('group', 'src_interface')
+ cmdline.append('group')
+ cmdline.append('src_interface')
else:
ifname = self.config['ifname']
raise ConfigError(
- f'VXLAN "{ifname}" is missing mandatory underlay multicast group or source interface for a multicast network.')
+ f'VXLAN "{ifname}" is missing mandatory underlay multicast'
+ 'group or source interface for a multicast network.')
cmd = 'ip link'
for key in cmdline: