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 2a30857ab..e10e01e2f 100644
--- a/python/vyos/ifconfig.py
+++ b/python/vyos/ifconfig.py
@@ -781,29 +781,14 @@ class BridgeIf(Interface):
return self._write_sysfs('/sys/class/net/{}/bridge/forward_delay'
.format(self._ifname), (int(time) * 100))
- @property
- def hello_time(self):
- """
- Get bridge hello time in seconds. Internal Kernel representation
- is in centiseconds.
-
- Example:
- >>> from vyos.ifconfig import Interface
- >>> BridgeIf('br0').hello_time
- '2'
- """
- return (self._read_sysfs('/sys/class/net/{}/bridge/hello_time'
- .format(self._ifname)) / 100)
-
- @hello_time.setter
- def hello_time(self, time):
+ def set_hello_time(self, time):
"""
Set bridge hello time in seconds. Internal Kernel representation
is in centiseconds.
Example:
- >>> from vyos.ifconfig import Interface
- >>> BridgeIf('br0').hello_time = 2
+ >>> from vyos.ifconfig import BridgeIf
+ >>> BridgeIf('br0').set_hello_time(2)
"""
return self._write_sysfs('/sys/class/net/{}/bridge/hello_time'
.format(self._ifname), (int(time) * 100))
diff --git a/src/conf_mode/interface-bridge.py b/src/conf_mode/interface-bridge.py
index 7380799ee..5d97d49bc 100755
--- a/src/conf_mode/interface-bridge.py
+++ b/src/conf_mode/interface-bridge.py
@@ -191,7 +191,7 @@ def apply(bridge):
# set bridge forward delay
br.set_forward_delay(bridge['forwarding_delay'])
# set hello time
- br.hello_time = bridge['hello_time']
+ br.set_hello_time(bridge['hello_time'])
# set max message age
br.set_max_age(bridge['max_age'])
# set bridge priority