Skip to content
Snippets Groups Projects
Commit 0f9d92e2 authored by Saurav Das's avatar Saurav Das
Browse files

Fixing comments to reflect changes made to the REST API handler (when

accomodating the CLI)
parent d3f48d29
No related branches found
No related tags found
No related merge requests found
...@@ -260,7 +260,8 @@ public class DebugCounterResource extends DebugCounterResourceBase { ...@@ -260,7 +260,8 @@ public class DebugCounterResource extends DebugCounterResourceBase {
* *
* where {param1} must be one of (no quotes): * where {param1} must be one of (no quotes):
* null if nothing is given then by default all * null if nothing is given then by default all
* counters are returned * module names are returned for which counters
* have been registered
* "all" returns value/info on all counters. * "all" returns value/info on all counters.
* "{moduleName}" returns value/info on all counters for * "{moduleName}" returns value/info on all counters for
* the specified module 'moduelName'. * the specified module 'moduelName'.
...@@ -270,6 +271,9 @@ public class DebugCounterResource extends DebugCounterResourceBase { ...@@ -270,6 +271,9 @@ public class DebugCounterResource extends DebugCounterResourceBase {
* all counters in the hierarchical level below. * all counters in the hierarchical level below.
* So giving just the switch dpid will fetch * So giving just the switch dpid will fetch
* all counters for that switch. * all counters for that switch.
* A special case => if param2 is null, then
* all hierarchical counterNames are returned
* for the given moduleName (in param1)
*/ */
@Get @Get
public DebugCounterInfoOutput handleCounterInfoQuery() { public DebugCounterInfoOutput handleCounterInfoQuery() {
......
...@@ -133,8 +133,9 @@ public class DebugEventResource extends DebugEventResourceBase { ...@@ -133,8 +133,9 @@ public class DebugEventResource extends DebugEventResourceBase {
* *
* Not giving {param1} will reset all events * Not giving {param1} will reset all events
* {param1} can be 'all' or the name of a module. The former case will reset * {param1} can be 'all' or the name of a module. The former case will reset
* all events, while the latter will reset all events for the moduleName. * all events, while the latter will reset all events for the moduleName (if
* {param2} must be an eventName for the given moduleName * param2 is null).{param2} must be an eventName for the given moduleName to
* reset a specific event.
*/ */
@Post @Post
public ResetOutput postHandler(DebugEventPost postData) { public ResetOutput postHandler(DebugEventPost postData) {
...@@ -195,9 +196,9 @@ public class DebugEventResource extends DebugEventResourceBase { ...@@ -195,9 +196,9 @@ public class DebugEventResource extends DebugEventResourceBase {
/** /**
* Return the debug event data for the get rest-api call * Return the debug event data for the get rest-api call
* *
* URL must be in one of the following forms for retrieving a list of all * URL must be in one of the following forms for retrieving a list
* registered events: * moduleNames "http://{controller-hostname}:8080/wm/debugevent/
* "http://{controller-hostname}:8080/wm/debugevent/ * counterNames "http://{controller-hostname}:8080/wm/debugevent/{moduleName}
* *
* URL must be in one of the following forms for retrieving event data: * URL must be in one of the following forms for retrieving event data:
* "http://{controller-hostname}:8080/wm/debugevent/{param1} * "http://{controller-hostname}:8080/wm/debugevent/{param1}
...@@ -205,16 +206,17 @@ public class DebugEventResource extends DebugEventResourceBase { ...@@ -205,16 +206,17 @@ public class DebugEventResource extends DebugEventResourceBase {
* *
* where {param1} must be one of (no quotes): * where {param1} must be one of (no quotes):
* null if nothing is given then by default the list * null if nothing is given then by default the list
* of all events is returned, not their histories. * of all moduleNames is returned for which
* "all" returns value/info on all active events. * events have been registered
* "all" can return value/info on all active events
* but is currently disallowed
* "{moduleName}" returns value/info on events for the specified module * "{moduleName}" returns value/info on events for the specified module
* depending on the value of param2 * depending on the value of param2
* and {param2} must be one of (no quotes): * and {param2} must be one of (no quotes):
* null returns all eventNames registered for the
* given moduleName (in param1)
* "{eventName}" returns value/info for specific event if it is active. * "{eventName}" returns value/info for specific event if it is active.
* *
* {param2} is optional; in which case the event history for all the events registered
* for that moduleName will be returned.
*
*/ */
@Get("json") @Get("json")
public DebugEventInfoOutput handleEventInfoQuery() { public DebugEventInfoOutput handleEventInfoQuery() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment