summaryrefslogtreecommitdiff
path: root/python/vyos/configinterface.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-08-02 17:27:25 +0200
committerChristian Poessinger <christian@poessinger.com>2019-08-03 22:23:37 +0200
commit5b836709a15e4f6a8775e5dc26609febd5bc2480 (patch)
tree8c7b47208401587b27e5dc0857bb47cb84db2977 /python/vyos/configinterface.py
parentc40d6e8d6dc7b513dca666e7dcd1cab42e0fde31 (diff)
downloadvyos-1x-5b836709a15e4f6a8775e5dc26609febd5bc2480.tar.gz
vyos-1x-5b836709a15e4f6a8775e5dc26609febd5bc2480.zip
[bridge] T1156: support adding and removing bridge member interfaces
This is the new syntax bridge br0 { member { interface eth0 { cost 10 } interface eth1 { cost 11 } } }
Diffstat (limited to 'python/vyos/configinterface.py')
-rw-r--r--python/vyos/configinterface.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/python/vyos/configinterface.py b/python/vyos/configinterface.py
index b0d766b9c..37b6b92c1 100644
--- a/python/vyos/configinterface.py
+++ b/python/vyos/configinterface.py
@@ -15,6 +15,14 @@
import os
+def set_mac_address(intf, addr):
+ """
+ Configure interface mac address using iproute2 command
+
+ NOTE: mac address should be validated here???
+ """
+ os.system('ip link set {} address {}'.format(intf, addr))
+
def set_description(intf, desc):
"""
Sets the interface secription reported usually by SNMP