summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/force-commit-archive.xml.in2
-rw-r--r--op-mode-definitions/include/vni-tagnode-all.xml.i5
-rw-r--r--op-mode-definitions/include/vni-tagnode.xml.i5
-rw-r--r--op-mode-definitions/nat.xml.in33
-rw-r--r--op-mode-definitions/ntp.xml.in16
-rw-r--r--op-mode-definitions/show-evpn.xml.in59
-rw-r--r--op-mode-definitions/show-interfaces-bonding.xml.in34
-rw-r--r--op-mode-definitions/show-log.xml.in50
-rw-r--r--op-mode-definitions/system-image.xml.in9
9 files changed, 200 insertions, 13 deletions
diff --git a/op-mode-definitions/force-commit-archive.xml.in b/op-mode-definitions/force-commit-archive.xml.in
index 162323c20..46836f967 100644
--- a/op-mode-definitions/force-commit-archive.xml.in
+++ b/op-mode-definitions/force-commit-archive.xml.in
@@ -6,7 +6,7 @@
<properties>
<help>Manually archive configuration</help>
</properties>
- <command>/usr/bin/config-mgmt</command>
+ <command>/etc/commit/post-hooks.d/02vyos-commit-archive; printf "\n"</command>
</leafNode>
</children>
</node>
diff --git a/op-mode-definitions/include/vni-tagnode-all.xml.i b/op-mode-definitions/include/vni-tagnode-all.xml.i
index 0fedb9371..fabab19d7 100644
--- a/op-mode-definitions/include/vni-tagnode-all.xml.i
+++ b/op-mode-definitions/include/vni-tagnode-all.xml.i
@@ -3,9 +3,10 @@
<properties>
<help>VXLAN network identifier (VNI) number</help>
<completionHelp>
- <list>1-16777215 all</list>
+ <list>&lt;1-16777215&gt; all</list>
+ <script>${vyos_completion_dir}/list_vni.sh</script>
</completionHelp>
</properties>
- <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+ <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command>
</tagNode>
<!-- included end -->
diff --git a/op-mode-definitions/include/vni-tagnode.xml.i b/op-mode-definitions/include/vni-tagnode.xml.i
index 22f2d33bd..f5b99dcc8 100644
--- a/op-mode-definitions/include/vni-tagnode.xml.i
+++ b/op-mode-definitions/include/vni-tagnode.xml.i
@@ -3,9 +3,10 @@
<properties>
<help>VXLAN network identifier (VNI) number</help>
<completionHelp>
- <list>1-16777215</list>
+ <list>&lt;1-16777215&gt;</list>
+ <script>${vyos_completion_dir}/list_vni.sh</script>
</completionHelp>
</properties>
- <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+ <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command>
</tagNode>
<!-- included end -->
diff --git a/op-mode-definitions/nat.xml.in b/op-mode-definitions/nat.xml.in
index 307a91337..13e7fd81d 100644
--- a/op-mode-definitions/nat.xml.in
+++ b/op-mode-definitions/nat.xml.in
@@ -7,6 +7,39 @@
<help>Show IPv4 Network Address Translation (NAT) information</help>
</properties>
<children>
+ <node name="cgnat">
+ <properties>
+ <help>Show Carrier-Grade Network Address Translation (CGNAT)</help>
+ </properties>
+ <children>
+ <node name="allocation">
+ <properties>
+ <help>Show allocated CGNAT parameters</help>
+ </properties>
+ <children>
+ <tagNode name="external-address">
+ <properties>
+ <help>Show CGNAT allocations for an external IP address</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/cgnat.py show_allocation --external-address "$6"</command>
+ </tagNode>
+ <tagNode name="internal-address">
+ <properties>
+ <help>Show CGNAT allocations for an internal IP address</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/cgnat.py show_allocation --internal-address "$6"</command>
+ </tagNode>
+ </children>
+ <command>sudo ${vyos_op_scripts_dir}/cgnat.py show_allocation</command>
+ </node>
+ </children>
+ </node>
<node name="source">
<properties>
<help>Show source IPv4 to IPv4 Network Address Translation (NAT) information</help>
diff --git a/op-mode-definitions/ntp.xml.in b/op-mode-definitions/ntp.xml.in
index b8d0c43ec..17250a45e 100644
--- a/op-mode-definitions/ntp.xml.in
+++ b/op-mode-definitions/ntp.xml.in
@@ -6,13 +6,25 @@
<properties>
<help>Show peer status of NTP daemon</help>
</properties>
- <command>${vyos_op_scripts_dir}/show_ntp.sh --sourcestats</command>
+ <command>${vyos_op_scripts_dir}/ntp.py show_sourcestats</command>
<children>
+ <node name="activity">
+ <properties>
+ <help>Report the number of servers and peers that are online and offline</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ntp.py show_activity</command>
+ </node>
+ <node name="sources">
+ <properties>
+ <help>Show information about the current time sources being accessed</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/ntp.py show_sources</command>
+ </node>
<node name="system">
<properties>
<help>Show parameters about the system clock performance</help>
</properties>
- <command>${vyos_op_scripts_dir}/show_ntp.sh --tracking</command>
+ <command>${vyos_op_scripts_dir}/ntp.py show_tracking</command>
</node>
</children>
</node>
diff --git a/op-mode-definitions/show-evpn.xml.in b/op-mode-definitions/show-evpn.xml.in
index a005cbc30..3c1e5c7d6 100644
--- a/op-mode-definitions/show-evpn.xml.in
+++ b/op-mode-definitions/show-evpn.xml.in
@@ -14,7 +14,7 @@
<children>
#include <include/frr-detail.xml.i>
</children>
- <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+ <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command>
</node>
<tagNode name="access-vlan">
<properties>
@@ -31,7 +31,7 @@
<list>&lt;1-4094&gt;</list>
</completionHelp>
</properties>
- <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+ <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command>
</node>
</children>
</tagNode>
@@ -43,6 +43,45 @@
#include <include/vni-tagnode-all.xml.i>
</children>
</node>
+ <tagNode name="es">
+ <properties>
+ <help>Show ESI information for specified ESI</help>
+ <completionHelp>
+ <list>&lt;esi&gt;</list>
+ <script>${vyos_completion_dir}/list_esi.sh</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command>
+ </tagNode>
+ <node name="es">
+ <properties>
+ <help>Show ESI information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show ESI details</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command>
+ </leafNode>
+ </children>
+ </node>
+ <node name="es-evi">
+ <properties>
+ <help>Show ESI information per EVI</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show ESI per EVI details</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command>
+ </leafNode>
+ #include <include/vni-tagnode.xml.i>
+ </children>
+ </node>
<node name="mac">
<properties>
<help>MAC addresses</help>
@@ -67,7 +106,23 @@
#include <include/vni-tagnode-all.xml.i>
</children>
</node>
+ #include <include/vni-tagnode.xml.i>
+ <node name="vni">
+ <properties>
+ <help>Show VNI information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show VNI details</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command>
+ </leafNode>
+ </children>
+ </node>
</children>
+ <command>${vyos_op_scripts_dir}/evpn.py show_evpn --command "$*"</command>
</node>
</children>
</node>
diff --git a/op-mode-definitions/show-interfaces-bonding.xml.in b/op-mode-definitions/show-interfaces-bonding.xml.in
index 8ca5adb4f..e2950331b 100644
--- a/op-mode-definitions/show-interfaces-bonding.xml.in
+++ b/op-mode-definitions/show-interfaces-bonding.xml.in
@@ -23,8 +23,27 @@
<properties>
<help>Show detailed interface information</help>
</properties>
- <command>if [ -f "/proc/net/bonding/$4" ]; then cat "/proc/net/bonding/$4"; else echo "Interface $4 does not exist!"; fi</command>
+ <command>if [ -f "/proc/net/bonding/$4" ]; then sudo cat "/proc/net/bonding/$4"; else echo "Interface $4 does not exist!"; fi</command>
</leafNode>
+ <node name="lacp">
+ <properties>
+ <help>Show LACP related info</help>
+ </properties>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show LACP details</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/bonding.py show_lacp_detail --interface="$4" </command>
+ </leafNode>
+ <leafNode name="neighbors">
+ <properties>
+ <help>Show LACP Neighbors</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/bonding.py show_lacp_neighbors --interface="$4"</command>
+ </leafNode>
+ </children>
+ </node>
<leafNode name="slaves">
<properties>
<help>Show specified bonding interface information</help>
@@ -62,6 +81,19 @@
</properties>
<command>${vyos_op_scripts_dir}/interfaces.py show --intf-type=bonding</command>
</leafNode>
+ <node name="lacp">
+ <properties>
+ <help>Show LACP related info</help>
+ </properties>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show LACP details</help>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/bonding.py show_lacp_detail</command>
+ </leafNode>
+ </children>
+ </node>
<leafNode name="slaves">
<properties>
<help>Show specified bonding interface information</help>
diff --git a/op-mode-definitions/show-log.xml.in b/op-mode-definitions/show-log.xml.in
index e13270364..c3aa324ba 100644
--- a/op-mode-definitions/show-log.xml.in
+++ b/op-mode-definitions/show-log.xml.in
@@ -464,12 +464,56 @@
</properties>
<command>journalctl --no-hostname --boot --unit lldpd.service</command>
</leafNode>
- <leafNode name="nat">
+ <node 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>
+ <children>
+ <node name="destination">
+ <properties>
+ <help>Show NAT destination log</help>
+ </properties>
+ <command>journalctl --no-hostname --boot -k | egrep "\[DST-NAT-[0-9]+\]"</command>
+ <children>
+ <tagNode name="rule">
+ <properties>
+ <help>Show NAT destination log for specified rule</help>
+ </properties>
+ <command>journalctl --no-hostname --boot -k | egrep "\[DST-NAT-$6\]"</command>
+ </tagNode>
+ </children>
+ </node>
+ <node name="source">
+ <properties>
+ <help>Show NAT source log</help>
+ </properties>
+ <command>journalctl --no-hostname --boot -k | egrep "\[SRC-NAT-[0-9]+(-MASQ)?\]"&quot;"</command>
+ <children>
+ <tagNode name="rule">
+ <properties>
+ <help>Show NAT source log for specified rule</help>
+ </properties>
+ <command>journalctl --no-hostname --boot -k | egrep "\[SRC-NAT-$6(-MASQ)?\]"</command>
+ </tagNode>
+ </children>
+ </node>
+ <node name="static">
+ <properties>
+ <help>Show NAT static log</help>
+ </properties>
+ <command>journalctl --no-hostname --boot -k | egrep "\[STATIC-(SRC|DST)-NAT-[0-9]+\]"</command>
+ <children>
+ <tagNode name="rule">
+ <properties>
+ <help>Show NAT static log for specified rule</help>
+ </properties>
+ <command>journalctl --no-hostname --boot -k | egrep "\[STATIC-(SRC|DST)-NAT-$6\]"</command>
+ </tagNode>
+ </children>
+ </node>
+ </children>
+ <command>journalctl --no-hostname --boot -k | egrep "\[(STATIC-)?(DST|SRC)-NAT-[0-9]+(-MASQ)?\]"</command>
+ </node>
<leafNode name="ndp-proxy">
<properties>
<help>Show log for Neighbor Discovery Protocol (NDP) Proxy</help>
diff --git a/op-mode-definitions/system-image.xml.in b/op-mode-definitions/system-image.xml.in
index 7b5260b4e..44b055be6 100644
--- a/op-mode-definitions/system-image.xml.in
+++ b/op-mode-definitions/system-image.xml.in
@@ -72,6 +72,15 @@
<help>Set system operational parameters</help>
</properties>
<children>
+ <tagNode name="boot-console">
+ <properties>
+ <help>Set system console type at boot</help>
+ <completionHelp>
+ <script>sudo ${vyos_op_scripts_dir}/image_manager.py --action list_console_types</script>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/image_manager.py --action set_console_type --console-type "${4}"</command>
+ </tagNode>
<node name="image">
<properties>
<help>Set system image parameters</help>