more refactor
diff --git a/olt.py b/olt.py
index 268878d..2ee6d20 100644
--- a/olt.py
+++ b/olt.py
@@ -670,12 +670,12 @@
def runTest(self):
logging.info("Testing Rule removal")
delete_all_flows(self.controller)
- processEapolRule(self, onu_port)
+ self.processEapolRule(onu_port)
#wait for the rule to settle
time.sleep(3)
- installDoubleTaggingRules(1, 2, self.controller)
+ self.installDoubleTaggingRules(1, 2)
#wait for the rules to settle
time.sleep(3)
@@ -685,7 +685,7 @@
self.assertTrue(len(stats) == 5, \
"Wrong number of rules reports; reported %s, expected 5\n\n %s" % (len(stats), stats))
- processEapolRule(self, onu_port, install = False)
+ self.processEapolRule(onu_port, install = False)
time.sleep(3)
stats = get_flow_stats(self, ofp.match())
@@ -724,7 +724,7 @@
time.sleep(10)
# Test packet flows
- testPacketFlow(self, c_vlan_id, s_vlan_id)
+ self.testPacketFlow(c_vlan_id, s_vlan_id)
# clean up the test
delete_all_flows(self.controller)
@@ -742,9 +742,9 @@
for ctag in xrange(2, 4000, 100):
delete_all_flows(self.controller)
time.sleep(5)
- installDoubleTaggingRules(stag, ctag, self.controller)
+ self.installDoubleTaggingRules(stag, ctag)
time.sleep(5)
- testPacketFlow(self, ctag, stag)
+ self.testPacketFlow(ctag, stag)
diff --git a/oltbase.py b/oltbase.py
index 2860404..ba72e8e 100644
--- a/oltbase.py
+++ b/oltbase.py
@@ -4,6 +4,7 @@
from oftest.testutils import *
from oltconstants import *
import copy
+import logging
class OltBaseTest(base_tests.SimpleDataPlane):
@@ -87,7 +88,7 @@
# test upstream untagged packet got double tag at OLT
self.dataplane.send(onu_port, str(zeroTaggedPkt))
- verify_packet(test, upstreamDoubleTaggedPkt, olt_port)
+ verify_packet(self, upstreamDoubleTaggedPkt, olt_port)
# test downstream doubletagged packet got untagged at ONU
self.dataplane.send(olt_port, str(upstreamDoubleTaggedPkt))