Message ID | 20240105114702.443465-8-amorenoz@redhat.com |
---|---|
State | Changes Requested |
Delegated to: | Simon Horman |
Headers | show |
Series | python: Miscelaneous flow parsing fixes. | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/intel-ovs-compilation | success | test: success |
On Fri, Jan 05, 2024 at 12:46:59PM +0100, Adrian Moreno wrote: > In general, most actions must be lists since the keys can be repeated. > > Signed-off-by: Adrian Moreno <amorenoz@redhat.com> Acked-by: Simon Horman <horms@ovn.org>
diff --git a/python/ovs/flow/odp.py b/python/ovs/flow/odp.py index 46697a1bc..7d9b165d4 100644 --- a/python/ovs/flow/odp.py +++ b/python/ovs/flow/odp.py @@ -375,13 +375,15 @@ class ODPFlow(Flow): KVDecoders( decoders=_decoders, default_free=decode_free_output, - ) + ), + is_list=True, ), "le": nested_kv_decoder( KVDecoders( decoders=_decoders, default_free=decode_free_output, - ) + ), + is_list=True, ), } ) diff --git a/python/ovs/tests/test_odp.py b/python/ovs/tests/test_odp.py index 8147a31d1..d52056794 100644 --- a/python/ovs/tests/test_odp.py +++ b/python/ovs/tests/test_odp.py @@ -517,24 +517,24 @@ def test_odp_fields(input_string, expected): "check_pkt_len", { "size": 200, - "gt": {"output": {"port": 4}}, - "le": {"output": {"port": 5}}, + "gt": [{"output": {"port": 4}}], + "le": [{"output": {"port": 5}}], }, ), KeyValue( "check_pkt_len", { "size": 200, - "gt": {"drop": True}, - "le": {"output": {"port": 5}}, + "gt": [{"drop": True}], + "le": [{"output": {"port": 5}}], }, ), KeyValue( "check_pkt_len", { "size": 200, - "gt": {"ct": {"nat": True}}, - "le": {"drop": True}, + "gt": [{"ct": {"nat": True}}], + "le": [{"drop": True}], }, ), ],
In general, most actions must be lists since the keys can be repeated. Signed-off-by: Adrian Moreno <amorenoz@redhat.com> --- python/ovs/flow/odp.py | 6 ++++-- python/ovs/tests/test_odp.py | 12 ++++++------ 2 files changed, 10 insertions(+), 8 deletions(-)