summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason Kölker <jason@koelker.net>2016-03-29 19:18:35 +0000
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-03-30 08:08:40 +0900
commitcb51b6cdc3e86ea325d620612f9a8c79b8db478a (patch)
tree78ec40dfd387d1050aa02d991bb4c50bf332f79c
parentb69c5b907a28a8c44616a35a18a34c3ef95730b3 (diff)
lib/ofctl_*: Consolidate `send_stats_requst`
Signed-off-by: Jason Kölker <jason@koelker.net> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/lib/ofctl_utils.py23
-rw-r--r--ryu/lib/ofctl_v1_0.py35
-rw-r--r--ryu/lib/ofctl_v1_2.py43
-rw-r--r--ryu/lib/ofctl_v1_3.py51
-rw-r--r--ryu/lib/ofctl_v1_4.py51
5 files changed, 71 insertions, 132 deletions
diff --git a/ryu/lib/ofctl_utils.py b/ryu/lib/ofctl_utils.py
index 158f6a57..e3b80e6d 100644
--- a/ryu/lib/ofctl_utils.py
+++ b/ryu/lib/ofctl_utils.py
@@ -15,8 +15,11 @@
import logging
+from ryu.lib import hub
+
LOG = logging.getLogger(__name__)
+DEFAULT_TIMEOUT = 1.0
def str_to_int(str_num):
@@ -38,6 +41,26 @@ def send_msg(dp, msg, logger=None):
dp.send_msg(msg)
+def send_stats_request(dp, stats, waiters, msgs, logger=None):
+ dp.set_xid(stats)
+ waiters_per_dp = waiters.setdefault(dp.id, {})
+ lock = hub.Event()
+ previous_msg_len = len(msgs)
+ waiters_per_dp[stats.xid] = (lock, msgs)
+ send_msg(dp, stats, logger)
+
+ lock.wait(timeout=DEFAULT_TIMEOUT)
+ current_msg_len = len(msgs)
+
+ while current_msg_len > previous_msg_len:
+ previous_msg_len = current_msg_len
+ lock.wait(timeout=DEFAULT_TIMEOUT)
+ current_msg_len = len(msgs)
+
+ if not lock.is_set():
+ del waiters_per_dp[stats.xid]
+
+
class OFCtlUtil(object):
def __init__(self, ofproto):
diff --git a/ryu/lib/ofctl_v1_0.py b/ryu/lib/ofctl_v1_0.py
index 447397c1..b38cc12b 100644
--- a/ryu/lib/ofctl_v1_0.py
+++ b/ryu/lib/ofctl_v1_0.py
@@ -18,7 +18,6 @@ import socket
import logging
from ryu.ofproto import ofproto_v1_0
-from ryu.lib import hub
from ryu.lib import ofctl_utils
from ryu.lib.mac import haddr_to_bin, haddr_to_str
@@ -278,30 +277,10 @@ def nw_dst_to_str(wildcards, addr):
return ip
-def send_stats_request(dp, stats, waiters, msgs):
- dp.set_xid(stats)
- waiters_per_dp = waiters.setdefault(dp.id, {})
- lock = hub.Event()
- previous_msg_len = len(msgs)
- waiters_per_dp[stats.xid] = (lock, msgs)
- ofctl_utils.send_msg(dp, stats, LOG)
-
- lock.wait(timeout=DEFAULT_TIMEOUT)
- current_msg_len = len(msgs)
-
- while current_msg_len > previous_msg_len:
- previous_msg_len = current_msg_len
- lock.wait(timeout=DEFAULT_TIMEOUT)
- current_msg_len = len(msgs)
-
- if not lock.is_set():
- del waiters_per_dp[stats.xid]
-
-
def get_desc_stats(dp, waiters):
stats = dp.ofproto_parser.OFPDescStatsRequest(dp, 0)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
s = {}
for msg in msgs:
@@ -329,7 +308,7 @@ def get_queue_stats(dp, waiters, port=None, queue_id=None):
stats = dp.ofproto_parser.OFPQueueStatsRequest(dp, 0, port,
queue_id)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
s = []
for msg in msgs:
@@ -356,7 +335,7 @@ def get_flow_stats(dp, waiters, flow=None):
dp, 0, match, table_id, out_port)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
flows = []
for msg in msgs:
@@ -392,7 +371,7 @@ def get_aggregate_flow_stats(dp, waiters, flow=None):
dp, 0, match, table_id, out_port)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
flows = []
for msg in msgs:
@@ -411,7 +390,7 @@ def get_table_stats(dp, waiters):
stats = dp.ofproto_parser.OFPTableStatsRequest(dp, 0)
ofp = dp.ofproto
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
match_convert = {ofp.OFPFW_IN_PORT: 'IN_PORT',
ofp.OFPFW_DL_VLAN: 'DL_VLAN',
@@ -467,7 +446,7 @@ def get_port_stats(dp, waiters, port=None):
stats = dp.ofproto_parser.OFPPortStatsRequest(
dp, 0, port)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
ports = []
for msg in msgs:
@@ -494,7 +473,7 @@ def get_port_desc(dp, waiters):
stats = dp.ofproto_parser.OFPFeaturesRequest(dp)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
descs = []
diff --git a/ryu/lib/ofctl_v1_2.py b/ryu/lib/ofctl_v1_2.py
index 586f7c51..a1053971 100644
--- a/ryu/lib/ofctl_v1_2.py
+++ b/ryu/lib/ofctl_v1_2.py
@@ -21,7 +21,6 @@ from ryu.ofproto import ether
from ryu.ofproto import inet
from ryu.ofproto import ofproto_v1_2
from ryu.ofproto import ofproto_v1_2_parser
-from ryu.lib import hub
from ryu.lib import ofctl_utils
@@ -396,30 +395,10 @@ def match_vid_to_str(value, mask):
return value
-def send_stats_request(dp, stats, waiters, msgs):
- dp.set_xid(stats)
- waiters_per_dp = waiters.setdefault(dp.id, {})
- lock = hub.Event()
- previous_msg_len = len(msgs)
- waiters_per_dp[stats.xid] = (lock, msgs)
- ofctl_utils.send_msg(dp, stats, LOG)
-
- lock.wait(timeout=DEFAULT_TIMEOUT)
- current_msg_len = len(msgs)
-
- while current_msg_len > previous_msg_len:
- previous_msg_len = current_msg_len
- lock.wait(timeout=DEFAULT_TIMEOUT)
- current_msg_len = len(msgs)
-
- if not lock.is_set():
- del waiters_per_dp[stats.xid]
-
-
def get_desc_stats(dp, waiters):
stats = dp.ofproto_parser.OFPDescStatsRequest(dp)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
s = {}
for msg in msgs:
@@ -449,7 +428,7 @@ def get_queue_stats(dp, waiters, port=None, queue_id=None):
stats = dp.ofproto_parser.OFPQueueStatsRequest(dp, port,
queue_id, 0)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
s = []
for msg in msgs:
@@ -468,7 +447,7 @@ def get_queue_config(dp, port, waiters):
port = UTIL.ofp_port_from_user(port)
stats = dp.ofproto_parser.OFPQueueGetConfigRequest(dp, port)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
prop_type = {dp.ofproto.OFPQT_MIN_RATE: 'MIN_RATE',
dp.ofproto.OFPQT_MAX_RATE: 'MAX_RATE',
@@ -517,7 +496,7 @@ def get_flow_stats(dp, waiters, flow=None):
dp, table_id, out_port, out_group, cookie, cookie_mask, match)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
flows = []
for msg in msgs:
@@ -558,7 +537,7 @@ def get_aggregate_flow_stats(dp, waiters, flow=None):
dp, table_id, out_port, out_group, cookie, cookie_mask, match)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
flows = []
for msg in msgs:
@@ -576,7 +555,7 @@ def get_table_stats(dp, waiters):
stats = dp.ofproto_parser.OFPTableStatsRequest(dp)
ofp = dp.ofproto
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
oxm_type_convert = {ofp.OFPXMT_OFB_IN_PORT: 'IN_PORT',
ofp.OFPXMT_OFB_IN_PHY_PORT: 'IN_PHY_PORT',
@@ -706,7 +685,7 @@ def get_port_stats(dp, waiters, port=None):
stats = dp.ofproto_parser.OFPPortStatsRequest(
dp, port, 0)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
ports = []
for msg in msgs:
@@ -738,7 +717,7 @@ def get_group_stats(dp, waiters, group_id=None):
stats = dp.ofproto_parser.OFPGroupStatsRequest(
dp, group_id, 0)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
groups = []
for msg in msgs:
@@ -787,7 +766,7 @@ def get_group_features(dp, waiters):
stats = dp.ofproto_parser.OFPGroupFeaturesStatsRequest(dp, 0)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
features = []
for msg in msgs:
@@ -828,7 +807,7 @@ def get_group_desc(dp, waiters):
stats = dp.ofproto_parser.OFPGroupDescStatsRequest(dp, 0)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
descs = []
for msg in msgs:
@@ -855,7 +834,7 @@ def get_port_desc(dp, waiters):
stats = dp.ofproto_parser.OFPFeaturesRequest(dp)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
descs = []
diff --git a/ryu/lib/ofctl_v1_3.py b/ryu/lib/ofctl_v1_3.py
index 474e2fac..e28e03a3 100644
--- a/ryu/lib/ofctl_v1_3.py
+++ b/ryu/lib/ofctl_v1_3.py
@@ -21,7 +21,6 @@ from ryu.ofproto import ether
from ryu.ofproto import inet
from ryu.ofproto import ofproto_v1_3
from ryu.ofproto import ofproto_v1_3_parser
-from ryu.lib import hub
from ryu.lib import ofctl_utils
@@ -434,30 +433,10 @@ def match_vid_to_str(value, mask):
return value
-def send_stats_request(dp, stats, waiters, msgs):
- dp.set_xid(stats)
- waiters_per_dp = waiters.setdefault(dp.id, {})
- lock = hub.Event()
- previous_msg_len = len(msgs)
- waiters_per_dp[stats.xid] = (lock, msgs)
- ofctl_utils.send_msg(dp, stats, LOG)
-
- lock.wait(timeout=DEFAULT_TIMEOUT)
- current_msg_len = len(msgs)
-
- while current_msg_len > previous_msg_len:
- previous_msg_len = current_msg_len
- lock.wait(timeout=DEFAULT_TIMEOUT)
- current_msg_len = len(msgs)
-
- if not lock.is_set():
- del waiters_per_dp[stats.xid]
-
-
def get_desc_stats(dp, waiters):
stats = dp.ofproto_parser.OFPDescStatsRequest(dp, 0)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
s = {}
for msg in msgs:
@@ -487,7 +466,7 @@ def get_queue_stats(dp, waiters, port=None, queue_id=None):
stats = dp.ofproto_parser.OFPQueueStatsRequest(dp, 0, port,
queue_id)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
s = []
for msg in msgs:
@@ -508,7 +487,7 @@ def get_queue_config(dp, port, waiters):
port = UTIL.ofp_port_from_user(port)
stats = dp.ofproto_parser.OFPQueueGetConfigRequest(dp, port)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
prop_type = {dp.ofproto.OFPQT_MIN_RATE: 'MIN_RATE',
dp.ofproto.OFPQT_MAX_RATE: 'MAX_RATE',
@@ -559,7 +538,7 @@ def get_flow_stats(dp, waiters, flow=None):
match)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
flows = []
for msg in msgs:
@@ -604,7 +583,7 @@ def get_aggregate_flow_stats(dp, waiters, flow=None):
match)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
flows = []
for msg in msgs:
@@ -621,7 +600,7 @@ def get_aggregate_flow_stats(dp, waiters, flow=None):
def get_table_stats(dp, waiters):
stats = dp.ofproto_parser.OFPTableStatsRequest(dp, 0)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
tables = []
for msg in msgs:
@@ -641,7 +620,7 @@ def get_table_features(dp, waiters):
stats = dp.ofproto_parser.OFPTableFeaturesStatsRequest(dp, 0, [])
msgs = []
ofproto = dp.ofproto
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
prop_type = {ofproto.OFPTFPT_INSTRUCTIONS: 'INSTRUCTIONS',
ofproto.OFPTFPT_INSTRUCTIONS_MISS: 'INSTRUCTIONS_MISS',
@@ -742,7 +721,7 @@ def get_port_stats(dp, waiters, port=None):
stats = dp.ofproto_parser.OFPPortStatsRequest(
dp, 0, port)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
ports = []
for msg in msgs:
@@ -776,7 +755,7 @@ def get_meter_stats(dp, waiters, meter_id=None):
stats = dp.ofproto_parser.OFPMeterStatsRequest(
dp, 0, meter_id)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
meters = []
for msg in msgs:
@@ -812,7 +791,7 @@ def get_meter_features(dp, waiters):
stats = dp.ofproto_parser.OFPMeterFeaturesStatsRequest(dp, 0)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
features = []
for msg in msgs:
@@ -853,7 +832,7 @@ def get_meter_config(dp, waiters, meter_id=None):
stats = dp.ofproto_parser.OFPMeterConfigStatsRequest(
dp, 0, meter_id)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
configs = []
for msg in msgs:
@@ -889,7 +868,7 @@ def get_group_stats(dp, waiters, group_id=None):
stats = dp.ofproto_parser.OFPGroupStatsRequest(
dp, 0, group_id)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
groups = []
for msg in msgs:
@@ -942,7 +921,7 @@ def get_group_features(dp, waiters):
stats = dp.ofproto_parser.OFPGroupFeaturesStatsRequest(dp, 0)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
features = []
for msg in msgs:
@@ -983,7 +962,7 @@ def get_group_desc(dp, waiters):
stats = dp.ofproto_parser.OFPGroupDescStatsRequest(dp, 0)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
descs = []
for msg in msgs:
@@ -1010,7 +989,7 @@ def get_port_desc(dp, waiters):
stats = dp.ofproto_parser.OFPPortDescStatsRequest(dp, 0)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
descs = []
diff --git a/ryu/lib/ofctl_v1_4.py b/ryu/lib/ofctl_v1_4.py
index 75b7db5c..ca1ff3e1 100644
--- a/ryu/lib/ofctl_v1_4.py
+++ b/ryu/lib/ofctl_v1_4.py
@@ -21,7 +21,6 @@ import six
from ryu.ofproto import ether
from ryu.ofproto import ofproto_v1_4
from ryu.ofproto import ofproto_v1_4_parser
-from ryu.lib import hub
from ryu.lib import ofctl_utils
LOG = logging.getLogger(__name__)
@@ -348,30 +347,10 @@ def match_vid_to_str(value, mask):
return value
-def send_stats_request(dp, stats, waiters, msgs):
- dp.set_xid(stats)
- waiters_per_dp = waiters.setdefault(dp.id, {})
- lock = hub.Event()
- previous_msg_len = len(msgs)
- waiters_per_dp[stats.xid] = (lock, msgs)
- ofctl_utils.send_msg(dp, stats, LOG)
-
- lock.wait(timeout=DEFAULT_TIMEOUT)
- current_msg_len = len(msgs)
-
- while current_msg_len > previous_msg_len:
- previous_msg_len = current_msg_len
- lock.wait(timeout=DEFAULT_TIMEOUT)
- current_msg_len = len(msgs)
-
- if not lock.is_set():
- del waiters_per_dp[stats.xid]
-
-
def get_desc_stats(dp, waiters):
stats = dp.ofproto_parser.OFPDescStatsRequest(dp, 0)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
s = {}
for msg in msgs:
@@ -386,7 +365,7 @@ def get_queue_stats(dp, waiters):
stats = dp.ofproto_parser.OFPQueueStatsRequest(dp, 0, ofp.OFPP_ANY,
ofp.OFPQ_ALL)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
desc = []
for msg in msgs:
@@ -413,7 +392,7 @@ def get_queue_desc_stats(dp, waiters, port_no=None, queue_id=None):
stats = dp.ofproto_parser.OFPQueueDescStatsRequest(
dp, 0, port_no, queue_id)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
configs = []
for msg in msgs:
@@ -450,7 +429,7 @@ def get_flow_stats(dp, waiters, flow=None):
match)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
flows = []
for msg in msgs:
@@ -482,7 +461,7 @@ def get_aggregate_flow_stats(dp, waiters, flow=None):
match)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
flows = []
for msg in msgs:
@@ -497,7 +476,7 @@ def get_aggregate_flow_stats(dp, waiters, flow=None):
def get_table_stats(dp, waiters):
stats = dp.ofproto_parser.OFPTableStatsRequest(dp, 0)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
tables = []
for msg in msgs:
@@ -514,7 +493,7 @@ def get_table_features(dp, waiters):
stats = dp.ofproto_parser.OFPTableFeaturesStatsRequest(dp, 0, [])
msgs = []
ofproto = dp.ofproto
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
p_type_instructions = [ofproto.OFPTFPT_INSTRUCTIONS,
ofproto.OFPTFPT_INSTRUCTIONS_MISS]
@@ -587,7 +566,7 @@ def get_port_stats(dp, waiters):
stats = dp.ofproto_parser.OFPPortStatsRequest(
dp, 0, dp.ofproto.OFPP_ANY)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
ports = []
for msg in msgs:
@@ -609,7 +588,7 @@ def get_meter_stats(dp, waiters):
stats = dp.ofproto_parser.OFPMeterStatsRequest(
dp, 0, dp.ofproto.OFPM_ALL)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
meters = []
for msg in msgs:
@@ -637,7 +616,7 @@ def get_meter_features(dp, waiters):
stats = dp.ofproto_parser.OFPMeterFeaturesStatsRequest(dp, 0)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
features = []
for msg in msgs:
@@ -669,7 +648,7 @@ def get_meter_config(dp, waiters):
stats = dp.ofproto_parser.OFPMeterConfigStatsRequest(
dp, 0, dp.ofproto.OFPM_ALL)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
configs = []
for msg in msgs:
@@ -696,7 +675,7 @@ def get_group_stats(dp, waiters):
stats = dp.ofproto_parser.OFPGroupStatsRequest(
dp, 0, dp.ofproto.OFPG_ALL)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
groups = []
for msg in msgs:
@@ -744,7 +723,7 @@ def get_group_features(dp, waiters):
stats = dp.ofproto_parser.OFPGroupFeaturesStatsRequest(dp, 0)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
features = []
for msg in msgs:
@@ -779,7 +758,7 @@ def get_group_features(dp, waiters):
def get_group_desc(dp, waiters):
stats = dp.ofproto_parser.OFPGroupDescStatsRequest(dp, 0)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
descs = []
for msg in msgs:
@@ -804,7 +783,7 @@ def get_group_desc(dp, waiters):
def get_port_desc(dp, waiters):
stats = dp.ofproto_parser.OFPPortDescStatsRequest(dp, 0)
msgs = []
- send_stats_request(dp, stats, waiters, msgs)
+ ofctl_utils.send_stats_request(dp, stats, waiters, msgs, LOG)
descs = []