summaryrefslogtreecommitdiff
path: root/op-mode-definitions
diff options
context:
space:
mode:
Diffstat (limited to 'op-mode-definitions')
-rw-r--r--op-mode-definitions/generate_firewall_rule-resequence.xml.in29
-rw-r--r--op-mode-definitions/generate_nat64_rule-resequence.xml.in15
-rw-r--r--op-mode-definitions/generate_nat66_rule-resequence.xml.in15
-rw-r--r--op-mode-definitions/generate_nat_rule-resequence.xml.in15
-rw-r--r--op-mode-definitions/include/rule-resequence.xml.i30
5 files changed, 76 insertions, 28 deletions
diff --git a/op-mode-definitions/generate_firewall_rule-resequence.xml.in b/op-mode-definitions/generate_firewall_rule-resequence.xml.in
index 66078deb9..ef81579fa 100644
--- a/op-mode-definitions/generate_firewall_rule-resequence.xml.in
+++ b/op-mode-definitions/generate_firewall_rule-resequence.xml.in
@@ -7,34 +7,7 @@
<help>Firewall</help>
</properties>
<children>
- <node name="rule-resequence">
- <properties>
- <help>Resequence the firewall rules</help>
- </properties>
- <command>${vyos_op_scripts_dir}/generate_firewall_rule-resequence.py</command>
- <children>
- <tagNode name="start">
- <properties>
- <help>Set the first sequence number</help>
- <completionHelp>
- <list>1-1000</list>
- </completionHelp>
- </properties>
- <command>${vyos_op_scripts_dir}/generate_firewall_rule-resequence.py --start $5</command>
- <children>
- <tagNode name="step">
- <properties>
- <help>Step between rules</help>
- <completionHelp>
- <list>1-1000</list>
- </completionHelp>
- </properties>
- <command>${vyos_op_scripts_dir}/generate_firewall_rule-resequence.py --start $5 --step $7</command>
- </tagNode>
- </children>
- </tagNode>
- </children>
- </node>
+ #include <include/rule-resequence.xml.i>
</children>
</node>
</children>
diff --git a/op-mode-definitions/generate_nat64_rule-resequence.xml.in b/op-mode-definitions/generate_nat64_rule-resequence.xml.in
new file mode 100644
index 000000000..399253b37
--- /dev/null
+++ b/op-mode-definitions/generate_nat64_rule-resequence.xml.in
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="generate">
+ <children>
+ <node name="nat64">
+ <properties>
+ <help>Network Address Translation (NAT64)</help>
+ </properties>
+ <children>
+ #include <include/rule-resequence.xml.i>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/generate_nat66_rule-resequence.xml.in b/op-mode-definitions/generate_nat66_rule-resequence.xml.in
new file mode 100644
index 000000000..d7159cf60
--- /dev/null
+++ b/op-mode-definitions/generate_nat66_rule-resequence.xml.in
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="generate">
+ <children>
+ <node name="nat66">
+ <properties>
+ <help>Network Prefix Translation (NAT66/NPTv6)</help>
+ </properties>
+ <children>
+ #include <include/rule-resequence.xml.i>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/generate_nat_rule-resequence.xml.in b/op-mode-definitions/generate_nat_rule-resequence.xml.in
new file mode 100644
index 000000000..e32a89e08
--- /dev/null
+++ b/op-mode-definitions/generate_nat_rule-resequence.xml.in
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="generate">
+ <children>
+ <node name="nat">
+ <properties>
+ <help>Network Address Translation (NAT)</help>
+ </properties>
+ <children>
+ #include <include/rule-resequence.xml.i>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/op-mode-definitions/include/rule-resequence.xml.i b/op-mode-definitions/include/rule-resequence.xml.i
new file mode 100644
index 000000000..987bf634e
--- /dev/null
+++ b/op-mode-definitions/include/rule-resequence.xml.i
@@ -0,0 +1,30 @@
+<!-- included start from show-nht.xml.i -->
+<node name="rule-resequence">
+ <properties>
+ <help>Resequence rules</help>
+ </properties>
+ <command>${vyos_op_scripts_dir}/generate_service_rule-resequence.py --service $2</command>
+ <children>
+ <tagNode name="start">
+ <properties>
+ <help>Set the first sequence number</help>
+ <completionHelp>
+ <list>1-1000</list>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/generate_service_rule-resequence.py --service $2 --start $5</command>
+ <children>
+ <tagNode name="step">
+ <properties>
+ <help>Step between rules</help>
+ <completionHelp>
+ <list>1-1000</list>
+ </completionHelp>
+ </properties>
+ <command>${vyos_op_scripts_dir}/generate_service_rule-resequence.py --service $2 --start $5 --step $7</command>
+ </tagNode>
+ </children>
+ </tagNode>
+ </children>
+</node>
+<!-- included end -->