ofctl_v1_3: correct MeterStats and MeterFeatures
- add the insufficient handlers - correct the using instance Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
b039832213
commit
a05b1e990f
@ -77,6 +77,8 @@ LOG = logging.getLogger('ryu.app.ofctl_rest')
|
||||
# delete a meter entry
|
||||
# POST /stats/meterentry/delete
|
||||
|
||||
# TODO: support OFPMeterConfigStats
|
||||
|
||||
|
||||
class StatsController(ControllerBase):
|
||||
def __init__(self, req, link, data, **config):
|
||||
@ -339,3 +341,11 @@ class RestStatsApi(app_manager.RyuApp):
|
||||
@set_ev_cls(ofp_event.EventOFPPortStatsReply, MAIN_DISPATCHER)
|
||||
def port_stats_reply_handler(self, ev):
|
||||
self.stats_reply_handler(ev)
|
||||
|
||||
@set_ev_cls(ofp_event.EventOFPMeterStatsReply, MAIN_DISPATCHER)
|
||||
def meter_stats_reply_handler(self, ev):
|
||||
self.stats_reply_handler(ev)
|
||||
|
||||
@set_ev_cls(ofp_event.EventOFPMeterFeaturesStatsReply, MAIN_DISPATCHER)
|
||||
def meter_features_stats_reply_handler(self, ev):
|
||||
self.stats_reply_handler(ev)
|
||||
|
@ -470,10 +470,10 @@ def get_meter_features(dp, waiters):
|
||||
features = []
|
||||
for msg in msgs:
|
||||
for feature in msg.body:
|
||||
f = {'max_meter': msg.body.max_meter,
|
||||
'band_type': msg.body.band_type,
|
||||
'max_bands': msg.body.max_bands,
|
||||
'max_color': msg.body.max_color}
|
||||
f = {'max_meter': feature.max_meter,
|
||||
'band_types': feature.band_types,
|
||||
'max_band': feature.max_band,
|
||||
'max_color': feature.max_color}
|
||||
features.append(f)
|
||||
features = {str(dp.id): features}
|
||||
return features
|
||||
|
Loading…
x
Reference in New Issue
Block a user