Skip to content

Commit

Permalink
python: ovs: flow: Add meter_id to controller.
Browse files Browse the repository at this point in the history
Add missing option to controller action.

Signed-off-by: Adrian Moreno <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
  • Loading branch information
amorenoz authored and Simon Horman committed Jan 17, 2024
1 parent ea44caf commit 253d900
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/ovs/flow/ofp_act.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def decode_controller(value):
"id": decode_int,
"userdata": decode_default,
"pause": decode_flag,
"meter_id": decode_int,
}
)
)(value)
Expand Down
15 changes: 15 additions & 0 deletions python/ovs/tests/test_ofp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
[
Expand Down

0 comments on commit 253d900

Please sign in to comment.