diff options
Diffstat (limited to 'op-mode-definitions')
-rw-r--r-- | op-mode-definitions/include/isis-common.xml.i | 179 | ||||
-rw-r--r-- | op-mode-definitions/nat.xml.in | 10 | ||||
-rw-r--r-- | op-mode-definitions/nat66.xml.in | 98 | ||||
-rw-r--r-- | op-mode-definitions/show-isis.xml.in | 178 | ||||
-rw-r--r-- | op-mode-definitions/show-ntp.xml.in | 9 | ||||
-rw-r--r-- | op-mode-definitions/show-zebra.xml.in | 54 |
6 files changed, 347 insertions, 181 deletions
diff --git a/op-mode-definitions/include/isis-common.xml.i b/op-mode-definitions/include/isis-common.xml.i new file mode 100644 index 000000000..b1ee3e241 --- /dev/null +++ b/op-mode-definitions/include/isis-common.xml.i @@ -0,0 +1,179 @@ +<!-- included start from isis-common.xml.i -->
+<node name="database">
+ <properties>
+ <help>Show IS-IS link state database</help>
+ </properties>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+ </leafNode>
+ </children>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+</node>
+<tagNode name="database">
+ <properties>
+ <help>Show IS-IS link state database PDU</help>
+ <completionHelp>
+ <list>lsp-id detail</list>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+</tagNode>
+<leafNode name="hostname">
+ <properties>
+ <help>Show IS-IS dynamic hostname mapping</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+</leafNode>
+<node name="interface">
+ <properties>
+ <help>Show IS-IS interfaces</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+ </leafNode>
+ </children>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+</node>
+<tagNode name="interface">
+ <properties>
+ <help>Show specific IS-IS interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+</tagNode>
+<node name="mpls-te">
+ <properties>
+ <help>Show IS-IS MPLS traffic engineering information</help>
+ </properties>
+ <children>
+ <leafNode name="router">
+ <properties>
+ <help>Show router information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+ </leafNode>
+ <leafNode name="interface">
+ <properties>
+ <help>Show interface information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+ </leafNode>
+ <tagNode name="interface">
+ <properties>
+ <help>Show specific IS-IS interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+ </tagNode>
+ </children>
+</node>
+<node name="neighbor">
+ <properties>
+ <help>Show IS-IS neighbor adjacencies</help>
+ </properties>
+ <children>
+ <leafNode name="detail">
+ <properties>
+ <help>Show detailed information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+ </leafNode>
+ </children>
+ <command>vtysh -c "show isis neighbor"</command>
+</node>
+<tagNode name="neighbor">
+ <properties>
+ <help>Show specific IS-IS neighbor adjacency </help>
+ <completionHelp>
+ <list>system-id</list>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+</tagNode>
+<node name="route">
+ <properties>
+ <help>Show IS-IS routing table</help>
+ </properties>
+ <children>
+ <leafNode name="level-1">
+ <properties>
+ <help>Show level-1 routes</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+ </leafNode>
+ <leafNode name="level-2">
+ <properties>
+ <help>Show level-2 routes</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+ </leafNode>
+ </children>
+ <command>vtysh -c "show isis route"</command>
+</node>
+<node name="segment-routing">
+ <properties>
+ <help>Show IS-IS Segment-Routing (SPRING) information</help>
+ </properties>
+ <children>
+ <leafNode name="node">
+ <properties>
+ <help>Show node information</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+ </leafNode>
+ <leafNode name="prefix-sids">
+ <properties>
+ <help>Show prefix segment IDs</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+ </leafNode>
+ </children>
+</node>
+<leafNode name="spf-delay-ietf">
+ <properties>
+ <help>Show IS-IS SPF delay parameters</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+</leafNode>
+<leafNode name="summary">
+ <properties>
+ <help>Show IS-IS information summary</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+</leafNode>
+<node name="topology">
+ <properties>
+ <help>Show IS-IS paths to Intermediate Systems</help>
+ </properties>
+ <children>
+ <leafNode name="level-1">
+ <properties>
+ <help>Show level-1 routes</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+ </leafNode>
+ <leafNode name="level-2">
+ <properties>
+ <help>Show level-2 routes</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+ </leafNode>
+ </children>
+ <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command>
+</node>
+<!-- included end -->
diff --git a/op-mode-definitions/nat.xml.in b/op-mode-definitions/nat.xml.in index 4b09816f9..084e2e7e3 100644 --- a/op-mode-definitions/nat.xml.in +++ b/op-mode-definitions/nat.xml.in @@ -4,19 +4,19 @@ <children> <node name="nat"> <properties> - <help>Show Network Address Translation (NAT) information</help> + <help>Show IPv4 to IPv4 Network Address Translation (NAT) information</help> </properties> <children> <node name="source"> <properties> - <help>Show source Network Address Translation (NAT) information</help> + <help>Show source IPv4 to IPv4 Network Address Translation (NAT) information</help> </properties> <children> <node name="rules"> <properties> <help>Show configured source NAT rules</help> </properties> - <command>echo To be migrated to Python - Phabricator T2459</command> + <command>${vyos_op_scripts_dir}/show_nat_rules.py --source</command> </node> <node name="statistics"> <properties> @@ -51,14 +51,14 @@ </node> <node name="destination"> <properties> - <help>Show destination Network Address Translation (NAT) information</help> + <help>Show destination IPv4 to IPv4 Network Address Translation (NAT) information</help> </properties> <children> <node name="rules"> <properties> <help>Show configured destination NAT rules</help> </properties> - <command>echo To be migrated to Python - Phabricator T2459</command> + <command>${vyos_op_scripts_dir}/show_nat_rules.py --destination</command> </node> <node name="statistics"> <properties> diff --git a/op-mode-definitions/nat66.xml.in b/op-mode-definitions/nat66.xml.in new file mode 100644 index 000000000..1ec46eb11 --- /dev/null +++ b/op-mode-definitions/nat66.xml.in @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interfaceDefinition> + <node name="show"> + <children> + <node name="nat66"> + <properties> + <help>Show IPv6 to IPv6 Network Address Translation (NAT66) information</help> + </properties> + <children> + <node name="source"> + <properties> + <help>Show source IPv6 to IPv6 Network Address Translation (NAT66) information</help> + </properties> + <children> + <node name="rules"> + <properties> + <help>Show configured source NAT66 rules</help> + </properties> + <command>${vyos_op_scripts_dir}/show_nat66_rules.py --source</command> + </node> + <node name="statistics"> + <properties> + <help>Show statistics for configured source NAT66 rules</help> + </properties> + <command>${vyos_op_scripts_dir}/show_nat66_statistics.py --source</command> + </node> + <node name="translations"> + <properties> + <help>Show active source NAT66 translations</help> + </properties> + <children> + <tagNode name="address"> + <properties> + <help>Show active source NAT66 translations for an IPv6 address</help> + <completionHelp> + <list><h:h:h:h:h:h:h:h></list> + </completionHelp> + </properties> + <command>${vyos_op_scripts_dir}/show_nat66_translations.py --type=source --verbose --ipaddr="$6"</command> + </tagNode> + <node name="detail"> + <properties> + <help>Show active source NAT66 translations detail</help> + </properties> + <command>${vyos_op_scripts_dir}/show_nat66_translations.py --type=source --verbose</command> + </node> + </children> + <command>${vyos_op_scripts_dir}/show_nat66_translations.py --type=source</command> + </node> + </children> + </node> + <node name="destination"> + <properties> + <help>Show destination IPv6 to IPv6 Network Address Translation (NAT66) information</help> + </properties> + <children> + <node name="rules"> + <properties> + <help>Show configured destination NAT66 rules</help> + </properties> + <command>${vyos_op_scripts_dir}/show_nat66_rules.py --destination</command> + </node> + <node name="statistics"> + <properties> + <help>Show statistics for configured destination NAT66 rules</help> + </properties> + <command>${vyos_op_scripts_dir}/show_nat66_statistics.py --destination</command> + </node> + <node name="translations"> + <properties> + <help>Show active destination NAT66 translations</help> + </properties> + <children> + <tagNode name="address"> + <properties> + <help>Show active NAT66 destination translations for an IPv6 address</help> + <completionHelp> + <list><h:h:h:h:h:h:h:h></list> + </completionHelp> + </properties> + <command>${vyos_op_scripts_dir}/show_nat66_translations.py --type=destination --verbose --ipaddr="$6"</command> + </tagNode> + <node name="detail"> + <properties> + <help>Show active destination NAT66 translations detail</help> + </properties> + <command>${vyos_op_scripts_dir}/show_nat66_translations.py --type=destination --verbose</command> + </node> + </children> + <command>${vyos_op_scripts_dir}/show_nat66_translations.py --type=destination</command> + </node> + </children> + </node> + </children> + </node> + </children> + </node> +</interfaceDefinition> diff --git a/op-mode-definitions/show-isis.xml.in b/op-mode-definitions/show-isis.xml.in index 890d511e2..202e3214b 100644 --- a/op-mode-definitions/show-isis.xml.in +++ b/op-mode-definitions/show-isis.xml.in @@ -4,186 +4,22 @@ <children> <node name="isis"> <properties> - <help>IS-IS routing protocol</help> + <help>Show IS-IS routing protocol</help> </properties> <children> - <node name="database"> + #include <include/isis-common.xml.i> + <tagNode name="vrf"> <properties> - <help>Show IS-IS link state database</help> - </properties> - <children> - <leafNode name="detail"> - <properties> - <help>Show detailed information</help> - </properties> - <command>vtysh -c "show isis database detail"</command> - </leafNode> - </children> - <command>vtysh -c "show isis database"</command> - </node> - <tagNode name="database"> - <properties> - <help>Show IS-IS link state database PDU</help> - <completionHelp> - <list>lsp-id detail</list> - </completionHelp> - </properties> - <command>vtysh -c "show isis database $4"</command> - </tagNode> - <leafNode name="hostname"> - <properties> - <help>Show IS-IS dynamic hostname mapping</help> - </properties> - <command>vtysh -c "show isis hostname"</command> - </leafNode> - <node name="interface"> - <properties> - <help>Show IS-IS interfaces</help> + <help>Show IS-IS routing protocol for given VRF</help> <completionHelp> - <script>${vyos_completion_dir}/list_interfaces.py</script> + <path>vrf name</path> + <list>all</list> </completionHelp> </properties> <children> - <leafNode name="detail"> - <properties> - <help>Show detailed information</help> - </properties> - <command>vtysh -c "show isis interface detail"</command> - </leafNode> - </children> - <command>vtysh -c "show isis interface"</command> - </node> - <tagNode name="interface"> - <properties> - <help>Show specific IS-IS interface</help> - <completionHelp> - <script>${vyos_completion_dir}/list_interfaces.py</script> - </completionHelp> - </properties> - <command>vtysh -c "show isis interface $4"</command> - </tagNode> - <node name="traffic-engineering"> - <properties> - <help>Show IS-IS MPLS traffic engineering information</help> - </properties> - <children> - <leafNode name="router"> - <properties> - <help>Show router information</help> - </properties> - <command>vtysh -c "show isis mpls-te router"</command> - </leafNode> - <leafNode name="interface"> - <properties> - <help>Show interface information</help> - </properties> - <command>vtysh -c "show isis mpls-te interface"</command> - </leafNode> - <tagNode name="interface"> - <properties> - <help>Show specific IS-IS interface</help> - <completionHelp> - <script>${vyos_completion_dir}/list_interfaces.py</script> - </completionHelp> - </properties> - <command>vtysh -c "show isis mpls-te interface $5"</command> - </tagNode> - </children> - </node> - <node name="neighbor"> - <properties> - <help>Show IS-IS neighbor adjacencies</help> - </properties> - <children> - <leafNode name="detail"> - <properties> - <help>Show detailed information</help> - </properties> - <command>vtysh -c "show isis neighbor detail"</command> - </leafNode> + #include <include/isis-common.xml.i> </children> - <command>vtysh -c "show isis neighbor"</command> - </node> - <tagNode name="neighbor"> - <properties> - <help>Show specific IS-IS neighbor adjacency </help> - <completionHelp> - <list>system-id</list> - </completionHelp> - </properties> - <command>vtysh -c "show isis neighbor $4"</command> </tagNode> - <node name="route"> - <properties> - <help>Show IS-IS routing table</help> - </properties> - <children> - <leafNode name="level-1"> - <properties> - <help>Show level-1 routes</help> - </properties> - <command>vtysh -c "show isis route level-1"</command> - </leafNode> - <leafNode name="level-2"> - <properties> - <help>Show level-2 routes</help> - </properties> - <command>vtysh -c "show isis route level-2"</command> - </leafNode> - </children> - <command>vtysh -c "show isis route"</command> - </node> - <node name="segment-routing"> - <properties> - <help>Show IS-IS Segment-Routing (SPRING) information</help> - </properties> - <children> - <leafNode name="node"> - <properties> - <help>Show node information</help> - </properties> - <command>vtysh -c "show isis segment-routing node"</command> - </leafNode> - <leafNode name="prefix-sids"> - <properties> - <help>Show prefix segment IDs</help> - </properties> - <command>vtysh -c "show isis segment-routing prefix-sids"</command> - </leafNode> - </children> - </node> - <leafNode name="spf-delay"> - <properties> - <help>Show IS-IS SPF delay parameters</help> - </properties> - <command>vtysh -c "show isis spf-delay-ietf"</command> - </leafNode> - <leafNode name="summary"> - <properties> - <help>Show IS-IS information summary</help> - </properties> - <command>vtysh -c "show isis summary"</command> - </leafNode> - <node name="topology"> - <properties> - <help>Show IS-IS paths to Intermediate Systems</help> - </properties> - <children> - <leafNode name="level-1"> - <properties> - <help>Show level-1 routes</help> - </properties> - <command>vtysh -c "show isis topology level-1"</command> - </leafNode> - <leafNode name="level-2"> - <properties> - <help>Show level-2 routes</help> - </properties> - <command>vtysh -c "show isis topology level-2"</command> - </leafNode> - </children> - <command>vtysh -c "show isis topology"</command> - </node> </children> </node> </children> diff --git a/op-mode-definitions/show-ntp.xml.in b/op-mode-definitions/show-ntp.xml.in index b7f0acdf8..01f4477d8 100644 --- a/op-mode-definitions/show-ntp.xml.in +++ b/op-mode-definitions/show-ntp.xml.in @@ -6,7 +6,7 @@ <properties> <help>Show peer status of NTP daemon</help> </properties> - <command>if ps -C ntpd &>/dev/null; then ntpq -n -c peers; else echo NTP daemon disabled; fi</command> + <command>${vyos_op_scripts_dir}/show_ntp.sh --basic</command> <children> <tagNode name="server"> <properties> @@ -15,15 +15,14 @@ <script>${vyos_completion_dir}/list_ntp_servers.sh</script> </completionHelp> </properties> - <command>/usr/sbin/ntpdate -q "$4"</command> + <command>${vyos_op_scripts_dir}/show_ntp.sh --server "$4"</command> </tagNode> <node name="info"> <properties> <help>Show NTP operational summary</help> </properties> - <command>if ps -C ntpd &>/dev/null; then ntpq -n -c sysinfo; ntpq -n -c kerninfo; else echo NTP daemon disabled; fi</command> - </node> - + <command>${vyos_op_scripts_dir}/show_ntp.sh --info</command> + </node> </children> </node> </children> diff --git a/op-mode-definitions/show-zebra.xml.in b/op-mode-definitions/show-zebra.xml.in new file mode 100644 index 000000000..b0ad37f49 --- /dev/null +++ b/op-mode-definitions/show-zebra.xml.in @@ -0,0 +1,54 @@ +<?xml version="1.0"?> +<interfaceDefinition> + <node name="show"> + <children> + <node name="zebra"> + <properties> + <help>Zebra routing information</help> + </properties> + <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> + <children> + <node name="client"> + <properties> + <help>Client information </help> + </properties> + <children> + <node name="summary"> + <properties> + <help>Brief Summary</help> + </properties> + <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> + </node> + </children> + </node> + <node name="dplane"> + <properties> + <help>Zebra dataplane information</help> + </properties> + <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> + </node> + <node name="router"> + <properties> + <help>Zebra Router Information</help> + </properties> + <children> + <node name="table"> + <properties> + <help>Table Information about this Zebra Router</help> + </properties> + <children> + <node name="summary"> + <properties> + <help>Summary Information</help> + </properties> + <command>${vyos_op_scripts_dir}/vtysh_wrapper.sh $@</command> + </node> + </children> + </node> + </children> + </node> + </children> + </node> + </children> + </node> +</interfaceDefinition> |