On 2/11/22 15:12, Eelco Chaudron wrote:
+def decode_nat(value):
+    """Decodes the 'nat' keyword of the ct action"""
You were going to add an example of what the decode would look like?

+    if not value:
+        return True
You where going to add a comment here why return true:

“””

Why returning True is no data is present? I would expect None.
In general keys without values are decoded as key: True. Other places in the code calls them "flags", e.g: 
"drop" action is decoded as {"drop": True}. In this case "ct" without a value is a flag.

But I can see how this can be confusing. I'll add a comment to clarify.

“””


Sorry I missed it, will send another version.

--
Adrián Moreno

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to