From e41213fd082603a7c70e518e52582b7600af8589 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 24 Sep 2019 18:22:25 +0200 Subject: Python/ifconfig: T1557: refactor BridgeIf 'hello_time' property to set_hello_time() --- python/vyos/ifconfig.py | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'python') 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)) -- cgit v1.2.3