From 6bfeb43b0cfed18c8e9022c83b2b40d630b0eb6b Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Fri, 10 Mar 2023 15:54:09 +0100 Subject: xml: bgp: T5070: split out CLI definitions to include files which can be reused --- .../include/bgp/martian-next-hop.xml.i | 15 +++++ op-mode-definitions/include/bgp/next-hop.xml.i | 23 +++++++ op-mode-definitions/show-bgp.xml.in | 72 ++-------------------- 3 files changed, 42 insertions(+), 68 deletions(-) create mode 100644 op-mode-definitions/include/bgp/martian-next-hop.xml.i create mode 100644 op-mode-definitions/include/bgp/next-hop.xml.i diff --git a/op-mode-definitions/include/bgp/martian-next-hop.xml.i b/op-mode-definitions/include/bgp/martian-next-hop.xml.i new file mode 100644 index 000000000..938d4ffa2 --- /dev/null +++ b/op-mode-definitions/include/bgp/martian-next-hop.xml.i @@ -0,0 +1,15 @@ + + + + Martian next-hops + + + + + Martian next-hop database + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + diff --git a/op-mode-definitions/include/bgp/next-hop.xml.i b/op-mode-definitions/include/bgp/next-hop.xml.i new file mode 100644 index 000000000..517a44888 --- /dev/null +++ b/op-mode-definitions/include/bgp/next-hop.xml.i @@ -0,0 +1,23 @@ + + + + Show BGP nexthop table + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + #include + + + + + IPv4/IPv6 nexthop address + + <x.x.x.x> <h:h:h:h:h:h:h:h> + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + #include + + + diff --git a/op-mode-definitions/show-bgp.xml.in b/op-mode-definitions/show-bgp.xml.in index 378ae47f0..974147621 100644 --- a/op-mode-definitions/show-bgp.xml.in +++ b/op-mode-definitions/show-bgp.xml.in @@ -31,46 +31,14 @@ - - - martian next-hops - - - - - martian next-hop database - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - + #include Global BGP memory statistics ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - Show BGP nexthop table - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - #include - - - - - IPv4/IPv6 nexthop address - - <x.x.x.x> <h:h:h:h:h:h:h:h> - - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - #include - - + #include BGP RIB advertisement statistics @@ -100,40 +68,8 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ #include - - - martian next-hops - - - - - martian next-hop database - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - - - Show BGP nexthop table - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - #include - - - - - IPv4/IPv6 nexthop address - - <x.x.x.x> <h:h:h:h:h:h:h:h> - - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - #include - - + #include + #include #include -- cgit v1.2.3