When we use voltha-onos docker, onos sends clear_actions instruction to voltha ofagent component. voltha ofagent component doesnt handle this instruction type and creates an exception:
20180124T125506.456 ERROR of_protocol_handler.handle_flow_mod_request
{e: <class 'loxi.of13.instruction.clear_actions'>, event: failed-to-convert, exception: Traceback (most recent call last): File "/ofagent/ofagent/of_protocol_handler.py", line 122, in handle_flow_mod_request grpc_req = to_grpc(req) File "/ofagent/ofagent/converter.py", line 52, in to_grpc return converter(loxi_object) File "/ofagent/ofagent/converter.py", line 244, in loxi_flow_mod_to_ofp_flow_mod instructions=[to_grpc(i) for i in lo.instructions]) File "/ofagent/ofagent/converter.py", line 51, in to_grpc converter = to_grpc_converters[cls] KeyError: <class 'loxi.of13.instruction.clear_actions'>, instance_id: compose_ofagent_1}
As a conclusion, we see the flows at pending_add state when we check them at Onos cli.
Change-Id: Icde46ba15dccaa2d25920d5d5d104baf88bdd22b
diff --git a/cli/utils.py b/cli/utils.py
index 729c3a2..7426f99 100644
--- a/cli/utils.py
+++ b/cli/utils.py
@@ -146,6 +146,8 @@
elif itype == 1:
table.add_cell(i, 10000, 'goto-table',
instruction['goto_table']['table_id'])
+ elif itype == 5:
+ table.add_cell(i, 10000, 'clear-actions', [])
else:
raise NotImplementedError(
'not handling instruction type {}'.format(itype))