testing vlan untag
diff --git a/ofdpa/dev.py b/ofdpa/dev.py
index ba850a6..b5140b4 100644
--- a/ofdpa/dev.py
+++ b/ofdpa/dev.py
@@ -13,6 +13,7 @@
from oftest.testutils import *
from accton_util import *
+@disabled
class Purge(base_tests.SimpleDataPlane):
def runTest(self):
delete_all_flows(self.controller)
@@ -21,7 +22,7 @@
add_vlan_table_flow(self.controller, config["port_map"].keys(), 1)
verify_no_other_packets(self)
-
+@disabled
class FlowStats(base_tests.SimpleProtocol):
"""
Flow stats multipart transaction
@@ -35,3 +36,64 @@
for entry in stats:
print(entry.show())
+class TagFlow20to10(base_tests.SimpleDataPlane):
+ def runTest(self):
+ do_barrier(self.controller)
+ for port in config["port_map"].keys():
+ add_one_vlan_table_flow(self.controller, port, 10)
+ do_barrier(self.controller)
+ logging.info("Sending flow stats request")
+ stats = get_flow_stats(self, ofp.match())
+ print "STATS"
+ for entry in stats:
+ print(entry.show())
+ print "END"
+ do_barrier(self.controller)
+ verify_no_other_packets(self)
+@disabled
+class UnTagFlow0(base_tests.SimpleDataPlane):
+ def runTest(self):
+ do_barrier(self.controller)
+ for port in config["port_map"].keys():
+ add_untag_vlan_table_flow(self.controller, port, 0x0000, 0x1000)
+ do_barrier(self.controller)
+ logging.info("Sending flow stats request")
+ stats = get_flow_stats(self, ofp.match())
+ print "STATS"
+ for entry in stats:
+ print(entry.show())
+ print "END"
+ do_barrier(self.controller)
+ verify_no_other_packets(self)
+
+class UnTagFlow10(base_tests.SimpleDataPlane):
+ def runTest(self):
+ do_barrier(self.controller)
+ for port in config["port_map"].keys():
+ add_untag_vlan_table_flow(self.controller, port, 0x0000, 0x1fff)
+ do_barrier(self.controller)
+ logging.info("Sending flow stats request")
+ stats = get_flow_stats(self, ofp.match())
+ print "STATS"
+ for entry in stats:
+ print(entry.show())
+ print "END"
+ do_barrier(self.controller)
+ verify_no_other_packets(self)
+
+
+@disabled
+class UnTagFlow1(base_tests.SimpleDataPlane):
+ def runTest(self):
+ do_barrier(self.controller)
+ for port in config["port_map"].keys():
+ add_untag_vlan_table(self.controller, port)
+ do_barrier(self.controller)
+ logging.info("Sending flow stats request")
+ stats = get_flow_stats(self, ofp.match())
+ print "STATS"
+ for entry in stats:
+ print(entry.show())
+ print "END"
+ do_barrier(self.controller)
+ verify_no_other_packets(self)