From 8f6e1c37e3e74e1fd490a0de5360ff1467c521cd Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 29 Aug 2018 16:23:26 +0200 Subject: JSON: Rename mangle statement properties Instead of the generic "left" and "right", use "key" and "value". Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- tests/py/any/ct.t.json | 68 ++++++++++++++++++++-------------------- tests/py/any/ct.t.json.output | 24 +++++++------- tests/py/any/meta.t.json | 36 ++++++++++----------- tests/py/any/meta.t.json.output | 32 +++++++++---------- tests/py/arp/arp.t.json | 4 +-- tests/py/arp/arp.t.json.output | 4 +-- tests/py/bridge/ether.t.json | 4 +-- tests/py/inet/map.t.json | 8 ++--- tests/py/inet/map.t.json.output | 8 ++--- tests/py/inet/rt.t.json | 4 +-- tests/py/inet/tcpopt.t.json | 4 +-- tests/py/inet/udp.t.json | 8 ++--- tests/py/ip/hash.t.json | 24 +++++++------- tests/py/ip/ip.t.json | 36 ++++++++++----------- tests/py/ip/ip.t.json.output | 4 +-- tests/py/ip/ip_tcp.t.json | 4 +-- tests/py/ip/ip_tcp.t.json.output | 4 +-- tests/py/ip/numgen.t.json | 8 ++--- tests/py/ip/numgen.t.json.output | 4 +-- tests/py/ip6/ip6.t.json | 36 ++++++++++----------- tests/py/ip6/ip6.t.json.output | 4 +-- tests/py/ip6/map.t.json | 4 +-- tests/py/ip6/map.t.json.output | 4 +-- 23 files changed, 168 insertions(+), 168 deletions(-) (limited to 'tests/py') diff --git a/tests/py/any/ct.t.json b/tests/py/any/ct.t.json index 8e312795..2fb4e727 100644 --- a/tests/py/any/ct.t.json +++ b/tests/py/any/ct.t.json @@ -613,12 +613,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "mark" } }, - "right": { "^": [ "0x11", "0x1331" ] } + "value": { "^": [ "0x11", "0x1331" ] } } } ] @@ -627,12 +627,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "mark" } }, - "right": { "&": [ "0x11333", "0x11" ] } + "value": { "&": [ "0x11333", "0x11" ] } } } ] @@ -641,12 +641,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "mark" } }, - "right": { "|": [ "0x12", "0x11" ] } + "value": { "|": [ "0x12", "0x11" ] } } } ] @@ -655,12 +655,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "mark" } }, - "right": "0x11" + "value": "0x11" } } ] @@ -669,12 +669,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "mark" } }, - "right": { + "value": { "meta": { "key": "mark" } } } @@ -685,12 +685,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "mark" } }, - "right": { + "value": { "map": { "key": { "meta": { "key": "mark" } @@ -1125,12 +1125,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "event" } }, - "right": "new" + "value": "new" } } ] @@ -1139,12 +1139,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "event" } }, - "right": [ + "value": [ "new", "related", "destroy", @@ -1158,12 +1158,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "event" } }, - "right": [ + "value": [ "new", "related", "destroy", @@ -1177,12 +1177,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "event" } }, - "right": [ + "value": [ "new", "destroy" ] @@ -1194,12 +1194,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "event" } }, - "right": 1 + "value": 1 } } ] @@ -1208,12 +1208,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "event" } }, - "right": "0x0" + "value": "0x0" } } ] @@ -1236,12 +1236,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "label" } }, - "right": 127 + "value": 127 } } ] @@ -1308,12 +1308,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "zone" } }, - "right": 1 + "value": 1 } } ] @@ -1322,13 +1322,13 @@ [ { "mangle": { - "left": { + "key": { "ct": { "dir": "original", "key": "zone" } }, - "right": 1 + "value": 1 } } ] @@ -1337,13 +1337,13 @@ [ { "mangle": { - "left": { + "key": { "ct": { "dir": "reply", "key": "zone" } }, - "right": 1 + "value": 1 } } ] @@ -1352,12 +1352,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "zone" } }, - "right": { + "value": { "map": { "key": { "meta": { "key": "mark" } diff --git a/tests/py/any/ct.t.json.output b/tests/py/any/ct.t.json.output index eb11ecc4..8f0ca93c 100644 --- a/tests/py/any/ct.t.json.output +++ b/tests/py/any/ct.t.json.output @@ -348,12 +348,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "mark" } }, - "right": 4896 + "value": 4896 } } ] @@ -362,12 +362,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "mark" } }, - "right": 17 + "value": 17 } } ] @@ -376,12 +376,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "mark" } }, - "right": 19 + "value": 19 } } ] @@ -390,12 +390,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "mark" } }, - "right": 17 + "value": 17 } } ] @@ -608,12 +608,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "event" } }, - "right": "new" + "value": "new" } } ] @@ -622,12 +622,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "event" } }, - "right": 0 + "value": 0 } } ] diff --git a/tests/py/any/meta.t.json b/tests/py/any/meta.t.json index 9149b641..00a4f237 100644 --- a/tests/py/any/meta.t.json +++ b/tests/py/any/meta.t.json @@ -521,10 +521,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "priority" } }, - "right": "cafe:beef" + "value": "cafe:beef" } } ] @@ -1502,10 +1502,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": { "^": [ "0xffffffc8", "0x16" ] } + "value": { "^": [ "0xffffffc8", "0x16" ] } } } ] @@ -1514,10 +1514,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": { "&": [ "0x16", "0x16" ] } + "value": { "&": [ "0x16", "0x16" ] } } } ] @@ -1526,10 +1526,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": { "|": [ "0xffffffe9", "0x16" ] } + "value": { "|": [ "0xffffffe9", "0x16" ] } } } ] @@ -1538,10 +1538,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": { "&": [ "0xffffffde", "0x16" ] } + "value": { "&": [ "0xffffffde", "0x16" ] } } } ] @@ -1550,10 +1550,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": { "|": [ "0xf045ffde", "0x10" ] } + "value": { "|": [ "0xf045ffde", "0x10" ] } } } ] @@ -1562,10 +1562,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": { "|": [ "0xffffffde", "0x16" ] } + "value": { "|": [ "0xffffffde", "0x16" ] } } } ] @@ -1574,10 +1574,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": { "|": [ "0x32", "0xfffff" ] } + "value": { "|": [ "0x32", "0xfffff" ] } } } ] @@ -1586,10 +1586,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": { "^": [ "0xfffe", "0x16" ] } + "value": { "^": [ "0xfffe", "0x16" ] } } } ] diff --git a/tests/py/any/meta.t.json.output b/tests/py/any/meta.t.json.output index 682ad684..398583f4 100644 --- a/tests/py/any/meta.t.json.output +++ b/tests/py/any/meta.t.json.output @@ -401,10 +401,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": 4294967262 + "value": 4294967262 } } ] @@ -413,10 +413,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": 22 + "value": 22 } } ] @@ -425,10 +425,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": 4294967295 + "value": 4294967295 } } ] @@ -437,10 +437,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": 22 + "value": 22 } } ] @@ -449,10 +449,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": 4031119326 + "value": 4031119326 } } ] @@ -461,10 +461,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": 4294967262 + "value": 4294967262 } } ] @@ -473,10 +473,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": 1048575 + "value": 1048575 } } ] @@ -485,10 +485,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": 65512 + "value": 65512 } } ] diff --git a/tests/py/arp/arp.t.json b/tests/py/arp/arp.t.json index 49f5c2ca..7f5c3ca2 100644 --- a/tests/py/arp/arp.t.json +++ b/tests/py/arp/arp.t.json @@ -861,14 +861,14 @@ }, { "mangle": { - "left": { + "key": { "payload": { "base": "nh", "len": 48, "offset": 144 } }, - "right": "0x112233445566" + "value": "0x112233445566" } } ] diff --git a/tests/py/arp/arp.t.json.output b/tests/py/arp/arp.t.json.output index 295d05fa..7ee4dbfa 100644 --- a/tests/py/arp/arp.t.json.output +++ b/tests/py/arp/arp.t.json.output @@ -132,14 +132,14 @@ }, { "mangle": { - "left": { + "key": { "payload": { "base": "nh", "len": 48, "offset": 144 } }, - "right": 18838586676582 + "value": 18838586676582 } } ] diff --git a/tests/py/bridge/ether.t.json b/tests/py/bridge/ether.t.json index 136a22ca..d9a0066b 100644 --- a/tests/py/bridge/ether.t.json +++ b/tests/py/bridge/ether.t.json @@ -164,13 +164,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "saddr", "protocol": "ether" } }, - "right": "ff:fe:dc:ba:98:76" + "value": "ff:fe:dc:ba:98:76" } }, { diff --git a/tests/py/inet/map.t.json b/tests/py/inet/map.t.json index 207ac3f3..1cb28e01 100644 --- a/tests/py/inet/map.t.json +++ b/tests/py/inet/map.t.json @@ -2,10 +2,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": { + "value": { "map": { "key": { "payload": { @@ -35,10 +35,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": { + "value": { "map": { "key": { "payload": { diff --git a/tests/py/inet/map.t.json.output b/tests/py/inet/map.t.json.output index 9c235e30..b0bb7ddf 100644 --- a/tests/py/inet/map.t.json.output +++ b/tests/py/inet/map.t.json.output @@ -2,10 +2,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": { + "value": { "map": { "key": { "payload": { @@ -35,10 +35,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": { + "value": { "map": { "key": { "payload": { diff --git a/tests/py/inet/rt.t.json b/tests/py/inet/rt.t.json index 92f2dbea..e81bcfd8 100644 --- a/tests/py/inet/rt.t.json +++ b/tests/py/inet/rt.t.json @@ -39,13 +39,13 @@ [ { "mangle": { - "left": { + "key": { "tcp option": { "field": "size", "name": "maxseg" } }, - "right": { + "value": { "rt": { "key": "mtu" } diff --git a/tests/py/inet/tcpopt.t.json b/tests/py/inet/tcpopt.t.json index d4632187..431ee021 100644 --- a/tests/py/inet/tcpopt.t.json +++ b/tests/py/inet/tcpopt.t.json @@ -405,13 +405,13 @@ [ { "mangle": { - "left": { + "key": { "tcp option": { "field": "size", "name": "maxseg" } }, - "right": 1360 + "value": 1360 } } ] diff --git a/tests/py/inet/udp.t.json b/tests/py/inet/udp.t.json index 896d20d8..5ea073d7 100644 --- a/tests/py/inet/udp.t.json +++ b/tests/py/inet/udp.t.json @@ -694,13 +694,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "checksum", "protocol": "udp" } }, - "right": 0 + "value": 0 } } ] @@ -717,13 +717,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "dport", "protocol": "udp" } }, - "right": 65535 + "value": 65535 } } ] diff --git a/tests/py/ip/hash.t.json b/tests/py/ip/hash.t.json index febf0274..a95cf22f 100644 --- a/tests/py/ip/hash.t.json +++ b/tests/py/ip/hash.t.json @@ -2,12 +2,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "mark" } }, - "right": { + "value": { "jhash": { "expr": { "concat": [ @@ -37,12 +37,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "mark" } }, - "right": { + "value": { "jhash": { "expr": { "concat": [ @@ -71,12 +71,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "mark" } }, - "right": { + "value": { "jhash": { "expr": { "concat": [ @@ -106,12 +106,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "mark" } }, - "right": { + "value": { "jhash": { "expr": { "concat": [ @@ -142,12 +142,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "mark" } }, - "right": { + "value": { "jhash": { "expr": { "concat": [ @@ -213,12 +213,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "mark" } }, - "right": { + "value": { "symhash": { "mod": 2, "offset": 100 diff --git a/tests/py/ip/ip.t.json b/tests/py/ip/ip.t.json index 3e4f2d80..c8b2bf83 100644 --- a/tests/py/ip/ip.t.json +++ b/tests/py/ip/ip.t.json @@ -1584,13 +1584,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "daddr", "protocol": "ip" } }, - "right": "127.0.0.1" + "value": "127.0.0.1" } } ] @@ -1607,13 +1607,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "checksum", "protocol": "ip" } }, - "right": 0 + "value": 0 } } ] @@ -1630,13 +1630,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "id", "protocol": "ip" } }, - "right": 0 + "value": 0 } } ] @@ -1653,13 +1653,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "ecn", "protocol": "ip" } }, - "right": 1 + "value": 1 } } ] @@ -1676,13 +1676,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "ecn", "protocol": "ip" } }, - "right": "ce" + "value": "ce" } } ] @@ -1699,13 +1699,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "ttl", "protocol": "ip" } }, - "right": 23 + "value": 23 } } ] @@ -1722,13 +1722,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "protocol", "protocol": "ip" } }, - "right": 1 + "value": 1 } } ] @@ -1745,13 +1745,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "dscp", "protocol": "ip" } }, - "right": "af23" + "value": "af23" } } ] @@ -1768,13 +1768,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "dscp", "protocol": "ip" } }, - "right": "cs0" + "value": "cs0" } } ] diff --git a/tests/py/ip/ip.t.json.output b/tests/py/ip/ip.t.json.output index 22b4d8c9..0378c00f 100644 --- a/tests/py/ip/ip.t.json.output +++ b/tests/py/ip/ip.t.json.output @@ -213,13 +213,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "ecn", "protocol": "ip" } }, - "right": "ect1" + "value": "ect1" } } ] diff --git a/tests/py/ip/ip_tcp.t.json b/tests/py/ip/ip_tcp.t.json index 453c1e43..15b5f386 100644 --- a/tests/py/ip/ip_tcp.t.json +++ b/tests/py/ip/ip_tcp.t.json @@ -39,10 +39,10 @@ }, { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": 1 + "value": 1 } }, { diff --git a/tests/py/ip/ip_tcp.t.json.output b/tests/py/ip/ip_tcp.t.json.output index 15bd8e11..63cdfe0b 100644 --- a/tests/py/ip/ip_tcp.t.json.output +++ b/tests/py/ip/ip_tcp.t.json.output @@ -28,10 +28,10 @@ }, { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": 1 + "value": 1 } }, { diff --git a/tests/py/ip/numgen.t.json b/tests/py/ip/numgen.t.json index 5318a0f5..9902c2cf 100644 --- a/tests/py/ip/numgen.t.json +++ b/tests/py/ip/numgen.t.json @@ -2,12 +2,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "mark" } }, - "right": { + "value": { "numgen": { "mod": 2, "mode": "inc" @@ -21,12 +21,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "mark" } }, - "right": { + "value": { "numgen": { "mod": 2, "mode": "inc", diff --git a/tests/py/ip/numgen.t.json.output b/tests/py/ip/numgen.t.json.output index ffab43ba..b54121ca 100644 --- a/tests/py/ip/numgen.t.json.output +++ b/tests/py/ip/numgen.t.json.output @@ -2,12 +2,12 @@ [ { "mangle": { - "left": { + "key": { "ct": { "key": "mark" } }, - "right": { + "value": { "numgen": { "mod": 2, "mode": "inc", diff --git a/tests/py/ip6/ip6.t.json b/tests/py/ip6/ip6.t.json index a0a3079a..d6acaa3b 100644 --- a/tests/py/ip6/ip6.t.json +++ b/tests/py/ip6/ip6.t.json @@ -1416,13 +1416,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "daddr", "protocol": "ip6" } }, - "right": "::1" + "value": "::1" } } ] @@ -1439,13 +1439,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "hoplimit", "protocol": "ip6" } }, - "right": 1 + "value": 1 } } ] @@ -1462,13 +1462,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "dscp", "protocol": "ip6" } }, - "right": "af42" + "value": "af42" } } ] @@ -1485,13 +1485,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "dscp", "protocol": "ip6" } }, - "right": 63 + "value": 63 } } ] @@ -1508,13 +1508,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "ecn", "protocol": "ip6" } }, - "right": "ect0" + "value": "ect0" } } ] @@ -1531,13 +1531,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "ecn", "protocol": "ip6" } }, - "right": "ce" + "value": "ce" } } ] @@ -1554,13 +1554,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "flowlabel", "protocol": "ip6" } }, - "right": 0 + "value": 0 } } ] @@ -1577,13 +1577,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "flowlabel", "protocol": "ip6" } }, - "right": 12345 + "value": 12345 } } ] @@ -1600,13 +1600,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "flowlabel", "protocol": "ip6" } }, - "right": "0xfffff" + "value": "0xfffff" } } ] diff --git a/tests/py/ip6/ip6.t.json.output b/tests/py/ip6/ip6.t.json.output index 2b814721..48f28b3d 100644 --- a/tests/py/ip6/ip6.t.json.output +++ b/tests/py/ip6/ip6.t.json.output @@ -348,13 +348,13 @@ }, { "mangle": { - "left": { + "key": { "payload": { "field": "flowlabel", "protocol": "ip6" } }, - "right": 1048575 + "value": 1048575 } } ] diff --git a/tests/py/ip6/map.t.json b/tests/py/ip6/map.t.json index 2ddb3080..78a01c6b 100644 --- a/tests/py/ip6/map.t.json +++ b/tests/py/ip6/map.t.json @@ -2,10 +2,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": { + "value": { "map": { "key": { "&": [ diff --git a/tests/py/ip6/map.t.json.output b/tests/py/ip6/map.t.json.output index 84343763..9280d55e 100644 --- a/tests/py/ip6/map.t.json.output +++ b/tests/py/ip6/map.t.json.output @@ -2,10 +2,10 @@ [ { "mangle": { - "left": { + "key": { "meta": { "key": "mark" } }, - "right": { + "value": { "map": { "key": { "&": [ -- cgit v1.2.3