If you use initialize like the following way:

OFPSetConfig(dp, miss_send_len=1600)

You get the following assertion when it's serialized:

File "/Users/fujita/git/ryu/ryu/ofproto/ofproto_v1_2_parser.py", line 244, in 
_serialize_body
  assert self.flags is not None

Signed-off-by: FUJITA Tomonori <fujita.tomon...@lab.ntt.co.jp>
---
 ryu/ofproto/ofproto_v1_2_parser.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ryu/ofproto/ofproto_v1_2_parser.py 
b/ryu/ofproto/ofproto_v1_2_parser.py
index 61618a8..f52c199 100644
--- a/ryu/ofproto/ofproto_v1_2_parser.py
+++ b/ryu/ofproto/ofproto_v1_2_parser.py
@@ -235,7 +235,7 @@ class OFPGetConfigReply(MsgBase):
 
 @_set_msg_type(ofproto_v1_2.OFPT_SET_CONFIG)
 class OFPSetConfig(MsgBase):
-    def __init__(self, datapath, flags=None, miss_send_len=None):
+    def __init__(self, datapath, flags=0, miss_send_len=0):
         super(OFPSetConfig, self).__init__(datapath)
         self.flags = flags
         self.miss_send_len = miss_send_len
-- 
1.7.12.4 (Apple Git-37)


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to