From 4b9957924920eb533de46d00ae662b872ee50a3e Mon Sep 17 00:00:00 2001 From: Shinpei Muraoka Date: Fri, 13 May 2016 22:24:14 +0900 Subject: ofctl_rest: Enable to omit port_no and queue_id Signed-off-by: Shinpei Muraoka Signed-off-by: IWASE Yusuke Signed-off-by: FUJITA Tomonori --- ryu/app/ofctl_rest.py | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/ryu/app/ofctl_rest.py b/ryu/app/ofctl_rest.py index 96abe956..663db303 100644 --- a/ryu/app/ofctl_rest.py +++ b/ryu/app/ofctl_rest.py @@ -87,10 +87,15 @@ supported_ofctl = { # e.g. GET /stats/queue/1/ALL/1 # # get queues config stats of the switch -# GET /stats/queueconfig// +# GET /stats/queueconfig/[/] +# Note: Specification of port number is optional # # get queues desc stats of the switch -# GET /stats/queuedesc/// +# GET /stats/queuedesc/[/[/]] +# Note: Specification of port number and queue id are optional +# If you want to omitting the port number and setting the queue id, +# please specify the keyword "ALL" to the port number +# e.g. GET /stats/queuedesc/1/ALL/1 # # get meter features stats of the switch # GET /stats/meterfeatures/ @@ -529,11 +534,26 @@ class RestStatsApi(app_manager.RyuApp): controller=StatsController, action='get_queue_stats', conditions=dict(method=['GET'])) + uri = path + '/queueconfig/{dpid}' + mapper.connect('stats', uri, + controller=StatsController, action='get_queue_config', + conditions=dict(method=['GET'])) + uri = path + '/queueconfig/{dpid}/{port}' mapper.connect('stats', uri, controller=StatsController, action='get_queue_config', conditions=dict(method=['GET'])) + uri = path + '/queuedesc/{dpid}' + mapper.connect('stats', uri, + controller=StatsController, action='get_queue_desc', + conditions=dict(method=['GET'])) + + uri = path + '/queuedesc/{dpid}/{port}' + mapper.connect('stats', uri, + controller=StatsController, action='get_queue_desc', + conditions=dict(method=['GET'])) + uri = path + '/queuedesc/{dpid}/{port}/{queue}' mapper.connect('stats', uri, controller=StatsController, action='get_queue_desc', -- cgit v1.2.3