Skip to content

Commit

Permalink
python: ovs: flow: Add idle_age to openflow flows.
Browse files Browse the repository at this point in the history
Add missing key.

Signed-off-by: Adrian Moreno <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
  • Loading branch information
amorenoz authored and Simon Horman committed Jan 18, 2024
1 parent 07f5195 commit 258abb3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions python/ovs/flow/ofp.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ def _gen_info_decoders():
"idle_timeout": decode_time,
"hard_timeout": decode_time,
"hard_age": decode_time,
"idle_age": decode_time,
}
return KVDecoders(args)

Expand Down
3 changes: 2 additions & 1 deletion python/ovs/tests/test_ofp.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,14 +599,15 @@ def test_act(input_string, expected):
"input_string,expected",
[
(
"cookie=0x35f946ead8d8f9e4, duration=97746.271s, table=0, n_packets=12, n_bytes=254, priority=4,in_port=1", # noqa: E501
"cookie=0x35f946ead8d8f9e4, duration=97746.271s, table=0, n_packets=12, n_bytes=254, idle_age=117, priority=4,in_port=1", # noqa: E501
(
[
KeyValue("cookie", 0x35f946ead8d8f9e4),
KeyValue("duration", 97746.271),
KeyValue("table", 0),
KeyValue("n_packets", 12),
KeyValue("n_bytes", 254),
KeyValue("idle_age", 117),
],
[
KeyValue("priority", 4),
Expand Down

0 comments on commit 258abb3

Please sign in to comment.