diff options
author | Christian Breunig <christian@breunig.cc> | 2025-06-01 13:26:37 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2025-06-01 13:26:37 +0200 |
commit | d7df1aea35dedb6fd4542064dbb1219ec6efbdd6 (patch) | |
tree | 212140f2b0e526b9454c337a514e4c2d0092ed44 | |
parent | b8cd453177feebc44aee53657bfd2bbcea7a8d66 (diff) | |
download | vyos-1x-d7df1aea35dedb6fd4542064dbb1219ec6efbdd6.tar.gz vyos-1x-d7df1aea35dedb6fd4542064dbb1219ec6efbdd6.zip |
op-mode: T7509: add "detail" and "wide" modifier for advertised-routes
show ip bgp neighbors <ip> advertised-routes [detail [wide]|wide]
show bgp neighbors <ip> advertised-routes [detail [wide]|wide]
show bgp ipv4 neighbors <ip> advertised-routes [detail [wide]|wide]
show bgp ipv6 neighbors <ip> advertised-routes [detail [wide]|wide]
show bgp vrf <name> neighbors <ip> advertised-routes [detail [wide]|wide]
show bgp vrf <name> ipv4 neighbors <ip> advertised-routes [detail [wide]|wide]
show bgp vrf <name> ipv6 neighbors <ip> advertised-routes [detail [wide]|wide]
5 files changed, 26 insertions, 18 deletions
diff --git a/op-mode-definitions/include/bgp/advertised-routes.xml.i b/op-mode-definitions/include/bgp/advertised-routes.xml.i new file mode 100644 index 000000000..cc3f1f9b5 --- /dev/null +++ b/op-mode-definitions/include/bgp/advertised-routes.xml.i @@ -0,0 +1,12 @@ +<!-- included start from bgp/advertised-routes.xml.i --> +<node name="advertised-routes"> + <properties> + <help>Show routes advertised to a BGP neighbor</help> + </properties> + <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> + <children> + #include <include/vtysh-generic-detail-wide.xml.i> + #include <include/vtysh-generic-wide.xml.i> + </children> +</node> +<!-- included end --> diff --git a/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i b/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i index 820d507fd..a6faa4949 100644 --- a/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i +++ b/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i @@ -158,12 +158,7 @@ </properties> <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> <children> - <leafNode name="advertised-routes"> - <properties> - <help>Show routes advertised to a BGP neighbor</help> - </properties> - <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> - </leafNode> + #include <include/bgp/advertised-routes.xml.i> <leafNode name="dampened-routes"> <properties> <help>Show dampened routes received from BGP neighbor</help> diff --git a/op-mode-definitions/include/bgp/show-bgp-common.xml.i b/op-mode-definitions/include/bgp/show-bgp-common.xml.i index d888bc3b0..8d2c3d1b9 100644 --- a/op-mode-definitions/include/bgp/show-bgp-common.xml.i +++ b/op-mode-definitions/include/bgp/show-bgp-common.xml.i @@ -128,12 +128,7 @@ </properties> <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> <children> - <leafNode name="advertised-routes"> - <properties> - <help>Show routes advertised to a BGP neighbor</help> - </properties> - <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> - </leafNode> + #include <include/bgp/advertised-routes.xml.i> <leafNode name="routes"> <properties> <help>Show routes learned from BGP neighbor</help> diff --git a/op-mode-definitions/include/bgp/show-ip-bgp-common.xml.i b/op-mode-definitions/include/bgp/show-ip-bgp-common.xml.i index db9021f3e..49e035b5f 100644 --- a/op-mode-definitions/include/bgp/show-ip-bgp-common.xml.i +++ b/op-mode-definitions/include/bgp/show-ip-bgp-common.xml.i @@ -81,12 +81,7 @@ </properties> <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> <children> - <leafNode name="advertised-routes"> - <properties> - <help>Show routes advertised to a BGP neighbor</help> - </properties> - <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> - </leafNode> + #include <include/bgp/advertised-routes.xml.i> <leafNode name="prefix-counts"> <properties> <help>Show detailed prefix count information</help> diff --git a/op-mode-definitions/include/vtysh-generic-detail-wide.xml.i b/op-mode-definitions/include/vtysh-generic-detail-wide.xml.i new file mode 100644 index 000000000..98ce09948 --- /dev/null +++ b/op-mode-definitions/include/vtysh-generic-detail-wide.xml.i @@ -0,0 +1,11 @@ +<!-- included start from vtysh-generic-detail-wide.xml.i --> +<node name="detail"> + <properties> + <help>Detailed information</help> + </properties> + <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> + <children> + #include <include/vtysh-generic-wide.xml.i> + </children> +</node> +<!-- included end --> |