From 3f2173873e0519ea253759e7e119b2bcaea596bb Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 13 Dec 2021 21:06:47 +0100 Subject: op-mode: xml: refactor "show ip(v6) route" to use #include building blocks This change then adds supper to filter for given route types under a VRF instance. You will have "show ip route bgp" in the global VRF and "show ip route vrf red bgp" in the red VRF. Same commands apply to IPv6 routes. --- op-mode-definitions/include/show-route-bgp.xml.i | 8 ++++++++ op-mode-definitions/include/show-route-connected.xml.i | 8 ++++++++ op-mode-definitions/include/show-route-isis.xml.i | 8 ++++++++ op-mode-definitions/include/show-route-kernel.xml.i | 8 ++++++++ op-mode-definitions/include/show-route-ospf.xml.i | 8 ++++++++ op-mode-definitions/include/show-route-ospfv3.xml.i | 8 ++++++++ op-mode-definitions/include/show-route-rip.xml.i | 8 ++++++++ op-mode-definitions/include/show-route-ripng.xml.i | 8 ++++++++ op-mode-definitions/include/show-route-static.xml.i | 8 ++++++++ op-mode-definitions/include/show-route-summary.xml.i | 8 ++++++++ .../include/show-route-supernets-only.xml.i | 8 ++++++++ op-mode-definitions/include/show-route-table.xml.i | 17 +++++++++++++++++ op-mode-definitions/include/show-route-tag.xml.i | 16 ++++++++++++++++ 13 files changed, 121 insertions(+) create mode 100644 op-mode-definitions/include/show-route-bgp.xml.i create mode 100644 op-mode-definitions/include/show-route-connected.xml.i create mode 100644 op-mode-definitions/include/show-route-isis.xml.i create mode 100644 op-mode-definitions/include/show-route-kernel.xml.i create mode 100644 op-mode-definitions/include/show-route-ospf.xml.i create mode 100644 op-mode-definitions/include/show-route-ospfv3.xml.i create mode 100644 op-mode-definitions/include/show-route-rip.xml.i create mode 100644 op-mode-definitions/include/show-route-ripng.xml.i create mode 100644 op-mode-definitions/include/show-route-static.xml.i create mode 100644 op-mode-definitions/include/show-route-summary.xml.i create mode 100644 op-mode-definitions/include/show-route-supernets-only.xml.i create mode 100644 op-mode-definitions/include/show-route-table.xml.i create mode 100644 op-mode-definitions/include/show-route-tag.xml.i (limited to 'op-mode-definitions/include') diff --git a/op-mode-definitions/include/show-route-bgp.xml.i b/op-mode-definitions/include/show-route-bgp.xml.i new file mode 100644 index 000000000..5c26bf43f --- /dev/null +++ b/op-mode-definitions/include/show-route-bgp.xml.i @@ -0,0 +1,8 @@ + + + + Border Gateway Protocol (BGP) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/show-route-connected.xml.i b/op-mode-definitions/include/show-route-connected.xml.i new file mode 100644 index 000000000..37364de64 --- /dev/null +++ b/op-mode-definitions/include/show-route-connected.xml.i @@ -0,0 +1,8 @@ + + + + Connected routes (directly attached subnet or host) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/show-route-isis.xml.i b/op-mode-definitions/include/show-route-isis.xml.i new file mode 100644 index 000000000..9ff2ccdc5 --- /dev/null +++ b/op-mode-definitions/include/show-route-isis.xml.i @@ -0,0 +1,8 @@ + + + + Intermediate System to Intermediate System (IS-IS) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/show-route-kernel.xml.i b/op-mode-definitions/include/show-route-kernel.xml.i new file mode 100644 index 000000000..8c5ac414e --- /dev/null +++ b/op-mode-definitions/include/show-route-kernel.xml.i @@ -0,0 +1,8 @@ + + + + Kernel routes (not installed via the zebra RIB) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/show-route-ospf.xml.i b/op-mode-definitions/include/show-route-ospf.xml.i new file mode 100644 index 000000000..1122aaba5 --- /dev/null +++ b/op-mode-definitions/include/show-route-ospf.xml.i @@ -0,0 +1,8 @@ + + + + Open Shortest Path First (OSPFv2) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/show-route-ospfv3.xml.i b/op-mode-definitions/include/show-route-ospfv3.xml.i new file mode 100644 index 000000000..c7a11b7ba --- /dev/null +++ b/op-mode-definitions/include/show-route-ospfv3.xml.i @@ -0,0 +1,8 @@ + + + + Open Shortest Path First (IPv6) (OSPFv3) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/show-route-rip.xml.i b/op-mode-definitions/include/show-route-rip.xml.i new file mode 100644 index 000000000..3c2fede28 --- /dev/null +++ b/op-mode-definitions/include/show-route-rip.xml.i @@ -0,0 +1,8 @@ + + + + Routing Information Protocol (RIP) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/show-route-ripng.xml.i b/op-mode-definitions/include/show-route-ripng.xml.i new file mode 100644 index 000000000..6e59cb054 --- /dev/null +++ b/op-mode-definitions/include/show-route-ripng.xml.i @@ -0,0 +1,8 @@ + + + + Routing Information Protocol next-generation (IPv6) (RIPng) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/show-route-static.xml.i b/op-mode-definitions/include/show-route-static.xml.i new file mode 100644 index 000000000..c2e396763 --- /dev/null +++ b/op-mode-definitions/include/show-route-static.xml.i @@ -0,0 +1,8 @@ + + + + Statically configured routes + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/show-route-summary.xml.i b/op-mode-definitions/include/show-route-summary.xml.i new file mode 100644 index 000000000..471124562 --- /dev/null +++ b/op-mode-definitions/include/show-route-summary.xml.i @@ -0,0 +1,8 @@ + + + + Summary of all routes + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/show-route-supernets-only.xml.i b/op-mode-definitions/include/show-route-supernets-only.xml.i new file mode 100644 index 000000000..4d1e7c51f --- /dev/null +++ b/op-mode-definitions/include/show-route-supernets-only.xml.i @@ -0,0 +1,8 @@ + + + + Show supernet entries only + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/show-route-table.xml.i b/op-mode-definitions/include/show-route-table.xml.i new file mode 100644 index 000000000..c3cf82a86 --- /dev/null +++ b/op-mode-definitions/include/show-route-table.xml.i @@ -0,0 +1,17 @@ + + + + Table to display + + + + + The table number to display + + all + protocols static table + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/show-route-tag.xml.i b/op-mode-definitions/include/show-route-tag.xml.i new file mode 100644 index 000000000..8bfa0ae4e --- /dev/null +++ b/op-mode-definitions/include/show-route-tag.xml.i @@ -0,0 +1,16 @@ + + + + Show only routes with tag + + + + + Tag value + + <1-4294967295> + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + -- cgit v1.2.3