action_list: throw exception if value is not an action
This is a programmer error, not a switch issue.
diff --git a/tests/FuncUtils.py b/tests/FuncUtils.py
index 82f1a4f..4d420da 100644
--- a/tests/FuncUtils.py
+++ b/tests/FuncUtils.py
@@ -39,7 +39,7 @@
act = action.action_output()
act.port = of_ports[1]
- self.assertTrue(msg.actions.add(act), "could not add action")
+ msg.actions.add(act)
rv = self.controller.message_send(msg)
self.assertTrue(rv != -1, "Error installing flow mod")
@@ -67,7 +67,7 @@
act = action.action_output()
act.port = of_ports[2]
- self.assertTrue(msg.actions.add(act), "could not add action")
+ msg.actions.add(act)
rv = self.controller.message_send(msg)
self.assertTrue(rv != -1, "Error installing flow mod")
@@ -96,7 +96,7 @@
act1 = action.action_output()
act1.port = of_ports[1]
- self.assertTrue(msg1.actions.add(act1), "could not add action")
+ msg1.actions.add(act1)
rv = self.controller.message_send(msg1)
self.assertTrue(rv != -1, "Error installing flow mod")
@@ -124,7 +124,7 @@
act = action.action_output()
act.port = of_ports[1]
- self.assertTrue(msg.actions.add(act), "could not add action")
+ msg.actions.add(act)
rv = self.controller.message_send(msg)
self.assertTrue(rv != -1, "Error installing flow mod")
@@ -151,7 +151,7 @@
act = action.action_output()
act.port = of_ports[1]
- self.assertTrue(msg.actions.add(act), "could not add action")
+ msg.actions.add(act)
rv = self.controller.message_send(msg)
self.assertTrue(rv != -1, "Error installing flow mod")
@@ -176,7 +176,7 @@
msg2.match = match2
act2 = action.action_output()
act2.port = of_ports[1]
- self.assertTrue(msg2.actions.add(act2), "could not add action")
+ msg2.actions.add(act2)
if priority != None :
msg2.priority = priority
@@ -209,7 +209,7 @@
act3 = action.action_output()
act3.port = of_ports[1]
- self.assertTrue(msg3.actions.add(act3), "could not add action")
+ msg3.actions.add(act3)
if priority != None :
msg3.priority = priority
@@ -243,7 +243,7 @@
act3 = action.action_output()
act3.port = of_ports[2]
- self.assertTrue(msg3.actions.add(act3), "could not add action")
+ msg3.actions.add(act3)
if priority != None :
msg3.priority = priority
@@ -273,7 +273,7 @@
act = action.action_output()
act.port = of_ports[1]
- self.assertTrue(msg.actions.add(act), "could not add action")
+ msg.actions.add(act)
rv = self.controller.message_send(msg)
self.assertTrue(rv != -1, "Error installing flow mod")
@@ -300,7 +300,7 @@
act = action.action_output()
act.port = of_ports[1]
- self.assertTrue(msg.actions.add(act), "could not add action")
+ msg.actions.add(act)
rv = self.controller.message_send(msg)
self.assertTrue(rv != -1, "Error installing flow mod")
@@ -328,7 +328,7 @@
act = action.action_output()
act.port = of_ports[1]
- self.assertTrue(msg.actions.add(act), "could not add action")
+ msg.actions.add(act)
rv = self.controller.message_send(msg)
self.assertTrue(rv != -1, "Error installing flow mod")
@@ -355,7 +355,7 @@
act = action.action_output()
act.port = of_ports[1]
- self.assertTrue(msg.actions.add(act), "could not add action")
+ msg.actions.add(act)
rv = self.controller.message_send(msg)
self.assertTrue(rv != -1, "Error installing flow mod")
@@ -381,7 +381,7 @@
msg.priority = priority
act = action.action_output()
act.port = of_ports[1]
- self.assertTrue(msg.actions.add(act), "could not add action")
+ msg.actions.add(act)
rv = self.controller.message_send(msg)
self.assertTrue(rv != -1, "Error installing flow mod")
@@ -407,7 +407,7 @@
msg.priority = priority
act = action.action_output()
act.port = of_ports[1]
- self.assertTrue(msg.actions.add(act), "could not add action")
+ msg.actions.add(act)
rv = self.controller.message_send(msg)
self.assertTrue(rv != -1, "Error installing flow mod")
@@ -435,7 +435,7 @@
act = action.action_output()
act.port = of_ports[1]
- self.assertTrue(msg.actions.add(act), "could not add action")
+ msg.actions.add(act)
rv = self.controller.message_send(msg)
self.assertTrue(rv != -1, "Error installing flow mod")
@@ -461,7 +461,7 @@
msg.priority = priority
act = action.action_output()
act.port = of_ports[1]
- self.assertTrue(msg.actions.add(act), "could not add action")
+ msg.actions.add(act)
rv = self.controller.message_send(msg)
self.assertTrue(rv != -1, "Error installing flow mod")
@@ -489,7 +489,7 @@
act = action.action_output()
act.port = of_ports[1]
- self.assertTrue(msg.actions.add(act), "could not add action")
+ msg.actions.add(act)
rv = self.controller.message_send(msg)
self.assertTrue(rv != -1, "Error installing flow mod")
@@ -510,7 +510,7 @@
msg5.buffer_id = 0xffffffff
act5 = action.action_output()
act5.port = egress_port
- self.assertTrue(msg5.actions.add(act5), "could not add action")
+ msg5.actions.add(act5)
if priority != None :
msg5.priority = priority
@@ -533,7 +533,7 @@
msg8.buffer_id = 0xffffffff
act8 = action.action_output()
act8.port = of_ports[2]
- self.assertTrue(msg8.actions.add(act8), "could not add action")
+ msg8.actions.add(act8)
if priority != None :
msg8.priority = priority
@@ -559,7 +559,7 @@
act = action.action_enqueue()
act.port = egress_port
act.queue_id = egress_queue_id
- self.assertTrue(request.actions.add(act), "Could not add action")
+ request.actions.add(act)
logging.info("Inserting flow")
rv = self.controller.message_send(request)