summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2012-04-04 18:37:53 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2012-05-01 08:44:02 +0900
commit57bd1abe5c6abdf6e6dff2c85fd75079ae7a3909 (patch)
tree5328a15cbe8b47a6617c7a0d7194fd3d57df4083
parent7858adf321b48821e25b755498d56683d1bb62b9 (diff)
controller, ofproto_v1_0: avoid format for argument
format is defined in builtin, so it should be avoid for argument. use flow_format instead. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Reviewed-by: Simon Horman <simon@horms.net> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/controller/controller.py12
-rw-r--r--ryu/ofproto/ofproto_v1_0_parser.py4
2 files changed, 8 insertions, 8 deletions
diff --git a/ryu/controller/controller.py b/ryu/controller/controller.py
index ad6127d2..5bf71b3f 100644
--- a/ryu/controller/controller.py
+++ b/ryu/controller/controller.py
@@ -244,14 +244,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 f3fd172e..c0a323b7 100644
--- a/ryu/ofproto/ofproto_v1_0_parser.py
+++ b/ryu/ofproto/ofproto_v1_0_parser.py
@@ -732,10 +732,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()