diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-08-02 17:27:25 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-08-03 22:23:37 +0200 |
commit | 5b836709a15e4f6a8775e5dc26609febd5bc2480 (patch) | |
tree | 8c7b47208401587b27e5dc0857bb47cb84db2977 /python | |
parent | c40d6e8d6dc7b513dca666e7dcd1cab42e0fde31 (diff) | |
download | vyos-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')
-rw-r--r-- | python/vyos/configinterface.py | 8 |
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 |