action_list: throw exception if value is not an action
This is a programmer error, not a switch issue.
diff --git a/src/python/oftest/testutils.py b/src/python/oftest/testutils.py
index 8ee212b..de7b52a 100644
--- a/src/python/oftest/testutils.py
+++ b/src/python/oftest/testutils.py
@@ -535,8 +535,7 @@
if action_list is not None:
for act in action_list:
logging.debug("Adding action " + act.show())
- rv = request.actions.add(act)
- parent.assertTrue(rv, "Could not add action" + act.show())
+ request.actions.add(act)
# Set up output/enqueue action if directed
if egr_queue is not None:
@@ -545,16 +544,12 @@
for egr_port in egr_port_list:
act.port = egr_port
act.queue_id = egr_queue
- rv = request.actions.add(act)
- parent.assertTrue(rv, "Could not add enqueue action " +
- str(egr_port) + " Q: " + str(egr_queue))
+ request.actions.add(act)
elif egr_ports is not None:
for egr_port in egr_port_list:
act = action.action_output()
act.port = egr_port
- rv = request.actions.add(act)
- parent.assertTrue(rv, "Could not add output action " +
- str(egr_port))
+ request.actions.add(act)
logging.debug(request.show())
@@ -637,14 +632,14 @@
msg.data = str(pkt)
if action_list is not None:
for act in action_list:
- assert(msg.actions.add(act))
+ msg.actions.add(act)
# Set up output action
if egr_ports is not None:
for egr_port in egr_ports:
act = action.action_output()
act.port = egr_port
- assert(msg.actions.add(act))
+ msg.actions.add(act)
logging.debug(msg.show())
rv = parent.controller.message_send(msg)