diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-09-12 21:23:14 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-09-20 21:28:53 +0200 |
commit | f107a252020d225b4e7429cc5c3a61af6cb2e1d9 (patch) | |
tree | ee6eea0a887cd7e40c87056323ef0331ea51db52 | |
parent | 1d2bec57085303420b3e12dc61a44edd62c4c490 (diff) | |
download | vyos-1x-f107a252020d225b4e7429cc5c3a61af6cb2e1d9.tar.gz vyos-1x-f107a252020d225b4e7429cc5c3a61af6cb2e1d9.zip |
ethernet: T1637: only list supported link speeds for completion helper
-rw-r--r-- | interface-definitions/interfaces-ethernet.xml | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/interface-definitions/interfaces-ethernet.xml b/interface-definitions/interfaces-ethernet.xml index a2de4aeb3..14a6ff095 100644 --- a/interface-definitions/interfaces-ethernet.xml +++ b/interface-definitions/interfaces-ethernet.xml @@ -337,38 +337,15 @@ </leafNode> <leafNode name="speed"> <properties> - <help>Link speed</help> + <help>Link speed in MBit/s</help> <completionHelp> - <list>auto 10 100 1000 2500 5000 10000</list> + <list>auto</list> + <script>/sbin/ethtool $VAR(../@) | sed -n '/Supported ports/{:a;n;/Supported pause frame use/b;p;ba}' | sed -s 's/Supported link modes://' | sed -e 's/[[:space:]]*//' | sed 's/[^0-9]*//g'</script> </completionHelp> <valueHelp> <format>auto</format> <description>Auto negotiation (default)</description> </valueHelp> - <valueHelp> - <format>10</format> - <description>10 Mbit/sec</description> - </valueHelp> - <valueHelp> - <format>100</format> - <description>100 Mbit/sec</description> - </valueHelp> - <valueHelp> - <format>1000</format> - <description>1 Gbit/sec</description> - </valueHelp> - <valueHelp> - <format>2500</format> - <description>2.5 Gbit/sec</description> - </valueHelp> - <valueHelp> - <format>5000</format> - <description>5 Gbit/sec</description> - </valueHelp> - <valueHelp> - <format>10000</format> - <description>10 Gbit/sec</description> - </valueHelp> <constraint> <regex>(auto|10|100|1000|2500|5000|10000)</regex> </constraint> |