summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-12-23 17:30:22 +0100
committerChristian Poessinger <christian@poessinger.com>2022-12-23 17:36:34 +0100
commit5a089a033bf684583ad75d3c7b5687d72aabded9 (patch)
tree8a1212ba208193f623fdc4362c90bab5a1c3a6b0 /op-mode-definitions
parent76d8a34d9efe9b420f9e698bba88b44ec5d8631b (diff)
downloadvyos-1x-5a089a033bf684583ad75d3c7b5687d72aabded9.tar.gz
vyos-1x-5a089a033bf684583ad75d3c7b5687d72aabded9.zip
nat: T4545: implement missing functionality from old script to new op-mode script
Remaining functionality to filter NAT translations for a given address got implemented to nat.py - with this cahnge we can drop the old files show_nat*.py
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/nat.xml.in30
-rw-r--r--op-mode-definitions/nat66.xml.in22
2 files changed, 14 insertions, 38 deletions
diff --git a/op-mode-definitions/nat.xml.in b/op-mode-definitions/nat.xml.in
index 50abb1555..307a91337 100644
--- a/op-mode-definitions/nat.xml.in
+++ b/op-mode-definitions/nat.xml.in
@@ -4,7 +4,7 @@
<children>
<node name="nat">
<properties>
- <help>Show IPv4 to IPv4 Network Address Translation (NAT) information</help>
+ <help>Show IPv4 Network Address Translation (NAT) information</help>
</properties>
<children>
<node name="source">
@@ -16,13 +16,13 @@
<properties>
<help>Show configured source NAT rules</help>
</properties>
- <command>${vyos_op_scripts_dir}/nat.py show_rules --direction source --family inet</command>
+ <command>sudo ${vyos_op_scripts_dir}/nat.py show_rules --direction source --family inet</command>
</node>
<node name="statistics">
<properties>
<help>Show statistics for configured source NAT rules</help>
</properties>
- <command>${vyos_op_scripts_dir}/nat.py show_statistics --direction source --family inet</command>
+ <command>sudo ${vyos_op_scripts_dir}/nat.py show_statistics --direction source --family inet</command>
</node>
<node name="translations">
<properties>
@@ -36,16 +36,10 @@
<list>&lt;x.x.x.x&gt;</list>
</completionHelp>
</properties>
- <command>${vyos_op_scripts_dir}/show_nat_translations.py --type=source --verbose --ipaddr="$6"</command>
+ <command>sudo ${vyos_op_scripts_dir}/nat.py show_translations --direction source --family inet --address "$6"</command>
</tagNode>
- <node name="detail">
- <properties>
- <help>Show active source NAT translations detail</help>
- </properties>
- <command>${vyos_op_scripts_dir}/show_nat_translations.py --type=source --verbose</command>
- </node>
</children>
- <command>${vyos_op_scripts_dir}/nat.py show_translations --direction source --family inet</command>
+ <command>sudo ${vyos_op_scripts_dir}/nat.py show_translations --direction source --family inet</command>
</node>
</children>
</node>
@@ -58,13 +52,13 @@
<properties>
<help>Show configured destination NAT rules</help>
</properties>
- <command>${vyos_op_scripts_dir}/nat.py show_rules --direction destination --family inet</command>
+ <command>sudo ${vyos_op_scripts_dir}/nat.py show_rules --direction destination --family inet</command>
</node>
<node name="statistics">
<properties>
<help>Show statistics for configured destination NAT rules</help>
</properties>
- <command>${vyos_op_scripts_dir}/nat.py show_statistics --direction destination --family inet</command>
+ <command>sudo ${vyos_op_scripts_dir}/nat.py show_statistics --direction destination --family inet</command>
</node>
<node name="translations">
<properties>
@@ -78,16 +72,10 @@
<list>&lt;x.x.x.x&gt;</list>
</completionHelp>
</properties>
- <command>${vyos_op_scripts_dir}/show_nat_translations.py --type=destination --verbose --ipaddr="$6"</command>
+ <command>sudo ${vyos_op_scripts_dir}/nat.py show_translations --direction destination --family inet --address "$6"</command>
</tagNode>
- <node name="detail">
- <properties>
- <help>Show active destination NAT translations detail</help>
- </properties>
- <command>${vyos_op_scripts_dir}/show_nat_translations.py --type=destination --verbose</command>
- </node>
</children>
- <command>${vyos_op_scripts_dir}/nat.py show_translations --direction destination --family inet</command>
+ <command>sudo ${vyos_op_scripts_dir}/nat.py show_translations --direction destination --family inet</command>
</node>
</children>
</node>
diff --git a/op-mode-definitions/nat66.xml.in b/op-mode-definitions/nat66.xml.in
index 25aa04d59..6a8a39000 100644
--- a/op-mode-definitions/nat66.xml.in
+++ b/op-mode-definitions/nat66.xml.in
@@ -4,7 +4,7 @@
<children>
<node name="nat66">
<properties>
- <help>Show IPv6 to IPv6 Network Address Translation (NAT66) information</help>
+ <help>Show IPv6 Network Address Translation (NAT66) information</help>
</properties>
<children>
<node name="source">
@@ -22,7 +22,7 @@
<properties>
<help>Show statistics for configured source NAT66 rules</help>
</properties>
- <command>${vyos_op_scripts_dir}/show_nat66_statistics.py --source</command>
+ <command>sudo ${vyos_op_scripts_dir}/nat.py show_statistics --direction source --family inet6</command>
</node>
<node name="translations">
<properties>
@@ -36,14 +36,8 @@
<list>&lt;h:h:h:h:h:h:h:h&gt;</list>
</completionHelp>
</properties>
- <command>${vyos_op_scripts_dir}/show_nat66_translations.py --type=source --verbose --ipaddr="$6"</command>
+ <command>sudo ${vyos_op_scripts_dir}/nat.py show_translations --direction source --family inet6 --address "$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}/nat.py show_translations --direction source --family inet6</command>
</node>
@@ -64,7 +58,7 @@
<properties>
<help>Show statistics for configured destination NAT66 rules</help>
</properties>
- <command>${vyos_op_scripts_dir}/show_nat66_statistics.py --destination</command>
+ <command>sudo ${vyos_op_scripts_dir}/nat.py show_statistics --direction destination --family inet6</command>
</node>
<node name="translations">
<properties>
@@ -78,14 +72,8 @@
<list>&lt;h:h:h:h:h:h:h:h&gt;</list>
</completionHelp>
</properties>
- <command>${vyos_op_scripts_dir}/show_nat66_translations.py --type=destination --verbose --ipaddr="$6"</command>
+ <command>sudo ${vyos_op_scripts_dir}/nat.py show_translations --direction destination --family inet6 --address "$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}/nat.py show_translations --direction destination --family inet6</command>
</node>