diff mbox series

[ovs-dev,v2,5/6] python: ovs: flow: Make check_pkt_len action a list.

Message ID 20231220175803.2098495-6-amorenoz@redhat.com
State Changes Requested
Headers show
Series python: Miscelaneous flow parsing fixes. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test fail github build: failed
ovsrobot/intel-ovs-compilation success test: success

Commit Message

Adrian Moreno Dec. 20, 2023, 5:57 p.m. UTC
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 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Ilya Maximets Jan. 2, 2024, 2:26 p.m. UTC | #1
On 12/20/23 18:57, Adrian Moreno wrote:
> 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 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> 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,
>                          ),
>                      }
>                  )

Hi, Adrian.  This change breaks the pytest.  Please, adjust the
unit tests accordingly.

Speaking of tests, it might make sense to add some for other patches
in the set as well, if applicable.

Best regards, Ilya Maximets.
Adrian Moreno Jan. 5, 2024, 8:37 a.m. UTC | #2
On 1/2/24 15:26, Ilya Maximets wrote:
> On 12/20/23 18:57, Adrian Moreno wrote:
>> 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 ++++--
>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> 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,
>>                           ),
>>                       }
>>                   )
> 
> Hi, Adrian.  This change breaks the pytest.  Please, adjust the
> unit tests accordingly.
> 
> Speaking of tests, it might make sense to add some for other patches
> in the set as well, if applicable.
> 

Wow, will have to look into my scripts and see why pytest were being skipped! 
Thanks.

> Best regards, Ilya Maximets.
>
diff mbox series

Patch

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,
                         ),
                     }
                 )