diff options
Diffstat (limited to 'ryu/lib/ofctl_v1_2.py')
-rw-r--r-- | ryu/lib/ofctl_v1_2.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ryu/lib/ofctl_v1_2.py b/ryu/lib/ofctl_v1_2.py index 05a77adf..0b4c4156 100644 --- a/ryu/lib/ofctl_v1_2.py +++ b/ryu/lib/ofctl_v1_2.py @@ -490,7 +490,8 @@ def get_queue_config(dp, port, waiters): return configs -def get_flow_stats(dp, waiters, flow={}): +def get_flow_stats(dp, waiters, flow=None): + flow = flow if flow else {} table_id = int(flow.get('table_id', dp.ofproto.OFPTT_ALL)) out_port = int(flow.get('out_port', dp.ofproto.OFPP_ANY)) out_group = int(flow.get('out_group', dp.ofproto.OFPG_ANY)) @@ -527,7 +528,8 @@ def get_flow_stats(dp, waiters, flow={}): return flows -def get_aggregate_flow_stats(dp, waiters, flow={}): +def get_aggregate_flow_stats(dp, waiters, flow=None): + flow = flow if flow else {} table_id = int(flow.get('table_id', dp.ofproto.OFPTT_ALL)) out_port = int(flow.get('out_port', dp.ofproto.OFPP_ANY)) out_group = int(flow.get('out_group', dp.ofproto.OFPG_ANY)) @@ -880,7 +882,7 @@ def mod_group_entry(dp, group, cmd): type_ = type_convert.get(group.get('type', 'ALL')) if type_ is None: - LOG.error('Unknown type: %s', group.get('type')) + LOG.error('Unknown group type: %s', group.get('type')) group_id = int(group.get('group_id', 0)) |