summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-06-03 16:29:09 +0200
committerChristian Poessinger <christian@poessinger.com>2020-06-03 16:32:03 +0200
commit9ab669d726d9e8658308e84804fb82bff6bb0bcb (patch)
tree3cb6344b4df50589209db51518e8359bba6afdb2 /op-mode-definitions
parentfcb185eb080a2fb3a234a79fdedb669354f1e8dc (diff)
downloadvyos-1x-9ab669d726d9e8658308e84804fb82bff6bb0bcb.tar.gz
vyos-1x-9ab669d726d9e8658308e84804fb82bff6bb0bcb.zip
op-mode: ethernet: T2546: migrate basic commands
- show interfaces ethernet eth0 physical - show interfaces ethernet eth0 physical offload - show interfaces ethernet eth0 statistics - show interfaces ethernet eth0 transceiver
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/show-interfaces-ethernet.xml47
1 files changed, 47 insertions, 0 deletions
diff --git a/op-mode-definitions/show-interfaces-ethernet.xml b/op-mode-definitions/show-interfaces-ethernet.xml
new file mode 100644
index 000000000..e19505d26
--- /dev/null
+++ b/op-mode-definitions/show-interfaces-ethernet.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="interfaces">
+ <children>
+ <tagNode name="ethernet">
+ <properties>
+ <help>Show ethernet interface information</help>
+ <completionHelp>
+ <path>interfaces ethernet</path>
+ </completionHelp>
+ </properties>
+ <children>
+ <node name="physical">
+ <properties>
+ <help>Show physical device information for specified ethernet interface</help>
+ </properties>
+ <command>/sbin/ethtool "$4"; /sbin/ethtool -i "$4"</command>
+ <children>
+ <leafNode name="offload">
+ <properties>
+ <help>Show physical device offloading capabilities</help>
+ </properties>
+ <command>/sbin/ethtool -k "$4"</command>
+ </leafNode>
+ </children>
+ </node>
+ <leafNode name="statistics">
+ <properties>
+ <help>Show physical device statistics for specified ethernet interface</help>
+ </properties>
+ <command>/sbin/ethtool -S "$4"</command>
+ </leafNode>
+ <leafNode name="transceiver">
+ <properties>
+ <help>Show transceiver information from modules (e.g SFP+, QSFP)</help>
+ </properties>
+ <command>/sbin/ethtool -m "$4"</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>