diff options
author | Shinpei Muraoka <shinpei.muraoka@gmail.com> | 2016-05-13 22:24:14 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-05-13 22:24:14 +0900 |
commit | 4b9957924920eb533de46d00ae662b872ee50a3e (patch) | |
tree | 4cc834ebb593e90506f1324d6bad9e4d95fd1180 | |
parent | f60c12cbbeb49fd1a31d284c318d13ab6fc45589 (diff) |
ofctl_rest: Enable to omit port_no and queue_id
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/app/ofctl_rest.py | 24 |
1 files 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/<dpid>/<port> +# GET /stats/queueconfig/<dpid>[/<port>] +# Note: Specification of port number is optional # # get queues desc stats of the switch -# GET /stats/queuedesc/<dpid>/<port>/<queue> +# GET /stats/queuedesc/<dpid>[/<port>[/<queue_id>]] +# 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/<dpid> @@ -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', |