summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2023-01-15 20:31:13 +0000
committerGitHub <noreply@github.com>2023-01-15 20:31:13 +0000
commit6c9c4144df327d6c27d559c8a0c14317da3a2588 (patch)
treec81dc2c6036e893cc5a19bb24d144821dda60a91 /op-mode-definitions
parentc9a92b01fab00d656ce3be5702634e76bcab6a23 (diff)
parent65fa4e55074652ec65b21eff457faa8f4adc9a1a (diff)
downloadvyos-1x-6c9c4144df327d6c27d559c8a0c14317da3a2588.tar.gz
vyos-1x-6c9c4144df327d6c27d559c8a0c14317da3a2588.zip
Merge pull request #1753 from dmbaturin/ipv6-route-summary
opmode: T4837: add family and table arguments for ShowRoute
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/include/show-route-summary.xml.i8
-rw-r--r--op-mode-definitions/show-ip-route.xml.in15
-rw-r--r--op-mode-definitions/show-ipv6-route.xml.in15
3 files changed, 28 insertions, 10 deletions
diff --git a/op-mode-definitions/include/show-route-summary.xml.i b/op-mode-definitions/include/show-route-summary.xml.i
deleted file mode 100644
index 471124562..000000000
--- a/op-mode-definitions/include/show-route-summary.xml.i
+++ /dev/null
@@ -1,8 +0,0 @@
-<!-- included start from show-route-summary.xml.i -->
-<leafNode name="summary">
- <properties>
- <help>Summary of all routes</help>
- </properties>
- <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
-</leafNode>
-<!-- included end -->
diff --git a/op-mode-definitions/show-ip-route.xml.in b/op-mode-definitions/show-ip-route.xml.in
index 1e906672d..63b04fcd0 100644
--- a/op-mode-definitions/show-ip-route.xml.in
+++ b/op-mode-definitions/show-ip-route.xml.in
@@ -50,10 +50,23 @@
#include <include/show-route-ospf.xml.i>
#include <include/show-route-rip.xml.i>
#include <include/show-route-static.xml.i>
- #include <include/show-route-summary.xml.i>
#include <include/show-route-supernets-only.xml.i>
#include <include/show-route-table.xml.i>
#include <include/show-route-tag.xml.i>
+ <node name="summary">
+ <properties>
+ <help>Summary of all routes</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/route.py show_summary --family inet</command>
+ <children>
+ <tagNode name="table">
+ <properties>
+ <help>Summary of routes in a particular table</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/route.py show_summary --family inet --table $6</command>
+ </tagNode>
+ </children>
+ </node>
<tagNode name="vrf">
<properties>
<help>Show IP routes in VRF</help>
diff --git a/op-mode-definitions/show-ipv6-route.xml.in b/op-mode-definitions/show-ipv6-route.xml.in
index 2c5024991..30ea208c1 100644
--- a/op-mode-definitions/show-ipv6-route.xml.in
+++ b/op-mode-definitions/show-ipv6-route.xml.in
@@ -50,9 +50,22 @@
#include <include/show-route-ospfv3.xml.i>
#include <include/show-route-ripng.xml.i>
#include <include/show-route-static.xml.i>
- #include <include/show-route-summary.xml.i>
#include <include/show-route-table.xml.i>
#include <include/show-route-tag.xml.i>
+ <node name="summary">
+ <properties>
+ <help>Summary of all routes</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/route.py show_summary --family inet6</command>
+ <children>
+ <tagNode name="table">
+ <properties>
+ <help>Summary of routes in a particular table</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/route.py show_summary --family inet6 --table $6</command>
+ </tagNode>
+ </children>
+ </node>
<tagNode name="vrf">
<properties>
<help>Show IPv6 routes in VRF</help>