summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig/bond.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-07-30 23:31:55 +0200
committerChristian Poessinger <christian@poessinger.com>2020-07-30 23:31:55 +0200
commit29dd5079ad38e82363032b585304d509db0fea8e (patch)
treef64d9e1c9a405ee9ca38c431d6d453f6eac3cc7f /python/vyos/ifconfig/bond.py
parentf75f9cf6aae10c061e7b757b4e8a658b4457def7 (diff)
downloadvyos-1x-29dd5079ad38e82363032b585304d509db0fea8e.tar.gz
vyos-1x-29dd5079ad38e82363032b585304d509db0fea8e.zip
ifconfig: T2653: remove duplicated code for address flush
Diffstat (limited to 'python/vyos/ifconfig/bond.py')
-rw-r--r--python/vyos/ifconfig/bond.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/vyos/ifconfig/bond.py b/python/vyos/ifconfig/bond.py
index 5a48ac632..5c9a43c9b 100644
--- a/python/vyos/ifconfig/bond.py
+++ b/python/vyos/ifconfig/bond.py
@@ -362,10 +362,10 @@ class BondIf(Interface):
value = jmespath.search('member.interface', config)
if value:
for interface in value:
- # if we've come here we already verified the interface does
- # not have an addresses configured so just flush any
- # remaining ones
- cmd(f'ip addr flush dev "{interface}"')
+ # if we've come here we already verified the interface
+ # does not have an addresses configured so just flush
+ # any remaining ones
+ self.flush_addrs(interface)
self.add_port(interface)
# Primary device interface - must be set after 'mode'