Add missing option to controller action.
Acked-by: Simon Horman <[email protected]>
Signed-off-by: Adrian Moreno <[email protected]>
---
python/ovs/flow/ofp_act.py | 1 +
python/ovs/tests/test_ofp.py | 15 +++++++++++++++
2 files changed, 16 insertions(+)
diff --git a/python/ovs/flow/ofp_act.py b/python/ovs/flow/ofp_act.py
index c540443ea..2c85076a3 100644
--- a/python/ovs/flow/ofp_act.py
+++ b/python/ovs/flow/ofp_act.py
@@ -54,6 +54,7 @@ def decode_controller(value):
"id": decode_int,
"userdata": decode_default,
"pause": decode_flag,
+ "meter_id": decode_int,
}
)
)(value)
diff --git a/python/ovs/tests/test_ofp.py b/python/ovs/tests/test_ofp.py
index 7ba444b7b..d098520ca 100644
--- a/python/ovs/tests/test_ofp.py
+++ b/python/ovs/tests/test_ofp.py
@@ -52,6 +52,21 @@ def do_test_section(input_string, section, expected):
KeyValue("controller", {"max_len": 200}),
],
),
+ (
+
"actions=controller(max_len=123,reason=no_match,id=456,userdata=00.00.00.12.00.00.00.00,meter_id=12)",
# noqa: E501
+ [
+ KeyValue(
+ "controller",
+ {
+ "max_len": 123,
+ "reason": "no_match",
+ "id": 456,
+ "userdata": "00.00.00.12.00.00.00.00",
+ "meter_id": 12,
+ }
+ ),
+ ],
+ ),
(
"actions=enqueue(foo,42),enqueue:foo:42,enqueue(bar,4242)",
[
--
2.43.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev