format is defined in builtin, so it should be avoid for argument.
use flow_format instead.

Cc: Simon Horman <[email protected]>
Signed-off-by: Isaku Yamahata <[email protected]>
---
 ryu/controller/controller.py       |   12 ++++++------
 ryu/ofproto/ofproto_v1_0_parser.py |    4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/ryu/controller/controller.py b/ryu/controller/controller.py
index 100313e..1787f3d 100644
--- a/ryu/controller/controller.py
+++ b/ryu/controller/controller.py
@@ -243,14 +243,14 @@ class Datapath(object):
         barrier_request = self.ofproto_parser.OFPBarrierRequest(self)
         self.send_msg(barrier_request)
 
-    def send_nxt_set_flow_format(self, format):
-        assert (format == ofproto_v1_0.NXFF_OPENFLOW10 or
-                format == ofproto_v1_0.NXFF_NXM)
-        if self.flow_format == format:
+    def send_nxt_set_flow_format(self, flow_format):
+        assert (flow_format == ofproto_v1_0.NXFF_OPENFLOW10 or
+                flow_format == ofproto_v1_0.NXFF_NXM)
+        if self.flow_format == flow_format:
             # Nothing to do
             return
-        self.flow_format = format
-        set_format = self.ofproto_parser.NXTSetFlowFormat(self, format)
+        self.flow_format = flow_format
+        set_format = self.ofproto_parser.NXTSetFlowFormat(self, flow_format)
         # FIXME: If NXT_SET_FLOW_FORMAT or NXFF_NXM is not supported by
         # the switch then an error message will be received. It may be
         # handled by setting self.flow_format to
diff --git a/ryu/ofproto/ofproto_v1_0_parser.py 
b/ryu/ofproto/ofproto_v1_0_parser.py
index 72631da..a13f972 100644
--- a/ryu/ofproto/ofproto_v1_0_parser.py
+++ b/ryu/ofproto/ofproto_v1_0_parser.py
@@ -731,10 +731,10 @@ class NXTRequest(OFPVendor):
 
 
 class NXTSetFlowFormat(NXTRequest):
-    def __init__(self, datapath, format):
+    def __init__(self, datapath, flow_format):
         super(NXTSetFlowFormat, self).__init__(
             datapath, ofproto_v1_0.NXT_SET_FLOW_FORMAT)
-        self.format = format
+        self.format = flow_format
 
     def _serialize_body(self):
         self.serialize_header()
-- 
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