diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-09-24 22:08:21 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-09-24 22:08:21 +0200 |
commit | 0588f5409f57a8d8577bc9bd23c393487fd2987b (patch) | |
tree | e51f4d72af89d7918ba5cd2adca01f4b4e5040b8 /src | |
parent | 1dc92ac5a36b2e1f3e1f8dc2248e68892bfda248 (diff) | |
download | vyos-1x-0588f5409f57a8d8577bc9bd23c393487fd2987b.tar.gz vyos-1x-0588f5409f57a8d8577bc9bd23c393487fd2987b.zip |
Python/ifconfig: T1557: add STPIf class (spanning tree) bridge member
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/interface-bridge.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/conf_mode/interface-bridge.py b/src/conf_mode/interface-bridge.py index b20e7f6ff..37b5c4979 100755 --- a/src/conf_mode/interface-bridge.py +++ b/src/conf_mode/interface-bridge.py @@ -20,7 +20,7 @@ from copy import deepcopy from sys import exit from netifaces import interfaces -from vyos.ifconfig import BridgeIf, Interface +from vyos.ifconfig import BridgeIf, STPIf from vyos.configdict import list_diff from vyos.config import Config from vyos import ConfigError @@ -229,16 +229,15 @@ def apply(bridge): # configure additional bridge member options for member in bridge['member']: - # set bridge port path cost - br.set_path_cost(member['name'], member['cost']) - # set bridge port path priority - br.set_path_priority(member['name'], member['priority']) - - i = Interface(member['name']) + i = STPIf(member['name']) # configure ARP cache timeout i.set_arp_cache_tmo(bridge['arp_cache_tmo']) # ignore link state changes i.set_link_detect(bridge['disable_link_detect']) + # set bridge port path cost + i.set_path_cost(member['cost']) + # set bridge port path priority + i.set_path_priority(member['priority']) return None |