diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2013-09-26 10:28:20 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2013-09-27 02:43:33 +0900 |
commit | 094a1da9891c7eb13686c2fa360bbfbf2f508dc8 (patch) | |
tree | d183b5ca982e58dc5e6d688be0cf53b27af634d0 | |
parent | 8cbfc3f55a4f22077f9a6723b8938df0db61b121 (diff) |
of1.2: set default arguments for FlowStatsRequest
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/ofproto/ofproto_v1_2_parser.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ryu/ofproto/ofproto_v1_2_parser.py b/ryu/ofproto/ofproto_v1_2_parser.py index db36ce29..02159038 100644 --- a/ryu/ofproto/ofproto_v1_2_parser.py +++ b/ryu/ofproto/ofproto_v1_2_parser.py @@ -1983,8 +1983,10 @@ class OFPFlowStatsRequest(OFPStatsRequest): cookie, cookie_mask, match) datapath.send_msg(req) """ - def __init__(self, datapath, table_id, out_port, out_group, - cookie, cookie_mask, match, flags=0): + def __init__(self, datapath, table_id=ofproto_v1_2.OFPTT_ALL, + out_port=ofproto_v1_2.OFPP_ANY, + out_group=ofproto_v1_2.OFPG_ANY, + cookie=0, cookie_mask=0, match=None, flags=0): super(OFPFlowStatsRequest, self).__init__(datapath, ofproto_v1_2.OFPST_FLOW, flags) @@ -1993,6 +1995,8 @@ class OFPFlowStatsRequest(OFPStatsRequest): self.out_group = out_group self.cookie = cookie self.cookie_mask = cookie_mask + if match is None: + match = OFPMatch() self.match = match def _serialize_stats_body(self): |