From a9ef9748ce48e96b1c0be0237f77bd8e951ef69a Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 24 Sep 2019 18:21:05 +0200 Subject: Python/ifconfig: T1557: refactor BridgeIf 'forward_delay' property to set_forward_delay() --- 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 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)) -- cgit v1.2.3