summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/nat.xml98
-rw-r--r--op-mode-definitions/show-interfaces-pppoe.xml2
-rw-r--r--op-mode-definitions/traceroute.xml70
3 files changed, 146 insertions, 24 deletions
diff --git a/op-mode-definitions/nat.xml b/op-mode-definitions/nat.xml
new file mode 100644
index 000000000..ffaa2cba3
--- /dev/null
+++ b/op-mode-definitions/nat.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interfaceDefinition>
+ <node name="show">
+ <children>
+ <node name="nat">
+ <properties>
+ <help>Show Network Address Translation (NAT) information</help>
+ </properties>
+ <children>
+ <node name="source">
+ <properties>
+ <help>Show source 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 - https://phabricator.vyos.net/T2459</command>
+ </node>
+ <node name="statistics">
+ <properties>
+ <help>Show statistics for configured source NAT rules</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_nat_statistics.py --source</command>
+ </node>
+ <node name="translations">
+ <properties>
+ <help>Show active source NAT translations</help>
+ </properties>
+ <children>
+ <tagNode name="address">
+ <properties>
+ <help>Show active source NAT translations for an IP address</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/to_be_migrated/vyatta-nat-translations.pl --type=source --verbose --ipaddr="$6"</command>
+ </tagNode>
+ <node name="detail">
+ <properties>
+ <help>Show active source NAT translations detail</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/to_be_migrated/vyatta-nat-translations.pl --type=source --verbose</command>
+ </node>
+ </children>
+ <command>${vyos_op_scripts_dir}/to_be_migrated/vyatta-nat-translations.pl --type=source</command>
+ </node>
+ </children>
+ </node>
+ <node name="destination">
+ <properties>
+ <help>Show destination 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 - https://phabricator.vyos.net/T2459</command>
+ </node>
+ <node name="statistics">
+ <properties>
+ <help>Show statistics for configured destination NAT rules</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/show_nat_statistics.py --destination</command>
+ </node>
+ <node name="translations">
+ <properties>
+ <help>Show active destination NAT translations</help>
+ </properties>
+ <children>
+ <tagNode name="address">
+ <properties>
+ <help>Show active NAT destination translations for an IP address</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/to_be_migrated/vyatta-nat-translations.pl --type=destination --verbose --ipaddr="$6"</command>
+ </tagNode>
+ <node name="detail">
+ <properties>
+ <help>Show active destination NAT translations detail</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/to_be_migrated/vyatta-nat-translations.pl --type=destination --verbose</command>
+ </node>
+ </children>
+ <command>${vyos_op_scripts_dir}/to_be_migrated/vyatta-nat-translations.pl --type=destination</command>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/show-interfaces-pppoe.xml b/op-mode-definitions/show-interfaces-pppoe.xml
index e68d05da9..211ad9808 100644
--- a/op-mode-definitions/show-interfaces-pppoe.xml
+++ b/op-mode-definitions/show-interfaces-pppoe.xml
@@ -11,7 +11,7 @@
<script>${vyos_completion_dir}/list_pppoe_peers.sh</script>
</completionHelp>
</properties>
- <command>${vyos_op_scripts_dir}/show_interfaces.py pppoe --intf="$4"</command>
+ <command>${vyos_op_scripts_dir}/show_interfaces.py --intf="$4"</command>
<children>
<node name="log">
<properties>
diff --git a/op-mode-definitions/traceroute.xml b/op-mode-definitions/traceroute.xml
index d623fe103..1aea8eef6 100644
--- a/op-mode-definitions/traceroute.xml
+++ b/op-mode-definitions/traceroute.xml
@@ -1,71 +1,70 @@
<?xml version="1.0"?>
<interfaceDefinition>
- <node name="traceroute">
+ <tagNode name="traceroute">
<properties>
<help>Track network path to node</help>
+ <completionHelp>
+ <list>&lt;hostname&gt; &lt;x.x.x.x&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
+ </completionHelp>
</properties>
+ <command>/usr/bin/traceroute "$2"</command>
+ </tagNode>
+ <node name="traceroute">
<children>
- <tagNode name="">
- <properties>
- <help>Track network path to specified node</help>
- <completionHelp>
- <list>&lt;hostname&gt; &lt;x.x.x.x&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
- </completionHelp>
- </properties>
- <command>/usr/bin/traceroute $2</command>
- </tagNode>
<tagNode name="ipv4">
<properties>
- <help>Track network path to &lt;hostname|IPv4 address&gt;</help>
+ <help>Explicitly use IPv4 when tracing the path</help>
<completionHelp>
<list>&lt;hostname&gt; &lt;x.x.x.x&gt;</list>
</completionHelp>
</properties>
- <command>/usr/bin/traceroute -4 $3</command>
+ <command>/usr/bin/traceroute -4 "$3"</command>
</tagNode>
<tagNode name="ipv6">
<properties>
- <help>Track network path to &lt;hostname|IPv6 address&gt;</help>
+ <help>Explicitly use IPv6 when tracing the path</help>
<completionHelp>
<list>&lt;hostname&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
</completionHelp>
</properties>
- <command>/usr/bin/traceroute -6 $3</command>
+ <command>/usr/bin/traceroute -6 "$3"</command>
</tagNode>
<tagNode name="vrf">
<properties>
- <help>Track network path to specified node via given VRF instance</help>
+ <help>Track network path to specified node via given VRF</help>
<completionHelp>
<path>vrf name</path>
</completionHelp>
</properties>
<children>
+ <!-- we need an empty tagNode to pass in a plain fqdn/ip address and
+ let traceroute decide how to handle this parameter -->
<tagNode name="">
<properties>
- <help>Track network path to specified node</help>
+ <help>Track network path to specified node via given VRF</help>
<completionHelp>
<list>&lt;hostname&gt; &lt;x.x.x.x&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
</completionHelp>
</properties>
- <command>sudo ip vrf exec "$3" traceroute "$4"</command>
+ <command>sudo /usr/sbin/ip vrf exec "$3" /usr/bin/traceroute "$4"</command>
</tagNode>
<tagNode name="ipv4">
<properties>
- <help>Track network path to &lt;hostname|IPv4 address&gt;</help>
+ <help>Explicitly use IPv4 when tracing the path via given VRF</help>
<completionHelp>
<list>&lt;hostname&gt; &lt;x.x.x.x&gt;</list>
</completionHelp>
</properties>
- <command>sudo ip vrf exec "$3" traceroute -4 "$5"</command>
+ <command>sudo /usr/sbin/ip vrf exec "$3" /usr/bin/traceroute -4 "$5"</command>
</tagNode>
<tagNode name="ipv6">
<properties>
- <help>Track network path to &lt;hostname|IPv6 address&gt;</help>
+ <help>Explicitly use IPv6 when tracing the path via given VRF</help>
<completionHelp>
<list>&lt;hostname&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
</completionHelp>
</properties>
- <command>sudo ip vrf exec "$3" traceroute -6 "$5"</command>
+ <command>sudo /usr/sbin/ip vrf exec "$3" /usr/bin/traceroute -6 "$5"</command>
</tagNode>
</children>
</tagNode>
@@ -75,13 +74,38 @@
<children>
<tagNode name="traceroute">
<properties>
- <help>Monitor the path to a destination in realtime</help>
+ <help>Monitor path to destination in realtime</help>
<completionHelp>
<list>&lt;hostname&gt; &lt;x.x.x.x&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
</completionHelp>
</properties>
- <command>/usr/bin/mtr $3</command>
+ <command>/usr/bin/mtr "$3"</command>
</tagNode>
+ <node name="traceroute">
+ <children>
+ <tagNode name="vrf">
+ <properties>
+ <help>Monitor path to destination in realtime via given VRF</help>
+ <completionHelp>
+ <path>vrf name</path>
+ </completionHelp>
+ </properties>
+ <children>
+ <!-- we need an empty tagNode to pass in a plain fqdn/ip address and
+ let traceroute decide how to handle this parameter -->
+ <tagNode name="">
+ <properties>
+ <help>Track network path to specified node via given VRF</help>
+ <completionHelp>
+ <list>&lt;hostname&gt; &lt;x.x.x.x&gt; &lt;h:h:h:h:h:h:h:h&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>sudo /usr/sbin/ip vrf exec "$4" /usr/bin/mtr "$5"</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+ </node>
</children>
</node>
</interfaceDefinition>