Refactored some tests
diff --git a/ofdpa/flows.py b/ofdpa/flows.py
index 00a4f1a..44184b3 100644
--- a/ofdpa/flows.py
+++ b/ofdpa/flows.py
@@ -69,7 +69,7 @@
# create match
match = ofp.match()
match.oxm_list.append(ofp.oxm.eth_type(0x0800))
- match.oxm_list.append(ofp.oxm.ip_proto(2))
+ match.oxm_list.append(ofp.oxm.ip_proto(17))
request = ofp.message.flow_add(
table_id=60,
cookie=42,
@@ -783,8 +783,9 @@
delete_all_flows(self.controller)
delete_all_groups(self.controller)
- if len(config["port_map"]) <2:
- logging.info("Port count less than 2, can't run this case")
+ if len(config["port_map"]) <3:
+ logging.info("Port count less than 3, can't run this case")
+ assert(False)
return
vlan_id =300
@@ -849,7 +850,8 @@
delete_all_groups(self.controller)
if len(config["port_map"]) <3:
- logging.info("Port count less than 2, can't run this case")
+ logging.info("Port count less than 3, can't run this case")
+ assert(False)
return
vlan_id =1
@@ -918,7 +920,8 @@
#delete_all_groups(self.controller)
if len(config["port_map"]) <3:
- logging.info("Port count less than 2, can't run this case")
+ logging.info("Port count less than 3, can't run this case")
+ assert(False)
return
vlan_id =1
@@ -985,5 +988,3 @@
verify_packet(self, pkt, port2)
verify_packet(self, pkt, port3)
verify_no_other_packets(self)
-
-