summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/vyos/ifconfig.py20
-rwxr-xr-xsrc/conf_mode/interface-bridge.py2
2 files changed, 3 insertions, 19 deletions
diff --git a/python/vyos/ifconfig.py b/python/vyos/ifconfig.py
index 0c3a3d0c8..c3dcd86c5 100644
--- a/python/vyos/ifconfig.py
+++ b/python/vyos/ifconfig.py
@@ -823,30 +823,14 @@ class BridgeIf(Interface):
return self._write_sysfs('/sys/class/net/{}/bridge/hello_time'
.format(self._ifname), (int(time) * 100))
- @property
- def max_age(self):
- """
- Get bridge max max message age in seconds. Internal Kernel representation
- is in centiseconds.
-
- Example:
- >>> from vyos.ifconfig import Interface
- >>> BridgeIf('br0').max_age
- '20'
- """
-
- return (self._read_sysfs('/sys/class/net/{}/bridge/max_age'
- .format(self._ifname)) / 100)
-
- @max_age.setter
- def max_age(self, time):
+ def set_max_age(self, time):
"""
Set bridge max message age in seconds. Internal Kernel representation
is in centiseconds.
Example:
>>> from vyos.ifconfig import Interface
- >>> BridgeIf('br0').max_age = 30
+ >>> BridgeIf('br0').set_max_age(30)
"""
return self._write_sysfs('/sys/class/net/{}/bridge/max_age'
.format(self._ifname), (int(time) * 100))
diff --git a/src/conf_mode/interface-bridge.py b/src/conf_mode/interface-bridge.py
index 0adbb0617..3690a144e 100755
--- a/src/conf_mode/interface-bridge.py
+++ b/src/conf_mode/interface-bridge.py
@@ -193,7 +193,7 @@ def apply(bridge):
# set hello time
br.hello_time = bridge['hello_time']
# set max message age
- br.max_age = bridge['max_age']
+ br.set_max_age(bridge['max_age'])
# set bridge priority
br.priority = bridge['priority']
# turn stp on/off