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))
diff --git a/ofagent/converter.py b/ofagent/converter.py
index 6855c56..06b31ba 100644
--- a/ofagent/converter.py
+++ b/ofagent/converter.py
@@ -157,6 +157,8 @@
             return of13.instruction.apply_actions(
                 actions=[make_loxi_action(a)
                          for a in inst['actions']['actions']])
+        elif type == pb2.OFPIT_CLEAR_ACTIONS:
+            return of13.instruction.clear_actions()
         elif type == pb2.OFPIT_GOTO_TABLE:
             return of13.instruction.goto_table(
                 table_id=inst['goto_table']['table_id'])
@@ -352,6 +354,10 @@
         actions=pb2.ofp_instruction_actions(
             actions=[to_grpc(a) for a in lo.actions]))
 
+def loxi_clear_actions_to_ofp_instruction(lo):
+    return pb2.ofp_instruction(
+        type=pb2.OFPIT_CLEAR_ACTIONS)
+
 
 def loxi_goto_table_to_ofp_instruction(lo):
     return pb2.ofp_instruction(
@@ -414,6 +420,7 @@
     of13.oxm.metadata: loxi_oxm_metadata_to_ofp_oxm,
 
     of13.instruction.apply_actions: loxi_apply_actions_to_ofp_instruction,
+    of13.instruction.clear_actions: loxi_clear_actions_to_ofp_instruction,
     of13.instruction.goto_table: loxi_goto_table_to_ofp_instruction,
 
     of13.action.output: loxi_output_action_to_ofp_action,
diff --git a/tests/utests/ofagent/test_converter.py b/tests/utests/ofagent/test_converter.py
index fd72925..415aea3 100644
--- a/tests/utests/ofagent/test_converter.py
+++ b/tests/utests/ofagent/test_converter.py
@@ -1,8 +1,9 @@
 from unittest import TestCase, main
 
 from loxi import of13
+from ofagent.loxi.of13.instruction import clear_actions
 from voltha.protos import third_party
-from ofagent.converter import to_loxi
+from ofagent.converter import to_loxi, to_grpc
 from voltha.core.flow_decomposer import *
 
 _ = third_party
@@ -223,6 +224,10 @@
         for group_stat in group_stats:
             loxi_group_desc = to_loxi(group_stat.desc)
 
+    def test_clear_actions_instruction(self):
+        obj = clear_actions()
+        ofp_instruction = to_grpc(obj)
+        self.assertEqual(ofp_instruction.type, 5)
 
 if __name__ == '__main__':
     main()