summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/connect.xml.in2
-rw-r--r--op-mode-definitions/disconnect.xml.in2
-rw-r--r--op-mode-definitions/generate-public-key-command.xml.in33
-rw-r--r--op-mode-definitions/show-interfaces-wirelessmodem.xml.in51
-rw-r--r--op-mode-definitions/show-interfaces-wwan.xml.in103
-rw-r--r--op-mode-definitions/show-log.xml.in6
-rw-r--r--op-mode-definitions/show-version.xml.in6
7 files changed, 150 insertions, 53 deletions
diff --git a/op-mode-definitions/connect.xml.in b/op-mode-definitions/connect.xml.in
index 1ec62949a..8f19eac70 100644
--- a/op-mode-definitions/connect.xml.in
+++ b/op-mode-definitions/connect.xml.in
@@ -19,7 +19,7 @@
<help>Bring up a connection-oriented network interface</help>
<completionHelp>
<path>interfaces pppoe</path>
- <path>interfaces wirelessmodem</path>
+ <path>interfaces wwan</path>
</completionHelp>
</properties>
<command>sudo ${vyos_op_scripts_dir}/connect_disconnect.py --connect "$3"</command>
diff --git a/op-mode-definitions/disconnect.xml.in b/op-mode-definitions/disconnect.xml.in
index bf2c37b89..4415c0ed2 100644
--- a/op-mode-definitions/disconnect.xml.in
+++ b/op-mode-definitions/disconnect.xml.in
@@ -10,7 +10,7 @@
<help>Take down a connection-oriented network interface</help>
<completionHelp>
<path>interfaces pppoe</path>
- <path>interfaces wirelessmodem</path>
+ <path>interfaces wwan</path>
</completionHelp>
</properties>
<command>sudo ${vyos_op_scripts_dir}/connect_disconnect.py --disconnect "$3"</command>
diff --git a/op-mode-definitions/generate-public-key-command.xml.in b/op-mode-definitions/generate-public-key-command.xml.in
new file mode 100644
index 000000000..21f0f56f0
--- /dev/null
+++ b/op-mode-definitions/generate-public-key-command.xml.in
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="generate">
+ <children>
+ <node name="public-key-command">
+ <properties>
+ <help>Generate configuration mode command to add OpenSSH public key from file</help>
+ </properties>
+ <children>
+ <tagNode name="user">
+ <properties>
+ <help>Username of public key owner</help>
+ <completionHelp>
+ <list>&lt;username&gt;</list>
+ </completionHelp>
+ </properties>
+ <children>
+ <tagNode name="path">
+ <properties>
+ <help>Local path or remote URL of OpenSSH public key</help>
+ <completionHelp>
+ <list><![CDATA[<http[s]://[<username>:<password>@]<hostname>/<path-to-file>> <ftp://[<username>[:<password>]@]<hostname>/<path-to-file>> <tftp://<hostname>/<path-to-file>> <sftp://[<username>[:<password>]@]<hostname>/<path-to-file>> <scp://[<username>[:<password>]@]<hostname>/<path-to-file>> <[file://]/<path-to-file>>]]></list>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/generate_public_key_command.py "$4" "$6"</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-interfaces-wirelessmodem.xml.in b/op-mode-definitions/show-interfaces-wirelessmodem.xml.in
deleted file mode 100644
index 18b1e55c7..000000000
--- a/op-mode-definitions/show-interfaces-wirelessmodem.xml.in
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0"?>
-<interfaceDefinition>
- <node name="show">
- <children>
- <node name="interfaces">
- <children>
- <tagNode name="wirelessmodem">
- <properties>
- <help>Show Wireless Modem (WWAN) interface information</help>
- <completionHelp>
- <path>interfaces wirelessmodem</path>
- </completionHelp>
- </properties>
- <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4"</command>
- <children>
- <leafNode name="log">
- <properties>
- <help>Show specified WWAN interface log</help>
- </properties>
- <command>/usr/bin/journalctl --unit "ppp@$4".service</command>
- </leafNode>
- <leafNode name="statistics">
- <properties>
- <help>Show specified WWAN interface statistics</help>
- <completionHelp>
- <path>interfaces wirelessmodem</path>
- </completionHelp>
- </properties>
- <command>if [ -d "/sys/class/net/$4" ]; then /usr/sbin/pppstats "$4"; fi</command>
- </leafNode>
- </children>
- </tagNode>
- <node name="wirelessmodem">
- <properties>
- <help>Show Wireless Modem (WWAN) interface information</help>
- </properties>
- <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=wirelessmodem --action=show-brief</command>
- <children>
- <leafNode name="detail">
- <properties>
- <help>Show detailed Wireless Modem (WWAN( interface information</help>
- </properties>
- <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=wirelessmodem --action=show</command>
- </leafNode>
- </children>
- </node>
- </children>
- </node>
- </children>
- </node>
-</interfaceDefinition>
diff --git a/op-mode-definitions/show-interfaces-wwan.xml.in b/op-mode-definitions/show-interfaces-wwan.xml.in
new file mode 100644
index 000000000..d57e17a13
--- /dev/null
+++ b/op-mode-definitions/show-interfaces-wwan.xml.in
@@ -0,0 +1,103 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="interfaces">
+ <children>
+ <tagNode name="wwan">
+ <properties>
+ <help>Show Wireless Wire Area Network (WWAN) interface information</help>
+ <completionHelp>
+ <path>interfaces wwan</path>
+ <script>cd /sys/class/net; ls -d wwan*</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4"</command>
+ <children>
+ <leafNode name="capabilities">
+ <properties>
+ <help>Show WWAN module capabilities</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --capabilities</command>
+ </leafNode>
+ <leafNode name="firmware">
+ <properties>
+ <help>Show WWAN module firmware</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --firmware</command>
+ </leafNode>
+ <leafNode name="imei">
+ <properties>
+ <help>Show WWAN module IMEI/ESN/MEID</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --imei</command>
+ </leafNode>
+ <leafNode name="imsi">
+ <properties>
+ <help>Show WWAN module IMSI</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --imsi</command>
+ </leafNode>
+ <leafNode name="model">
+ <properties>
+ <help>Show WWAN module manufacturer</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --model</command>
+ </leafNode>
+ <leafNode name="msisdn">
+ <properties>
+ <help>Show WWAN module MSISDN</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --msisdn</command>
+ </leafNode>
+ <leafNode name="revision">
+ <properties>
+ <help>Show WWAN module revision</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --revision</command>
+ </leafNode>
+ <leafNode name="signal">
+ <properties>
+ <help>Show WWAN module RF signal info</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --signal</command>
+ </leafNode>
+ <leafNode name="sim">
+ <properties>
+ <help>Show WWAN module connected SIM card information</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_wwan.py --interface=$4 --sim</command>
+ </leafNode>
+ <leafNode name="summary">
+ <properties>
+ <help>Show WWAN module information summary</help>
+ </properties>
+ <command>mmcli --modem ${4#wwan}</command>
+ </leafNode>
+ <leafNode name="log">
+ <properties>
+ <help>Show interface log for specified interface</help>
+ </properties>
+ <command>echo not implemented</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <node name="wwan">
+ <properties>
+ <help>Show Wireless Modem (WWAN) interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=wirelessmodem --action=show-brief</command>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed Wireless Modem (WWAN( interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=wirelessmodem --action=show</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-log.xml.in b/op-mode-definitions/show-log.xml.in
index bb2de1580..92c1cf016 100644
--- a/op-mode-definitions/show-log.xml.in
+++ b/op-mode-definitions/show-log.xml.in
@@ -123,6 +123,12 @@
</tagNode>
</children>
</tagNode>
+ <leafNode name="kernel">
+ <properties>
+ <help>Show messages in kernel ring buffer</help>
+ </properties>
+ <command>sudo dmesg</command>
+ </leafNode>
<leafNode name="lldp">
<properties>
<help>Show log for LLDP</help>
diff --git a/op-mode-definitions/show-version.xml.in b/op-mode-definitions/show-version.xml.in
index 6bc49b8cf..8b7cc7e58 100644
--- a/op-mode-definitions/show-version.xml.in
+++ b/op-mode-definitions/show-version.xml.in
@@ -26,6 +26,12 @@
</properties>
<command>vtysh -c "show version"</command>
</leafNode>
+ <leafNode name="kernel">
+ <properties>
+ <help>Show Linux Kernel version information</help>
+ </properties>
+ <command>uname -r</command>
+ </leafNode>
</children>
</node>
</children>