mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
python: ovs: flow: Add dp hash and meter actions.
Add missing actions. Signed-off-by: Adrian Moreno <amorenoz@redhat.com> Signed-off-by: Simon Horman <horms@ovn.org>
This commit is contained in:
committed by
Simon Horman
parent
ab7d089612
commit
5e45091ea8
@@ -204,6 +204,7 @@ class ODPFlow(Flow):
|
||||
"""Generate the arguments for the action KVDecoders."""
|
||||
_decoders = {
|
||||
"drop": decode_flag,
|
||||
"meter": decode_int,
|
||||
"lb_output": decode_int,
|
||||
"trunc": decode_int,
|
||||
"recirc": decode_int,
|
||||
@@ -334,6 +335,14 @@ class ODPFlow(Flow):
|
||||
)
|
||||
),
|
||||
**ODPFlow._tnl_action_decoder_args(),
|
||||
"hash": nested_kv_decoder(
|
||||
KVDecoders(
|
||||
{
|
||||
"l4": decode_int,
|
||||
"sym_l4": decode_int,
|
||||
}
|
||||
)
|
||||
),
|
||||
}
|
||||
|
||||
_decoders["sample"] = nested_kv_decoder(
|
||||
|
@@ -534,6 +534,18 @@ def test_odp_fields(input_string, expected):
|
||||
),
|
||||
],
|
||||
),
|
||||
(
|
||||
"actions:meter(1),hash(l4(0))",
|
||||
[
|
||||
KeyValue("meter", 1),
|
||||
KeyValue(
|
||||
"hash",
|
||||
{
|
||||
"l4": 0,
|
||||
}
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_odp_actions(input_string, expected):
|
||||
|
Reference in New Issue
Block a user