diff options
author | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2022-09-21 02:05:30 +0200 |
---|---|---|
committer | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2022-09-21 20:53:49 +0200 |
commit | c6bbe051574acf5ca1501e631d73ac06bdb17b30 (patch) | |
tree | 3a10a0d4d58a2edb8b50e65d45f61b7574dd82af /python/vyos/template.py | |
parent | e6ba98a85ca72abc7e7e2001d208bcd1806c2c13 (diff) | |
download | vyos-1x-c6bbe051574acf5ca1501e631d73ac06bdb17b30.tar.gz vyos-1x-c6bbe051574acf5ca1501e631d73ac06bdb17b30.zip |
nat: T4605: Refactor static NAT to use python module for parsing rules
* Rename table to vyos_nat
* Add static NAT smoketest
Diffstat (limited to 'python/vyos/template.py')
-rw-r--r-- | python/vyos/template.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/python/vyos/template.py b/python/vyos/template.py index d9ff98d2e..0870a0523 100644 --- a/python/vyos/template.py +++ b/python/vyos/template.py @@ -621,6 +621,11 @@ def nat_rule(rule_conf, rule_id, nat_type, ipv6=False): from vyos.nat import parse_nat_rule return parse_nat_rule(rule_conf, rule_id, nat_type, ipv6) +@register_filter('nat_static_rule') +def nat_static_rule(rule_conf, rule_id, nat_type): + from vyos.nat import parse_nat_static_rule + return parse_nat_static_rule(rule_conf, rule_id, nat_type) + @register_filter('range_to_regex') def range_to_regex(num_range): from vyos.range_regex import range_to_regex |