summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/container.xml.in (renamed from op-mode-definitions/containers.xml.in)12
-rw-r--r--op-mode-definitions/monitor-log.xml.in24
-rw-r--r--op-mode-definitions/show-log.xml.in12
-rw-r--r--op-mode-definitions/show-system.xml.in4
-rw-r--r--op-mode-definitions/traceroute.xml.in220
5 files changed, 46 insertions, 226 deletions
diff --git a/op-mode-definitions/containers.xml.in b/op-mode-definitions/container.xml.in
index 48501bd84..fa66402dc 100644
--- a/op-mode-definitions/containers.xml.in
+++ b/op-mode-definitions/container.xml.in
@@ -11,7 +11,7 @@
<properties>
<help>Pull a new image for container</help>
</properties>
- <command>sudo ${vyos_op_scripts_dir}/containers_op.py --pull "${4}"</command>
+ <command>sudo podman image pull "${4}"</command>
</tagNode>
</children>
</node>
@@ -44,7 +44,7 @@
<script>sudo podman image ls -q</script>
</completionHelp>
</properties>
- <command>sudo ${vyos_op_scripts_dir}/containers_op.py --remove "${4}"</command>
+ <command>sudo podman image rm --force "${4}"</command>
</tagNode>
</children>
</node>
@@ -100,13 +100,13 @@
<properties>
<help>Show containers</help>
</properties>
- <command>sudo ${vyos_op_scripts_dir}/containers_op.py --all</command>
+ <command>sudo podman ps --all</command>
<children>
<leafNode name="image">
<properties>
<help>Show container image</help>
</properties>
- <command>sudo ${vyos_op_scripts_dir}/containers_op.py --image</command>
+ <command>sudo podman image ls</command>
</leafNode>
<tagNode name="log">
<properties>
@@ -121,7 +121,7 @@
<properties>
<help>Show available container networks</help>
</properties>
- <command>sudo ${vyos_op_scripts_dir}/containers_op.py --networks</command>
+ <command>sudo podman network ls</command>
</leafNode>
</children>
</node>
@@ -167,7 +167,7 @@
<path>container name</path>
</completionHelp>
</properties>
- <command>sudo ${vyos_op_scripts_dir}/containers_op.py --update "${4}"</command>
+ <command>if cli-shell-api existsActive container name "$4"; then sudo podman pull $(cli-shell-api returnActiveValue container name "$4" image); else echo "Container $4 does not exist"; fi</command>
</tagNode>
</children>
</node>
diff --git a/op-mode-definitions/monitor-log.xml.in b/op-mode-definitions/monitor-log.xml.in
index 6f82ce611..7ecce4f78 100644
--- a/op-mode-definitions/monitor-log.xml.in
+++ b/op-mode-definitions/monitor-log.xml.in
@@ -16,18 +16,18 @@
</node>
<node name="dhcp">
<properties>
- <help>Show log for Dynamic Host Control Protocol (DHCP)</help>
+ <help>Monitor last lines of Dynamic Host Control Protocol (DHCP)</help>
</properties>
<children>
<node name="server">
<properties>
- <help>Show log for DHCP server</help>
+ <help>Monitor last lines of DHCP server</help>
</properties>
<command>journalctl --no-hostname --follow --boot --unit isc-dhcp-server.service</command>
</node>
<node name="client">
<properties>
- <help>Show DHCP client logs</help>
+ <help>Monitor last lines of DHCP client</help>
</properties>
<command>journalctl --no-hostname --follow --boot --unit "dhclient@*.service"</command>
<children>
@@ -46,18 +46,18 @@
</node>
<node name="dhcpv6">
<properties>
- <help>Show log for Dynamic Host Control Protocol IPv6 (DHCPv6)</help>
+ <help>Monitor last lines of Dynamic Host Control Protocol IPv6 (DHCPv6)</help>
</properties>
<children>
<node name="server">
<properties>
- <help>Show log for DHCPv6 server</help>
+ <help>Monitor last lines of DHCPv6 server</help>
</properties>
<command>journalctl --no-hostname --follow --boot --unit isc-dhcp-server6.service</command>
</node>
<node name="client">
<properties>
- <help>Show DHCPv6 client logs</help>
+ <help>Monitor last lines of DHCPv6 client</help>
</properties>
<command>journalctl --no-hostname --follow --boot --unit "dhcp6c@*.service"</command>
<children>
@@ -74,12 +74,24 @@
</node>
</children>
</node>
+ <leafNode name="flow-accounting">
+ <properties>
+ <help>Monitor last lines of flow-accounting log</help>
+ </properties>
+ <command>journalctl --no-hostname --boot --follow --unit uacctd.service</command>
+ </leafNode>
<leafNode name="kernel">
<properties>
<help>Monitor last lines of Linux Kernel log</help>
</properties>
<command>journalctl --no-hostname --boot --follow --dmesg</command>
</leafNode>
+ <leafNode name="nhrp">
+ <properties>
+ <help>Monitor last lines of NHRP log</help>
+ </properties>
+ <command>journalctl --no-hostname --boot --unit opennhrp.service</command>
+ </leafNode>
<node name="pppoe">
<properties>
<help>Monitor last lines of PPPoE log</help>
diff --git a/op-mode-definitions/show-log.xml.in b/op-mode-definitions/show-log.xml.in
index 954369712..76879e5d6 100644
--- a/op-mode-definitions/show-log.xml.in
+++ b/op-mode-definitions/show-log.xml.in
@@ -139,6 +139,12 @@
</tagNode>
</children>
</node>
+ <leafNode name="flow-accounting">
+ <properties>
+ <help>Show log for flow-accounting</help>
+ </properties>
+ <command>journalctl --no-hostname --boot --unit uacctd.service</command>
+ </leafNode>
<leafNode name="https">
<properties>
<help>Show log for HTTPs</help>
@@ -195,6 +201,12 @@
</properties>
<command>egrep -i "kernel:.*\[NAT-[A-Z]{3,}-[0-9]+(-MASQ)?\]" $(find /var/log -maxdepth 1 -type f -name messages\* | sort -t. -k2nr)</command>
</leafNode>
+ <leafNode name="nhrp">
+ <properties>
+ <help>Show log for NHRP</help>
+ </properties>
+ <command>journalctl --no-hostname --boot --unit opennhrp.service</command>
+ </leafNode>
<node name="openvpn">
<properties>
<help>Show log for OpenVPN</help>
diff --git a/op-mode-definitions/show-system.xml.in b/op-mode-definitions/show-system.xml.in
index 0f852164e..68b473bc1 100644
--- a/op-mode-definitions/show-system.xml.in
+++ b/op-mode-definitions/show-system.xml.in
@@ -166,9 +166,9 @@
</leafNode>
<leafNode name="uptime">
<properties>
- <help>Show how long the system has been up</help>
+ <help>Show system uptime and load averages</help>
</properties>
- <command>uptime</command>
+ <command>${vyos_op_scripts_dir}/show_uptime.py</command>
</leafNode>
</children>
</node>
diff --git a/op-mode-definitions/traceroute.xml.in b/op-mode-definitions/traceroute.xml.in
index e3217235c..aba0f45e3 100644
--- a/op-mode-definitions/traceroute.xml.in
+++ b/op-mode-definitions/traceroute.xml.in
@@ -2,226 +2,22 @@
<interfaceDefinition>
<tagNode name="traceroute">
<properties>
- <help>Track network path to node</help>
- <completionHelp>
- <list>&lt;hostname&gt; &lt;x.x.x.x&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
- </completionHelp>
- </properties>
- <command>/usr/bin/traceroute "$2"</command>
- </tagNode>
- <node name="traceroute">
- <properties>
- <help>Track network path to node</help>
+ <help>Trace network path to node</help>
<completionHelp>
<list>&lt;hostname&gt; &lt;x.x.x.x&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
</completionHelp>
</properties>
+ <command>${vyos_op_scripts_dir}/traceroute.py ${@:2}</command>
<children>
- <tagNode name="ipv4">
+ <leafNode name="node.tag">
<properties>
- <help>Explicitly use IPv4 when tracing the path</help>
+ <help>Traceroute options</help>
<completionHelp>
- <list>&lt;hostname&gt; &lt;x.x.x.x&gt;</list>
+ <script>${vyos_op_scripts_dir}/traceroute.py --get-options "${COMP_WORDS[@]}"</script>
</completionHelp>
</properties>
- <command>/usr/bin/traceroute -4 "$3"</command>
- <children>
- <node name="tcp">
- <properties>
- <help>Route tracing and port detection using TCP</help>
- </properties>
- <command>sudo /usr/bin/tcptraceroute "$3" </command>
- <children>
- <tagNode name="port">
- <properties>
- <help>TCP port to connect to for path tracing</help>
- <completionHelp>
- <list>0-65535</list>
- </completionHelp>
- </properties>
- <command>sudo /usr/bin/tcptraceroute "$3" $6</command>
- </tagNode>
- </children>
- </node>
- </children>
- </tagNode>
- <tagNode name="ipv6">
- <properties>
- <help>Explicitly use IPv6 when tracing the path</help>
- <completionHelp>
- <list>&lt;hostname&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
- </completionHelp>
- </properties>
- <command>/usr/bin/traceroute -6 "$3"</command>
- <children>
- <node name="tcp">
- <properties>
- <help>Use TCP/IPv6 packets to perform a traceroute</help>
- </properties>
- <command>sudo /usr/bin/tcptraceroute6 "$3" </command>
- <children>
- <tagNode name="port">
- <properties>
- <help>TCP port to connect to for path tracing</help>
- <completionHelp>
- <list>0-65535</list>
- </completionHelp>
- </properties>
- <command>sudo /usr/bin/tcptraceroute6 "$3" $6</command>
- </tagNode>
- </children>
- </node>
- </children>
- </tagNode>
- <tagNode name="vrf">
- <properties>
- <help>Track network path to specified node via given VRF</help>
- <completionHelp>
- <path>vrf name</path>
- </completionHelp>
- </properties>
- <children>
- <!-- we need an empty tagNode to pass in a plain fqdn/ip address and
- let traceroute decide how to handle this parameter -->
- <tagNode name="">
- <properties>
- <help>Track network path to specified node via given VRF</help>
- <completionHelp>
- <list>&lt;hostname&gt; &lt;x.x.x.x&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
- </completionHelp>
- </properties>
- <command>sudo ip vrf exec "$3" /usr/bin/traceroute "$4"</command>
- </tagNode>
- <tagNode name="ipv4">
- <properties>
- <help>Explicitly use IPv4 when tracing the path via given VRF</help>
- <completionHelp>
- <list>&lt;hostname&gt; &lt;x.x.x.x&gt;</list>
- </completionHelp>
- </properties>
- <command>sudo ip vrf exec "$3" /usr/bin/traceroute -4 "$5"</command>
- <children>
- <node name="tcp">
- <properties>
- <help>Route tracing and port detection using TCP</help>
- </properties>
- <command>sudo ip vrf exec "$3" /usr/bin/tcptraceroute "$5" </command>
- <children>
- <tagNode name="port">
- <properties>
- <help>TCP port to connect to for path tracing</help>
- <completionHelp>
- <list>0-65535</list>
- </completionHelp>
- </properties>
- <command>sudo ip vrf exec "$3" /usr/bin/tcptraceroute "$5" $8</command>
- </tagNode>
- </children>
- </node>
- </children>
- </tagNode>
- <tagNode name="ipv6">
- <properties>
- <help>Explicitly use IPv6 when tracing the path via given VRF</help>
- <completionHelp>
- <list>&lt;hostname&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
- </completionHelp>
- </properties>
- <command>sudo ip vrf exec "$3" /usr/bin/traceroute -6 "$5"</command>
- <children>
- <node name="tcp">
- <properties>
- <help>Use TCP/IPv6 packets to perform a traceroute</help>
- </properties>
- <command>sudo ip vrf exec "$3" /usr/bin/tcptraceroute6 "$5" </command>
- <children>
- <tagNode name="port">
- <properties>
- <help>TCP port to connect to for path tracing</help>
- <completionHelp>
- <list>0-65535</list>
- </completionHelp>
- </properties>
- <command>sudo ip vrf exec "$3" /usr/bin/tcptraceroute6 "$5" $8</command>
- </tagNode>
- </children>
- </node>
- </children>
- </tagNode>
- </children>
- </tagNode>
- </children>
- </node>
- <node name="monitor">
- <children>
- <tagNode name="traceroute">
- <properties>
- <help>Monitor path to destination in realtime</help>
- <completionHelp>
- <list>&lt;hostname&gt; &lt;x.x.x.x&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
- </completionHelp>
- </properties>
- <command>/usr/bin/mtr "$3"</command>
- </tagNode>
- <node name="traceroute">
- <children>
- <tagNode name="ipv4">
- <properties>
- <help>IPv4 fully qualified domain name (FQDN)</help>
- <completionHelp>
- <list>&lt;fqdn&gt;</list>
- </completionHelp>
- </properties>
- <command>/usr/bin/mtr -4 "$4"</command>
- </tagNode>
- <tagNode name="ipv6">
- <properties>
- <help>IPv6 fully qualified domain name (FQDN)</help>
- <completionHelp>
- <list>&lt;fqdn&gt;</list>
- </completionHelp>
- </properties>
- <command>/usr/bin/mtr -6 "$4"</command>
- </tagNode>
- <tagNode name="vrf">
- <properties>
- <help>Monitor path to destination in realtime via given VRF</help>
- <completionHelp>
- <path>vrf name</path>
- </completionHelp>
- </properties>
- <children>
- <tagNode name="ipv4">
- <properties>
- <help>IPv4 fully qualified domain name (FQDN)</help>
- <completionHelp>
- <list>&lt;fqdn&gt;</list>
- </completionHelp>
- </properties>
- <command>sudo ip vrf exec "$4" /usr/bin/mtr -4 "$6"</command>
- </tagNode>
- <tagNode name="ipv6">
- <properties>
- <help>IPv6 fully qualified domain name (FQDN)</help>
- <completionHelp>
- <list>&lt;fqdn&gt;</list>
- </completionHelp>
- </properties>
- <command>sudo ip vrf exec "$4" /usr/bin/mtr -6 "$6"</command>
- </tagNode>
- <tagNode name="">
- <properties>
- <help>Track network path to specified node via given VRF</help>
- <completionHelp>
- <list>&lt;hostname&gt; &lt;x.x.x.x&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
- </completionHelp>
- </properties>
- <command>sudo ip vrf exec "$4" /usr/bin/mtr "$5"</command>
- </tagNode>
- </children>
- </tagNode>
- </children>
- </node>
+ <command>${vyos_op_scripts_dir}/traceroute.py ${@:2}</command>
+ </leafNode>
</children>
- </node>
+ </tagNode>
</interfaceDefinition>