diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-03-04 18:44:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-04 18:44:59 +0100 |
commit | e295df224d64296d371e19c9582bab683a1615a7 (patch) | |
tree | 231bf6a070fc2258553ff247cc3f66e5998ae2e4 /python | |
parent | 5cb485c2fa6e551b9ff8949e9429abd02996cb78 (diff) | |
parent | 7a752c0287651876809ced750319eec9eb125e07 (diff) | |
download | vyos-1x-e295df224d64296d371e19c9582bab683a1615a7.tar.gz vyos-1x-e295df224d64296d371e19c9582bab683a1615a7.zip |
Merge pull request #239 from thomas-mangin/2057-fixtime
ifconfig: T2057: fix multiple issues with initial patch
Diffstat (limited to 'python')
-rw-r--r-- | python/vyos/ifconfig.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/python/vyos/ifconfig.py b/python/vyos/ifconfig.py index 389f6072f..1a2fad46f 100644 --- a/python/vyos/ifconfig.py +++ b/python/vyos/ifconfig.py @@ -1036,32 +1036,31 @@ class BridgeIf(Interface): _sysfs_set = {**Interface._sysfs_set, **{ 'ageing_time': { 'validate': assert_positive, - 'convert': lambda time: int(time) * 100, + 'convert': lambda t: int(t) * 100, 'location': '/sys/class/net/{ifname}/bridge/ageing_time', }, 'forward_delay': { 'validate': assert_positive, - 'convert': lambda time: int(time) * 100, + 'convert': lambda t: int(t) * 100, 'location': '/sys/class/net/{ifname}/bridge/forward_delay', }, 'hello_time': { 'validate': assert_positive, - 'convert': lambda time: int(time) * 100, + 'convert': lambda t: int(t) * 100, 'location': '/sys/class/net/{ifname}/bridge/hello_time', }, 'max_age': { 'validate': assert_positive, - 'convert': lambda time: int(time) * 100, + 'convert': lambda t: int(t) * 100, 'location': '/sys/class/net/{ifname}/bridge/max_age', }, 'priority': { 'validate': assert_positive, - 'convert': lambda time: int(time) * 100, 'location': '/sys/class/net/{ifname}/bridge/priority', }, 'stp': { 'validate': assert_boolean, - 'location': '/sys/class/net/{ifconfig}/bridge/stp_state', + 'location': '/sys/class/net/{ifname}/bridge/stp_state', }, 'multicast_querier': { 'validate': assert_boolean, @@ -1071,11 +1070,9 @@ class BridgeIf(Interface): _command_set = {**Interface._command_set, **{ 'add_port': { - 'validate': assert_boolean, 'shellcmd': 'ip link set dev {value} master {ifname}', }, 'del_port': { - 'validate': assert_boolean, 'shellcmd': 'ip link set dev {value} nomaster', }, }} @@ -1140,7 +1137,7 @@ class BridgeIf(Interface): >>> from vyos.ifconfig import BridgeIf >>> BridgeIf('br0').set_priority(8192) """ - self.set_interface('priority', time) + self.set_interface('priority', priority) def set_stp(self, state): """ |