summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--op-mode-definitions/include/bgp/martian-next-hop.xml.i15
-rw-r--r--op-mode-definitions/include/bgp/next-hop.xml.i23
-rw-r--r--op-mode-definitions/show-bgp.xml.in72
3 files changed, 42 insertions, 68 deletions
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 @@
+<!-- included start from bgp/martian-next-hop.xml.i -->
+<node name="martian">
+ <properties>
+ <help>Martian next-hops</help>
+ </properties>
+ <children>
+ <leafNode name="next-hop">
+ <properties>
+ <help>Martian next-hop database</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+ </leafNode>
+ </children>
+</node>
+<!-- included end -->
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 @@
+<!-- included start from bgp/next-hop.xml.i -->
+<node name="nexthop">
+ <properties>
+ <help>Show BGP nexthop table</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+ <children>
+ #include <include/vtysh-generic-detail.xml.i>
+ </children>
+</node>
+<tagNode name="nexthop">
+ <properties>
+ <help>IPv4/IPv6 nexthop address</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+ <children>
+ #include <include/vtysh-generic-detail.xml.i>
+ </children>
+</tagNode>
+<!-- included end -->
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 @@
</leafNode>
</children>
</node>
- <node name="martian">
- <properties>
- <help>martian next-hops</help>
- </properties>
- <children>
- <leafNode name="next-hop">
- <properties>
- <help>martian next-hop database</help>
- </properties>
- <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
- </leafNode>
- </children>
- </node>
+ #include <include/bgp/martian-next-hop.xml.i>
<leafNode name="memory">
<properties>
<help>Global BGP memory statistics</help>
</properties>
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
</leafNode>
- <node name="nexthop">
- <properties>
- <help>Show BGP nexthop table</help>
- </properties>
- <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
- <children>
- #include <include/vtysh-generic-detail.xml.i>
- </children>
- </node>
- <tagNode name="nexthop">
- <properties>
- <help>IPv4/IPv6 nexthop address</help>
- <completionHelp>
- <list>&lt;x.x.x.x&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
- </completionHelp>
- </properties>
- <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
- <children>
- #include <include/vtysh-generic-detail.xml.i>
- </children>
- </tagNode>
+ #include <include/bgp/next-hop.xml.i>
<leafNode name="statistics">
<properties>
<help>BGP RIB advertisement statistics</help>
@@ -100,40 +68,8 @@
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
<children>
#include <include/bgp/show-bgp-common.xml.i>
- <node name="martian">
- <properties>
- <help>martian next-hops</help>
- </properties>
- <children>
- <leafNode name="next-hop">
- <properties>
- <help>martian next-hop database</help>
- </properties>
- <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
- </leafNode>
- </children>
- </node>
- <node name="nexthop">
- <properties>
- <help>Show BGP nexthop table</help>
- </properties>
- <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
- <children>
- #include <include/vtysh-generic-detail.xml.i>
- </children>
- </node>
- <tagNode name="nexthop">
- <properties>
- <help>IPv4/IPv6 nexthop address</help>
- <completionHelp>
- <list>&lt;x.x.x.x&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
- </completionHelp>
- </properties>
- <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
- <children>
- #include <include/vtysh-generic-detail.xml.i>
- </children>
- </tagNode>
+ #include <include/bgp/martian-next-hop.xml.i>
+ #include <include/bgp/next-hop.xml.i>
</children>
</tagNode>
#include <include/vtysh-generic-wide.xml.i>