summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/vyos/ifconfig.py21
-rwxr-xr-xsrc/conf_mode/interface-bridge.py2
2 files changed, 4 insertions, 19 deletions
diff --git a/python/vyos/ifconfig.py b/python/vyos/ifconfig.py
index c3dcd86c5..2a30857ab 100644
--- a/python/vyos/ifconfig.py
+++ b/python/vyos/ifconfig.py
@@ -769,29 +769,14 @@ class BridgeIf(Interface):
return self._write_sysfs('/sys/class/net/{}/bridge/ageing_time'
.format(self._ifname), time)
- @property
- def forward_delay(self):
- """
- Get bridge forwarding delay in seconds. Internal Kernel representation
- is in centiseconds.
-
- Example:
- >>> from vyos.ifconfig import Interface
- >>> BridgeIf('br0').ageing_time
- '3'
- """
- return (self._read_sysfs('/sys/class/net/{}/bridge/forward_delay'
- .format(self._ifname)) / 100)
-
- @forward_delay.setter
- def forward_delay(self, time):
+ def set_forward_delay(self, time):
"""
Set bridge forwarding delay in seconds. Internal Kernel representation
is in centiseconds.
Example:
- >>> from vyos.ifconfig import Interface
- >>> BridgeIf('br0').forward_delay = 15
+ >>> from vyos.ifconfig import BridgeIf
+ >>> BridgeIf('br0').forward_delay(15)
"""
return self._write_sysfs('/sys/class/net/{}/bridge/forward_delay'
.format(self._ifname), (int(time) * 100))
diff --git a/src/conf_mode/interface-bridge.py b/src/conf_mode/interface-bridge.py
index 3690a144e..7380799ee 100755
--- a/src/conf_mode/interface-bridge.py
+++ b/src/conf_mode/interface-bridge.py
@@ -189,7 +189,7 @@ def apply(bridge):
# set ageing time
br.ageing_time = bridge['aging']
# set bridge forward delay
- br.forward_delay = bridge['forwarding_delay']
+ br.set_forward_delay(bridge['forwarding_delay'])
# set hello time
br.hello_time = bridge['hello_time']
# set max message age