Changes to work on OLT again
diff --git a/olt.py b/olt.py
index 5b15771..80f9169 100644
--- a/olt.py
+++ b/olt.py
@@ -176,8 +176,8 @@
self.dataplane.send(olt_port, str(inPkt))
verify_packet(self, inPkt, onu_port)
# upstream
- self.dataplane.send(olt_port, str(inPkt))
- verify_packet(self, inPkt, onu_port)
+ self.dataplane.send(onu_port, str(inPkt))
+ verify_packet(self, inPkt, olt_port)
# clean up the test
meter_mod = ofp.message.meter_mod(xid = 2, command = ofp.OFPMC_DELETE, meter_id = 1)
@@ -201,7 +201,7 @@
try:
verify_no_errors(self.controller)
except AssertionError as e:
- if (not e.message is "unexpected error type=12 code=1"):
+ if (not e.message == "unexpected error type=12 code=1"):
raise AssertionError("Incorrect error type: %s" % e.message)
@@ -252,7 +252,7 @@
ofp.instruction.apply_actions(
actions=[
ofp.action.pop_vlan(),
- ofp.action.output(port=1)])],
+ ofp.action.output(port=onu_port)])],
buffer_id=ofp.OFP_NO_BUFFER,
priority=1000)
@@ -500,9 +500,9 @@
def runTest(self):
logging.info("Running Group datapath forwarding tests")
delete_all_flows(self.controller)
- delete_all_groups(self.controller)
+ #delete_all_groups(self.controller)
- vlan_id = 200
+ vlan_id = 201
# Create a group
test_group_id = 1
@@ -530,7 +530,9 @@
self.controller.message_send(request)
do_barrier(self.controller)
verify_no_errors(self.controller)
- do_barrier(self.controller)
+
+ # It takes some time for flows to propagate down to the data plane
+ time.sleep(2)
inPkt = simple_udp_packet(pktlen=104,dl_vlan_enable=True,
vlan_vid=vlan_id, vlan_pcp=0, dl_vlan_cfi=0)
@@ -545,6 +547,9 @@
do_barrier(self.controller)
verify_no_errors(self.controller)
+ # It takes some time for flows to propagate down to the data plane
+ time.sleep(2)
+
self.dataplane.send(olt_port, str(inPkt))
verify_packet(self, outPkt, onu_port)
verify_packet(self, outPkt, onu_port2)
@@ -563,6 +568,7 @@
def runTest(self):
logging.info("Running transparent vlan tests")
+ delete_all_flows(self.controller)
vlan_id = 201
match = ofp.match()
@@ -603,6 +609,8 @@
do_barrier(self.controller)
verify_no_errors(self.controller)
+ # It takes some time for flows to propagate down to the data plane
+ time.sleep(2)
inPkt = simple_udp_packet(dl_vlan_enable=True, vlan_vid=vlan_id, vlan_pcp=0)
# downstream