- add the insufficient handlers
- correct the using instance

Signed-off-by: Yuichi Ito <[email protected]>
---
 ryu/app/ofctl_rest.py |   10 ++++++++++
 ryu/lib/ofctl_v1_3.py |    8 ++++----
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/ryu/app/ofctl_rest.py b/ryu/app/ofctl_rest.py
index 907bed5..788714d 100644
--- a/ryu/app/ofctl_rest.py
+++ b/ryu/app/ofctl_rest.py
@@ -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)
diff --git a/ryu/lib/ofctl_v1_3.py b/ryu/lib/ofctl_v1_3.py
index 7822569..37f67d0 100644
--- a/ryu/lib/ofctl_v1_3.py
+++ b/ryu/lib/ofctl_v1_3.py
@@ -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
-- 
1.7.10.4


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to