In of1.4 spec, enum name has been changed as follows:
of1.3.4 spec:
OFPR_NO_MATCH = 0, / * No matching flow (table-miss flow entry). * /
of1.4 spec:
OFPR_TABLE_MISS = 0, / * No matching flow (table-miss flow entry). * /
Along with this change, AttributeError has occurred in the process of
comparison of the received message.
This patch fixes this problem.
Signed-off-by: Minoru TAKAHASHI <[email protected]>
---
ryu/tests/switch/tester.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/ryu/tests/switch/tester.py b/ryu/tests/switch/tester.py
index 1f14b89..82120f8 100644
--- a/ryu/tests/switch/tester.py
+++ b/ryu/tests/switch/tester.py
@@ -706,10 +706,15 @@ class OfTester(app_manager.RyuApp):
model_pkt = (pkt[KEY_EGRESS] if KEY_EGRESS in pkt
else pkt[KEY_PKT_IN])
+ if hasattr(msg.datapath.ofproto, "OFPR_NO_MATCH"):
+ table_miss_value = msg.datapath.ofproto.OFPR_NO_MATCH
+ else:
+ table_miss_value = msg.datapath.ofproto.OFPR_TABLE_MISS
+
if msg.datapath.id != pkt_in_src_model.dp.id:
pkt_type = 'packet-in'
err_msg = 'SW[dpid=%s]' % dpid_lib.dpid_to_str(msg.datapath.id)
- elif msg.reason == msg.datapath.ofproto.OFPR_NO_MATCH or \
+ elif msg.reason == table_miss_value or \
msg.reason == msg.datapath.ofproto.OFPR_INVALID_TTL:
pkt_type = 'packet-in'
err_msg = 'OFPPacketIn[reason=%d]' % msg.reason
--
1.9.1
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel