From 8ac524b6d12618d696fa883ff78ded8c35c26d05 Mon Sep 17 00:00:00 2001 From: Thomas Mangin Date: Tue, 24 Mar 2020 18:34:59 +0000 Subject: ifconfig: T2057: convert STP to adapter --- src/conf_mode/interfaces-bridge.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/conf_mode/interfaces-bridge.py b/src/conf_mode/interfaces-bridge.py index f8f20bf5c..c45ab13a8 100755 --- a/src/conf_mode/interfaces-bridge.py +++ b/src/conf_mode/interfaces-bridge.py @@ -20,7 +20,8 @@ from copy import deepcopy from sys import exit from netifaces import interfaces -from vyos.ifconfig import BridgeIf, STPIf +from vyos.ifconfig import BridgeIf +from vyos.ifconfig.stp import STP from vyos.configdict import list_diff from vyos.config import Config from vyos import ConfigError @@ -322,9 +323,10 @@ def apply(bridge): for addr in bridge['address']: br.add_addr(addr) + STPBridgeIf = STP.enable(BridgeIf) # configure additional bridge member options for member in bridge['member']: - i = STPIf(member['name']) + i = STPBridgeIf(member['name']) # configure ARP cache timeout i.set_arp_cache_tmo(bridge['arp_cache_tmo']) # ignore link state changes -- cgit v1.2.3