summaryrefslogtreecommitdiff
path: root/python/vyos
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-09-10 16:56:32 +0200
committerChristian Poessinger <christian@poessinger.com>2021-09-10 16:56:32 +0200
commit3037661951d0e5d1f6264f886781b7ddc019329e (patch)
tree15247ddc5cb2e80e7b92ef97aea2d493bb95add2 /python/vyos
parente2b7e1766cc22c5cd718a5001be6336bdca92eec (diff)
downloadvyos-1x-3037661951d0e5d1f6264f886781b7ddc019329e.tar.gz
vyos-1x-3037661951d0e5d1f6264f886781b7ddc019329e.zip
ethtool: T3802: extend check_speed_duplex() implementation to support 'auto'
Diffstat (limited to 'python/vyos')
-rw-r--r--python/vyos/ethtool.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/vyos/ethtool.py b/python/vyos/ethtool.py
index 4efc3a234..bc95767b1 100644
--- a/python/vyos/ethtool.py
+++ b/python/vyos/ethtool.py
@@ -190,9 +190,9 @@ class Ethtool:
the underlaying network adapter. """
if isinstance(speed, int):
speed = str(speed)
- if not speed.isdigit():
+ if speed != 'auto' and not speed.isdigit():
raise ValueError(f'Value "{speed}" for speed is invalid!')
- if duplex not in ['full', 'half']:
+ if duplex not in ['auto', 'full', 'half']:
raise ValueError(f'Value "{duplex}" for duplex is invalid!')
if self.get_driver_name() in ['vmxnet3', 'virtio_net', 'xen_netfront']: