[ovs-dev] [PATCH 3/3] Handle tunnel set changes for BUM traffic in the vtep emulator
Russell Bryant
russell at ovn.org
Wed Feb 17 14:40:52 UTC 2016
On 02/16/2016 09:26 PM, Darrell Ball wrote:
>>
>>> break
>>> -
>>> - ovs_ofctl("add-flow %s table=1,priority=0,action=%s"
>>> + # Handle remote tunnel port set changes
>>> + if ((existing_flow == 1) and (appended_flood_tunnel_port == 1)):
>>
>> if existing_flow and appended_flood_tunnel_port:
>
> I’ll be using
> if existing_flow == True and appended_flood_tunnel_port == True:
>
> semantics
>
> My reasoning is with Python booleans, I can assign 2
> or even ‘apple’ to existing_flow and the check
> if existing_flow:
> would evaluate to True
If you want to be explicit, it's better to use "foo is True" instead of
"foo == False". The meaning of '==' can be overridden. If you install
the 'flake8' utility, it will generate a warning on "foo == True" at
build time.
--
Russell Bryant
More information about the dev
mailing list