summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/add-system-image.xml62
-rw-r--r--op-mode-definitions/anyconnect.xml20
-rw-r--r--op-mode-definitions/configure.xml24
-rw-r--r--op-mode-definitions/connect.xml29
-rw-r--r--op-mode-definitions/date.xml64
-rw-r--r--op-mode-definitions/dhcp.xml203
-rw-r--r--op-mode-definitions/disconnect.xml20
-rw-r--r--op-mode-definitions/disks.xml50
-rw-r--r--op-mode-definitions/dns-dynamic.xml75
-rw-r--r--op-mode-definitions/dns-forwarding.xml94
-rw-r--r--op-mode-definitions/flow-accounting-op.xml81
-rw-r--r--op-mode-definitions/force-arp.xml79
-rw-r--r--op-mode-definitions/force-ipv6-nd.xml33
-rw-r--r--op-mode-definitions/force-ipv6-rd.xml34
-rw-r--r--op-mode-definitions/generate-macsec-key.xml26
-rw-r--r--op-mode-definitions/generate-ssh-server-key.xml16
-rw-r--r--op-mode-definitions/igmp-proxy.xml13
-rw-r--r--op-mode-definitions/ipoe-server.xml81
-rw-r--r--op-mode-definitions/ipv4-route.xml87
-rw-r--r--op-mode-definitions/ipv6-route.xml133
-rw-r--r--op-mode-definitions/l2tp-server.xml26
-rw-r--r--op-mode-definitions/lldp.xml37
-rw-r--r--op-mode-definitions/monitor-bandwidth-test.xml29
-rw-r--r--op-mode-definitions/monitor-bandwidth.xml23
-rw-r--r--op-mode-definitions/monitor-log.xml13
-rw-r--r--op-mode-definitions/monitor-ndp.xml44
-rw-r--r--op-mode-definitions/nat.xml98
-rw-r--r--op-mode-definitions/openvpn.xml140
-rw-r--r--op-mode-definitions/ping.xml23
-rw-r--r--op-mode-definitions/poweroff.xml52
-rw-r--r--op-mode-definitions/pppoe-server.xml104
-rw-r--r--op-mode-definitions/pptp-server.xml26
-rw-r--r--op-mode-definitions/reboot.xml52
-rw-r--r--op-mode-definitions/reset-conntrack.xml16
-rw-r--r--op-mode-definitions/reset-ip-igmp.xml24
-rw-r--r--op-mode-definitions/reset-ip-multicast.xml24
-rw-r--r--op-mode-definitions/reset-vpn.xml96
-rw-r--r--op-mode-definitions/restart-frr.xml63
-rw-r--r--op-mode-definitions/show-acceleration.xml63
-rw-r--r--op-mode-definitions/show-bridge.xml36
-rw-r--r--op-mode-definitions/show-configuration.xml37
-rw-r--r--op-mode-definitions/show-console-server.xml36
-rw-r--r--op-mode-definitions/show-environment.xml21
-rw-r--r--op-mode-definitions/show-hardware.xml94
-rw-r--r--op-mode-definitions/show-history.xml31
-rw-r--r--op-mode-definitions/show-host.xml44
-rw-r--r--op-mode-definitions/show-interfaces-bonding.xml59
-rw-r--r--op-mode-definitions/show-interfaces-bridge.xml42
-rw-r--r--op-mode-definitions/show-interfaces-dummy.xml42
-rw-r--r--op-mode-definitions/show-interfaces-ethernet.xml91
-rw-r--r--op-mode-definitions/show-interfaces-input.xml42
-rw-r--r--op-mode-definitions/show-interfaces-l2tpv3.xml42
-rw-r--r--op-mode-definitions/show-interfaces-loopback.xml42
-rw-r--r--op-mode-definitions/show-interfaces-macsec.xml29
-rw-r--r--op-mode-definitions/show-interfaces-pppoe.xml51
-rw-r--r--op-mode-definitions/show-interfaces-pseudo-ethernet.xml42
-rw-r--r--op-mode-definitions/show-interfaces-tunnel.xml42
-rw-r--r--op-mode-definitions/show-interfaces-vti.xml42
-rw-r--r--op-mode-definitions/show-interfaces-vxlan.xml42
-rw-r--r--op-mode-definitions/show-interfaces-wirelessmodem.xml51
-rw-r--r--op-mode-definitions/show-interfaces.xml27
-rw-r--r--op-mode-definitions/show-ip-access-paths-prefix-community-lists.xml116
-rw-r--r--op-mode-definitions/show-ip-bgp.xml342
-rw-r--r--op-mode-definitions/show-ip-igmp.xml48
-rw-r--r--op-mode-definitions/show-ip-multicast.xml42
-rw-r--r--op-mode-definitions/show-ip-ospf.xml579
-rw-r--r--op-mode-definitions/show-ip-pim.xml72
-rw-r--r--op-mode-definitions/show-ip-ports.xml17
-rw-r--r--op-mode-definitions/show-ip-rip.xml28
-rw-r--r--op-mode-definitions/show-ip-route.xml160
-rw-r--r--op-mode-definitions/show-ipv6-bgp.xml24
-rw-r--r--op-mode-definitions/show-license.xml13
-rw-r--r--op-mode-definitions/show-log.xml218
-rw-r--r--op-mode-definitions/show-login.xml33
-rw-r--r--op-mode-definitions/show-monitoring.xml13
-rw-r--r--op-mode-definitions/show-mpls.xml65
-rw-r--r--op-mode-definitions/show-ntp.xml31
-rw-r--r--op-mode-definitions/show-poweroff.xml13
-rw-r--r--op-mode-definitions/show-protocols-bfd.xml49
-rw-r--r--op-mode-definitions/show-protocols-static.xml32
-rw-r--r--op-mode-definitions/show-raid.xml16
-rw-r--r--op-mode-definitions/show-reboot.xml13
-rw-r--r--op-mode-definitions/show-route-map.xml22
-rw-r--r--op-mode-definitions/show-rpki.xml32
-rw-r--r--op-mode-definitions/show-system.xml183
-rw-r--r--op-mode-definitions/show-table.xml13
-rw-r--r--op-mode-definitions/show-users.xml30
-rw-r--r--op-mode-definitions/show-version.xml33
-rw-r--r--op-mode-definitions/show-vpn.xml20
-rw-r--r--op-mode-definitions/show-vrf.xml30
-rw-r--r--op-mode-definitions/snmp.xml111
-rw-r--r--op-mode-definitions/sstp-server.xml26
-rw-r--r--op-mode-definitions/telnet.xml30
-rw-r--r--op-mode-definitions/terminal.xml122
-rw-r--r--op-mode-definitions/traceroute.xml227
-rw-r--r--op-mode-definitions/traffic-dump.xml45
-rw-r--r--op-mode-definitions/vrrp.xml37
-rw-r--r--op-mode-definitions/wake-on-lan.xml26
-rw-r--r--op-mode-definitions/wireguard.xml138
-rw-r--r--op-mode-definitions/wireless.xml119
100 files changed, 6330 insertions, 0 deletions
diff --git a/op-mode-definitions/add-system-image.xml b/op-mode-definitions/add-system-image.xml
new file mode 100644
index 000000000..3dc1c67ab
--- /dev/null
+++ b/op-mode-definitions/add-system-image.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="add">
+ <children>
+ <node name="system">
+ <properties>
+ <help>Add item to a system facility</help>
+ </properties>
+ <children>
+ <tagNode name="image">
+ <properties>
+ <help>Add a new image to the system</help>
+ <completionHelp>
+ <list>/path/to/vyos-image.iso http://example.com/vyos-image.iso</list>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyatta_sbindir}/install-image --url "${4}"</command>
+ <children>
+ <tagNode name="vrf">
+ <properties>
+ <help>Download image via specified VRF</help>
+ <completionHelp>
+ <path>vrf name</path>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyatta_sbindir}/install-image --url "${4}" --vrf "${6}"</command>
+ <children>
+ <tagNode name="username">
+ <properties>
+ <help>Username for authentication</help>
+ </properties>
+ <children>
+ <tagNode name="password">
+ <properties>
+ <help>Password to use with authentication</help>
+ </properties>
+ <command>sudo ${vyatta_sbindir}/install-image --url "${4}" --vrf "${6}" --username "${8}" --password "${10}"</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </tagNode>
+ <tagNode name="username">
+ <properties>
+ <help>Username for authentication</help>
+ </properties>
+ <children>
+ <tagNode name="password">
+ <properties>
+ <help>Password to use with authentication</help>
+ </properties>
+ <command>sudo ${vyatta_sbindir}/install-image --url "${4}" --username "${6}" --password "${8}"</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/anyconnect.xml b/op-mode-definitions/anyconnect.xml
new file mode 100644
index 000000000..7e8cdd35b
--- /dev/null
+++ b/op-mode-definitions/anyconnect.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="anyconnect-server">
+ <properties>
+ <help>show anyconnect-server information</help>
+ </properties>
+ <children>
+ <leafNode name="sessions">
+ <properties>
+ <help>Show active anyconnect server sessions</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/anyconnect-control.py --action="show_sessions"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/configure.xml b/op-mode-definitions/configure.xml
new file mode 100644
index 000000000..3dd5a0f45
--- /dev/null
+++ b/op-mode-definitions/configure.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="configure">
+ <properties>
+ <help>Enter configuration mode</help>
+ </properties>
+ <command>if [ `id -u` == 0 ]; then
+ echo "You are attempting to enter configuration mode as root."
+ echo "It may have unintended consequences and render your system"
+ echo "unusable until restart."
+ echo "Please do it as an administrator level VyOS user instead."
+ else
+ if grep -q -e '^overlay.*/filesystem.squashfs' /proc/mounts; then
+ echo "WARNING: You are currently configuring a live-ISO environment, changes will not persist until installed"
+ fi
+ history -w
+ export _OFR_CONFIGURE=ok
+ newgrp vyattacfg
+ unset _OFR_CONFIGURE
+ _vyatta_op_do_key_bindings
+ history -r
+ fi</command>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/connect.xml b/op-mode-definitions/connect.xml
new file mode 100644
index 000000000..1ec62949a
--- /dev/null
+++ b/op-mode-definitions/connect.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="connect">
+ <properties>
+ <help>Establish connection</help>
+ </properties>
+ <children>
+ <tagNode name="console">
+ <properties>
+ <help>Connect to device attached to serial console server</help>
+ <completionHelp>
+ <path>service console-server device</path>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/console "$3"</command>
+ </tagNode>
+ <tagNode name="interface">
+ <properties>
+ <help>Bring up a connection-oriented network interface</help>
+ <completionHelp>
+ <path>interfaces pppoe</path>
+ <path>interfaces wirelessmodem</path>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/connect_disconnect.py --connect "$3"</command>
+ </tagNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/date.xml b/op-mode-definitions/date.xml
new file mode 100644
index 000000000..15a69dbd9
--- /dev/null
+++ b/op-mode-definitions/date.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="date">
+ <properties>
+ <help>Show system time and date</help>
+ </properties>
+ <command>/bin/date</command>
+ <children>
+ <node name="utc">
+ <properties>
+ <help>Show system date and time as Coordinated Universal Time</help>
+ </properties>
+ <command>/bin/date -u</command>
+ <children>
+ <leafNode name="maya">
+ <properties>
+ <help>Show UTC date in Maya calendar format</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/maya_date.py $(date +%s)</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="set">
+ <children>
+ <tagNode name="date">
+ <properties>
+ <help>Set system date and time</help>
+ <completionHelp>
+ <list>&lt;MMDDhhmm&gt; &lt;MMDDhhmmYY&gt; &lt;MMDDhhmmCCYY&gt; &lt;MMDDhhmmCCYY.ss&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/bin/date "$3"</command>
+ </tagNode>
+ <node name="date">
+ <properties>
+ <help>Set system date and time</help>
+ </properties>
+ <children>
+ <node name="ntp">
+ <properties>
+ <help>Set system date and time from NTP server (default: 0.pool.ntp.org)</help>
+ </properties>
+ <command>/usr/sbin/ntpdate -u 0.pool.ntp.org</command>
+ </node>
+ <tagNode name="ntp">
+ <properties>
+ <help>Set system date and time from NTP server</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_ntp_servers.sh</script>
+ </completionHelp>
+ </properties>
+ <command>/usr/sbin/ntpdate -u "$4"</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/dhcp.xml b/op-mode-definitions/dhcp.xml
new file mode 100644
index 000000000..48752cfd5
--- /dev/null
+++ b/op-mode-definitions/dhcp.xml
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="dhcp">
+ <properties>
+ <help>Show DHCP (Dynamic Host Configuration Protocol) information</help>
+ </properties>
+ <children>
+ <node name="server">
+ <properties>
+ <help>Show DHCP server information</help>
+ </properties>
+ <children>
+ <node name="leases">
+ <properties>
+ <help>Show DHCP server leases</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases</command>
+ <children>
+ <tagNode name="pool">
+ <properties>
+ <help>Show DHCP server leases for a specific pool</help>
+ <completionHelp>
+ <script>sudo ${vyos_op_scripts_dir}/show_dhcp.py --allowed pool</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases --pool $6</command>
+ </tagNode>
+ <tagNode name="sort">
+ <properties>
+ <help>Show DHCP server leases sorted by the specified key</help>
+ <completionHelp>
+ <script>sudo ${vyos_op_scripts_dir}/show_dhcp.py --allowed sort</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases --sort $6</command>
+ </tagNode>
+ <tagNode name="state">
+ <properties>
+ <help>Show DHCP server leases with a specific state (can be multiple, comma-separated)</help>
+ <completionHelp>
+ <script>sudo ${vyos_op_scripts_dir}/show_dhcp.py --allowed state</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases --state $(echo $6 | tr , " ")</command>
+ </tagNode>
+ </children>
+ </node>
+ <node name="statistics">
+ <properties>
+ <help>Show DHCP server statistics</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --statistics</command>
+ <children>
+ <tagNode name="pool">
+ <properties>
+ <help>Show DHCP server statistics for a specific pool</help>
+ <completionHelp>
+ <script>sudo ${vyos_op_scripts_dir}/show_dhcp.py --allowed pool</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcp.py --statistics --pool $6</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="dhcpv6">
+ <properties>
+ <help>Show DHCPv6 (IPv6 Dynamic Host Configuration Protocol) information</help>
+ </properties>
+ <children>
+ <node name="server">
+ <properties>
+ <help>Show DHCPv6 server information</help>
+ </properties>
+ <children>
+ <node name="leases">
+ <properties>
+ <help>Show DHCPv6 server leases</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases</command>
+ <children>
+ <tagNode name="pool">
+ <properties>
+ <help>Show DHCPv6 server leases for a specific pool</help>
+ <completionHelp>
+ <script>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --allowed pool</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases --pool $6</command>
+ </tagNode>
+ <tagNode name="sort">
+ <properties>
+ <help>Show DHCPv6 server leases sorted by the specified key</help>
+ <completionHelp>
+ <script>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --allowed sort</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases --sort $6</command>
+ </tagNode>
+ <tagNode name="state">
+ <properties>
+ <help>Show DHCPv6 server leases with a specific state (can be multiple, comma-separated)</help>
+ <completionHelp>
+ <script>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --allowed state</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases --state $(echo $6 | tr , " ")</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="restart">
+ <children>
+ <node name="dhcp">
+ <properties>
+ <help>Restart DHCP processes</help>
+ </properties>
+ <children>
+ <node name="server">
+ <properties>
+ <help>Restart the DHCP server process</help>
+ </properties>
+ <command>sudo systemctl restart isc-dhcp-server.service</command>
+ </node>
+ <node name="relay-agent">
+ <properties>
+ <help>Restart the DHCP server process</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/restart_dhcp_relay.py --ipv4</command>
+ </node>
+ </children>
+ </node>
+ <node name="dhcpv6">
+ <properties>
+ <help>Restart DHCPv6 processes</help>
+ </properties>
+ <children>
+ <node name="server">
+ <properties>
+ <help>Restart the DHCPv6 server process</help>
+ </properties>
+ <command>sudo systemctl restart isc-dhcp-server6.service</command>
+ </node>
+ <node name="relay-agent">
+ <properties>
+ <help>Restart the DHCP server process</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/restart_dhcp_relay.py --ipv6</command>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="renew">
+ <properties>
+ <help>Renew specified variable</help>
+ </properties>
+ <children>
+ <node name="dhcp">
+ <properties>
+ <help>Renew DHCP client lease</help>
+ </properties>
+ <children>
+ <tagNode name="interface">
+ <properties>
+ <help>Renew DHCP client lease for specified interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ <command>sudo systemctl restart "dhclient@$4.service"</command>
+ </tagNode>
+ </children>
+ </node>
+ <node name="dhcpv6">
+ <properties>
+ <help>Renew DHCPv6 client lease</help>
+ </properties>
+ <children>
+ <tagNode name="interface">
+ <properties>
+ <help>Renew DHCPv6 client lease for specified interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ <command>sudo systemctl restart "dhcp6c@$4.service"</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/disconnect.xml b/op-mode-definitions/disconnect.xml
new file mode 100644
index 000000000..bf2c37b89
--- /dev/null
+++ b/op-mode-definitions/disconnect.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="disconnect">
+ <properties>
+ <help>Take down a connection</help>
+ </properties>
+ <children>
+ <tagNode name="interface">
+ <properties>
+ <help>Take down a connection-oriented network interface</help>
+ <completionHelp>
+ <path>interfaces pppoe</path>
+ <path>interfaces wirelessmodem</path>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/connect_disconnect.py --disconnect "$3"</command>
+ </tagNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/disks.xml b/op-mode-definitions/disks.xml
new file mode 100644
index 000000000..fb39c4f3c
--- /dev/null
+++ b/op-mode-definitions/disks.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="format">
+ <properties>
+ <help>Format a device</help>
+ </properties>
+ <children>
+ <tagNode name="disk">
+ <properties>
+ <help>Format a disk drive</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_disks.py</script>
+ </completionHelp>
+ </properties>
+ <children>
+ <tagNode name="like">
+ <properties>
+ <help>Format this disk the same as another disk</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_disks.py --exclude ${COMP_WORDS[2]}</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/format_disk.py --target $3 --proto $5</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+
+ <node name="show">
+ <children>
+ <tagNode name="disk">
+ <properties>
+ <help>Show status of disk device</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_disks.py</script>
+ </completionHelp>
+ </properties>
+ <children>
+ <leafNode name="format">
+ <properties>
+ <help>Show disk drive formatting</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_disk_format.sh $3</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/dns-dynamic.xml b/op-mode-definitions/dns-dynamic.xml
new file mode 100644
index 000000000..9c37874fb
--- /dev/null
+++ b/op-mode-definitions/dns-dynamic.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="log">
+ <children>
+ <node name="dns">
+ <children>
+ <node name="dynamic">
+ <properties>
+ <help>Show log for dynamic DNS</help>
+ </properties>
+ <command>cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e "ddclient"</command>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="dns">
+ <properties>
+ <help>Show DNS information</help>
+ </properties>
+ <children>
+ <node name="dynamic">
+ <properties>
+ <help>Show Dynamic DNS information</help>
+ </properties>
+ <children>
+ <leafNode name="status">
+ <properties>
+ <help>Show Dynamic DNS status</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/dynamic_dns.py --status</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="restart">
+ <children>
+ <node name="dns">
+ <children>
+ <node name="dynamic">
+ <properties>
+ <help>Restart Dynamic DNS service</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/dynamic_dns.py --update</command>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="update">
+ <properties>
+ <help>Update data for a service</help>
+ </properties>
+ <children>
+ <node name="dns">
+ <properties>
+ <help>Update DNS information</help>
+ </properties>
+ <children>
+ <node name="dynamic">
+ <properties>
+ <help>Update Dynamic DNS information</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/dynamic_dns.py --update</command>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/dns-forwarding.xml b/op-mode-definitions/dns-forwarding.xml
new file mode 100644
index 000000000..23de97704
--- /dev/null
+++ b/op-mode-definitions/dns-forwarding.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="log">
+ <children>
+ <node name="dns">
+ <properties>
+ <help>Show log for Domain Name Service (DNS)</help>
+ </properties>
+ <children>
+ <node name="forwarding">
+ <properties>
+ <help>Show log for DNS Forwarding</help>
+ </properties>
+ <command>cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e "pdns_recursor"</command>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="dns">
+ <properties>
+ <help>Show DNS information</help>
+ </properties>
+ <children>
+ <node name="forwarding">
+ <properties>
+ <help>Show DNS forwarding information</help>
+ </properties>
+ <children>
+ <leafNode name="statistics">
+ <properties>
+ <help>Show DNS forwarding statistics</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/dns_forwarding_statistics.py</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="restart">
+ <children>
+ <node name="dns">
+ <properties>
+ <help>Restart a DNS service</help>
+ </properties>
+ <children>
+ <leafNode name="forwarding">
+ <properties>
+ <help>Restart DNS forwarding service</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/dns_forwarding_restart.sh</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="reset">
+ <properties>
+ <help>Reset a service</help>
+ </properties>
+ <children>
+ <node name="dns">
+ <properties>
+ <help>Reset a DNS service state</help>
+ </properties>
+ <children>
+ <node name="forwarding">
+ <properties>
+ <help>Reset DNS forwarding cache</help>
+ </properties>
+ <children>
+ <tagNode name="domain">
+ <command>sudo ${vyos_op_scripts_dir}/dns_forwarding_reset.py $5</command>
+ <properties>
+ <help>Reset DNS forwarding cache for a domain</help>
+ </properties>
+ </tagNode>
+ <leafNode name="all">
+ <command>sudo ${vyos_op_scripts_dir}/dns_forwarding_reset.py --all</command>
+ <properties>
+ <help>Reset DNS forwarding cache</help>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/flow-accounting-op.xml b/op-mode-definitions/flow-accounting-op.xml
new file mode 100644
index 000000000..912805d59
--- /dev/null
+++ b/op-mode-definitions/flow-accounting-op.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- flow-accounting op mode commands -->
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="flow-accounting">
+ <properties>
+ <help>Show flow accounting statistics</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/flow_accounting_op.py --action show</command>
+ <children>
+ <tagNode name="interface">
+ <properties>
+ <help>Show flow accounting statistics for specified interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/flow_accounting_op.py --action show --interface $4</command>
+ <children>
+ <tagNode name="host">
+ <properties>
+ <help>Show flow accounting statistics for specified interface/host</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/flow_accounting_op.py --action show --interface $4 --host $6</command>
+ </tagNode>
+ <tagNode name="port">
+ <properties>
+ <help>Show flow accounting statistics for specified interface/port</help>
+ <completionHelp>
+ <list>1-65535</list>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/flow_accounting_op.py --action show --interface $4 --ports $6</command>
+ </tagNode>
+ <tagNode name="top">
+ <properties>
+ <help>Show top N flows for specified interface</help>
+ <completionHelp>
+ <list>1-100</list>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/flow_accounting_op.py --action show --interface $4 --top $6</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="restart">
+ <children>
+ <leafNode name="flow-accounting">
+ <properties>
+ <help>Restart flow-accounting service</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/flow_accounting_op.py --action restart</command>
+ </leafNode>
+ </children>
+ </node>
+ <node name="clear">
+ <children>
+ <node name="flow-accounting">
+ <properties>
+ <help>Clear flow accounting</help>
+ </properties>
+ <children>
+ <leafNode name="counters">
+ <properties>
+ <help>Clear flow accounting statistics</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/flow_accounting_op.py --action clear</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/force-arp.xml b/op-mode-definitions/force-arp.xml
new file mode 100644
index 000000000..c7bcad413
--- /dev/null
+++ b/op-mode-definitions/force-arp.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="force">
+ <properties>
+ <help>Force an operation</help>
+ </properties>
+ <children>
+ <node name="arp">
+ <properties>
+ <help>Send gratuitous ARP request or reply</help>
+ </properties>
+ <children>
+ <node name="reply">
+ <properties>
+ <help>Send gratuitous ARP reply</help>
+ </properties>
+ <children>
+ <tagNode name="interface">
+ <properties>
+ <help>Send gratuitous ARP reply on specified interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py --broadcast</script>
+ </completionHelp>
+ </properties>
+ <children>
+ <tagNode name="address">
+ <properties>
+ <help>Send gratuitous ARP reply for specified address</help>
+ </properties>
+ <command>sudo /usr/bin/arping -I $5 -c 1 -A $7</command>
+ <children>
+ <tagNode name="count">
+ <properties>
+ <help>Send specified number of ARP replies</help>
+ </properties>
+ <command>sudo /usr/bin/arping -I $5 -c $9 -A $7</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ <node name="request">
+ <properties>
+ <help>Send gratuitous ARP request</help>
+ </properties>
+ <children>
+ <tagNode name="interface">
+ <properties>
+ <help>Send gratuitous ARP request on specified interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py --broadcast</script>
+ </completionHelp>
+ </properties>
+ <children>
+ <tagNode name="address">
+ <properties>
+ <help>Send gratuitous ARP request for specified address</help>
+ </properties>
+ <command>sudo /usr/bin/arping -I $5 -c 1 -U $7</command>
+ <children>
+ <tagNode name="count">
+ <properties>
+ <help>Send specified number of ARP requests</help>
+ </properties>
+ <command>sudo /usr/bin/arping -I $5 -c $9 -U $7</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/force-ipv6-nd.xml b/op-mode-definitions/force-ipv6-nd.xml
new file mode 100644
index 000000000..49de097f6
--- /dev/null
+++ b/op-mode-definitions/force-ipv6-nd.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="force">
+ <children>
+ <node name="ipv6-nd">
+ <properties>
+ <help>IPv6 Neighbor Discovery</help>
+ </properties>
+ <children>
+ <tagNode name="interface">
+ <properties>
+ <help>IPv6 Neighbor Discovery on specified interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ <children>
+ <tagNode name="address">
+ <properties>
+ <help>IPv6 address of node to lookup</help>
+ <completionHelp>
+ <list>&lt;h:h:h:h:h:h:h:h&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/ndisc6 -m "$6" "$4"</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/force-ipv6-rd.xml b/op-mode-definitions/force-ipv6-rd.xml
new file mode 100644
index 000000000..8c901af25
--- /dev/null
+++ b/op-mode-definitions/force-ipv6-rd.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="force">
+ <children>
+ <node name="ipv6-rd">
+ <properties>
+ <help>IPv6 Router Discovery</help>
+ </properties>
+ <children>
+ <tagNode name="interface">
+ <properties>
+ <help>IPv6 Router Discovery on specified interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/rdisc6 "$4"</command>
+ <children>
+ <tagNode name="address">
+ <properties>
+ <help>IPv6 address of target</help>
+ <completionHelp>
+ <list>&lt;h:h:h:h:h:h:h:h&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/rdisc6 -m "$6" "$4"</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/generate-macsec-key.xml b/op-mode-definitions/generate-macsec-key.xml
new file mode 100644
index 000000000..40d2b9061
--- /dev/null
+++ b/op-mode-definitions/generate-macsec-key.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="generate">
+ <children>
+ <node name="macsec">
+ <properties>
+ <help>Generate MACsec Key</help>
+ </properties>
+ <children>
+ <node name="mka-cak">
+ <properties>
+ <help>Generate MACsec connectivity association key (CAK)</help>
+ </properties>
+ <command>/usr/bin/hexdump -n 16 -e '4/4 "%08x" 1 "\n"' /dev/random</command>
+ </node>
+ <node name="mka-ckn">
+ <properties>
+ <help>Generate MACsec connectivity association name (CKN)</help>
+ </properties>
+ <command>/usr/bin/hexdump -n 32 -e '8/4 "%08x" 1 "\n"' /dev/random</command>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/generate-ssh-server-key.xml b/op-mode-definitions/generate-ssh-server-key.xml
new file mode 100644
index 000000000..a6ebf1b78
--- /dev/null
+++ b/op-mode-definitions/generate-ssh-server-key.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="generate">
+ <properties>
+ <help>Generate an object</help>
+ </properties>
+ <children>
+ <node name="ssh-server-key">
+ <properties>
+ <help>Regenerate the host SSH keys and restart the SSH server</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/generate_ssh_server_key.py</command>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/igmp-proxy.xml b/op-mode-definitions/igmp-proxy.xml
new file mode 100644
index 000000000..8533138d7
--- /dev/null
+++ b/op-mode-definitions/igmp-proxy.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interfaceDefinition>
+ <node name="restart">
+ <children>
+ <node name="igmp-proxy">
+ <properties>
+ <help>Restart the IGMP proxy process</help>
+ </properties>
+ <command>sudo systemctl restart igmpproxy.service</command>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/ipoe-server.xml b/op-mode-definitions/ipoe-server.xml
new file mode 100644
index 000000000..c20d3aa2a
--- /dev/null
+++ b/op-mode-definitions/ipoe-server.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="reset">
+ <children>
+ <node name="ipoe-server">
+ <properties>
+ <help>Clear ipoe-server sessions or process</help>
+ </properties>
+ <children>
+ <node name="session">
+ <properties>
+ <help>Clear ipoe-server session</help>
+ </properties>
+ <children>
+ <tagNode name="username">
+ <properties>
+ <help>Clear ipoe-server session by username</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_ipoe.py --selector="username"</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ipoe-control.py --action="terminate" --selector="username" --target="$5"</command>
+ </tagNode>
+ <tagNode name="sid">
+ <properties>
+ <help>Clear ipoe-server session by Session ID</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_ipoe.py --selector="sid"</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ipoe-control.py --action="terminate" --selector="sid" --target="$5"</command>
+ </tagNode>
+ <tagNode name="interface">
+ <properties>
+ <help>Clear ipoe-server session by interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_ipoe.py --selector="ifname"</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ipoe-control.py --action="terminate" --selector="if" --target="$5"</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="show">
+ <children>
+ <node name="ipoe-server">
+ <properties>
+ <help>show ipoe-server status</help>
+ </properties>
+ <children>
+ <leafNode name="sessions">
+ <properties>
+ <help>Show active IPoE server sessions</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ipoe-control.py --action="show_sessions"</command>
+ </leafNode>
+ <leafNode name="statistics">
+ <properties>
+ <help>Show IPoE server statistics</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ipoe-control.py --action="show_stat"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="restart">
+ <children>
+ <leafNode name="ipoe-server">
+ <properties>
+ <help>show ipoe-server status</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ipoe-control.py --action="restart"</command>
+ </leafNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/ipv4-route.xml b/op-mode-definitions/ipv4-route.xml
new file mode 100644
index 000000000..1bda3ac11
--- /dev/null
+++ b/op-mode-definitions/ipv4-route.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <properties>
+ <help>Show system information</help>
+ </properties>
+ <children>
+ <node name="ip">
+ <properties>
+ <help>Show IPv4 information</help>
+ </properties>
+ <children>
+ <leafNode name="groups">
+ <properties>
+ <help>Show IP multicast group membership</help>
+ </properties>
+ <command>netstat -gn4</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+
+ <node name="reset">
+ <properties>
+ <help>Reset a service</help>
+ </properties>
+ <children>
+ <node name="ip">
+ <properties>
+ <help>Reset Internet Protocol (IP) parameters</help>
+ </properties>
+ <children>
+ <node name="arp">
+ <properties>
+ <help>Reset Address Resolution Protocol (ARP) cache</help>
+ </properties>
+ <children>
+ <tagNode name="address">
+ <properties>
+ <help>Reset ARP cache for an IPv4 address</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>sudo /sbin/ip neigh flush to "$5"</command>
+ </tagNode>
+ <tagNode name="interface">
+ <properties>
+ <help>Reset ARP cache for interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ <command>sudo /sbin/ip neigh flush dev "$5"</command>
+ </tagNode>
+ </children>
+ </node>
+
+ <node name="route">
+ <properties>
+ <help>Reset IP route</help>
+ </properties>
+ <children>
+ <leafNode name= "cache">
+ <properties>
+ <help>Flush the kernel route cache</help>
+ </properties>
+ <command>sudo /sbin/ip route flush cache</command>
+ </leafNode>
+
+ <tagNode name="cache">
+ <properties>
+ <help>Flush the kernel route cache for a given route</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt; &lt;x.x.x.x/x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>sudo /sbin/ip route flush cache "$5"</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/ipv6-route.xml b/op-mode-definitions/ipv6-route.xml
new file mode 100644
index 000000000..fbf6489ba
--- /dev/null
+++ b/op-mode-definitions/ipv6-route.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <properties>
+ <help>Show system information</help>
+ </properties>
+ <children>
+ <node name="ipv6">
+ <properties>
+ <help>Show IPv6 routing information</help>
+ </properties>
+ <children>
+ <leafNode name="groups">
+ <properties>
+ <help>Show IPv6 multicast group membership</help>
+ </properties>
+ <command>netstat -gn6</command>
+ </leafNode>
+
+ <leafNode name="neighbors">
+ <properties>
+ <help>Show IPv6 Neighbor Discovery (ND) information</help>
+ </properties>
+ <command>ip -f inet6 neigh list</command>
+ </leafNode>
+
+ <node name="route">
+ <properties>
+ <help>Show IPv6 routes</help>
+ </properties>
+ <children>
+ <node name="cache">
+ <properties>
+ <help>Show kernel IPv6 route cache</help>
+ </properties>
+ <command>ip -s -f inet6 route list cache</command>
+ </node>
+ <tagNode name="cache">
+ <properties>
+ <help>Show kernel IPv6 route cache for a given route</help>
+ <completionHelp>
+ <list>&lt;h:h:h:h:h:h:h:h&gt; &lt;h:h:h:h:h:h:h:h/x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>ip -s -f inet6 route list cache $5</command>
+ </tagNode>
+ <node name="forward">
+ <properties>
+ <help>Show kernel IPv6 route table</help>
+ </properties>
+ <command>ip -f inet6 route list</command>
+ </node>
+ <tagNode name="forward">
+ <properties>
+ <help>Show kernel IPv6 route table for a given route</help>
+ <completionHelp>
+ <list>&lt;h:h:h:h:h:h:h:h&gt; &lt;h:h:h:h:h:h:h:h/x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>ip -s -f inet6 route list $5</command>
+ </tagNode>
+ </children>
+ </node>
+
+ </children>
+ </node>
+ </children>
+ </node>
+
+ <node name="reset">
+ <properties>
+ <help>Reset a service</help>
+ </properties>
+ <children>
+ <node name="ipv6">
+ <properties>
+ <help>Reset Internet Protocol version 6 (IPv6) parameters</help>
+ </properties>
+ <children>
+ <node name="neighbors">
+ <properties>
+ <help>Reset IPv6 Neighbor Discovery (ND) cache</help>
+ </properties>
+ <children>
+ <tagNode name="address">
+ <properties>
+ <help>Reset ND cache for an IPv6 address</help>
+ <completionHelp>
+ <list>&lt;h:h:h:h:h:h:h:h&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>sudo ip -f inet6 neigh flush to "$5"</command>
+ </tagNode>
+ <tagNode name="interface">
+ <properties>
+ <help>Reset IPv6 ND cache for interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ip -f inet6 neigh flush dev "$5"</command>
+ </tagNode>
+ </children>
+ </node>
+
+ <node name="route">
+ <properties>
+ <help>Reset IPv6 route</help>
+ </properties>
+ <children>
+ <leafNode name= "cache">
+ <properties>
+ <help>Flush the kernel IPv6 route cache</help>
+ </properties>
+ <command>sudo ip -f inet6 route flush cache</command>
+ </leafNode>
+
+ <tagNode name="cache">
+ <properties>
+ <help>Flush the kernel IPv6 route cache for a given route</help>
+ <completionHelp>
+ <list>&lt;h:h:h:h:h:h:h:h&gt; &lt;h:h:h:h:h:h:h:h/x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>sudo ip -f inet6 route flush cache "$5"</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/l2tp-server.xml b/op-mode-definitions/l2tp-server.xml
new file mode 100644
index 000000000..3e96b9365
--- /dev/null
+++ b/op-mode-definitions/l2tp-server.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="l2tp-server">
+ <properties>
+ <help>Show L2TP server information</help>
+ </properties>
+ <children>
+ <leafNode name="sessions">
+ <properties>
+ <help>Show active L2TP server sessions</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ppp-server-ctrl.py --proto="l2tp" --action="show sessions"</command>
+ </leafNode>
+ <leafNode name="statistics">
+ <properties>
+ <help>Show L2TP server statistics</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ppp-server-ctrl.py --proto="l2tp" --action="show stat"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/lldp.xml b/op-mode-definitions/lldp.xml
new file mode 100644
index 000000000..297ccf1f4
--- /dev/null
+++ b/op-mode-definitions/lldp.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="lldp">
+ <properties>
+ <help>Show LLDP (Link Layer Discovery Protocol)</help>
+ </properties>
+ <children>
+ <node name="neighbors">
+ <properties>
+ <help>Show LLDP neighbors</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/lldp_op.py --all</command>
+ <children>
+ <node name="detail">
+ <properties>
+ <help>Show LLDP neighbor details</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/lldp_op.py --detail</command>
+ </node>
+ <tagNode name="interface">
+ <properties>
+ <help>Show LLDP for specified interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/lldp_op.py --interface $5</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/monitor-bandwidth-test.xml b/op-mode-definitions/monitor-bandwidth-test.xml
new file mode 100644
index 000000000..d1e459b17
--- /dev/null
+++ b/op-mode-definitions/monitor-bandwidth-test.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="monitor">
+ <children>
+ <node name="bandwidth-test">
+ <properties>
+ <help>Initiate or wait for bandwidth test</help>
+ </properties>
+ <children>
+ <leafNode name="accept">
+ <properties>
+ <help>Wait for bandwidth test connections (port TCP/5001)</help>
+ </properties>
+ <command>iperf -s</command>
+ </leafNode>
+ <tagNode name="initiate">
+ <properties>
+ <help>Initiate a bandwidth test to specified host (port TCP/5001)</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>iperf -c $4</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/monitor-bandwidth.xml b/op-mode-definitions/monitor-bandwidth.xml
new file mode 100644
index 000000000..9af0a9e70
--- /dev/null
+++ b/op-mode-definitions/monitor-bandwidth.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="monitor">
+ <children>
+ <node name="bandwidth">
+ <properties>
+ <help>Monitor interface bandwidth in real time</help>
+ </properties>
+ <children>
+ <tagNode name="interface">
+ <command>bmon -b -p $4</command>
+ <properties>
+ <help>Monitor bandwidth usage on specified interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/monitor-log.xml b/op-mode-definitions/monitor-log.xml
new file mode 100644
index 000000000..99efe5306
--- /dev/null
+++ b/op-mode-definitions/monitor-log.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="monitor">
+ <children>
+ <node name="log">
+ <properties>
+ <help>Monitor last lines of messages file</help>
+ </properties>
+ <command>tail --follow=name /var/log/messages</command>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/monitor-ndp.xml b/op-mode-definitions/monitor-ndp.xml
new file mode 100644
index 000000000..1ac6ce39b
--- /dev/null
+++ b/op-mode-definitions/monitor-ndp.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="monitor">
+ <children>
+ <node name="ndp">
+ <properties>
+ <help>Monitor the NDP information received by the router through the device</help>
+ </properties>
+ <command>sudo ndptool monitor</command>
+ <children>
+ <tagNode name="interface">
+ <command>sudo ndptool monitor --ifname=$4</command>
+ <properties>
+ <help>Monitor ndp protocol on specified interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ <children>
+ <tagNode name="type">
+ <command>sudo ndptool monitor --ifname=$4 --msg-type=$6</command>
+ <properties>
+ <help>Monitor specific types of NDP protocols</help>
+ <completionHelp>
+ <list>rs ra ns na</list>
+ </completionHelp>
+ </properties>
+ </tagNode>
+ </children>
+ </tagNode>
+ <tagNode name="type">
+ <command>sudo ndptool monitor --msg-type=$4</command>
+ <properties>
+ <help>Monitor specific types of NDP protocols</help>
+ <completionHelp>
+ <list>rs ra ns na</list>
+ </completionHelp>
+ </properties>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/nat.xml b/op-mode-definitions/nat.xml
new file mode 100644
index 000000000..f6c0fa748
--- /dev/null
+++ b/op-mode-definitions/nat.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="nat">
+ <properties>
+ <help>Show Network Address Translation (NAT) information</help>
+ </properties>
+ <children>
+ <node name="source">
+ <properties>
+ <help>Show source Network Address Translation (NAT) information</help>
+ </properties>
+ <children>
+ <node name="rules">
+ <properties>
+ <help>Show configured source NAT rules</help>
+ </properties>
+ <command>echo To be migrated to Python - https://phabricator.vyos.net/T2459</command>
+ </node>
+ <node name="statistics">
+ <properties>
+ <help>Show statistics for configured source NAT rules</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_nat_statistics.py --source</command>
+ </node>
+ <node name="translations">
+ <properties>
+ <help>Show active source NAT translations</help>
+ </properties>
+ <children>
+ <tagNode name="address">
+ <properties>
+ <help>Show active source NAT translations for an IP address</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_nat_translations.py --type=source --verbose --ipaddr="$6"</command>
+ </tagNode>
+ <node name="detail">
+ <properties>
+ <help>Show active source NAT translations detail</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_nat_translations.py --type=source --verbose</command>
+ </node>
+ </children>
+ <command>${vyos_op_scripts_dir}/show_nat_translations.py --type=source</command>
+ </node>
+ </children>
+ </node>
+ <node name="destination">
+ <properties>
+ <help>Show destination Network Address Translation (NAT) information</help>
+ </properties>
+ <children>
+ <node name="rules">
+ <properties>
+ <help>Show configured destination NAT rules</help>
+ </properties>
+ <command>echo To be migrated to Python - https://phabricator.vyos.net/T2459</command>
+ </node>
+ <node name="statistics">
+ <properties>
+ <help>Show statistics for configured destination NAT rules</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_nat_statistics.py --destination</command>
+ </node>
+ <node name="translations">
+ <properties>
+ <help>Show active destination NAT translations</help>
+ </properties>
+ <children>
+ <tagNode name="address">
+ <properties>
+ <help>Show active NAT destination translations for an IP address</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_nat_translations.py --type=destination --verbose --ipaddr="$6"</command>
+ </tagNode>
+ <node name="detail">
+ <properties>
+ <help>Show active destination NAT translations detail</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_nat_translations.py --type=destination --verbose</command>
+ </node>
+ </children>
+ <command>${vyos_op_scripts_dir}/show_nat_translations.py --type=destination</command>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/openvpn.xml b/op-mode-definitions/openvpn.xml
new file mode 100644
index 000000000..b9cb06dca
--- /dev/null
+++ b/op-mode-definitions/openvpn.xml
@@ -0,0 +1,140 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="generate">
+ <children>
+ <node name="openvpn">
+ <properties>
+ <help>OpenVPN key generation tool</help>
+ </properties>
+ <children>
+ <tagNode name="key">
+ <properties>
+ <help>Generate shared-secret key with specified file name</help>
+ <completionHelp>
+ <list>&lt;filename&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>
+ result=1;
+ key_path=$4
+ full_path=
+
+ # Prepend /config/auth if the path is not absolute
+ if echo $key_path | egrep -ve '^/.*' &gt; /dev/null; then
+ full_path=/config/auth/$key_path
+ else
+ full_path=$key_path
+ fi
+
+ key_dir=`dirname $full_path`
+ if [ ! -d $key_dir ]; then
+ echo "Directory $key_dir does not exist!"
+ exit 1
+ fi
+
+ echo "Generating OpenVPN key to $full_path"
+ sudo /usr/sbin/openvpn --genkey --secret "$full_path"
+ result=$?
+ if [ $result = 0 ]; then
+ echo "Your new local OpenVPN key has been generated"
+ fi
+ /usr/libexec/vyos/validators/file-exists --directory /config/auth "$full_path"
+ </command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="reset">
+ <properties>
+ <help>Reset a service</help>
+ </properties>
+ <children>
+ <node name="openvpn">
+ <children>
+ <tagNode name="client">
+ <properties>
+ <help>Reset specified OpenVPN client</help>
+ <completionHelp>
+ <script>sudo ${vyos_completion_dir}/list_openvpn_clients.py --all</script>
+ </completionHelp>
+ </properties>
+ <command>echo kill $4 | socat - UNIX-CONNECT:/run/openvpn/openvpn-mgmt-intf &gt; /dev/null</command>
+ </tagNode>
+ <tagNode name="interface">
+ <properties>
+ <help>Reset OpenVPN process on interface</help>
+ <completionHelp>
+ <script>sudo ${vyos_completion_dir}/list_interfaces.py --type openvpn</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/reset_openvpn.py $4</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="show">
+ <children>
+ <node name="interfaces">
+ <children>
+ <node name="openvpn">
+ <properties>
+ <help>Show OpenVPN interface information</help>
+ </properties>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed OpenVPN interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=openvpn --action=show</command>
+ </leafNode>
+ </children>
+ </node>
+ <tagNode name="openvpn">
+ <properties>
+ <help>Show OpenVPN interface information</help>
+ <completionHelp>
+ <script>sudo ${vyos_completion_dir}/list_interfaces.py --type openvpn</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf=$4</command>
+ <children>
+ <leafNode name="brief">
+ <properties>
+ <help>Show summary of specified OpenVPN interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4" --action=show-brief</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ <node name="openvpn">
+ <properties>
+ <help>Show OpenVPN information</help>
+ </properties>
+ <children>
+ <leafNode name="client">
+ <properties>
+ <help>Show tunnel status for OpenVPN client interfaces</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_openvpn.py --mode=client</command>
+ </leafNode>
+ <leafNode name="server">
+ <properties>
+ <help>Show tunnel status for OpenVPN server interfaces</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_openvpn.py --mode=server</command>
+ </leafNode>
+ <leafNode name="site-to-site">
+ <properties>
+ <help>Show tunnel status for OpenVPN site-to-site interfaces</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_openvpn.py --mode=site-to-site</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/ping.xml b/op-mode-definitions/ping.xml
new file mode 100644
index 000000000..4c25a59ab
--- /dev/null
+++ b/op-mode-definitions/ping.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <tagNode name="ping">
+ <properties>
+ <help>Send Internet Control Message Protocol (ICMP) echo request</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}/ping.py ${@:2}</command>
+ <children>
+ <leafNode name="node.tag">
+ <properties>
+ <help>Ping options</help>
+ <completionHelp>
+ <script>${vyos_op_scripts_dir}/ping.py --get-options "${COMP_WORDS[@]}"</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ping.py ${@:2}</command>
+ </leafNode>
+ </children>
+ </tagNode>
+</interfaceDefinition>
diff --git a/op-mode-definitions/poweroff.xml b/op-mode-definitions/poweroff.xml
new file mode 100644
index 000000000..b4163bcb9
--- /dev/null
+++ b/op-mode-definitions/poweroff.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="poweroff">
+ <properties>
+ <help>Poweroff the system</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --poweroff</command>
+ <children>
+ <leafNode name="now">
+ <properties>
+ <help>Poweroff the system without confirmation</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --yes --poweroff</command>
+ </leafNode>
+ <leafNode name="cancel">
+ <properties>
+ <help>Cancel a pending poweroff</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --cancel</command>
+ </leafNode>
+ <tagNode name="in">
+ <properties>
+ <help>Poweroff in X minutes</help>
+ <completionHelp>
+ <list>&lt;Minutes&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --yes --poweroff $3 $4</command>
+ </tagNode>
+ <tagNode name="at">
+ <properties>
+ <help>Poweroff at a specific time</help>
+ <completionHelp>
+ <list>&lt;HH:MM&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --yes --poweroff $3</command>
+ <children>
+ <tagNode name="date">
+ <properties>
+ <help>Poweroff at a specific date</help>
+ <completionHelp>
+ <list>&lt;DDMMYYYY&gt; &lt;DD/MM/YYYY&gt; &lt;DD.MM.YYYY&gt; &lt;DD:MM:YYYY&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --yes --poweroff $3 $5</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/pppoe-server.xml b/op-mode-definitions/pppoe-server.xml
new file mode 100644
index 000000000..5ac9d9497
--- /dev/null
+++ b/op-mode-definitions/pppoe-server.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="pppoe-server">
+ <properties>
+ <help>Show pppoe-server status</help>
+ </properties>
+ <children>
+ <leafNode name="sessions">
+ <properties>
+ <help>Show active PPPoE server sessions</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ppp-server-ctrl.py --proto="pppoe" --action="show sessions"</command>
+ </leafNode>
+ <leafNode name="statistics">
+ <properties>
+ <help>Show PPPoE server statistics</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ppp-server-ctrl.py --proto="pppoe" --action="show stat"</command>
+ </leafNode>
+ <leafNode name="interfaces">
+ <properties>
+ <help>Show interfaces where pppoe-server listens on</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ppp-server-ctrl.py --proto="pppoe" --action="pppoe interface show"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="restart">
+ <children>
+ <leafNode name="pppoe-server">
+ <properties>
+ <help>Restarts pppoe-server</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ppp-server-ctrl.py --proto="pppoe" --action="restart"</command>
+ </leafNode>
+ </children>
+ </node>
+ <node name="reset">
+ <properties>
+ <help>Reset a service</help>
+ </properties>
+ <children>
+ <node name="pppoe-server">
+ <properties>
+ <help>Reset PPPoE server sessions</help>
+ </properties>
+ <children>
+ <leafNode name="all">
+ <properties>
+ <help>Terminate all pppoe-server users</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ppp-server-ctrl.py --proto="pppoe" --action="terminate all"</command>
+ </leafNode>
+ <tagNode name="interface">
+ <properties>
+ <help>Terminate a ppp interface</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ppp-server-ctrl.py --proto="pppoe" --action="terminate if $4"</command>
+ </tagNode>
+ <tagNode name="username">
+ <properties>
+ <help>Terminate specified users</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ppp-server-ctrl.py --proto="pppoe" --action="terminate username $4"</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="set">
+ <children>
+ <node name="pppoe-server">
+ <properties>
+ <help>Set PPPoE server maintenance mode</help>
+ </properties>
+ <children>
+ <node name="maintenance-mode">
+ <properties>
+ <help>Set PPPoE server maintenance mode</help>
+ </properties>
+ <children>
+ <leafNode name="enable">
+ <properties>
+ <help>Deny new connections and stop to serve pppoe after disconnect last session</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ppp-server-ctrl.py --proto="pppoe" --action="shutdown soft"</command>
+ </leafNode>
+ <leafNode name="cancel">
+ <properties>
+ <help>Cancel maintenance mode</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ppp-server-ctrl.py --proto="pppoe" --action="shutdown cancel"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/pptp-server.xml b/op-mode-definitions/pptp-server.xml
new file mode 100644
index 000000000..59be68611
--- /dev/null
+++ b/op-mode-definitions/pptp-server.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="pptp-server">
+ <properties>
+ <help>Show PPTP server information</help>
+ </properties>
+ <children>
+ <leafNode name="sessions">
+ <properties>
+ <help>Show active PPTP server sessions</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ppp-server-ctrl.py --proto="pptp" --action="show sessions"</command>
+ </leafNode>
+ <leafNode name="statistics">
+ <properties>
+ <help>Show PPTP server statistics</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ppp-server-ctrl.py --proto="pptp" --action="show stat"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/reboot.xml b/op-mode-definitions/reboot.xml
new file mode 100644
index 000000000..2c8daec5d
--- /dev/null
+++ b/op-mode-definitions/reboot.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="reboot">
+ <properties>
+ <help>Reboot the system</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --reboot</command>
+ <children>
+ <leafNode name="now">
+ <properties>
+ <help>Reboot the system without confirmation</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --yes --reboot</command>
+ </leafNode>
+ <leafNode name="cancel">
+ <properties>
+ <help>Cancel a pending reboot</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --cancel</command>
+ </leafNode>
+ <tagNode name="in">
+ <properties>
+ <help>Reboot in X minutes</help>
+ <completionHelp>
+ <list>&lt;Minutes&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --yes --reboot $3 $4</command>
+ </tagNode>
+ <tagNode name="at">
+ <properties>
+ <help>Reboot at a specific time</help>
+ <completionHelp>
+ <list>&lt;HH:MM&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --yes --reboot $3</command>
+ <children>
+ <tagNode name="date">
+ <properties>
+ <help>Reboot at a specific date</help>
+ <completionHelp>
+ <list>&lt;DDMMYYYY&gt; &lt;DD/MM/YYYY&gt; &lt;DD.MM.YYYY&gt; &lt;DD:MM:YYYY&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/powerctrl.py --yes --reboot $3 $5</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/reset-conntrack.xml b/op-mode-definitions/reset-conntrack.xml
new file mode 100644
index 000000000..827ba4af4
--- /dev/null
+++ b/op-mode-definitions/reset-conntrack.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="reset">
+ <properties>
+ <help>Reset a service</help>
+ </properties>
+ <children>
+ <node name="conntrack">
+ <properties>
+ <help>Reset all currently tracked connections</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/clear_conntrack.py</command>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/reset-ip-igmp.xml b/op-mode-definitions/reset-ip-igmp.xml
new file mode 100644
index 000000000..143553d33
--- /dev/null
+++ b/op-mode-definitions/reset-ip-igmp.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="reset">
+ <children>
+ <node name="ip">
+ <children>
+ <node name="igmp">
+ <properties>
+ <help>IGMP clear commands</help>
+ </properties>
+ <children>
+ <leafNode name="interfaces">
+ <properties>
+ <help>Reset IGMP interfaces</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "clear ip igmp interfaces"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/reset-ip-multicast.xml b/op-mode-definitions/reset-ip-multicast.xml
new file mode 100644
index 000000000..d610add16
--- /dev/null
+++ b/op-mode-definitions/reset-ip-multicast.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="reset">
+ <children>
+ <node name="ip">
+ <children>
+ <node name="multicast">
+ <properties>
+ <help>IP multicast routing table</help>
+ </properties>
+ <children>
+ <leafNode name="route">
+ <properties>
+ <help>Clear multicast routing table</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "clear ip mroute"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/reset-vpn.xml b/op-mode-definitions/reset-vpn.xml
new file mode 100644
index 000000000..ae553c272
--- /dev/null
+++ b/op-mode-definitions/reset-vpn.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="reset">
+ <properties>
+ <help>Reset a service</help>
+ </properties>
+ <children>
+ <node name="vpn">
+ <properties>
+ <help>Reset Virtual Private Network (VPN) information</help>
+ </properties>
+ <children>
+ <node name="remote-access">
+ <properties>
+ <help>Reset remote access VPN connections</help>
+ </properties>
+ <children>
+ <node name="all">
+ <properties>
+ <help>Terminate all user's current remote access VPN session(s)</help>
+ </properties>
+ <children>
+ <node name="protocol">
+ <properties>
+ <help>Terminate specified user's current remote access VPN session(s) with specified protocol</help>
+ </properties>
+ <children>
+ <leafNode name="l2tp">
+ <properties>
+ <help>Terminate all user's current remote access VPN session(s) with L2TP protocol</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/reset_vpn.py --username="all_users" --protocol="l2tp"</command>
+ </leafNode>
+ <leafNode name="pptp">
+ <properties>
+ <help>Terminate all user's current remote access VPN session(s) with PPTP protocol</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/reset_vpn.py --username="all_users" --protocol="pptp"</command>
+ </leafNode>
+ <leafNode name="sstp">
+ <properties>
+ <help>Terminate all user's current remote access VPN session(s) with SSTP protocol</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/reset_vpn.py --username="all_users" --protocol="sstp"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ <command>sudo ${vyos_op_scripts_dir}/reset_vpn.py --username="all_users"</command>
+ </node>
+ <tagNode name="interface">
+ <properties>
+ <help>Terminate a remote access VPN interface</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/reset_vpn.py --interface="$5"</command>
+ </tagNode>
+ <tagNode name="user">
+ <properties>
+ <help>Terminate specified user's current remote access VPN session(s)</help>
+ </properties>
+ <children>
+ <node name="protocol">
+ <properties>
+ <help>Terminate specified user's current remote access VPN session(s) with specified protocol</help>
+ </properties>
+ <children>
+ <leafNode name="l2tp">
+ <properties>
+ <help>Terminate all user's current remote access VPN session(s) with L2TP protocol</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/reset_vpn.py --username="$5" --protocol="l2tp"</command>
+ </leafNode>
+ <leafNode name="pptp">
+ <properties>
+ <help>Terminate all user's current remote access VPN session(s) with PPTP protocol</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/reset_vpn.py --username="$5" --protocol="pptp"</command>
+ </leafNode>
+ <leafNode name="sstp">
+ <properties>
+ <help>Terminate all user's current remote access VPN session(s) with SSTP protocol</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/reset_vpn.py --username="$5" --protocol="sstp"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ <command>sudo ${vyos_op_scripts_dir}/reset_vpn.py --username="$5"</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/restart-frr.xml b/op-mode-definitions/restart-frr.xml
new file mode 100644
index 000000000..96ad1a650
--- /dev/null
+++ b/op-mode-definitions/restart-frr.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="restart">
+ <children>
+ <node name="frr">
+ <properties>
+ <help>Restart FRRouting daemons</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart</command>
+ <children>
+ <leafNode name="bfdd">
+ <properties>
+ <help>Restart Bidirectional Forwarding Detection daemon</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon bfdd</command>
+ </leafNode>
+ <leafNode name="bgpd">
+ <properties>
+ <help>Restart Border Gateway Protocol daemon</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon bgpd</command>
+ </leafNode>
+ <leafNode name="ospfd">
+ <properties>
+ <help>Restart OSPFv2 daemon</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon ospfd</command>
+ </leafNode>
+ <leafNode name="ospf6d">
+ <properties>
+ <help>Restart OSPFv3 daemon</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon ospf6d</command>
+ </leafNode>
+ <leafNode name="ripd">
+ <properties>
+ <help>Restart Routing Information Protocol daemon</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon ripd</command>
+ </leafNode>
+ <leafNode name="ripngd">
+ <properties>
+ <help>Restart RIPng daemon</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon ripngd</command>
+ </leafNode>
+ <leafNode name="staticd">
+ <properties>
+ <help>Restart Static Route daemon</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon staticd</command>
+ </leafNode>
+ <leafNode name="zebra">
+ <properties>
+ <help>Restart IP routing manager daemon</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/restart_frr.py --action restart --daemon zebra</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-acceleration.xml b/op-mode-definitions/show-acceleration.xml
new file mode 100644
index 000000000..d0dcea2d6
--- /dev/null
+++ b/op-mode-definitions/show-acceleration.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="system">
+ <properties>
+ <help>Show system information</help>
+ </properties>
+ <children>
+ <node name="acceleration">
+ <properties>
+ <help>Acceleration components</help>
+ </properties>
+ <children>
+ <node name="qat">
+ <properties>
+ <help>Intel QAT (Quick Assist Technology) Devices</help>
+ </properties>
+ <children>
+ <tagNode name="device">
+ <properties>
+ <help>Show QAT information for a given acceleration device</help>
+ <completionHelp>
+ <script>${vyos_op_scripts_dir}/show_acceleration.py --dev_list</script>
+ </completionHelp>
+ </properties>
+ <children>
+ <node name="flows">
+ <properties>
+ <help>Intel QAT flows</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_acceleration.py --flow --dev $6</command>
+ </node>
+ <node name="config">
+ <properties>
+ <help>Intel QAT configuration</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_acceleration.py --conf --dev $6</command>
+ </node>
+ </children>
+ </tagNode>
+ <node name="status">
+ <properties>
+ <help>Intel QAT status</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_acceleration.py --status</command>
+ </node>
+ <node name="interrupts">
+ <properties>
+ <help>Intel QAT interrupts</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_acceleration.py --interrupts</command>
+ </node>
+ </children>
+ <command>${vyos_op_scripts_dir}/show_acceleration.py --hw</command>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-bridge.xml b/op-mode-definitions/show-bridge.xml
new file mode 100644
index 000000000..8c1f7c398
--- /dev/null
+++ b/op-mode-definitions/show-bridge.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <leafNode name="bridge">
+ <properties>
+ <help>Show bridging information</help>
+ </properties>
+ <command>/sbin/brctl show</command>
+ </leafNode>
+ <tagNode name="bridge">
+ <properties>
+ <help>Show bridge information for a given bridge interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py --type bridge</script>
+ </completionHelp>
+ </properties>
+ <command>/sbin/brctl show $3</command>
+ <children>
+ <leafNode name="macs">
+ <properties>
+ <help>Show bridge Media Access Control (MAC) address table</help>
+ </properties>
+ <command>/sbin/brctl showmacs $3</command>
+ </leafNode>
+ <leafNode name="spanning-tree">
+ <properties>
+ <help>Show bridge spanning tree information</help>
+ </properties>
+ <command>/sbin/brctl showstp $3</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-configuration.xml b/op-mode-definitions/show-configuration.xml
new file mode 100644
index 000000000..318942ab0
--- /dev/null
+++ b/op-mode-definitions/show-configuration.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="configuration">
+ <properties>
+ <help>Show available saved configurations</help>
+ </properties>
+ <!-- no admin check -->
+ <command>cli-shell-api showCfg --show-active-only --show-hide-secrets</command>
+ <children>
+ <node name="all">
+ <properties>
+ <help>Show running configuration (including default values)</help>
+ </properties>
+ <!-- no admin check -->
+ <command>cli-shell-api showCfg --show-show-defaults --show-active-only --show-hide-secrets</command>
+ </node>
+ <node name="commands">
+ <properties>
+ <help> Show running configuration as set commands </help>
+ </properties>
+ <!-- no admin check -->
+ <command>cli-shell-api showCfg --show-active-only | vyos-config-to-commands</command>
+ </node>
+ <node name="files">
+ <properties>
+ <help> Show available saved configurations </help>
+ </properties>
+ <!-- no admin check -->
+ <command>${vyos_op_scripts_dir}/show_configuration_files.sh</command>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-console-server.xml b/op-mode-definitions/show-console-server.xml
new file mode 100644
index 000000000..77a7f3376
--- /dev/null
+++ b/op-mode-definitions/show-console-server.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="log">
+ <children>
+ <leafNode name="console-server">
+ <properties>
+ <help>Show log for serial console server</help>
+ </properties>
+ <command>/usr/bin/journalctl -u conserver-server.service</command>
+ </leafNode>
+ </children>
+ </node>
+ <node name="console-server">
+ <properties>
+ <help>Show Console-Server information</help>
+ </properties>
+ <children>
+ <leafNode name="ports">
+ <properties>
+ <help>Examine console ports and configured baud rates</help>
+ </properties>
+ <command>/usr/bin/console -x</command>
+ </leafNode>
+ <leafNode name="user">
+ <properties>
+ <help>Show users on various consoles</help>
+ </properties>
+ <command>/usr/bin/console -u</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-environment.xml b/op-mode-definitions/show-environment.xml
new file mode 100644
index 000000000..95b658785
--- /dev/null
+++ b/op-mode-definitions/show-environment.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="environment">
+ <properties>
+ <help>Show current system environmental conditions</help>
+ </properties>
+ <children>
+ <leafNode name="sensors">
+ <properties>
+ <help>Show hardware monitoring results</help>
+ </properties>
+ <!-- Linux always adds "hypervisor" to CPU flags -->
+ <command>if ! grep -q hypervisor /proc/cpuinfo; then ${vyos_libexec_dir}/vyos-sudo.py ${vyos_op_scripts_dir}/show_sensors.py; else echo "VyOS running under hypervisor, no sensors available"; fi</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-hardware.xml b/op-mode-definitions/show-hardware.xml
new file mode 100644
index 000000000..c3ff3a60f
--- /dev/null
+++ b/op-mode-definitions/show-hardware.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="hardware">
+ <properties>
+ <help>Show system hardware details</help>
+ </properties>
+ <children>
+ <node name="cpu">
+ <properties>
+ <help>Show CPU info</help>
+ </properties>
+ <command>lscpu</command>
+ <children>
+ <node name="detail">
+ <properties>
+ <help> Show system CPU details</help>
+ </properties>
+ <command>cat /proc/cpuinfo</command>
+ </node>
+ <node name="summary">
+ <properties>
+ <help>Show CPU's on system</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/cpu_summary.py</command>
+ </node>
+ </children>
+ </node>
+ <node name="dmi">
+ <properties>
+ <help>Show system DMI details</help>
+ </properties>
+ <command>${vyatta_bindir}/vyatta-show-dmi</command>
+ </node>
+ <node name="mem">
+ <properties>
+ <help>Show system RAM details</help>
+ </properties>
+ <command>cat /proc/meminfo</command>
+ </node>
+ <node name="pci">
+ <properties>
+ <help>Show system PCI bus details</help>
+ </properties>
+ <command>lspci</command>
+ <children>
+ <node name="detail">
+ <properties>
+ <help>Show verbose system PCI bus details</help>
+ </properties>
+ <command>lspci -vvv</command>
+ </node>
+ </children>
+ </node>
+ <node name="scsi">
+ <properties>
+ <help>Show SCSI device information</help>
+ </properties>
+ <command>lsscsi</command>
+ <children>
+ <node name="detail">
+ <properties>
+ <help>Show detailed SCSI device information</help>
+ </properties>
+ <command>lsscsi -vvv</command>
+ </node>
+ </children>
+ </node>
+ <node name="usb">
+ <properties>
+ <help>Show peripherals connected to the USB bus</help>
+ </properties>
+ <command>/usr/bin/lsusb -t</command>
+ <children>
+ <node name="detail">
+ <properties>
+ <help>Show detailed USB bus information</help>
+ </properties>
+ <command>/usr/bin/lsusb -v</command>
+ </node>
+ <leafNode name="serial">
+ <properties>
+ <help>Show information about connected USB serial ports</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_usb_serial.py</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-history.xml b/op-mode-definitions/show-history.xml
new file mode 100644
index 000000000..7fb286264
--- /dev/null
+++ b/op-mode-definitions/show-history.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="history">
+ <properties>
+ <help>Show command history</help>
+ </properties>
+ <command>HISTTIMEFORMAT='%FT%T%z ' HISTFILE="$HOME/.bash_history" \set -o history; history</command>
+ <children>
+ <leafNode name="brief">
+ <properties>
+ <help>Show recent command history</help>
+ </properties>
+ <command>HISTTIMEFORMAT='%FT%T%z ' HISTFILE="$HOME/.bash_history" \set -o history; history 20</command>
+ </leafNode>
+ </children>
+ </node>
+
+ <tagNode name="history">
+ <properties>
+ <help>Show last N commands in history</help>
+ <completionHelp>
+ <list>&lt;NUMBER&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>HISTTIMEFORMAT='%FT%T%z ' HISTFILE="$HOME/.bash_history" \set -o history; history $3</command>
+ </tagNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-host.xml b/op-mode-definitions/show-host.xml
new file mode 100644
index 000000000..eee1288a1
--- /dev/null
+++ b/op-mode-definitions/show-host.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="host">
+ <properties>
+ <help>Show host information</help>
+ </properties>
+ <children>
+ <leafNode name="date">
+ <properties>
+ <help>Show host current date</help>
+ </properties>
+ <command>/bin/date</command>
+ </leafNode>
+ <leafNode name="domain">
+ <properties>
+ <help>Show domain name</help>
+ </properties>
+ <command>/bin/domainname -d</command>
+ </leafNode>
+ <leafNode name="name">
+ <properties>
+ <help>Show host name</help>
+ </properties>
+ <command>/bin/hostname</command>
+ </leafNode>
+ <tagNode name="lookup">
+ <properties>
+ <help>Lookup host information for hostname|IPv4 address</help>
+ </properties>
+ <command>/usr/bin/host $4</command>
+ </tagNode>
+ <leafNode name="os">
+ <properties>
+ <help>Show host operating system details</help>
+ </properties>
+ <command>/bin/uname -a</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-interfaces-bonding.xml b/op-mode-definitions/show-interfaces-bonding.xml
new file mode 100644
index 000000000..568b215af
--- /dev/null
+++ b/op-mode-definitions/show-interfaces-bonding.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="interfaces">
+ <children>
+ <tagNode name="bonding">
+ <properties>
+ <help>Show bonding interface information</help>
+ <completionHelp>
+ <path>interfaces bonding</path>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4"</command>
+ <children>
+ <leafNode name="brief">
+ <properties>
+ <help>Show summary of the specified bonding interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4" --action=show-brief</command>
+ </leafNode>
+ <tagNode name="vif">
+ <properties>
+ <help>Show specified virtual network interface (vif) information</help>
+ <completionHelp>
+ <path>interfaces bonding ${COMP_WORDS[3]} vif</path>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4.$6"</command>
+ <children>
+ <leafNode name="brief">
+ <properties>
+ <help>Show summary of specified virtual network interface (vif) information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4.$6" --action=show-brief</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </tagNode>
+ <node name="bonding">
+ <properties>
+ <help>Show bonding interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=bonding --action=show-brief</command>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed bonding interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=bonding --action=show</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-interfaces-bridge.xml b/op-mode-definitions/show-interfaces-bridge.xml
new file mode 100644
index 000000000..85fde95b5
--- /dev/null
+++ b/op-mode-definitions/show-interfaces-bridge.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="interfaces">
+ <children>
+ <tagNode name="bridge">
+ <properties>
+ <help>Show bridge interface information</help>
+ <completionHelp>
+ <path>interfaces bridge</path>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4"</command>
+ <children>
+ <leafNode name="brief">
+ <properties>
+ <help>Show summary of the specified bridge interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4" --action=show-brief</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <node name="bridge">
+ <properties>
+ <help>Show bridge interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=bridge --action=show-brief</command>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed bridge interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=bridge --action=show</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-interfaces-dummy.xml b/op-mode-definitions/show-interfaces-dummy.xml
new file mode 100644
index 000000000..7c24c6921
--- /dev/null
+++ b/op-mode-definitions/show-interfaces-dummy.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="interfaces">
+ <children>
+ <tagNode name="dummy">
+ <properties>
+ <help>Show dummy interface information</help>
+ <completionHelp>
+ <path>interfaces dummy</path>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4"</command>
+ <children>
+ <leafNode name="brief">
+ <properties>
+ <help>Show summary of the specified dummy interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4" --action=show-brief</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <node name="dummy">
+ <properties>
+ <help>Show dummy interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=dummy --action=show-brief</command>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed dummy interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=dummy --action=show</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-interfaces-ethernet.xml b/op-mode-definitions/show-interfaces-ethernet.xml
new file mode 100644
index 000000000..bdcfa55f1
--- /dev/null
+++ b/op-mode-definitions/show-interfaces-ethernet.xml
@@ -0,0 +1,91 @@
+<?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>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4"</command>
+ <children>
+ <leafNode name="brief">
+ <properties>
+ <help>Show summary of the specified ethernet interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4" --action=show-brief</command>
+ </leafNode>
+ <leafNode name="identify">
+ <properties>
+ <help>Visually identify specified ethernet interface</help>
+ </properties>
+ <command>echo "Blinking interface $4 for 30 seconds."; /sbin/ethtool --identify "$4" 30</command>
+ </leafNode>
+ <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" | sed -e 1d -e '/fixed/d' -e 's/^\t*//g' -e 's/://' | column -t -s' '</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>
+ <tagNode name="vif">
+ <properties>
+ <help>Show specified virtual network interface (vif) information</help>
+ <completionHelp>
+ <path>interfaces ethernet ${COMP_WORDS[3]} vif</path>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4.$6"</command>
+ <children>
+ <leafNode name="brief">
+ <properties>
+ <help>Show summary of specified virtual network interface (vif) information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4.$6" --action=show-brief</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </tagNode>
+ <node name="ethernet">
+ <properties>
+ <help>Show ethernet interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=ethernet --action=show-brief</command>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed ethernet interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=ethernet --action=show</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-interfaces-input.xml b/op-mode-definitions/show-interfaces-input.xml
new file mode 100644
index 000000000..15e8203e5
--- /dev/null
+++ b/op-mode-definitions/show-interfaces-input.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="interfaces">
+ <children>
+ <tagNode name="input">
+ <properties>
+ <help>Show input interface information</help>
+ <completionHelp>
+ <path>interfaces input</path>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4"</command>
+ <children>
+ <leafNode name="brief">
+ <properties>
+ <help>Show summary of the specified input interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4" --action=show-brief</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <node name="input">
+ <properties>
+ <help>Show input interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=input --action=show-brief</command>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed input interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=input --action=show</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-interfaces-l2tpv3.xml b/op-mode-definitions/show-interfaces-l2tpv3.xml
new file mode 100644
index 000000000..60fee34a1
--- /dev/null
+++ b/op-mode-definitions/show-interfaces-l2tpv3.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="interfaces">
+ <children>
+ <tagNode name="l2tpv3">
+ <properties>
+ <help>Show L2TPv3 interface information</help>
+ <completionHelp>
+ <path>interfaces l2tpv3</path>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4"</command>
+ <children>
+ <leafNode name="brief">
+ <properties>
+ <help>Show summary of the specified L2TPv3 interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4" --action=show-brief</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <node name="l2tpv3">
+ <properties>
+ <help>Show L2TPv3 interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=l2tpv3 --action=show-brief</command>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed L2TPv3 interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=l2tpv3 --action=show</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-interfaces-loopback.xml b/op-mode-definitions/show-interfaces-loopback.xml
new file mode 100644
index 000000000..b30b57909
--- /dev/null
+++ b/op-mode-definitions/show-interfaces-loopback.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="interfaces">
+ <children>
+ <tagNode name="loopback">
+ <properties>
+ <help>Show loopback interface information</help>
+ <completionHelp>
+ <path>interfaces loopback</path>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4"</command>
+ <children>
+ <leafNode name="brief">
+ <properties>
+ <help>Show summary of the specified dummy interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4" --action=show-brief</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <node name="loopback">
+ <properties>
+ <help>Show loopback interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=loopback --action=show-brief</command>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed dummy interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=dummy --action=show</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-interfaces-macsec.xml b/op-mode-definitions/show-interfaces-macsec.xml
new file mode 100644
index 000000000..6aeab66af
--- /dev/null
+++ b/op-mode-definitions/show-interfaces-macsec.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="interfaces">
+ <children>
+ <node name="macsec">
+ <properties>
+ <help>Show MACsec interface information</help>
+ <completionHelp>
+ <path>interfaces macsec</path>
+ </completionHelp>
+ </properties>
+ <command>/usr/sbin/ip macsec show</command>
+ </node>
+ <tagNode name="macsec">
+ <properties>
+ <help>Show specified MACsec interface information</help>
+ <completionHelp>
+ <path>interfaces macsec</path>
+ </completionHelp>
+ </properties>
+ <command>/usr/sbin/ip macsec show $4</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-interfaces-pppoe.xml b/op-mode-definitions/show-interfaces-pppoe.xml
new file mode 100644
index 000000000..393ca912f
--- /dev/null
+++ b/op-mode-definitions/show-interfaces-pppoe.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="interfaces">
+ <children>
+ <tagNode name="pppoe">
+ <properties>
+ <help>Show PPPoE interface information</help>
+ <completionHelp>
+ <path>interfaces pppoe</path>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4"</command>
+ <children>
+ <leafNode name="log">
+ <properties>
+ <help>Show specified PPPoE interface log</help>
+ </properties>
+ <command>/usr/bin/journalctl -u "ppp@$4".service</command>
+ </leafNode>
+ <leafNode name="statistics">
+ <properties>
+ <help>Show specified PPPoE interface statistics</help>
+ <completionHelp>
+ <path>interfaces pppoe</path>
+ </completionHelp>
+ </properties>
+ <command>if [ -d "/sys/class/net/$4" ]; then /usr/sbin/pppstats "$4"; fi</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <node name="pppoe">
+ <properties>
+ <help>Show PPPoE interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=pppoe --action=show-brief</command>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed PPPoE interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=pppoe --action=show</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-interfaces-pseudo-ethernet.xml b/op-mode-definitions/show-interfaces-pseudo-ethernet.xml
new file mode 100644
index 000000000..195944745
--- /dev/null
+++ b/op-mode-definitions/show-interfaces-pseudo-ethernet.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="interfaces">
+ <children>
+ <tagNode name="pseudo-ethernet">
+ <properties>
+ <help>Show pseudo-ethernet/MACvlan interface information</help>
+ <completionHelp>
+ <path>interfaces pseudo-ethernet</path>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4"</command>
+ <children>
+ <leafNode name="brief">
+ <properties>
+ <help>Show summary of the specified pseudo-ethernet/MACvlan interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4" --action=show-brief</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <node name="pseudo-ethernet">
+ <properties>
+ <help>Show pseudo-ethernet/MACvlan interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=pseudo-ethernet --action=show-brief</command>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed pseudo-ethernet/MACvlan interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=pseudo-ethernet --action=show</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-interfaces-tunnel.xml b/op-mode-definitions/show-interfaces-tunnel.xml
new file mode 100644
index 000000000..416de0299
--- /dev/null
+++ b/op-mode-definitions/show-interfaces-tunnel.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="interfaces">
+ <children>
+ <tagNode name="tunnel">
+ <properties>
+ <help>Show tunnel interface information</help>
+ <completionHelp>
+ <path>interfaces tunnel</path>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4"</command>
+ <children>
+ <leafNode name="brief">
+ <properties>
+ <help>Show summary of the specified tunnel interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4" --action=show-brief</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <node name="tunnel">
+ <properties>
+ <help>Show tunnel interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=tunnel --action=show-brief</command>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed tunnel interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=tunnel --action=show</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-interfaces-vti.xml b/op-mode-definitions/show-interfaces-vti.xml
new file mode 100644
index 000000000..f51be2d19
--- /dev/null
+++ b/op-mode-definitions/show-interfaces-vti.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="interfaces">
+ <children>
+ <tagNode name="vti">
+ <properties>
+ <help>Show vti interface information</help>
+ <completionHelp>
+ <path>interfaces vti</path>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4"</command>
+ <children>
+ <leafNode name="brief">
+ <properties>
+ <help>Show summary of the specified vti interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4" --action=show-brief</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <node name="vti">
+ <properties>
+ <help>Show vti interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=vti --action=show-brief</command>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed vti interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=vti --action=show</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-interfaces-vxlan.xml b/op-mode-definitions/show-interfaces-vxlan.xml
new file mode 100644
index 000000000..4e3cb93cd
--- /dev/null
+++ b/op-mode-definitions/show-interfaces-vxlan.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="interfaces">
+ <children>
+ <tagNode name="vxlan">
+ <properties>
+ <help>Show VXLAN interface information</help>
+ <completionHelp>
+ <path>interfaces vxlan</path>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4"</command>
+ <children>
+ <leafNode name="brief">
+ <properties>
+ <help>Show summary of the specified VXLAN interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4" --action=show-brief</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <node name="vxlan">
+ <properties>
+ <help>Show VXLAN interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=vxlan --action=show-brief</command>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed VXLAN interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=vxlan --action=show</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-interfaces-wirelessmodem.xml b/op-mode-definitions/show-interfaces-wirelessmodem.xml
new file mode 100644
index 000000000..c0ab9c66f
--- /dev/null
+++ b/op-mode-definitions/show-interfaces-wirelessmodem.xml
@@ -0,0 +1,51 @@
+<?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 -u "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.xml b/op-mode-definitions/show-interfaces.xml
new file mode 100644
index 000000000..39b0f0a2c
--- /dev/null
+++ b/op-mode-definitions/show-interfaces.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="interfaces">
+ <properties>
+ <help>Show network interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --action=show-brief</command>
+ <children>
+ <leafNode name="counters">
+ <properties>
+ <help>Show network interface counters</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --action=show-count</command>
+ </leafNode>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed information of all interfaces</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --action=show</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-ip-access-paths-prefix-community-lists.xml b/op-mode-definitions/show-ip-access-paths-prefix-community-lists.xml
new file mode 100644
index 000000000..a5ec65c94
--- /dev/null
+++ b/op-mode-definitions/show-ip-access-paths-prefix-community-lists.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="ip">
+ <properties>
+ <help>Show IPv4 routing information</help>
+ </properties>
+ <children>
+ <leafNode name="access-list">
+ <properties>
+ <help>Show all IP access-lists</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip access-list"</command>
+ </leafNode>
+ <tagNode name="access-list">
+ <properties>
+ <help>Show all IP access-lists</help>
+ <completionHelp>
+ <path>policy access-list</path>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip access-list $4"</command>
+ </tagNode>
+ <leafNode name="as-path-access-list">
+ <properties>
+ <help>Show all as-path-access-lists</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip as-path-access-list"</command>
+ </leafNode>
+ <tagNode name="as-path-access-list">
+ <properties>
+ <help>Show all as-path-access-lists</help>
+ <completionHelp>
+ <path>policy as-path-list</path>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip as-path-access-list $4"</command>
+ </tagNode>
+ <leafNode name="community-list">
+ <properties>
+ <help>Show IP community-lists</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show bgp community-list"</command>
+ </leafNode>
+ <tagNode name="community-list">
+ <properties>
+ <help>Show IP community-lists</help>
+ <completionHelp>
+ <path>policy community-list</path>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show bgp community-list $4 detail"</command>
+ </tagNode>
+ <leafNode name="extcommunity-list">
+ <properties>
+ <help>Show extended IP community-lists</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show bgp extcommunity-list"</command>
+ </leafNode>
+ <tagNode name="extcommunity-list">
+ <properties>
+ <help>Show extended IP community-lists</help>
+ <completionHelp>
+ <path>policy extcommunity-list</path>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show bgp extcommunity-list $4 detail"</command>
+ </tagNode>
+ <leafNode name="forwarding">
+ <properties>
+ <help>Show IP forwarding status</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip forwarding"</command>
+ </leafNode>
+ <leafNode name="large-community-list">
+ <properties>
+ <help>Show IP large-community-lists</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show bgp large-community-list"</command>
+ </leafNode>
+ <tagNode name="large-community-list">
+ <properties>
+ <help>Show IP large-community-lists</help>
+ <completionHelp>
+ <path>policy large-community-list</path>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show bgp large-community-list $4 detail"</command>
+ </tagNode>
+ <leafNode name="prefix-list">
+ <properties>
+ <help>Show all IP prefix-lists</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip prefix-list"</command>
+ </leafNode>
+ <tagNode name="prefix-list">
+ <properties>
+ <help>Show all IP prefix-lists</help>
+ <completionHelp>
+ <path>policy prefix-list</path>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip prefix-list $4"</command>
+ </tagNode>
+ <leafNode name="protocol">
+ <properties>
+ <help>Show IP route-maps per protocol</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip protocol"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-ip-bgp.xml b/op-mode-definitions/show-ip-bgp.xml
new file mode 100644
index 000000000..5eb2ae56e
--- /dev/null
+++ b/op-mode-definitions/show-ip-bgp.xml
@@ -0,0 +1,342 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="ip">
+ <children>
+ <node name="bgp">
+ <properties>
+ <help>Show Border Gateway Protocol (BGP) information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp"</command>
+ <children>
+ <leafNode name="attribute-info">
+ <properties>
+ <help>Show BGP attribute information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp attribute-info"</command>
+ </leafNode>
+ <leafNode name="cidr-only">
+ <properties>
+ <help>Display only routes with non-natural netmasks</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp cidr-only"</command>
+ </leafNode>
+ <node name="community">
+ <properties>
+ <help>Show BGP routes matching the communities</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp community"</command>
+ </node>
+ <tagNode name="community">
+ <properties>
+ <help>Display routes matching the specified communities</help>
+ <completionHelp>
+ <list>&lt;AA:NN&gt; local-AS no-advertise no-export</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp community $5"</command>
+ </tagNode>
+ <leafNode name="community-info">
+ <properties>
+ <help>List all bgp community information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp community-info"</command>
+ </leafNode>
+ <tagNode name="community-list">
+ <properties>
+ <help>Show BGP routes matching specified community list</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp community-list $5"</command>
+ <children>
+ <leafNode name="exact-match">
+ <properties>
+ <help>Show BGP routes exactly matching specified community list</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp community-list $5 exact-match"</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <leafNode name="dampened-paths">
+ <properties>
+ <help>Show dampened BGP paths</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp dampening dampened-paths"</command>
+ </leafNode>
+ <tagNode name="filter-list">
+ <properties>
+ <help>Show BGP information for specified word</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp filter-list $5"</command>
+ </tagNode>
+ <leafNode name="flap-statistics">
+ <properties>
+ <help>Show flap statistics of routes</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp dampening flap-statistics"</command>
+ </leafNode>
+ <node name="ipv4">
+ <properties>
+ <help>Show BGP IPv4 information</help>
+ </properties>
+ <children>
+ <node name="unicast">
+ <properties>
+ <help>Show BGP IPv4 unicast information</help>
+ </properties>
+ <children>
+ <leafNode name="cidr-only">
+ <properties>
+ <help>Display only routes with non-natural netmasks</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp ipv4 unicast cidr-only"</command>
+ </leafNode>
+ <node name="community"> <!-- START new code -->
+ <properties>
+ <help>Show BGP routes matching the communities</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp ipv4 unicast community"</command>
+ </node>
+ <tagNode name="community">
+ <properties>
+ <help>Display routes matching the specified communities</help>
+ <completionHelp>
+ <list>&lt;AA:NN&gt; local-AS no-advertise no-export</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp ipv4 unicast community $7"</command>
+ </tagNode>
+ <tagNode name="community-list">
+ <properties>
+ <help>Show BGP routes matching specified community list</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp ipv4 unicast community-list $7"</command>
+ <children>
+ <leafNode name="exact-match">
+ <properties>
+ <help>Show BGP routes exactly matching specified community list</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp ipv4 unicast community-list $7 exact-match"</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <tagNode name="filter-list">
+ <properties>
+ <help>Show BGP information for specified word</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp filter-list $5"</command>
+ </tagNode>
+ <tagNode name="neighbors">
+ <properties>
+ <help>Show detailed BGP IPv4 unicast neighbor information</help>
+ <completionHelp>
+ <script>vtysh -c "show ip bgp ipv4 unicast summary" | awk '{print $1}' | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b"</script>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp ipv4 unicast neighbors $7"</command>
+ <children>
+ <leafNode name="advertised-routes">
+ <properties>
+ <help>Show routes advertised to a BGP neighbor</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp ipv4 unicast neighbor $7 advertised-routes"</command>
+ </leafNode>
+ <leafNode name="prefix-counts">
+ <properties>
+ <help>Show detailed prefix count information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp ipv4 unicast neighbor $7 prefix-counts"</command>
+ </leafNode>
+ <leafNode name="received-routes">
+ <properties>
+ <help>Show the received routes from neighbor</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp ipv4 unicast neighbor $7 received-routes"</command>
+ </leafNode>
+ <leafNode name="routes">
+ <properties>
+ <help>Show routes learned from neighbor</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp ipv4 unicast neighbor $7 routes"</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <leafNode name="paths">
+ <properties>
+ <help>Show BGP path information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp ipv4 unicast paths"</command>
+ </leafNode>
+ <tagNode name="prefix-list">
+ <properties>
+ <help>Show BGP routes matching the specified prefix list</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp ipv4 unicast prefix-list $7"</command>
+ </tagNode>
+ <tagNode name="regexp">
+ <properties>
+ <help>Show BGP routes matching the specified AS path regular expression</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp ipv4 unicast regexp $5"</command>
+ </tagNode>
+ <tagNode name="route-map">
+ <properties>
+ <help>Show BGP routes matching the specified route map</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp route-map $5"</command>
+ </tagNode>
+ <leafNode name="summary">
+ <properties>
+ <help>Show summary of BGP information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp summary"</command>
+ </leafNode>
+ </children>
+ </node>
+ <tagNode name="unicast">
+ <properties>
+ <help>Show BGP information for specified IP address or prefix</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt; &lt;x.x.x.x/x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp $6"</command>
+ </tagNode>
+ </children>
+ </node>
+ <node name="large-community">
+ <properties>
+ <help>Show BGP routes matching the specified large-communities</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp large-community"</command>
+ </node>
+ <leafNode name="large-community-info">
+ <properties>
+ <help>Show BGP large-community information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp large-community-info"</command>
+ </leafNode>
+ <tagNode name="large-community-list">
+ <properties>
+ <help>Show BGP routes matching the specified large-community list</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp large-community-list $5"</command>
+ </tagNode>
+ <leafNode name="memory">
+ <properties>
+ <help>Show BGP memory usage</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp memory"</command>
+ </leafNode>
+ <tagNode name="neighbors">
+ <properties>
+ <help>Show detailed BGP IPv4 unicast neighbor information</help>
+ <completionHelp>
+ <script>vtysh -c "show ip bgp summary" | awk '{print $1}' | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b"</script>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp neighbors $5"</command>
+ <children>
+ <leafNode name="advertised-routes">
+ <properties>
+ <help>Show routes advertised to a BGP neighbor</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp neighbor $5 advertised-routes"</command>
+ </leafNode>
+ <leafNode name="dampened-routes">
+ <properties>
+ <help>Show dampened routes received from BGP neighbor</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp neighbor $5 dampened-routes"</command>
+ </leafNode>
+ <leafNode name="flap-statistics">
+ <properties>
+ <help>Show flap statistics of the routes learned from BGP neighbor</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp neighbor $5 flap-statistics"</command>
+ </leafNode>
+ <leafNode name="prefix-counts">
+ <properties>
+ <help>Show detailed prefix count information for BGP neighbor</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp neighbor $5 prefix-counts"</command>
+ </leafNode>
+ <node name="received">
+ <properties>
+ <help>Show information received from BGP neighbor</help>
+ </properties>
+ <children>
+ <leafNode name="prefix-filter">
+ <properties>
+ <help>Show prefixlist filter</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp neighbor $5 received prefix-filter"</command>
+ </leafNode>
+ </children>
+ </node>
+ <leafNode name="received-routes">
+ <properties>
+ <help>Show received routes from BGP neighbor</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp neighbor $5 received-routes"</command>
+ </leafNode>
+ <leafNode name="routes">
+ <properties>
+ <help>Show routes learned from BGP neighbor</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp neighbor $5 routes"</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <leafNode name="paths">
+ <properties>
+ <help>Show BGP path information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp paths"</command>
+ </leafNode>
+ <tagNode name="prefix-list">
+ <properties>
+ <help>Show BGP routes matching the specified prefix list</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp prefix-list $5"</command>
+ </tagNode>
+ <tagNode name="regexp">
+ <properties>
+ <help>Show BGP routes matching the specified AS path regular expression</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp regexp $5"</command>
+ </tagNode>
+ <tagNode name="route-map">
+ <properties>
+ <help>Show BGP routes matching the specified route map</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp route-map $5"</command>
+ </tagNode>
+ <leafNode name="statistics">
+ <properties>
+ <help>Show summary of BGP information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp statistics"</command>
+ </leafNode>
+ <leafNode name="summary">
+ <properties>
+ <help>Show summary of BGP information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp summary"</command>
+ </leafNode>
+ </children>
+ </node>
+ <tagNode name="bgp">
+ <properties>
+ <help>Show BGP information for specified IP address or prefix</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt; &lt;x.x.x.x/x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip bgp $4"</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-ip-igmp.xml b/op-mode-definitions/show-ip-igmp.xml
new file mode 100644
index 000000000..b8f2f9107
--- /dev/null
+++ b/op-mode-definitions/show-ip-igmp.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="ip">
+ <children>
+ <node name="igmp">
+ <properties>
+ <help>Show IGMP (Internet Group Management Protocol) information</help>
+ </properties>
+ <children>
+ <leafNode name="groups">
+ <properties>
+ <help>IGMP groups information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip igmp groups"</command>
+ </leafNode>
+ <leafNode name="interfaces">
+ <properties>
+ <help>IGMP interfaces information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip igmp interface"</command>
+ </leafNode>
+ <leafNode name="join">
+ <properties>
+ <help>IGMP static join information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip igmp join"</command>
+ </leafNode>
+ <leafNode name="sources">
+ <properties>
+ <help>IGMP sources information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip igmp sources"</command>
+ </leafNode>
+ <leafNode name="statistics">
+ <properties>
+ <help>IGMP statistics</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip igmp statistics"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-ip-multicast.xml b/op-mode-definitions/show-ip-multicast.xml
new file mode 100644
index 000000000..5331d2e35
--- /dev/null
+++ b/op-mode-definitions/show-ip-multicast.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="ip">
+ <children>
+ <node name="multicast">
+ <properties>
+ <help>Show IP multicast</help>
+ </properties>
+ <children>
+ <leafNode name="interface">
+ <properties>
+ <help>Show multicast interfaces</help>
+ </properties>
+ <command>if ps -C igmpproxy &amp;&gt;/dev/null; then ${vyos_op_scripts_dir}/show_igmpproxy.py --interface; else echo IGMP proxy not configured; fi</command>
+ </leafNode>
+ <leafNode name="mfc">
+ <properties>
+ <help>Show multicast fowarding cache</help>
+ </properties>
+ <command>if ps -C igmpproxy &amp;&gt;/dev/null; then ${vyos_op_scripts_dir}/show_igmpproxy.py --mfc; else echo IGMP proxy not configured; fi</command>
+ </leafNode>
+ <leafNode name="summary">
+ <properties>
+ <help>IP multicast information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip multicast"</command>
+ </leafNode>
+ <leafNode name="route">
+ <properties>
+ <help>IP multicast routing table</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip mroute"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-ip-ospf.xml b/op-mode-definitions/show-ip-ospf.xml
new file mode 100644
index 000000000..99441d185
--- /dev/null
+++ b/op-mode-definitions/show-ip-ospf.xml
@@ -0,0 +1,579 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="ip">
+ <properties>
+ <help>Show IPv4 routing information</help>
+ </properties>
+ <children>
+ <node name="ospf">
+ <properties>
+ <help>Show IPv4 Open Shortest Path First (OSPF) routing information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf"</command>
+ <children>
+ <leafNode name="border-routers">
+ <properties>
+ <help>Show IPv4 OSPF border-routers information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf border-routers"</command>
+ </leafNode>
+ <node name="database">
+ <properties>
+ <help>Show IPv4 OSPF database information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database"</command>
+ <children>
+ <node name="asbr-summary">
+ <properties>
+ <help>Show IPv4 OSPF ASBR summary database</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database asbr-summary"</command>
+ <children>
+ <tagNode name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF ASBR summary database for given address of advertised router</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database asbr-summary adv-router $7"</command>
+ </tagNode>
+ <node name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF ASBR summary database for given address of advertised router</help>
+ </properties>
+ </node>
+ </children>
+ </node>
+ <tagNode name="asbr-summary">
+ <properties>
+ <help>Show IPv4 OSPF ASBR summary database information of given address</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database asbr-summary"</command>
+ <children>
+ <node name="adv-router">
+ <properties>
+ <help>Show advertising router link states</help>
+ </properties>
+ </node>
+ <tagNode name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF ASBR summary database of given address for given advertised router</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database asbr-summary $6 adv-router $8"</command>
+ </tagNode>
+ <leafNode name="self-originate">
+ <properties>
+ <help>Show summary of self-originate IPv4 OSPF ASBR database</help>
+ </properties>
+ <command>show ip ospf database asbr-summary $6 self-originate</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <node name="external">
+ <properties>
+ <help>Show IPv4 OSPF external database</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database external"</command>
+ <children>
+ <tagNode name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF external database for specified IP address of advertised router</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database external adv-router $7"</command>
+ </tagNode>
+ <node name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF external database for specified IP address of advertised router</help>
+ </properties>
+ </node>
+ </children>
+ </node>
+ <tagNode name="external">
+ <properties>
+ <help>Show IPv4 OSPF external database information of specified IP address</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database external"</command>
+ <children>
+ <node name="adv-router">
+ <properties>
+ <help>Show advertising router link states</help>
+ </properties>
+ </node>
+ <tagNode name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF external database of specified IP address for specified advertised router</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database external $6 adv-router $8"</command>
+ </tagNode>
+ <leafNode name="self-originate">
+ <properties>
+ <help>Show self-originate IPv4 OSPF external database</help>
+ </properties>
+ <command>show ip ospf database external $6 self-originate</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <leafNode name="max-age">
+ <properties>
+ <help>Show IPv4 OSPF max-age database</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database max-age"</command>
+ </leafNode>
+ <node name="network">
+ <properties>
+ <help>Show IPv4 OSPF network database</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database network"</command>
+ <children>
+ <tagNode name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF network database for specified IP address of advertised router</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database network adv-router $7"</command>
+ </tagNode>
+ <node name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF network database for given address of advertised router</help>
+ </properties>
+ </node>
+ </children>
+ </node>
+ <tagNode name="network">
+ <properties>
+ <help>Show IPv4 OSPF network database information of specified IP address</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database network"</command>
+ <children>
+ <node name="adv-router">
+ <properties>
+ <help>Show advertising router link states</help>
+ </properties>
+ </node>
+ <tagNode name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF network database of specified IP address for specified advertised router</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database network $6 adv-router $8"</command>
+ </tagNode>
+ <leafNode name="self-originate">
+ <properties>
+ <help>Show self-originate IPv4 OSPF network database</help>
+ </properties>
+ <command>show ip ospf database network $6 self-originate</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <node name="nssa-external">
+ <properties>
+ <help>Show IPv4 OSPF NSSA external database</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database nssa-external"</command>
+ <children>
+ <tagNode name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF NSSA external database for specified IP address of advertised router</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database nssa-external adv-router $7"</command>
+ </tagNode>
+ <node name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF NSSA external database for specified IP address of advertised router</help>
+ </properties>
+ </node>
+ </children>
+ </node>
+ <tagNode name="nssa-external">
+ <properties>
+ <help>Show IPv4 OSPF NSSA external database information of specified IP address</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database nssa-external"</command>
+ <children>
+ <node name="adv-router">
+ <properties>
+ <help>Show advertising router link states</help>
+ </properties>
+ </node>
+ <tagNode name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF NSSA external database of specified IP address for specified advertised router</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database nssa-external $6 adv-router $8"</command>
+ </tagNode>
+ <leafNode name="self-originate">
+ <properties>
+ <help>Show self-originate IPv4 OSPF NSSA external database</help>
+ </properties>
+ <command>show ip ospf database nssa-external $6 self-originate</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <node name="opaque-area">
+ <properties>
+ <help>Show IPv4 OSPF opaque-area database</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database opaque-area"</command>
+ <children>
+ <tagNode name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF opaque-area database for specified IP address of advertised router</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database opaque-area adv-router $7"</command>
+ </tagNode>
+ <node name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF opaque-area database for specified IP address of advertised router</help>
+ </properties>
+ </node>
+ </children>
+ </node>
+ <tagNode name="opaque-area">
+ <properties>
+ <help>Show IPv4 OSPF opaque-area database information of specified IP address</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database opaque-area"</command>
+ <children>
+ <node name="adv-router">
+ <properties>
+ <help>Show advertising router link states</help>
+ </properties>
+ </node>
+ <tagNode name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF opaque-area database of specified IP address for specified advertised router</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database opaque-area $6 adv-router $8"</command>
+ </tagNode>
+ <leafNode name="self-originate">
+ <properties>
+ <help>Show self-originate IPv4 OSPF opaque-area database</help>
+ </properties>
+ <command>show ip ospf database opaque-area $6 self-originate</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <node name="opaque-as">
+ <properties>
+ <help>Show IPv4 OSPF opaque-as database</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database opaque-as"</command>
+ <children>
+ <tagNode name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF opaque-as database for specified IP address of advertised router</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database opaque-as adv-router $7"</command>
+ </tagNode>
+ <node name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF opaque-as database for specified IP address of advertised router</help>
+ </properties>
+ </node>
+ </children>
+ </node>
+ <tagNode name="opaque-as">
+ <properties>
+ <help>Show IPv4 OSPF opaque-as database information of specified IP address</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database opaque-as"</command>
+ <children>
+ <node name="adv-router">
+ <properties>
+ <help>Show advertising router link states</help>
+ </properties>
+ </node>
+ <tagNode name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF opaque-as database of specified IP address for specified advertised router</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database opaque-as $6 adv-router $8"</command>
+ </tagNode>
+ <leafNode name="self-originate">
+ <properties>
+ <help>Show self-originate IPv4 OSPF opaque-as database</help>
+ </properties>
+ <command>show ip ospf database opaque-as $6 self-originate</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <node name="opaque-link">
+ <properties>
+ <help>Show IPv4 OSPF opaque-link database</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database opaque-link"</command>
+ <children>
+ <tagNode name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF opaque-link database for specified IP address of advertised router</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database opaque-link adv-router $7"</command>
+ </tagNode>
+ <node name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF opaque-link database for specified IP address of advertised router</help>
+ </properties>
+ </node>
+ </children>
+ </node>
+ <tagNode name="opaque-link">
+ <properties>
+ <help>Show IPv4 OSPF opaque-link database information of specified IP address</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database opaque-link"</command>
+ <children>
+ <node name="adv-router">
+ <properties>
+ <help>Show advertising router link states</help>
+ </properties>
+ </node>
+ <tagNode name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF opaque-link database of specified IP address for specified advertised router</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database opaque-link $6 adv-router $8"</command>
+ </tagNode>
+ <leafNode name="self-originate">
+ <properties>
+ <help>Show self-originate IPv4 OSPF opaque-link database</help>
+ </properties>
+ <command>show ip ospf database opaque-link $6 self-originate</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <node name="router">
+ <properties>
+ <help>Show IPv4 OSPF router database</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database router"</command>
+ <children>
+ <tagNode name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF router database for specified IP address of advertised router</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database router adv-router $7"</command>
+ </tagNode>
+ <node name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF router database for specified IP address of advertised router</help>
+ </properties>
+ </node>
+ </children>
+ </node>
+ <tagNode name="router">
+ <properties>
+ <help>Show IPv4 OSPF router database information of specified IP address</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database router"</command>
+ <children>
+ <node name="adv-router">
+ <properties>
+ <help>Show advertising router link states</help>
+ </properties>
+ </node>
+ <tagNode name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF router database of specified IP address for specified advertised router</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database router $6 adv-router $8"</command>
+ </tagNode>
+ <leafNode name="self-originate">
+ <properties>
+ <help>Show self-originate IPv4 OSPF router database</help>
+ </properties>
+ <command>show ip ospf database router $6 self-originate</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ <leafNode name="self-originate">
+ <properties>
+ <help>Show IPv4 OSPF self-originate database</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database self-originate"</command>
+ </leafNode>
+ <node name="summary">
+ <properties>
+ <help>Show summary of IPv4 OSPF database</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database summary"</command>
+ <children>
+ <tagNode name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF summary database for specified IP address of advertised router</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database summary adv-router $7"</command>
+ </tagNode>
+ <node name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF summary database for specified IP address of advertised router</help>
+ </properties>
+ </node>
+ </children>
+ </node>
+ <tagNode name="summary">
+ <properties>
+ <help>Show IPv4 OSPF summary database information of specified IP address</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database summary"</command>
+ <children>
+ <node name="adv-router">
+ <properties>
+ <help>Show advertising router link states</help>
+ </properties>
+ </node>
+ <tagNode name="adv-router">
+ <properties>
+ <help>Show IPv4 OSPF summary database of specified IP address for specified advertised router</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf database summary $6 adv-router $8"</command>
+ </tagNode>
+ <leafNode name="self-originate">
+ <properties>
+ <help>Show self-originate IPv4 OSPF summary database</help>
+ </properties>
+ <command>show ip ospf database summary $6 self-originate</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ <node name="interface">
+ <properties>
+ <help>Show IPv4 OSPF interface information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf interface"</command>
+ </node>
+ <tagNode name="interface">
+ <properties>
+ <help>Show IPv4 OSPF information for specified interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf interface $5"</command>
+ </tagNode>
+ <node name="neighbor">
+ <properties>
+ <help>Show IPv4 OSPF neighbor information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf neighbor"</command>
+ <children>
+ <tagNode name="address">
+ <properties>
+ <help>Show IPv4 OSPF neighbor information for specified IP address</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf neighbor $6"</command>
+ </tagNode>
+ <node name="detail">
+ <properties>
+ <help>Show detailed IPv4 OSPF neighbor information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf neighbor detail"</command>
+ </node>
+ </children>
+ </node>
+ <tagNode name="neighbor">
+ <properties>
+ <help>Show IPv4 OSPF neighbor information for specified IP address or interface</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf neighbor $5"</command>
+ </tagNode>
+ <leafNode name="route">
+ <properties>
+ <help>Show IPv4 OSPF route information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip ospf route"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-ip-pim.xml b/op-mode-definitions/show-ip-pim.xml
new file mode 100644
index 000000000..3f4edc779
--- /dev/null
+++ b/op-mode-definitions/show-ip-pim.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="ip">
+ <children>
+ <node name="pim">
+ <properties>
+ <help>Show PIM (Protocol Independent Multicast) information</help>
+ </properties>
+ <children>
+ <leafNode name="interfaces">
+ <properties>
+ <help>PIM interfaces information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip pim interface"</command>
+ </leafNode>
+ <leafNode name="join">
+ <properties>
+ <help>PIM join information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip pim join"</command>
+ </leafNode>
+ <leafNode name="neighbor">
+ <properties>
+ <help>PIM neighbor information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip pim neighbor"</command>
+ </leafNode>
+ <leafNode name="nexthop">
+ <properties>
+ <help>PIM cached nexthop rpf information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip pim nexthop"</command>
+ </leafNode>
+ <leafNode name="state">
+ <properties>
+ <help>PIM state information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip pim state"</command>
+ </leafNode>
+ <leafNode name="statistics">
+ <properties>
+ <help>PIM statistics</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip pim statistics"</command>
+ </leafNode>
+ <leafNode name="rp">
+ <properties>
+ <help>PIM RP (Rendevous Point) information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip pim rp-info"</command>
+ </leafNode>
+ <leafNode name="rpf">
+ <properties>
+ <help>PIM cached source rpf information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip pim rpf"</command>
+ </leafNode>
+ <leafNode name="upstream">
+ <properties>
+ <help>PIM upstream information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip pim upstream"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-ip-ports.xml b/op-mode-definitions/show-ip-ports.xml
new file mode 100644
index 000000000..a74b68ffc
--- /dev/null
+++ b/op-mode-definitions/show-ip-ports.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="ip">
+ <children>
+ <leafNode name="ports">
+ <properties>
+ <help>Show IP ports in use by various system services</help>
+ </properties>
+ <command>sudo /usr/bin/netstat -tulnp</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-ip-rip.xml b/op-mode-definitions/show-ip-rip.xml
new file mode 100644
index 000000000..b61ab10a7
--- /dev/null
+++ b/op-mode-definitions/show-ip-rip.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="ip">
+ <properties>
+ <help>Show IPv4 routing information</help>
+ </properties>
+ <children>
+ <node name="rip">
+ <properties>
+ <help>Show Routing Information Protocol (RIP) information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip rip"</command>
+ <children>
+ <leafNode name="status">
+ <properties>
+ <help>Show RIP protocol status</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip rip status"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-ip-route.xml b/op-mode-definitions/show-ip-route.xml
new file mode 100644
index 000000000..d12d132c0
--- /dev/null
+++ b/op-mode-definitions/show-ip-route.xml
@@ -0,0 +1,160 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="ip">
+ <properties>
+ <help>Show IPv4 routing information</help>
+ </properties>
+ <children>
+ <node name="route">
+ <properties>
+ <help>Show IP routes</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip route"</command>
+ <children>
+ <leafNode name="bgp">
+ <properties>
+ <help>Show IP BGP routes</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip route bgp"</command>
+ </leafNode>
+ <node name="cache">
+ <properties>
+ <help>Show kernel route cache</help>
+ </properties>
+ <command>ip -s route list cache</command>
+ </node>
+ <tagNode name="cache">
+ <properties>
+ <help>Show kernel route cache for a given route</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt; &lt;x.x.x.x/x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>ip -s route list cache $5</command>
+ </tagNode>
+ <leafNode name="connected">
+ <properties>
+ <help>Show IP connected routes</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip route connected"</command>
+ </leafNode>
+ <node name="forward">
+ <properties>
+ <help>Show kernel route table</help>
+ </properties>
+ <command>ip route list</command>
+ </node>
+ <tagNode name="forward">
+ <properties>
+ <help>Show kernel route table for a given route</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt; &lt;x.x.x.x/x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>ip -s route list $5</command>
+ </tagNode>
+ <leafNode name="kernel">
+ <properties>
+ <help>Show IP kernel routes</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip route kernel"</command>
+ </leafNode>
+ <leafNode name="ospf">
+ <properties>
+ <help>Show IP OSPF routes</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip route ospf"</command>
+ </leafNode>
+ <leafNode name="rip">
+ <properties>
+ <help>Show IP RIP routes</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip route rip"</command>
+ </leafNode>
+ <leafNode name="static">
+ <properties>
+ <help>Show IP static routes</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip route static"</command>
+ </leafNode>
+ <leafNode name="summary">
+ <properties>
+ <help>Show IP routes summary</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip route summary"</command>
+ </leafNode>
+ <leafNode name="supernets-only">
+ <properties>
+ <help>Show IP supernet routes</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip route supernets-only"</command>
+ </leafNode>
+ <node name="table">
+ <properties>
+ <help>Show IP routes in policy table</help>
+ </properties>
+ </node>
+ <tagNode name="table">
+ <properties>
+ <help>Show IP routes in policy table</help>
+ <completionHelp>
+ <list>&lt;1-200&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip route table $5"</command>
+ </tagNode>
+ <node name="tag">
+ <properties>
+ <help>Show only routes with tag</help>
+ </properties>
+ </node>
+ <tagNode name="tag">
+ <properties>
+ <help>Tag value</help>
+ <completionHelp>
+ <list>&lt;1-4294967295&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip route tag $5"</command>
+ </tagNode>
+ <node name="vrf">
+ <properties>
+ <help>Show IP routes in VRF</help>
+ </properties>
+ </node>
+ <tagNode name="vrf">
+ <properties>
+ <help>Show IP routes in VRF</help>
+ <completionHelp>
+ <list>&lt;vrf&gt;</list>
+ <path>vrf name</path>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip route vrf $5"</command>
+ </tagNode>
+ </children>
+ </node>
+ <tagNode name="route">
+ <properties>
+ <help>Show IP routes of specified IP address or prefix</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt; &lt;x.x.x.x/x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip route $4"</command>
+ <children>
+ <leafNode name="longer-prefixes">
+ <properties>
+ <help>Show longer prefixes of routes for specified IP address or prefix</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show ip route $4"</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-ipv6-bgp.xml b/op-mode-definitions/show-ipv6-bgp.xml
new file mode 100644
index 000000000..67a8c8658
--- /dev/null
+++ b/op-mode-definitions/show-ipv6-bgp.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="ipv6">
+ <children>
+ <node name="bgp">
+ <children>
+ <tagNode name="route-map">
+ <properties>
+ <help>Show BGP routes matching the specified route map</help>
+ <completionHelp>
+ <path>policy route-map</path>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show bgp ipv6 route-map $5"</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-license.xml b/op-mode-definitions/show-license.xml
new file mode 100644
index 000000000..2ce11567d
--- /dev/null
+++ b/op-mode-definitions/show-license.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <leafNode name="license">
+ <properties>
+ <help>Show VyOS license information</help>
+ </properties>
+ <command>less $_vyatta_less_options --prompt=".license, page %dt of %D" -- ${vyatta_sysconfdir}/LICENSE</command>
+ </leafNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-log.xml b/op-mode-definitions/show-log.xml
new file mode 100644
index 000000000..0c4da647b
--- /dev/null
+++ b/op-mode-definitions/show-log.xml
@@ -0,0 +1,218 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="log">
+ <properties>
+ <help>Show contents of current master log file</help>
+ </properties>
+ <command>/bin/journalctl</command>
+ <children>
+ <leafNode name="all">
+ <properties>
+ <help>Show contents of all master log files</help>
+ </properties>
+ <command>eval $(lesspipe); less $_vyatta_less_options --prompt=".log?m, file %i of %m., page %dt of %D" -- `printf "%s\n" /var/log/messages* | sort -nr`</command>
+ </leafNode>
+ <leafNode name="authorization">
+ <properties>
+ <help>Show listing of authorization attempts</help>
+ </properties>
+ <command>/bin/journalctl -q SYSLOG_FACILITY=10 SYSLOG_FACILITY=4</command>
+ </leafNode>
+ <leafNode name="cluster">
+ <properties>
+ <help>Show log for Cluster</help>
+ </properties>
+ <command>cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e heartbeat -e cl_status -e mach_down -e ha_log</command>
+ </leafNode>
+ <leafNode name="conntrack-sync">
+ <properties>
+ <help>Show log for Conntrack-sync</help>
+ </properties>
+ <command>cat $(printf "%s\n" /var/log/messages* | sort -nr ) | grep -e conntrackd</command>
+ </leafNode>
+ <leafNode name="dhcp">
+ <properties>
+ <help>Show log for Dynamic Host Control Protocol (DHCP)</help>
+ </properties>
+ <command>cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep dhcpd</command>
+ </leafNode>
+ <node name="firewall">
+ <properties>
+ <help>Show log for Firewall</help>
+ </properties>
+ <children>
+ <tagNode name="ipv6-name">
+ <properties>
+ <help>Show log for a specified firewall (IPv6)</help>
+ <completionHelp>
+ <path>firewall ipv6-name</path>
+ </completionHelp>
+ </properties>
+ <command>cat $(printf "%s\n" /var/log/messages* | sort -nr ) | egrep "\[$5-([0-9]+|default)-[ADR]\]"</command>
+ <children>
+ <tagNode name="rule">
+ <properties>
+ <help>Show log for a rule in the specified firewall</help>
+ <completionHelp>
+ <path>firewall ipv6-name ${COMP_WORDS[4]} rule</path>
+ </completionHelp>
+ </properties>
+ <command>cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e "\[$5-$7-[ADR]\]"</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ <tagNode name="name">
+ <properties>
+ <help>Show log for a specified firewall (IPv4)</help>
+ <completionHelp>
+ <path>firewall name</path>
+ </completionHelp>
+ </properties>
+ <command>cat $(printf "%s\n" /var/log/messages* | sort -nr ) | egrep "\[$5-([0-9]+|default)-[ADR]\]"</command>
+ <children>
+ <tagNode name="rule">
+ <properties>
+ <help>Show log for a rule in the specified firewall</help>
+ <completionHelp>
+ <path>firewall name ${COMP_WORDS[4]} rule</path>
+ </completionHelp>
+ </properties>
+ <command>cat $(printf "%s\n" /var/log/messages* | sort -nr) | egrep "\[$5-$7-[ADR]\]"</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ <leafNode name="https">
+ <properties>
+ <help>Show log for HTTPs</help>
+ </properties>
+ <command>cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e nginx</command>
+ </leafNode>
+ <tagNode name="image">
+ <properties>
+ <help>Show contents of master log file for image</help>
+ <completionHelp>
+ <script>compgen -f /lib/live/mount/persistence/boot/ | grep -v grub | sed -e s@/lib/live/mount/persistence/boot/@@</script>
+ </completionHelp>
+ </properties>
+ <command>less $_vyatta_less_options --prompt=".log, page %dt of %D" -- /lib/live/mount/persistence/boot/$4/rw/var/log/messages</command>
+ <children>
+ <leafNode name="all">
+ <properties>
+ <help>Show contents of all master log files for image</help>
+ </properties>
+ <command>eval $(lesspipe); less $_vyatta_less_options --prompt=".log?m, file %i of %m., page %dt of %D" -- `printf "%s\n" /lib/live/mount/persistence/boot/$4/rw/var/log/messages* | sort -nr`</command>
+ </leafNode>
+ <leafNode name="authorization">
+ <properties>
+ <help>Show listing of authorization attempts for image</help>
+ </properties>
+ <command>less $_vyatta_less_options --prompt=".log, page %dt of %D" -- /lib/live/mount/persistence/boot/$4/rw/var/log/auth.log</command>
+ </leafNode>
+ <tagNode name="tail">
+ <properties>
+ <help>Show last changes to messages</help>
+ <completionHelp>
+ <list>&lt;NUMBER&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>tail -n "$6" /lib/live/mount/persistence/boot/$4/rw/var/log/messages | ${VYATTA_PAGER:-cat}</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ <leafNode name="lldp">
+ <properties>
+ <help>Show log for LLDP</help>
+ </properties>
+ <command>cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e lldpd</command>
+ </leafNode>
+ <leafNode name="nat">
+ <properties>
+ <help>Show log for Network Address Translation (NAT)</help>
+ </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="nat">
+ <properties>
+ <help>Show log for OpenVPN</help>
+ </properties>
+ <command>cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e openvpn</command>
+ </leafNode>
+ <leafNode name="snmp">
+ <properties>
+ <help>Show log for Simple Network Monitoring Protocol (SNMP)</help>
+ </properties>
+ <command>cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e snmpd</command>
+ </leafNode>
+ <tagNode name="tail">
+ <properties>
+ <help>Show last n changes to messages</help>
+ <completionHelp>
+ <list>&lt;NUMBER&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>tail -n "$4" /var/log/messages | ${VYATTA_PAGER:-cat}</command>
+ </tagNode>
+ <node name="tail">
+ <properties>
+ <help>Show last 10 lines of /var/log/messages file</help>
+ </properties>
+ <command>tail -n 10 /var/log/messages</command>
+ </node>
+ <node name="vpn">
+ <properties>
+ <help>Show log for Virtual Private Network (VPN)</help>
+ </properties>
+ <children>
+ <leafNode name="all">
+ <properties>
+ <help>Show log for ALL</help>
+ </properties>
+ <command>cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e charon -e accel -e pptpd -e ppp</command>
+ </leafNode>
+ <leafNode name="ipsec">
+ <properties>
+ <help>Show log for IPSec</help>
+ </properties>
+ <command>cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e charon</command>
+ </leafNode>
+ <leafNode name="l2tp">
+ <properties>
+ <help>Show log for L2TP</help>
+ </properties>
+ <command>cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e remote-access-aaa-win -e remote-access-zzz-mac -e accel-l2tp -e ppp</command>
+ </leafNode>
+ <leafNode name="pptp">
+ <properties>
+ <help>Show log for PPTP</help>
+ </properties>
+ <command>cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e accel-pptp -e ppp</command>
+ </leafNode>
+ <leafNode name="sstp">
+ <properties>
+ <help>Show log for SSTP</help>
+ </properties>
+ <command>cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e accel-sstp -e ppp</command>
+ </leafNode>
+ </children>
+ </node>
+ <leafNode name="vrrp">
+ <properties>
+ <help>Show log for Virtual Router Redundancy Protocol (VRRP)</help>
+ </properties>
+ <command>cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e Keepalived_vrrp</command>
+ </leafNode>
+ <leafNode name="webproxy">
+ <properties>
+ <help>Show log for Webproxy</help>
+ </properties>
+ <command>cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e "squid"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-login.xml b/op-mode-definitions/show-login.xml
new file mode 100644
index 000000000..6d8c782c4
--- /dev/null
+++ b/op-mode-definitions/show-login.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="login">
+ <properties>
+ <help>Show current login credentials</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_current_user.sh</command>
+ <children>
+ <leafNode name="groups">
+ <properties>
+ <help>Show current login group information</help>
+ </properties>
+ <command>/usr/bin/id -Gn</command>
+ </leafNode>
+ <leafNode name="level">
+ <properties>
+ <help>Show current login level</help>
+ </properties>
+ <command>if [ -n "$VYATTA_USER_LEVEL_DIR" ]; then basename $VYATTA_USER_LEVEL_DIR; fi</command>
+ </leafNode>
+ <leafNode name="user">
+ <properties>
+ <help>Show current login user id</help>
+ </properties>
+ <command>/usr/bin/id -un</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-monitoring.xml b/op-mode-definitions/show-monitoring.xml
new file mode 100644
index 000000000..2651b3438
--- /dev/null
+++ b/op-mode-definitions/show-monitoring.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <leafNode name="monitoring">
+ <properties>
+ <help>Show currently monitored services</help>
+ </properties>
+ <command>vtysh -c "show debugging"</command>
+ </leafNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-mpls.xml b/op-mode-definitions/show-mpls.xml
new file mode 100644
index 000000000..3f160b6dc
--- /dev/null
+++ b/op-mode-definitions/show-mpls.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="mpls">
+ <properties>
+ <help>Show Multiprotocol Label Switching (MPLS)</help>
+ </properties>
+ <children>
+ <node name="ldp">
+ <properties>
+ <help>Label Distribution Protocol (LDP)</help>
+ </properties>
+ <children>
+ <node name="binding">
+ <properties>
+ <help>Label Information Base</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show mpls ldp binding"</command>
+ </node>
+ <node name="discovery">
+ <properties>
+ <help>Discovery hello information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show mpls ldp discovery"</command>
+ </node>
+ <node name="interface">
+ <properties>
+ <help>LDP interface information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show mpls ldp interface"</command>
+ </node>
+ <node name="neighbor">
+ <properties>
+ <help>LDP neighbor information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show mpls ldp neighbor"</command>
+ <children>
+ <node name="detail">
+ <properties>
+ <help>Show neighbor detail</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show mpls ldp neighbor detail"</command>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="pseudowire">
+ <properties>
+ <help>Show MPLS pseudowire interfaces</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show mpls pseudowires"</command>
+ </node>
+ <node name="table">
+ <properties>
+ <help>Show MPLS table</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show mpls table"</command>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-ntp.xml b/op-mode-definitions/show-ntp.xml
new file mode 100644
index 000000000..b7f0acdf8
--- /dev/null
+++ b/op-mode-definitions/show-ntp.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="ntp">
+ <properties>
+ <help>Show peer status of NTP daemon</help>
+ </properties>
+ <command>if ps -C ntpd &amp;&gt;/dev/null; then ntpq -n -c peers; else echo NTP daemon disabled; fi</command>
+ <children>
+ <tagNode name="server">
+ <properties>
+ <help>Show date and time of specified NTP server</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_ntp_servers.sh</script>
+ </completionHelp>
+ </properties>
+ <command>/usr/sbin/ntpdate -q "$4"</command>
+ </tagNode>
+ <node name="info">
+ <properties>
+ <help>Show NTP operational summary</help>
+ </properties>
+ <command>if ps -C ntpd &amp;&gt;/dev/null; then ntpq -n -c sysinfo; ntpq -n -c kerninfo; else echo NTP daemon disabled; fi</command>
+ </node>
+
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-poweroff.xml b/op-mode-definitions/show-poweroff.xml
new file mode 100644
index 000000000..1fd2afcc3
--- /dev/null
+++ b/op-mode-definitions/show-poweroff.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <leafNode name="poweroff">
+ <properties>
+ <help>Show scheduled poweroff</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/powerctrl.py --check</command>
+ </leafNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-protocols-bfd.xml b/op-mode-definitions/show-protocols-bfd.xml
new file mode 100644
index 000000000..4483b39bf
--- /dev/null
+++ b/op-mode-definitions/show-protocols-bfd.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="protocols">
+ <properties>
+ <help>Show protocol specific information</help>
+ </properties>
+ <children>
+ <node name="bfd">
+ <children>
+ <node name="peer">
+ <properties>
+ <help>Show all Bidirectional Forwarding Detection (BFD) peer status</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show bfd peers"</command>
+ <children>
+ <leafNode name="counters">
+ <properties>
+ <help>Show Bidirectional Forwarding Detection (BFD) peer counters</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show bfd peers counters"</command>
+ </leafNode>
+ </children>
+ </node>
+ <tagNode name="peer">
+ <properties>
+ <help>Show Bidirectional Forwarding Detection (BFD) peer status</help>
+ <completionHelp>
+ <script>/usr/bin/vtysh -c "show bfd peers" | awk '/[:blank:]*peer/ { printf "%s\n", $2 }'</script>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show bfd peers" | awk -v BFD_PEER=$5 'BEGIN { regex = sprintf("(peer %s.*)vrf", BFD_PEER) } { if (match($0, regex, bfd_peer_value)) peer=bfd_peer_value[1] } END { if (peer) system("/usr/bin/vtysh -c \"show bfd " peer "\"") }'</command>
+ <children>
+ <leafNode name="counters">
+ <properties>
+ <help>Show Bidirectional Forwarding Detection (BFD) peer counters</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show bfd peers" | awk -v BFD_PEER=$5 'BEGIN { regex = sprintf("(peer %s.*)vrf", BFD_PEER) } { if (match($0, regex, bfd_peer_value)) peer=bfd_peer_value[1] } END { if (peer) system("/usr/bin/vtysh -c \"show bfd " peer " counters\"") }'</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-protocols-static.xml b/op-mode-definitions/show-protocols-static.xml
new file mode 100644
index 000000000..1211a7fe5
--- /dev/null
+++ b/op-mode-definitions/show-protocols-static.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="protocols">
+ <children>
+ <node name="static">
+ <children>
+ <node name="arp">
+ <properties>
+ <help>Show Address Resolution Protocol (ARP) information</help>
+ </properties>
+ <command>/usr/sbin/arp -e -n</command>
+ <children>
+ <tagNode name="interface">
+ <properties>
+ <help>Show Address Resolution Protocol (ARP) cache for specified interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py -b</script>
+ </completionHelp>
+ </properties>
+ <command>/usr/sbin/arp -e -n -i "$6"</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-raid.xml b/op-mode-definitions/show-raid.xml
new file mode 100644
index 000000000..8bf394552
--- /dev/null
+++ b/op-mode-definitions/show-raid.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <tagNode name="raid">
+ <properties>
+ <help>Show status of RAID set</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_raidset.sh</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_raid.sh $3</command>
+ </tagNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-reboot.xml b/op-mode-definitions/show-reboot.xml
new file mode 100644
index 000000000..c85966bcb
--- /dev/null
+++ b/op-mode-definitions/show-reboot.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <leafNode name="reboot">
+ <properties>
+ <help>Show scheduled reboot</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/powerctrl.py --check</command>
+ </leafNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-route-map.xml b/op-mode-definitions/show-route-map.xml
new file mode 100644
index 000000000..0e376757b
--- /dev/null
+++ b/op-mode-definitions/show-route-map.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="route-map">
+ <properties>
+ <help>Show route-map information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show route-map"</command>
+ </node>
+ <tagNode name="route-map">
+ <properties>
+ <help>Show specified route-map information</help>
+ <completionHelp>
+ <path>policy route-map</path>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/vtysh -c "show route-map $3"</command>
+ </tagNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-rpki.xml b/op-mode-definitions/show-rpki.xml
new file mode 100644
index 000000000..d68c3b862
--- /dev/null
+++ b/op-mode-definitions/show-rpki.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="rpki">
+ <properties>
+ <help>Show RPKI information</help>
+ </properties>
+ <children>
+ <leafNode name="cache-connection">
+ <properties>
+ <help>Show RPKI cache connections</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show rpki cache-connection"</command>
+ </leafNode>
+ <leafNode name="cache-server">
+ <properties>
+ <help>Show RPKI cache servers information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show rpki cache-server"</command>
+ </leafNode>
+ <leafNode name="prefix-table">
+ <properties>
+ <help>Show RPKI-validated prefixes</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show rpki prefix-table"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-system.xml b/op-mode-definitions/show-system.xml
new file mode 100644
index 000000000..1b98b559b
--- /dev/null
+++ b/op-mode-definitions/show-system.xml
@@ -0,0 +1,183 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="system">
+ <properties>
+ <help>Show system information</help>
+ </properties>
+ <children>
+ <node name="connections">
+ <properties>
+ <help>Show active network connections on the system</help>
+ </properties>
+ <command>netstat -an</command>
+ <children>
+ <node name="tcp">
+ <properties>
+ <help>Show TCP connection information</help>
+ </properties>
+ <command>ss -t -r</command>
+ <children>
+ <leafNode name="all">
+ <properties>
+ <help>Show all TCP connections</help>
+ </properties>
+ <command>ss -t -a</command>
+ </leafNode>
+ <leafNode name="numeric">
+ <properties>
+ <help>Show TCP connection without resolving names</help>
+ </properties>
+ <command>ss -t -n</command>
+ </leafNode>
+ </children>
+ </node>
+ <node name="udp">
+ <properties>
+ <help>Show UDP socket information</help>
+ </properties>
+ <command>ss -u -a -r</command>
+ <children>
+ <leafNode name="numeric">
+ <properties>
+ <help>Show UDP socket information without resolving names</help>
+ </properties>
+ <command>ss -u -a -n</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ <leafNode name="cpu">
+ <properties>
+ <help>Show CPU information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_cpu.py</command>
+ </leafNode>
+ <leafNode name= "integrity">
+ <properties>
+ <help>Checks overall system integrity</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/system_integrity.py</command>
+ </leafNode>
+ <leafNode name="kernel-messages">
+ <properties>
+ <help>Show messages in kernel ring buffer</help>
+ </properties>
+ <command>sudo dmesg</command>
+ </leafNode>
+ <node name="login">
+ <properties>
+ <help>Show user accounts</help>
+ </properties>
+ <children>
+ <node name="users">
+ <properties>
+ <help>Show user account information</help>
+ </properties>
+ <command>${vyos_libexec_dir}/vyos-sudo.py ${vyos_op_scripts_dir}/show_users.py</command>
+ <children>
+ <leafNode name="all">
+ <properties>
+ <help>Show information about all accounts</help>
+ </properties>
+ <command>${vyos_libexec_dir}/vyos-sudo.py ${vyos_op_scripts_dir}/show_users.py all</command>
+ </leafNode>
+ <leafNode name="locked">
+ <properties>
+ <help>Show information about locked accounts</help>
+ </properties>
+ <command>${vyos_libexec_dir}/vyos-sudo.py ${vyos_op_scripts_dir}/show_users.py locked</command>
+ </leafNode>
+ <leafNode name="other">
+ <properties>
+ <help>Show information about non VyOS user accounts</help>
+ </properties>
+ <command>${vyos_libexec_dir}/vyos-sudo.py ${vyos_op_scripts_dir}/show_users.py other</command>
+ </leafNode>
+ <leafNode name="vyos">
+ <properties>
+ <help>Show information about VyOS user accounts</help>
+ </properties>
+ <command>${vyos_libexec_dir}/vyos-sudo.py ${vyos_op_scripts_dir}/show_users.py vyos</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="memory">
+ <properties>
+ <help>Show system memory usage</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_ram.sh</command>
+ <children>
+ <leafNode name="cache">
+ <properties>
+ <help>Show kernel cache information</help>
+ </properties>
+ <command>sudo slabtop -o</command>
+ </leafNode>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed system memory usage</help>
+ </properties>
+ <command>cat /proc/meminfo</command>
+ </leafNode>
+ <leafNode name="routing-daemons">
+ <properties>
+ <help>Show memory usage of all routing protocols</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show memory"</command>
+ </leafNode>
+ </children>
+ </node>
+ <node name="processes">
+ <properties>
+ <help>Show system processes</help>
+ </properties>
+ <command>ps ax</command>
+ <children>
+ <leafNode name="extensive">
+ <properties>
+ <help>Show extensive process info</help>
+ </properties>
+ <command>top -b -n1</command>
+ </leafNode>
+ <leafNode name="summary">
+ <properties>
+ <help>Show summary of system processes</help>
+ </properties>
+ <command>uptime</command>
+ </leafNode>
+ <leafNode name="tree">
+ <properties>
+ <help>Show process tree</help>
+ </properties>
+ <command>ps -ejH</command>
+ </leafNode>
+ </children>
+ </node>
+ <leafNode name="routing-daemons">
+ <properties>
+ <help>Show Quagga routing daemons</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show daemons"</command>
+ </leafNode>
+ <leafNode name="storage">
+ <properties>
+ <help>Show filesystem usage</help>
+ </properties>
+ <command>df -h -x squashfs</command>
+ </leafNode>
+ <leafNode name="uptime">
+ <properties>
+ <help>Show how long the system has been up</help>
+ </properties>
+ <command>uptime</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-table.xml b/op-mode-definitions/show-table.xml
new file mode 100644
index 000000000..b093a5de7
--- /dev/null
+++ b/op-mode-definitions/show-table.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <leafNode name="table">
+ <properties>
+ <help>Show routing tables</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show zebra router table summary"</command>
+ </leafNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-users.xml b/op-mode-definitions/show-users.xml
new file mode 100644
index 000000000..a026e47e7
--- /dev/null
+++ b/op-mode-definitions/show-users.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="users">
+ <properties>
+ <help>Show user information</help>
+ </properties>
+ <command>who -H</command>
+ <children>
+ <node name="recent">
+ <properties>
+ <help>Show 10 recently logged in users</help>
+ </properties>
+ <command>last -aF -n 10 | sed -e 's/^wtmp begins/Displaying logins since/'</command>
+ </node>
+ <tagNode name="recent">
+ <properties>
+ <help>Show specified number of recently logged in users</help>
+ <completionHelp>
+ <list>NUMBER</list>
+ </completionHelp>
+ </properties>
+ <command>last -aF -n $4 | sed -e 's/^wtmp begins/Displaying logins since/'</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-version.xml b/op-mode-definitions/show-version.xml
new file mode 100644
index 000000000..aae5bb008
--- /dev/null
+++ b/op-mode-definitions/show-version.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="version">
+ <properties>
+ <help>Show system version information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_version.py</command>
+ <children>
+ <leafNode name="funny">
+ <properties>
+ <help>Show system version and some fun stuff</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_version.py --funny</command>
+ </leafNode>
+ <leafNode name="all">
+ <properties>
+ <help>Show system version and versions of all packages</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_version.py --all</command>
+ </leafNode>
+ <leafNode name="quagga">
+ <properties>
+ <help>Show Quagga version information</help>
+ </properties>
+ <command>/usr/bin/vtysh -c "show version"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-vpn.xml b/op-mode-definitions/show-vpn.xml
new file mode 100644
index 000000000..0e7fc38e9
--- /dev/null
+++ b/op-mode-definitions/show-vpn.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="vpn">
+ <properties>
+ <help>Show active remote access Virtual Private Network (VPN) sessions</help>
+ </properties>
+ <children>
+ <leafNode name="remote-access">
+ <properties>
+ <help>Show active VPN server sessions</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_vpn_ra.py</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-vrf.xml b/op-mode-definitions/show-vrf.xml
new file mode 100644
index 000000000..438e7c334
--- /dev/null
+++ b/op-mode-definitions/show-vrf.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="vrf">
+ <properties>
+ <help>Show VRF information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_vrf.py -e</command>
+ </node>
+ <tagNode name="vrf">
+ <properties>
+ <help>Show information on specific VRF instance</help>
+ <completionHelp>
+ <path>vrf name</path>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_vrf.py -e "$3"</command>
+ <children>
+ <leafNode name="processes">
+ <properties>
+ <help>Shows all process ids associated with VRF</help>
+ </properties>
+ <command>/usr/sbin/ip vrf pids "$3"</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/snmp.xml b/op-mode-definitions/snmp.xml
new file mode 100644
index 000000000..a0a47da40
--- /dev/null
+++ b/op-mode-definitions/snmp.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="snmp">
+ <properties>
+ <help>Show status of SNMP on localhost</help>
+ </properties>
+ <children>
+ <tagNode name="community">
+ <properties>
+ <help>Show status of SNMP community</help>
+ <completionHelp>
+ <script>${vyos_op_scripts_dir}/snmp.py --allowed</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/snmp.py --community="$4"</command>
+ <children>
+ <tagNode name="host">
+ <properties>
+ <help>Show status of SNMP on remote host</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/snmp.py --community="$4" --host "$6"</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ <node name="mib">
+ <properties>
+ <help>Show SNMP MIB information</help>
+ </properties>
+ <children>
+ <node name="ifmib">
+ <properties>
+ <help>Show all SNMP interfaces MIB information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/snmp_ifmib.py</command>
+ <children>
+ <tagNode name="ifAlias">
+ <properties>
+ <help>Show SNMP ifAlias for specified interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/snmp_ifmib.py --ifalias="$6"</command>
+ </tagNode>
+ <tagNode name="ifDescr">
+ <properties>
+ <help>Show SNMP ifDescr for specified interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/snmp_ifmib.py --ifdescr="$6"</command>
+ </tagNode>
+ <tagNode name="ifIndex">
+ <properties>
+ <help>Show SNMP ifDescr for specified interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/snmp_ifmib.py --ifindex="$6"</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="v3">
+ <properties>
+ <help>Show SNMP v3 status on localhost</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/snmp_v3.py --all</command>
+ <children>
+ <leafNode name="certificates">
+ <properties>
+ <help>Show TSM certificates</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/snmp_v3_showcerts.sh</command>
+ </leafNode>
+ <leafNode name="group">
+ <properties>
+ <help>Show the list of configured groups</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/snmp_v3.py --group</command>
+ </leafNode>
+ <leafNode name="trap-target">
+ <properties>
+ <help>Show the list of configured targets</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/snmp_v3.py --trap</command>
+ </leafNode>
+ <leafNode name="user">
+ <properties>
+ <help>Show the list of configured users</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/snmp_v3.py --user</command>
+ </leafNode>
+ <leafNode name="view">
+ <properties>
+ <help>Show the list of configured views</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/snmp_v3.py --view</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/sstp-server.xml b/op-mode-definitions/sstp-server.xml
new file mode 100644
index 000000000..03dfc4262
--- /dev/null
+++ b/op-mode-definitions/sstp-server.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="sstp-server">
+ <properties>
+ <help>Show SSTP server information</help>
+ </properties>
+ <children>
+ <leafNode name="sessions">
+ <properties>
+ <help>Show active SSTP server sessions</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ppp-server-ctrl.py --proto="sstp" --action="show sessions"</command>
+ </leafNode>
+ <leafNode name="statistics">
+ <properties>
+ <help>Show SSTP server statistics</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ppp-server-ctrl.py --proto="sstp" --action="show stat"</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/telnet.xml b/op-mode-definitions/telnet.xml
new file mode 100644
index 000000000..c5bb6d283
--- /dev/null
+++ b/op-mode-definitions/telnet.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="telnet">
+ <properties>
+ <help>Telnet to a node</help>
+ </properties>
+ <children>
+ <tagNode name="to">
+ <properties>
+ <help>Telnet to a host</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/telnet $3</command>
+ <children>
+ <tagNode name="port">
+ <properties>
+ <help>Telnet to a host:port</help>
+ <completionHelp>
+ <list>&lt;0-65535&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>/usr/bin/telnet $3 $5</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/terminal.xml b/op-mode-definitions/terminal.xml
new file mode 100644
index 000000000..9c4e629cb
--- /dev/null
+++ b/op-mode-definitions/terminal.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="clear">
+ <properties>
+ <help>Clear system information</help>
+ </properties>
+ <children>
+ <node name="console">
+ <properties>
+ <help>Clear screen</help>
+ </properties>
+ <command>/usr/bin/clear</command>
+ </node>
+ </children>
+ </node>
+ <node name="reset">
+ <properties>
+ <help>Reset a service</help>
+ </properties>
+ <children>
+ <node name="terminal">
+ <properties>
+ <help>Reset terminal</help>
+ </properties>
+ <command>/usr/bin/reset</command>
+ </node>
+ </children>
+ </node>
+ <node name="set">
+ <properties>
+ <help>Set operational options</help>
+ </properties>
+ <children>
+ <tagNode name="builtin">
+ <properties>
+ <help>Bash builtin set command</help>
+ <completionHelp>
+ <list>&lt;OPTION&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>builtin $3</command>
+ </tagNode>
+
+ <node name="console">
+ <properties>
+ <help>Control console behaviors</help>
+ </properties>
+ <children>
+ <leafNode name="keymap">
+ <properties>
+ <help>Reconfigure console keyboard layout</help>
+ </properties>
+ <command>sudo dpkg-reconfigure -f dialog keyboard-configuration &amp;&amp; sudo systemctl restart keyboard-setup</command>
+ </leafNode>
+ </children>
+ </node>
+
+ <node name="terminal">
+ <properties>
+ <help>Control terminal behaviors</help>
+ </properties>
+ <children>
+
+ <node name="key">
+ <properties>
+ <help>Set key behaviors</help>
+ </properties>
+ <children>
+ <tagNode name="query-help">
+ <properties>
+ <help>Enable/disable getting help using question mark (default enabled)</help>
+ <completionHelp>
+ <list>enable disable</list>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/toggle_help_binding.sh $5</command>
+ </tagNode>
+ </children>
+ </node>
+
+ <node name="pager">
+ <properties>
+ <help>Set terminal pager to default (less)</help>
+ </properties>
+ <command>VYATTA_PAGER=${_vyatta_default_pager}</command>
+ </node>
+ <tagNode name="pager">
+ <properties>
+ <help>Set terminal pager</help>
+ <completionHelp>
+ <list>&lt;PROGRAM&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>VYATTA_PAGER=$4</command>
+ </tagNode>
+
+ <tagNode name="length">
+ <properties>
+ <help>Set terminal to given number of rows (0 disables paging)</help>
+ <completionHelp>
+ <list>&lt;NUMBER&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>if [ "$4" -eq 0 ]; then VYATTA_PAGER=cat; else VYATTA_PAGER=${_vyatta_default_pager}; stty rows $4; fi</command>
+ </tagNode>
+
+ <tagNode name="width">
+ <properties>
+ <help>Set terminal to given number of columns</help>
+ <completionHelp>
+ <list>&lt;NUMBER&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>stty columns $4</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+
+
+</interfaceDefinition>
diff --git a/op-mode-definitions/traceroute.xml b/op-mode-definitions/traceroute.xml
new file mode 100644
index 000000000..1b619ed43
--- /dev/null
+++ b/op-mode-definitions/traceroute.xml
@@ -0,0 +1,227 @@
+<?xml version="1.0"?>
+<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>
+ <completionHelp>
+ <list>&lt;hostname&gt; &lt;x.x.x.x&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
+ </completionHelp>
+ </properties>
+ <children>
+ <tagNode name="ipv4">
+ <properties>
+ <help>Explicitly use IPv4 when tracing the path</help>
+ <completionHelp>
+ <list>&lt;hostname&gt; &lt;x.x.x.x&gt;</list>
+ </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 /usr/sbin/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 /usr/sbin/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 /usr/sbin/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 /usr/sbin/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 /usr/sbin/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 /usr/sbin/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 /usr/sbin/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 /usr/sbin/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 /usr/sbin/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 /usr/sbin/ip vrf exec "$4" /usr/bin/mtr "$5"</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/traffic-dump.xml b/op-mode-definitions/traffic-dump.xml
new file mode 100644
index 000000000..6d86f7423
--- /dev/null
+++ b/op-mode-definitions/traffic-dump.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="monitor">
+ <children>
+ <node name="traffic">
+ <properties>
+ <help>Monitor traffic dumps</help>
+ </properties>
+ <children>
+ <tagNode name="interface">
+ <command>sudo tcpdump -i $4</command>
+ <properties>
+ <help>Monitor traffic dump from an interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_dumpable_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ <children>
+ <tagNode name="filter">
+ <command>sudo tcpdump -n -i $4 "${@:6}"</command>
+ <properties>
+ <help>Monitor traffic matching filter conditions</help>
+ </properties>
+ </tagNode>
+ <tagNode name="save">
+ <command>sudo tcpdump -n -i $4 -w $6</command>
+ <properties>
+ <help>Save traffic dump from an interface to a file</help>
+ </properties>
+ <children>
+ <tagNode name="filter">
+ <command>sudo tcpdump -n -i $4 -w $6 "${@:8}"</command>
+ <properties>
+ <help>Save a dump of traffic matching filter conditions to a file</help>
+ </properties>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/vrrp.xml b/op-mode-definitions/vrrp.xml
new file mode 100644
index 000000000..856fb440d
--- /dev/null
+++ b/op-mode-definitions/vrrp.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="vrrp">
+ <properties>
+ <help>Show VRRP (Virtual Router Redundancy Protocol) information</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/vrrp.py --summary</command>
+ <children>
+ <node name="statistics">
+ <properties>
+ <help>Show VRRP statistics</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/vrrp.py --statistics</command>
+ </node>
+ <node name="detail">
+ <properties>
+ <help>Show detailed VRRP state information</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/vrrp.py --data</command>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="restart">
+ <children>
+ <node name="vrrp">
+ <properties>
+ <help>Restart the VRRP (Virtual Router Redundancy Protocol) process</help>
+ </properties>
+ <command>sudo systemctl restart keepalived.service</command>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/wake-on-lan.xml b/op-mode-definitions/wake-on-lan.xml
new file mode 100644
index 000000000..1a9b88596
--- /dev/null
+++ b/op-mode-definitions/wake-on-lan.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="wake-on-lan">
+ <properties>
+ <help>Send Wake-On-LAN (WOL) Magic Packet</help>
+ </properties>
+ <children>
+ <tagNode name="interface">
+ <properties>
+ <help>Interface where the station is connected</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ <children>
+ <tagNode name="host">
+ <properties>
+ <help>Station (MAC) address to wake up</help>
+ </properties>
+ <command>sudo /usr/sbin/etherwake -i "$3" "$5"</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/wireguard.xml b/op-mode-definitions/wireguard.xml
new file mode 100644
index 000000000..a7bfa36a3
--- /dev/null
+++ b/op-mode-definitions/wireguard.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0"?>
+<!-- wireguard key management -->
+<interfaceDefinition>
+ <node name="generate">
+ <children>
+ <node name="wireguard">
+ <properties>
+ <help>wireguard key generation utility</help>
+ </properties>
+ <children>
+ <leafNode name="default-keypair">
+ <properties>
+ <help>generates the wireguard default-keypair</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/wireguard.py --genkey</command>
+ </leafNode>
+ <leafNode name="preshared-key">
+ <properties>
+ <help>generate a wireguard preshared key</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/wireguard.py --genpsk</command>
+ </leafNode>
+ <tagNode name="named-keypairs">
+ <properties>
+ <help>Generates named wireguard keypairs</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/wireguard.py --genkey --location "$4"</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="show">
+ <children>
+ <node name="wireguard">
+ <properties>
+ <help>Show wireguard properties</help>
+ </properties>
+ <children>
+ <node name="keypairs">
+ <properties>
+ <help>Shows named wireguard keys</help>
+ </properties>
+ <children>
+ <tagNode name="pubkey">
+ <properties>
+ <help>Show wireguard private named key</help>
+ <completionHelp>
+ <script>${vyos_op_scripts_dir}/wireguard.py --listkdir</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/wireguard.py --showpub --location "$5"</command>
+ </tagNode>
+ <tagNode name="privkey">
+ <properties>
+ <help>Show wireguard public named key</help>
+ <completionHelp>
+ <script>${vyos_op_scripts_dir}/wireguard.py --listkdir</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/wireguard.py --showpriv --location "$5"</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="interfaces">
+ <children>
+ <tagNode name="wireguard">
+ <properties>
+ <help>show wireguard interface information</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py --type wireguard</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/wireguard.py --showinterface "$4"</command>
+ <children>
+ <leafNode name="allowed-ips">
+ <properties>
+ <help>show all allowed-ips for the specified interface</help>
+ </properties>
+ <command>sudo wg show "$4" allowed-ips</command>
+ </leafNode>
+ <leafNode name="endpoints">
+ <properties>
+ <help>show all endpoints for the specified interface</help>
+ </properties>
+ <command>sudo wg show "$4" endpoints</command>
+ </leafNode>
+ <leafNode name="peers">
+ <properties>
+ <help>show all peer IDs for the specified interface</help>
+ </properties>
+ <command>sudo wg show "$4" peers</command>
+ </leafNode>
+ <!-- more commands upon request -->
+ </children>
+ </tagNode>
+ <node name="wireguard">
+ <properties>
+ <help>Show wireguard interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=wireguard --action=show-brief</command>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed wireguard interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=wireguard --action=show</command>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="delete">
+ <children>
+ <node name="wireguard">
+ <properties>
+ <help>Delete wireguard properties</help>
+ </properties>
+ <children>
+ <tagNode name="keypair">
+ <properties>
+ <help>Delete a wireguard keypair</help>
+ <completionHelp>
+ <script>${vyos_op_scripts_dir}/wireguard.py --listkdir</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/wireguard.py --delkdir --location "$4"</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
+
diff --git a/op-mode-definitions/wireless.xml b/op-mode-definitions/wireless.xml
new file mode 100644
index 000000000..a3a9d1f55
--- /dev/null
+++ b/op-mode-definitions/wireless.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="clear">
+ <children>
+ <node name="interfaces">
+ <children>
+ <node name="wireless">
+ <properties>
+ <help>Clear wireless interface information</help>
+ </properties>
+ <children>
+ <leafNode name="counters">
+ <properties>
+ <help>Clear all wireless interface counters</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_interfaces.py --action=clear --intf-type="$3"</command>
+ </leafNode>
+ </children>
+ </node>
+ <tagNode name="wireless">
+ <properties>
+ <help>Clear interface information for a given wireless interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py --type wireless</script>
+ </completionHelp>
+ </properties>
+ <children>
+ <leafNode name="counters">
+ <properties>
+ <help>Clear all wireless interface counters</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_interfaces.py --action=clear --intf="$4"</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ <node name="show">
+ <children>
+ <node name="interfaces">
+ <children>
+ <node name="wireless">
+ <properties>
+ <help>Show wireless interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=wireless --action=show-brief</command>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed wireless interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf-type=wireless --action=show</command>
+ </leafNode>
+ <leafNode name="info">
+ <properties>
+ <help>Show wireless interface configuration</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_wireless.py --brief</command>
+ </leafNode>
+ </children>
+ </node>
+ <tagNode name="wireless">
+ <properties>
+ <help>Show specified wireless interface information</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py --type wireless</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4"</command>
+ <children>
+ <leafNode name="brief">
+ <properties>
+ <help>Show summary of the specified wireless interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4" --action=show-brief</command>
+ </leafNode>
+ <node name="scan">
+ <properties>
+ <help>Show summary of the specified wireless interface information</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/show_wireless.py --scan "$4"</command>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed scan results</help>
+ </properties>
+ <command>sudo /sbin/iw dev "$4" scan ap-force</command>
+ </leafNode>
+ </children>
+ </node>
+ <leafNode name="stations">
+ <properties>
+ <help>Show specified wireless interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_wireless.py --stations "$4"</command>
+ </leafNode>
+ <tagNode name="vif">
+ <properties>
+ <help>Show specified virtual network interface (vif) information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4.$6"</command>
+ <children>
+ <leafNode name="brief">
+ <properties>
+ <help>Show summary of specified virtual network interface (vif) information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4.$6" --action=show-brief</command>
+ </leafNode>
+ </children>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>