initialize subtype by base class, NXTRequest, instead of subclass.

Cc: Simon Horman <[email protected]>
Signed-off-by: Isaku Yamahata <[email protected]>
---
 ryu/ofproto/ofproto_v1_0_parser.py |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ryu/ofproto/ofproto_v1_0_parser.py 
b/ryu/ofproto/ofproto_v1_0_parser.py
index 13d5688..da03508 100644
--- a/ryu/ofproto/ofproto_v1_0_parser.py
+++ b/ryu/ofproto/ofproto_v1_0_parser.py
@@ -691,9 +691,10 @@ class OFPVendor(MsgBase):
 
 
 class NXTRequest(OFPVendor):
-    def __init__(self, datapath):
+    def __init__(self, datapath, subtype):
         super(NXTRequest, self).__init__(datapath)
         self.vendor = ofproto_v1_0.NX_VENDOR_ID
+        self.subtype = subtype
 
     def serialize_header(self):
         super(NXTRequest, self).serialize_header()
@@ -704,8 +705,8 @@ class NXTRequest(OFPVendor):
 
 class NXTSetFlowFormat(NXTRequest):
     def __init__(self, datapath, format):
-        super(NXTSetFlowFormat, self).__init__(datapath)
-        self.subtype = ofproto_v1_0.NXT_SET_FLOW_FORMAT
+        super(NXTSetFlowFormat, self).__init__(
+            datapath, ofproto_v1_0.NXT_SET_FLOW_FORMAT)
         self.format = format
 
     def _serialize_body(self):
@@ -718,8 +719,7 @@ class NXTFlowMod(NXTRequest):
     def __init__(self, datapath, cookie, command, idle_timeout,
                  hard_timeout, priority, buffer_id, out_port,
                  flags, rule, actions):
-        super(NXTFlowMod, self).__init__(datapath)
-        self.subtype = ofproto_v1_0.NXT_FLOW_MOD
+        super(NXTFlowMod, self).__init__(datapath, ofproto_v1_0.NXT_FLOW_MOD)
         self.cookie = cookie
         self.command = command
         self.idle_timeout = idle_timeout
-- 
1.7.1.1


------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to