diff options
author | Phil Sutter <phil@nwl.cc> | 2024-02-08 14:30:17 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2024-02-08 18:28:01 +0100 |
commit | 624b034b83a66ec2263314db9dc62ac06b1ae7e7 (patch) | |
tree | 3d162db5931e09ef7e36e9df0003c44bd1d4e617 /tests/shell/testcases/chains/dumps/0002jumps_1.json-nft | |
parent | d8f2124ffe1965629d0d47ad22a27e36de279c43 (diff) |
tests: shell: Pretty-print all *.json-nft dumps
The problem with single line output as produced by 'nft -j list ruleset'
is its incompatibility to unified diff format as any change in this
single line will produce a diff which contains the old and new lines in
total. This is not just unreadable but will blow up patches which may
exceed mailinglists' mail size limits.
Convert them all at once by feeding their contents to
tests/shell/helpers/json-pretty.sh.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'tests/shell/testcases/chains/dumps/0002jumps_1.json-nft')
-rw-r--r-- | tests/shell/testcases/chains/dumps/0002jumps_1.json-nft | 384 |
1 files changed, 383 insertions, 1 deletions
diff --git a/tests/shell/testcases/chains/dumps/0002jumps_1.json-nft b/tests/shell/testcases/chains/dumps/0002jumps_1.json-nft index 5ac08d73..66f921a0 100644 --- a/tests/shell/testcases/chains/dumps/0002jumps_1.json-nft +++ b/tests/shell/testcases/chains/dumps/0002jumps_1.json-nft @@ -1 +1,383 @@ -{"nftables": [{"metainfo": {"version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "t", "handle": 0}}, {"chain": {"family": "ip", "table": "t", "name": "c1", "handle": 0, "type": "filter", "hook": "input", "prio": 0, "policy": "accept"}}, {"chain": {"family": "ip", "table": "t", "name": "c2", "handle": 0}}, {"chain": {"family": "ip", "table": "t", "name": "c3", "handle": 0}}, {"chain": {"family": "ip", "table": "t", "name": "c4", "handle": 0}}, {"chain": {"family": "ip", "table": "t", "name": "c5", "handle": 0}}, {"chain": {"family": "ip", "table": "t", "name": "c6", "handle": 0}}, {"chain": {"family": "ip", "table": "t", "name": "c7", "handle": 0}}, {"chain": {"family": "ip", "table": "t", "name": "c8", "handle": 0}}, {"chain": {"family": "ip", "table": "t", "name": "c9", "handle": 0}}, {"chain": {"family": "ip", "table": "t", "name": "c10", "handle": 0}}, {"chain": {"family": "ip", "table": "t", "name": "c11", "handle": 0}}, {"chain": {"family": "ip", "table": "t", "name": "c12", "handle": 0}}, {"chain": {"family": "ip", "table": "t", "name": "c13", "handle": 0}}, {"chain": {"family": "ip", "table": "t", "name": "c14", "handle": 0}}, {"chain": {"family": "ip", "table": "t", "name": "c15", "handle": 0}}, {"chain": {"family": "ip", "table": "t", "name": "c16", "handle": 0}}, {"chain": {"family": "ip", "table": "t", "name": "c17", "handle": 0}}, {"rule": {"family": "ip", "table": "t", "chain": "c1", "handle": 0, "expr": [{"jump": {"target": "c2"}}]}}, {"rule": {"family": "ip", "table": "t", "chain": "c2", "handle": 0, "expr": [{"jump": {"target": "c3"}}]}}, {"rule": {"family": "ip", "table": "t", "chain": "c3", "handle": 0, "expr": [{"jump": {"target": "c4"}}]}}, {"rule": {"family": "ip", "table": "t", "chain": "c4", "handle": 0, "expr": [{"jump": {"target": "c5"}}]}}, {"rule": {"family": "ip", "table": "t", "chain": "c5", "handle": 0, "expr": [{"jump": {"target": "c6"}}]}}, {"rule": {"family": "ip", "table": "t", "chain": "c6", "handle": 0, "expr": [{"jump": {"target": "c7"}}]}}, {"rule": {"family": "ip", "table": "t", "chain": "c7", "handle": 0, "expr": [{"jump": {"target": "c8"}}]}}, {"rule": {"family": "ip", "table": "t", "chain": "c8", "handle": 0, "expr": [{"jump": {"target": "c9"}}]}}, {"rule": {"family": "ip", "table": "t", "chain": "c9", "handle": 0, "expr": [{"jump": {"target": "c10"}}]}}, {"rule": {"family": "ip", "table": "t", "chain": "c10", "handle": 0, "expr": [{"jump": {"target": "c11"}}]}}, {"rule": {"family": "ip", "table": "t", "chain": "c11", "handle": 0, "expr": [{"jump": {"target": "c12"}}]}}, {"rule": {"family": "ip", "table": "t", "chain": "c12", "handle": 0, "expr": [{"jump": {"target": "c13"}}]}}, {"rule": {"family": "ip", "table": "t", "chain": "c13", "handle": 0, "expr": [{"jump": {"target": "c14"}}]}}, {"rule": {"family": "ip", "table": "t", "chain": "c14", "handle": 0, "expr": [{"jump": {"target": "c15"}}]}}, {"rule": {"family": "ip", "table": "t", "chain": "c15", "handle": 0, "expr": [{"jump": {"target": "c16"}}]}}]} +{ + "nftables": [ + { + "metainfo": { + "version": "VERSION", + "release_name": "RELEASE_NAME", + "json_schema_version": 1 + } + }, + { + "table": { + "family": "ip", + "name": "t", + "handle": 0 + } + }, + { + "chain": { + "family": "ip", + "table": "t", + "name": "c1", + "handle": 0, + "type": "filter", + "hook": "input", + "prio": 0, + "policy": "accept" + } + }, + { + "chain": { + "family": "ip", + "table": "t", + "name": "c2", + "handle": 0 + } + }, + { + "chain": { + "family": "ip", + "table": "t", + "name": "c3", + "handle": 0 + } + }, + { + "chain": { + "family": "ip", + "table": "t", + "name": "c4", + "handle": 0 + } + }, + { + "chain": { + "family": "ip", + "table": "t", + "name": "c5", + "handle": 0 + } + }, + { + "chain": { + "family": "ip", + "table": "t", + "name": "c6", + "handle": 0 + } + }, + { + "chain": { + "family": "ip", + "table": "t", + "name": "c7", + "handle": 0 + } + }, + { + "chain": { + "family": "ip", + "table": "t", + "name": "c8", + "handle": 0 + } + }, + { + "chain": { + "family": "ip", + "table": "t", + "name": "c9", + "handle": 0 + } + }, + { + "chain": { + "family": "ip", + "table": "t", + "name": "c10", + "handle": 0 + } + }, + { + "chain": { + "family": "ip", + "table": "t", + "name": "c11", + "handle": 0 + } + }, + { + "chain": { + "family": "ip", + "table": "t", + "name": "c12", + "handle": 0 + } + }, + { + "chain": { + "family": "ip", + "table": "t", + "name": "c13", + "handle": 0 + } + }, + { + "chain": { + "family": "ip", + "table": "t", + "name": "c14", + "handle": 0 + } + }, + { + "chain": { + "family": "ip", + "table": "t", + "name": "c15", + "handle": 0 + } + }, + { + "chain": { + "family": "ip", + "table": "t", + "name": "c16", + "handle": 0 + } + }, + { + "chain": { + "family": "ip", + "table": "t", + "name": "c17", + "handle": 0 + } + }, + { + "rule": { + "family": "ip", + "table": "t", + "chain": "c1", + "handle": 0, + "expr": [ + { + "jump": { + "target": "c2" + } + } + ] + } + }, + { + "rule": { + "family": "ip", + "table": "t", + "chain": "c2", + "handle": 0, + "expr": [ + { + "jump": { + "target": "c3" + } + } + ] + } + }, + { + "rule": { + "family": "ip", + "table": "t", + "chain": "c3", + "handle": 0, + "expr": [ + { + "jump": { + "target": "c4" + } + } + ] + } + }, + { + "rule": { + "family": "ip", + "table": "t", + "chain": "c4", + "handle": 0, + "expr": [ + { + "jump": { + "target": "c5" + } + } + ] + } + }, + { + "rule": { + "family": "ip", + "table": "t", + "chain": "c5", + "handle": 0, + "expr": [ + { + "jump": { + "target": "c6" + } + } + ] + } + }, + { + "rule": { + "family": "ip", + "table": "t", + "chain": "c6", + "handle": 0, + "expr": [ + { + "jump": { + "target": "c7" + } + } + ] + } + }, + { + "rule": { + "family": "ip", + "table": "t", + "chain": "c7", + "handle": 0, + "expr": [ + { + "jump": { + "target": "c8" + } + } + ] + } + }, + { + "rule": { + "family": "ip", + "table": "t", + "chain": "c8", + "handle": 0, + "expr": [ + { + "jump": { + "target": "c9" + } + } + ] + } + }, + { + "rule": { + "family": "ip", + "table": "t", + "chain": "c9", + "handle": 0, + "expr": [ + { + "jump": { + "target": "c10" + } + } + ] + } + }, + { + "rule": { + "family": "ip", + "table": "t", + "chain": "c10", + "handle": 0, + "expr": [ + { + "jump": { + "target": "c11" + } + } + ] + } + }, + { + "rule": { + "family": "ip", + "table": "t", + "chain": "c11", + "handle": 0, + "expr": [ + { + "jump": { + "target": "c12" + } + } + ] + } + }, + { + "rule": { + "family": "ip", + "table": "t", + "chain": "c12", + "handle": 0, + "expr": [ + { + "jump": { + "target": "c13" + } + } + ] + } + }, + { + "rule": { + "family": "ip", + "table": "t", + "chain": "c13", + "handle": 0, + "expr": [ + { + "jump": { + "target": "c14" + } + } + ] + } + }, + { + "rule": { + "family": "ip", + "table": "t", + "chain": "c14", + "handle": 0, + "expr": [ + { + "jump": { + "target": "c15" + } + } + ] + } + }, + { + "rule": { + "family": "ip", + "table": "t", + "chain": "c15", + "handle": 0, + "expr": [ + { + "jump": { + "target": "c16" + } + } + ] + } + } + ] +} |