summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-01-11 20:46:05 +0100
committerGitHub <noreply@github.com>2022-01-11 20:46:05 +0100
commitb55ac8e2c06c593c9f2310cc510bac45c6943ce7 (patch)
tree077a6eb1843a2cd713b969fb2a0ea64a6fc99b34
parent24954d47010219d85f11e1f7aae70c91f7ce00b4 (diff)
parent30edcba594ebc07412c903a8e7896235cbc3d11f (diff)
downloadvyos-1x-b55ac8e2c06c593c9f2310cc510bac45c6943ce7.tar.gz
vyos-1x-b55ac8e2c06c593c9f2310cc510bac45c6943ce7.zip
Merge pull request #1159 from sarthurdev/firewall
policy: T2199: Update op-mode syntax to `route6`
-rw-r--r--op-mode-definitions/policy-route.xml.in8
-rwxr-xr-xsrc/op_mode/policy_route.py2
2 files changed, 5 insertions, 5 deletions
diff --git a/op-mode-definitions/policy-route.xml.in b/op-mode-definitions/policy-route.xml.in
index c998e5487..bd4a61dc9 100644
--- a/op-mode-definitions/policy-route.xml.in
+++ b/op-mode-definitions/policy-route.xml.in
@@ -84,17 +84,17 @@
<help>Show policy information</help>
</properties>
<children>
- <node name="ipv6-route">
+ <node name="route6">
<properties>
<help>Show IPv6 policy chain</help>
</properties>
<command>sudo ${vyos_op_scripts_dir}/policy_route.py --action show_all --ipv6</command>
</node>
- <tagNode name="ipv6-route">
+ <tagNode name="route6">
<properties>
<help>Show IPv6 policy chains</help>
<completionHelp>
- <path>policy ipv6-route</path>
+ <path>policy route6</path>
</completionHelp>
</properties>
<children>
@@ -102,7 +102,7 @@
<properties>
<help>Show summary of IPv6 policy rules</help>
<completionHelp>
- <path>policy ipv6-route ${COMP_WORDS[4]} rule</path>
+ <path>policy route6 ${COMP_WORDS[4]} rule</path>
</completionHelp>
</properties>
<command>sudo ${vyos_op_scripts_dir}/policy_route.py --action show --name $4 --rule $6 --ipv6</command>
diff --git a/src/op_mode/policy_route.py b/src/op_mode/policy_route.py
index 95a7eadac..5be40082f 100755
--- a/src/op_mode/policy_route.py
+++ b/src/op_mode/policy_route.py
@@ -65,7 +65,7 @@ def get_config_policy(conf, name=None, ipv6=False, interfaces=True):
route_conf['interface'] = []
if 'route6' in policy:
- for route_name, route_conf in policy['ipv6_route'].items():
+ for route_name, route_conf in policy['route6'].items():
route_conf['interface'] = []
get_policy_interfaces(conf, policy, name, ipv6)