remove assertions on the return value of delete_all_flows
This function can no longer fail.
diff --git a/tests/actions.py b/tests/actions.py
index 62afda8..7a3df4e 100644
--- a/tests/actions.py
+++ b/tests/actions.py
@@ -38,8 +38,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Install a flow without action")
logging.info("Send packets matching that flow")
@@ -136,8 +135,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Insert a flow with output action port OFPP_ALL")
logging.info("Send packet matching the flow")
@@ -149,8 +147,7 @@
act = action.action_output()
#Delete all flows
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
ingress_port=of_ports[0]
match.in_port = ingress_port
@@ -189,8 +186,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Insert a flow with output action port OFPP_CONTROLLER")
logging.info("Send packet matching the flow")
@@ -203,8 +199,7 @@
for ingress_port in of_ports:
#Delete all flows
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
match.in_port = ingress_port
@@ -243,8 +238,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Insert a flow with output action port OFPP_LOCAL")
logging.info("Send packet matching the flow")
@@ -257,8 +251,7 @@
for ingress_port in of_ports:
#Delete the flows
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
match.in_port = ingress_port
#Create flow mod message
@@ -293,8 +286,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Insert a flow with output action port OFPP_FORWARD")
logging.info("Send packet matching the flow")
@@ -306,8 +298,7 @@
act = action.action_output()
#Delete all flows
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
ingress_port=of_ports[0]
match.in_port = ingress_port
@@ -345,8 +336,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Insert a flow with output action port OFPP_INPORT")
logging.info("Send packet matching the flow")
@@ -358,8 +348,7 @@
act = action.action_output()
#Delete the flows
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
ingress_port=of_ports[0]
match.in_port = ingress_port
@@ -397,8 +386,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Insert a flow F with output action port set to some egress_port")
logging.info("Send packet out message (matching flow F) with action.port = OFP.TABLE")
@@ -435,8 +423,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Verify if switch supports the action -- set vlan id, if not skip the test")
logging.info("Insert a flow with set vid action")
@@ -475,8 +462,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Verify if switch supports the action -- modify vlan id, if not skip the test")
logging.info("Insert a flow with action --set vid ")
@@ -513,8 +499,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Verify if switch supports the action -- set vlan priority, if not skip the test")
logging.info("Insert a flow with action -- set vlan priority ")
@@ -552,8 +537,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Verify if switch supports the action -- set vlan priority, if not skip the test")
logging.info("Insert a flow with action -- set vlan priority ")
@@ -592,8 +576,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Verify if switch supports the action -- modify_l2_src, if not skip the test")
logging.info("Insert a flow with action -- set etherent src address")
@@ -627,8 +610,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Verify if switch supports the action -- modify_l2_dst, if not skip the test")
logging.info("Insert a flow with action -- set etherent dst address ")
@@ -661,8 +643,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Verify if switch supports the action -- modify_l3_src, if not skip the test")
logging.info("Insert a flow with action -- set network src address ")
@@ -695,8 +676,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Verify if switch supports the action -- modify_l3_dst, if not skip the test")
logging.info("Insert a flow with action -- set network dst address ")
@@ -730,8 +710,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Verify if switch supports the action -- modify_l4_src, if not skip the test")
logging.info("Insert a flow with action -- set src tcp port")
@@ -764,8 +743,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Verify if switch supports the action -- modify_l4_dst, if not skip the test")
logging.info("Insert a flow with action -- set dst tcp port")
@@ -798,8 +776,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Verify if switch supports the action -- modify_tos, if not skip the test")
logging.info("Insert a flow with action -- set type of service ")
diff --git a/tests/basic.py b/tests/basic.py
index 06d4304..f9e9d88 100644
--- a/tests/basic.py
+++ b/tests/basic.py
@@ -77,8 +77,7 @@
# Send packet to dataplane, once to each port
# Poll controller with expect message type packet in
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
vid = test_param_get('vid', default=TEST_VID_DEFAULT)
@@ -128,8 +127,7 @@
priority = -1
def runTest(self):
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
for of_port in config["port_map"].keys():
@@ -167,8 +165,7 @@
# Need at least two ports
self.assertTrue(len(config["port_map"]) > 1, "Too few ports for test")
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
of_ports = config["port_map"].keys()
@@ -194,8 +191,7 @@
# Send packet to dataplane
# Poll controller with expect message type packet in
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# These will get put into function
of_ports = config["port_map"].keys()
@@ -248,8 +244,7 @@
# Send packet to dataplane
# Poll controller with expect message type packet in
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# These will get put into function
of_ports = config["port_map"].keys()
diff --git a/tests/bsn_ipmask.py b/tests/bsn_ipmask.py
index 51f2213..65885f0 100644
--- a/tests/bsn_ipmask.py
+++ b/tests/bsn_ipmask.py
@@ -144,8 +144,7 @@
pkt3 = simple_tcp_packet(ip_dst=ip3)
msg = lambda ip: logging.info("Testing dest IP %s" % ip)
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
self.controller.message_send(flow_msg_create(
self, pkt0, ing_port=ports[0], egr_ports=[ports[1]],
diff --git a/tests/bsn_mirror.py b/tests/bsn_mirror.py
index 8a713be..ebf0f75 100644
--- a/tests/bsn_mirror.py
+++ b/tests/bsn_mirror.py
@@ -150,8 +150,7 @@
flow_mod.actions.add(act1)
flow_mod.actions.add(act2)
flow_mod.actions.add(act3)
- self.assertEqual(delete_all_flows(self.controller), 0,
- "Failed to delete all flows")
+ delete_all_flows(self.controller)
self.controller.message_send(flow_mod)
self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
diff --git a/tests/caps.py b/tests/caps.py
index 9f80d4b..b546513 100644
--- a/tests/caps.py
+++ b/tests/caps.py
@@ -29,8 +29,7 @@
of_ports = config["port_map"].keys()
of_ports.sort()
- rv = delete_all_flows(obj.controller)
- obj.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(obj.controller)
pkt = simple_tcp_packet()
match = packet_to_flow_match(obj, pkt)
@@ -87,7 +86,7 @@
logging.error("RESULT: " + str(active_flows) + " flows reported")
# clean up and wait a bit in case the table is really big
- rv = delete_all_flows(obj.controller)
+ delete_all_flows(obj.controller)
time.sleep(flow_count / 100)
diff --git a/tests/counters.py b/tests/counters.py
index 46566cc..4caae4f 100644
--- a/tests/counters.py
+++ b/tests/counters.py
@@ -47,8 +47,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Insert any flow")
logging.info("Sending N Packets matching the flow")
@@ -80,8 +79,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Insert any flow")
logging.info("Sending N Packets matching the flow")
@@ -114,8 +112,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Insert any flow")
logging.info("Send Flow_stats request after n sec intervals")
@@ -157,8 +154,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
# Clear Switch State
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Insert a flow with match on ingress_port")
logging.info("Send N Packets on an ingress_port P ")
@@ -193,8 +189,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Insert any flow matching on in_port=ingress_port, action output to egress_port T ")
logging.info("Send N Packets matching the flow on ingress_port P ")
@@ -231,8 +226,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch State
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Insert any flow matching on in_port=ingress_port")
logging.info("Send N Packets matching the flow on ingress_port P ")
@@ -269,8 +263,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch State
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Insert any flow matching on in_port=ingress_port,action = output to egress_port T")
logging.info("Send N Packets matching the flow on ingress_port P ")
@@ -306,8 +299,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear Switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Insert any flow matching on in_port=ingress_port,action = output to egress_port T ")
logging.info("Send Table_Stats, verify active_count counter is incremented in accordance")
@@ -333,8 +325,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear Switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Insert any flow matching on in_port=ingress_port,action = output to egress_port")
logging.info("Send N packets matching the flow, N' packets not matching the flow")
@@ -385,8 +376,7 @@
for egress_queue_id in queue_id:
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# Get Queue stats for selected egress queue only
(qs_before,p) = get_queuestats(self,egress_port,egress_queue_id)
@@ -425,8 +415,7 @@
for egress_queue_id in queue_id:
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# Get Queue stats for selected egress queue only
(qs_before,p) = get_queuestats(self,egress_port,egress_queue_id)
@@ -455,8 +444,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch State
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Send Port_Stats Request")
logging.info("Verify reply has rx_dropped count ")
@@ -482,8 +470,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch State
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Send Port_Stats Request")
logging.info("Verify reply has tx_dropped count ")
@@ -510,8 +497,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch State
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Send Port_Stats Request")
logging.info("Verify reply has rx_errors count ")
@@ -536,8 +522,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch State
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Send Port_Stats Request")
logging.info("Verify reply has Tx_errors count ")
@@ -562,8 +547,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch State
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Send Port_Stats Request")
logging.info("Verify reply has rx_frame_err count ")
@@ -589,8 +573,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch State
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Send Port_Stats Request")
logging.info("Verify reply has rx_over_err count ")
@@ -617,8 +600,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch State
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Send Port_Stats Request")
logging.info("Verify reply has rx_crc_err count ")
@@ -644,8 +626,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch State
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Send Port_Stats Request")
logging.info("Verify reply has Collisions count ")
@@ -672,8 +653,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch State
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Send Queue_Stats Request")
logging.info("Verify reply has Tramitted Overrun errors count ")
diff --git a/tests/detailed_contr_sw_messages.py b/tests/detailed_contr_sw_messages.py
index 3ca0038..31c3393 100644
--- a/tests/detailed_contr_sw_messages.py
+++ b/tests/detailed_contr_sw_messages.py
@@ -36,8 +36,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear Switch State
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Inserting two overlapping flows")
logging.info("Expecting switch to return an error")
@@ -95,8 +94,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear Switch State
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Inserting two overlapping flows")
logging.info("Expecting switch to insert the flows without generating errors")
@@ -127,8 +125,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Inserting two identical flows one by one")
logging.info("Expecting switch to overwrite the first flow and clear the counters associated with it ")
@@ -168,8 +165,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Inserting an emergency flow with timeout values")
logging.info("Expecting switch to generate error ")
@@ -222,8 +218,7 @@
logging.info("Expecting flow to get added i.e OFPFC_MODIFY command should be taken as OFPFC_ADD ")
#Clear Switch State
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
#Generate a flow-mod,command OFPC_MODIFY
@@ -258,8 +253,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Inserting a Flow and incrementing flow counters. Modifying the flow action")
logging.info("Expecting the flow action to be modified , but the flow-counters should be preserved")
@@ -296,8 +290,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Inserting Flows and incrementing flow counters. Strict Modify the flow action ")
logging.info("Expecting the flow action to be modified , but the flow-counters should be preserved")
@@ -340,8 +333,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Deleting a non-existing flow")
logging.info("Expecting switch to ignore the command , without generating errors")
@@ -376,8 +368,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear swicth state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Inserting flows F1 and F2 without and with send_flow_removed_message flag set ")
logging.info("Deleting the flows")
@@ -411,8 +402,7 @@
self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
# Delete the flow-2
- rc2 = delete_all_flows(self.controller)
- self.assertEqual(rc2, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# Verify flow removed message is generated for the FLOW-2
@@ -435,8 +425,7 @@
of_ports.sort()
#Clear switch state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Inserting a emergency flow with send_flow_removed flag set")
logging.info("Expecting no flow_removed_message on the deletion of the emergency flow")
@@ -478,8 +467,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Inserting a flow with exact match")
logging.info("Issue Strict Delete command , verify it gets deleted")
@@ -565,8 +553,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Inserting a flow with output action --> of_port[1]")
logging.info("Deleting the flow but with out_port set to of_port[2]")
@@ -621,8 +608,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Inserting flow entry with idle_timeout set. Also send_flow_removed_message flag set")
logging.info("Expecting the flow entry to delete with given idle_timeout")
@@ -665,8 +651,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Adding and modifying flow with out_port fields set")
logging.info("Expecting switch to ignore out_port")
@@ -705,8 +690,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Inserting flow entry with hard_timeout set. Also send_flow_removed_message flag set")
logging.info("Expecting the flow entry to delete with given hard_timeout")
@@ -752,8 +736,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear switch state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Inserting flow entry with hard_timeout set and send_flow_removed_message flag not set")
logging.info("Expecting the flow entry to delete, but no flow removed message")
diff --git a/tests/flow_expire.py b/tests/flow_expire.py
index 705cab0..ece6dcd 100644
--- a/tests/flow_expire.py
+++ b/tests/flow_expire.py
@@ -37,8 +37,7 @@
of_ports.sort()
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
pkt = simple_tcp_packet()
match = packet_to_flow_match(self, pkt)
diff --git a/tests/flow_matches.py b/tests/flow_matches.py
index e90ddd0..862633d 100644
--- a/tests/flow_matches.py
+++ b/tests/flow_matches.py
@@ -38,8 +38,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear Switch State
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Inserting an all wildcarded flow and sending packets with various match fields")
logging.info("Expecting all sent packets to match")
@@ -95,8 +94,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear Switch State
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
egress_port=of_ports[1]
no_ports=set(of_ports).difference([egress_port])
@@ -135,8 +133,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear Switch State
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
egress_port=of_ports[1]
no_ports=set(of_ports).difference([egress_port])
@@ -177,8 +174,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear Switch State
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
egress_port=of_ports[1]
no_ports=set(of_ports).difference([egress_port])
@@ -219,8 +215,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear Switch State
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
egress_port=of_ports[1]
no_ports=set(of_ports).difference([egress_port])
@@ -257,8 +252,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear Switch State
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
egress_port=of_ports[1]
no_ports=set(of_ports).difference([egress_port])
@@ -298,8 +292,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear Switch State
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
egress_port=of_ports[1]
no_ports=set(of_ports).difference([egress_port])
@@ -339,8 +332,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear Switch State
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
egress_port=of_ports[1]
no_ports=set(of_ports).difference([egress_port])
@@ -393,8 +385,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear Switch State
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
egress_port=of_ports[1]
no_ports=set(of_ports).difference([egress_port])
@@ -432,8 +423,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear Switch State
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
egress_port=of_ports[1]
no_ports=set(of_ports).difference([egress_port])
@@ -472,8 +462,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear Switch State
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
egress_port=of_ports[1]
no_ports=set(of_ports).difference([egress_port])
@@ -511,8 +500,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear Switch State
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
egress_port=of_ports[1]
no_ports=set(of_ports).difference([egress_port])
@@ -551,8 +539,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear Switch State
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
egress_port=of_ports[1]
no_ports=set(of_ports).difference([egress_port])
@@ -591,8 +578,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear Switch State
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
egress_port=of_ports[1]
no_ports=set(of_ports).difference([egress_port])
@@ -638,8 +624,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear Switch State
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
egress_port=of_ports[2]
no_ports=set(of_ports).difference([egress_port])
@@ -674,8 +659,7 @@
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
#Clear Switch State
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
egress_port=of_ports[1]
no_ports=set(of_ports).difference([egress_port])
diff --git a/tests/flow_query.py b/tests/flow_query.py
index b205101..5c5954e 100644
--- a/tests/flow_query.py
+++ b/tests/flow_query.py
@@ -1582,8 +1582,7 @@
# Clear all flows from switch
logging.info("Deleting all flows from switch")
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# Get switch capabilites
@@ -1685,8 +1684,7 @@
# Clear all flows from switch
logging.info("Deleting all flows from switch")
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# Get switch capabilites
@@ -1801,8 +1799,7 @@
# Clear all flows from switch
logging.info("Deleting all flows from switch")
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# Get switch capabilites
@@ -1933,8 +1930,7 @@
# Clear all flows from switch
logging.info("Deleting all flows from switch")
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# Get switch capabilites
@@ -2055,8 +2051,7 @@
# Clear all flows from switch
logging.info("Deleting all flows from switch")
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# Get switch capabilites
@@ -2182,8 +2177,7 @@
# Clear all flows from switch
logging.info("Deleting all flows from switch")
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# Get switch capabilites
@@ -2309,8 +2303,7 @@
# Clear all flows from switch
logging.info("Deleting all flows from switch")
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# Get switch capabilites
@@ -2460,8 +2453,7 @@
# Clear all flows from switch
logging.info("Deleting all flows from switch")
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# Get switch capabilites
@@ -2553,8 +2545,7 @@
# Clear all flows from switch
logging.info("Deleting all flows from switch")
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# Get switch capabilites
@@ -2669,8 +2660,7 @@
# Clear all flows from switch
logging.info("Deleting all flows from switch")
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# Get switch capabilites
@@ -2793,8 +2783,7 @@
# Clear all flows from switch
logging.info("Deleting all flows from switch")
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# Get switch capabilites
@@ -2950,8 +2939,7 @@
# Clear all flows from switch
logging.info("Deleting all flows from switch")
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# Get switch capabilites
diff --git a/tests/flow_stats.py b/tests/flow_stats.py
index e8322fd..a96bb45 100644
--- a/tests/flow_stats.py
+++ b/tests/flow_stats.py
@@ -119,8 +119,7 @@
of_ports.sort()
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# build packet
pkt = simple_tcp_packet()
@@ -259,8 +258,7 @@
egress_port1 = of_ports[1];
egress_port2 = of_ports[2];
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
pkt1 = simple_tcp_packet()
flow_mod_msg1 = self.buildFlowModMsg(pkt1, ingress_port, egress_port1)
@@ -371,8 +369,7 @@
egress_port1 = of_ports[1];
egress_port2 = of_ports[2];
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
pkt1 = simple_tcp_packet()
flow_mod_msg1 = self.buildFlowModMsg(pkt1, ingress_port, egress_port1)
@@ -415,8 +412,7 @@
the query doesn't match any flows.
"""
def runTest(self):
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
match = ofp.ofp_match()
match.wildcards = 0
stat_req = message.flow_stats_request()
@@ -436,8 +432,7 @@
the query doesn't match any flows.
"""
def runTest(self):
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
match = ofp.ofp_match()
match.wildcards = 0
stat_req = message.aggregate_stats_request()
@@ -473,8 +468,7 @@
of_ports.sort()
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# build packet
pkt = simple_tcp_packet()
@@ -515,8 +509,7 @@
# delete flow
logging.info("Deleting flow")
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# wait for flow_removed message
flow_removed, _ = self.controller.poll(
diff --git a/tests/load.py b/tests/load.py
index d3d3ca6..7f8f7dd 100644
--- a/tests/load.py
+++ b/tests/load.py
@@ -97,8 +97,7 @@
# Clear the flow table when done
logging.debug("Deleting all flows from switch")
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
class PacketInLoad(base_tests.SimpleDataPlane):
"""
@@ -113,8 +112,7 @@
# Send packet to dataplane, once to each port
# Poll controller with expect message type packet in
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
out_count = 0
in_count = 0
@@ -157,8 +155,7 @@
# Send packet to dataplane
# Poll controller with expect message type packet in
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# These will get put into function
of_ports = config["port_map"].keys()
@@ -235,8 +232,7 @@
for i in range(3):
logging.info("Iteration %d: delete all flows" % i)
- self.assertEqual(delete_all_flows(self.controller), 0,
- "Failed to delete all flows")
+ delete_all_flows(self.controller)
self.checkBarrier()
logging.info("Iteration %d: add %s flows" % (i, num_flows))
diff --git a/tests/message_types.py b/tests/message_types.py
index 0a72acd..21e92d7 100644
--- a/tests/message_types.py
+++ b/tests/message_types.py
@@ -297,8 +297,7 @@
of_ports.sort()
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
#Send a set_config_request message
miss_send_len = [0 ,32 ,64,100]
@@ -345,8 +344,7 @@
of_ports.sort()
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
#Create a simple tcp packet
pkt = simple_tcp_packet()
@@ -404,8 +402,7 @@
of_ports.sort()
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
#Set miss_send_len field
logging.info("Sending set_config_request to set miss_send_len... ")
@@ -451,8 +448,7 @@
of_ports.sort()
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# Create a simple tcp packet
pkt = simple_tcp_packet()
@@ -509,8 +505,7 @@
of_ports = config["port_map"].keys()
#Clear switch state
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
#Bring down the port by shutting the interface connected
try:
diff --git a/tests/openflow_protocol_messages.py b/tests/openflow_protocol_messages.py
index 037209d..4f63b07 100644
--- a/tests/openflow_protocol_messages.py
+++ b/tests/openflow_protocol_messages.py
@@ -36,8 +36,7 @@
of_ports.sort()
#Clear switch state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Sending Features_Request")
logging.info("Expecting Features_Reply")
@@ -65,8 +64,7 @@
of_ports.sort()
#Clear switch state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Sending OFPT_GET_CONFIG_REQUEST ")
logging.info("Expecting OFPT_GET_CONFIG_REPLY ")
@@ -93,8 +91,7 @@
of_ports.sort()
#Clear switch state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Inserting a flow entry")
logging.info("Expecting active_count=1 in table_stats_reply")
@@ -122,8 +119,7 @@
of_ports.sort()
#Clear switch state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Inserting a flow entry and then deleting it")
logging.info("Expecting the active_count=0 in table_stats_reply")
@@ -157,8 +153,7 @@
of_ports.sort()
#Clear switch state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Inserting a flow entry and then modifying it")
logging.info("Expecting the Test Packet to implement the modified action")
@@ -188,8 +183,7 @@
of_ports.sort()
#Clear switch state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Inserting a flow entry and then sending flow_stats request")
logging.info("Expecting the a flow_stats_reply without errors")
@@ -214,8 +208,7 @@
of_ports.sort()
#Clear Switch state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Sending a packet-out for each dataplane port")
logging.info("Expecting the packet on appropriate dataplane port")
@@ -271,8 +264,7 @@
ingress_port = of_ports[0]
#Clear Switch state
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
logging.info("Sending a Simple tcp packet a dataplane port")
diff --git a/tests/pktact.py b/tests/pktact.py
index 4a9f7cc..3c9b04c 100644
--- a/tests/pktact.py
+++ b/tests/pktact.py
@@ -107,8 +107,7 @@
act = action.action_output()
for idx in range(len(of_ports)):
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
ingress_port = of_ports[idx]
egress_port = of_ports[(idx + 1) % len(of_ports)]
@@ -175,8 +174,7 @@
"Could not generate flow match from pkt")
act = action.action_output()
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
ingress_port = of_ports[0]
match.in_port = ingress_port
@@ -264,8 +262,7 @@
+ " queue " + str(egress_queue_id)
)
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
match.in_port = ingress_port
@@ -394,8 +391,7 @@
+ " queue " + str(egress_queue_id)
)
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
match.in_port = ingress_port
@@ -507,8 +503,7 @@
act = action.action_output()
for idx in range(len(of_ports)):
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
ingress_port = of_ports[idx]
egress_port1 = of_ports[(idx + 1) % len(of_ports)]
@@ -566,8 +561,7 @@
act = action.action_output()
for ingress_port in of_ports:
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Ingress " + str(ingress_port) +
" all non-ingress ports")
@@ -619,8 +613,7 @@
act = action.action_output()
for ingress_port in of_ports:
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Ingress " + str(ingress_port) + " to all ports")
match.in_port = ingress_port
@@ -667,8 +660,7 @@
act = action.action_output()
for ingress_port in of_ports:
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Ingress " + str(ingress_port) + " to all ports")
match.in_port = ingress_port
@@ -714,8 +706,7 @@
act = action.action_output()
for ingress_port in of_ports:
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Ingress " + str(ingress_port) + " to all ports")
match.in_port = ingress_port
@@ -760,8 +751,7 @@
act = action.action_output()
for ingress_port in of_ports:
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Ingress " + str(ingress_port) + " to all ports")
match.in_port = ingress_port
@@ -807,8 +797,7 @@
act = action.action_output()
for ingress_port in of_ports:
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
logging.info("Ingress " + str(ingress_port) + " to all ports")
match.in_port = ingress_port
@@ -861,8 +850,7 @@
self.assertEqual(rv, 0, "Failed to set port config")
for idx in range(len(of_ports)):
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
ingress_port = of_ports[idx]
no_flood_idx = (idx + 1) % len(of_ports)
@@ -963,8 +951,7 @@
self.flowMsgs = {}
def _ClearTable(self):
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
def runTest(self):
@@ -1356,8 +1343,7 @@
ing_port = of_ports[0]
egr_ports = of_ports[1]
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
len_untagged = 100
len_w_vid = 104
@@ -2064,8 +2050,7 @@
of_ports.sort()
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
- rv = delete_all_flows(self.controller)
- self.assertEqual(rv, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
ingress_port = of_ports[0]
egress_port = of_ports[1]
diff --git a/tests/port_stats.py b/tests/port_stats.py
index bacf1d8..29b04ae 100644
--- a/tests/port_stats.py
+++ b/tests/port_stats.py
@@ -148,8 +148,7 @@
of_ports.sort()
self.assertTrue(len(of_ports) > 1, "Not enough ports for test")
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
# build packet
pkt = simple_tcp_packet()
@@ -236,8 +235,7 @@
egress_port1 = of_ports[1];
egress_port2 = of_ports[2];
- rc = delete_all_flows(self.controller)
- self.assertEqual(rc, 0, "Failed to delete all flows")
+ delete_all_flows(self.controller)
pkt1 = simple_tcp_packet()
flow_mod_msg1 = self.buildFlowModMsg(pkt1, ingress_port, egress_port1)