summaryrefslogtreecommitdiff
path: root/tests/unit/fixtures/nat_running.json
diff options
context:
space:
mode:
authoromnom62 <omnom62@outlook.com>2026-07-06 14:54:12 +1000
committerJohn Estabrook <jestabro@vyos.io>2026-08-21 14:02:19 -0500
commit45dc95873fd906c582fbbd5e6ca3838caf867399 (patch)
tree71b3e53e0080da60abf9fd2381705971dfe4d507 /tests/unit/fixtures/nat_running.json
parent7a6b5e4f3a7a021cfa75faa7bf833741dfc09cff (diff)
downloadrest.vyos-T8989_wave4.tar.gz
rest.vyos-T8989_wave4.zip
T8989: wave4 vyos_command, dict_op refactorT8989_wave4
* T8989: vyos_command module * T8989: vyos_command module UAT and SIT * T8989: vyos_command changelog * T8989: vyos_command linter * T8989: vyos_config module * T8989: vyos_config module changelog * T8989: Wave 4 vyos_config module with integration and unit tests * T8323: vyos_system module * T8332: vyos_system SIT and UAT * T8323: vyos_vlan module * T8323: vyos_vlan module * T8323: vyos_vlan module SIT and UAT * T8323: vyos_system module * T8989: Wave 4 vyos_vlan reworked with dict_op engine * T8989: Fix dict_op single-value string list handling, add vyos_system integration tests * T8989: logging_global refactor * T8989: migrate ntp_global, logging_global, firewall_global to dict_op engine * T8989: vyos_nat module for REST API collection * T8989: vyos_nat module for REST API collection, linter fixes * T8989: vyos_ha module for REST API collection * T8989: vyos_ha module for REST API collection * T8989: vyos_ha module sanity and linter fixes * T8989: vyos_ha module sanity and linter fixes * T8989: vyos_ha module linter fixes * T8989: vyos.rest AI comment fixes * T8323: vyos_nat AI comment fixes * T8989 ai fixes * T8989: vyos_bgp_address_family dict_op * T8989: vyos_bgp_address_family vyos_bgp_global dict_op * T8989: dict_op refactor for firewall_*, nat, user * T8989: dict_op refactor for firewall_*, nat, user * T8989: dict_op refactor for ntp_global, ha * T8989: snmp_server dict_op refactor * T8989: snmp_server dict_op refactor * T8989: route_map dict_op refactor
Diffstat (limited to 'tests/unit/fixtures/nat_running.json')
-rw-r--r--tests/unit/fixtures/nat_running.json80
1 files changed, 80 insertions, 0 deletions
diff --git a/tests/unit/fixtures/nat_running.json b/tests/unit/fixtures/nat_running.json
new file mode 100644
index 0000000..abaede0
--- /dev/null
+++ b/tests/unit/fixtures/nat_running.json
@@ -0,0 +1,80 @@
+{
+ "nat": {
+ "source": {
+ "rule": {
+ "100": {
+ "description": "Source rule 100",
+ "outbound-interface": { "name": "eth0" },
+ "translation": { "address": "masquerade" },
+ "load-balance": {
+ "hash": "random",
+ "backend": {
+ "192.168.1.10": { "weight": "50" },
+ "192.168.1.11": {}
+ }
+ }
+ },
+ "101": {
+ "outbound-interface": { "name": "eth1" },
+ "translation": { "address": "masquerade" }
+ }
+ }
+ },
+ "destination": {
+ "rule": {
+ "200": {
+ "protocol": "tcp",
+ "inbound-interface": { "name": "eth0" },
+ "destination": { "address": "198.51.100.10", "port": "80" },
+ "translation": { "address": "192.168.1.10", "port": "8080" }
+ }
+ }
+ },
+ "static": {
+ "rule": {
+ "300": {
+ "inbound-interface": "eth0",
+ "destination": { "address": "198.51.100.20" },
+ "translation": { "address": "192.168.1.20" }
+ }
+ }
+ },
+ "cgnat": {
+ "log-allocation": {},
+ "pool": {
+ "external": {
+ "EXT1": {
+ "external-port-range": "1024-65535",
+ "range": {
+ "203.0.113.1-203.0.113.10": { "seq": "1" }
+ }
+ }
+ },
+ "internal": {
+ "INT1": {
+ "range": ["10.0.0.0/24", "10.0.1.0/24"]
+ }
+ }
+ },
+ "rule": {
+ "1": {
+ "destination": { "group": { "address-group": "CGNAT-DST" } }
+ }
+ }
+ }
+ },
+ "nat64": {
+ "source": {
+ "rule": {
+ "10": {
+ "source": { "prefix": "2001:db8::/96" },
+ "translation": {
+ "pool": {
+ "1": { "address": "192.168.100.10", "port": "1-65535" }
+ }
+ }
+ }
+ }
+ }
+ }
+}