diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-09-24 18:22:25 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-09-24 18:22:25 +0200 |
commit | e41213fd082603a7c70e518e52582b7600af8589 (patch) | |
tree | b6e3b7fdbad5a946f13352534a3d43af10959148 /python/vyos/ifconfig.py | |
parent | a9ef9748ce48e96b1c0be0237f77bd8e951ef69a (diff) | |
download | vyos-1x-e41213fd082603a7c70e518e52582b7600af8589.tar.gz vyos-1x-e41213fd082603a7c70e518e52582b7600af8589.zip |
Python/ifconfig: T1557: refactor BridgeIf 'hello_time' property to set_hello_time()
Diffstat (limited to 'python/vyos/ifconfig.py')
-rw-r--r-- | python/vyos/ifconfig.py | 21 |
1 files changed, 3 insertions, 18 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)) |