From 0f9d92e23e3059a14798319204523be2cc57c2be Mon Sep 17 00:00:00 2001 From: Saurav Das <saurav.das@bigswitch.com> Date: Tue, 25 Jun 2013 10:58:03 -0700 Subject: [PATCH] Fixing comments to reflect changes made to the REST API handler (when accomodating the CLI) --- .../web/DebugCounterResource.java | 6 ++++- .../debugevent/web/DebugEventResource.java | 22 ++++++++++--------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/main/java/net/floodlightcontroller/debugcounter/web/DebugCounterResource.java b/src/main/java/net/floodlightcontroller/debugcounter/web/DebugCounterResource.java index f4d00bf14..3dd35bc07 100644 --- a/src/main/java/net/floodlightcontroller/debugcounter/web/DebugCounterResource.java +++ b/src/main/java/net/floodlightcontroller/debugcounter/web/DebugCounterResource.java @@ -260,7 +260,8 @@ public class DebugCounterResource extends DebugCounterResourceBase { * * where {param1} must be one of (no quotes): * 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. * "{moduleName}" returns value/info on all counters for * the specified module 'moduelName'. @@ -270,6 +271,9 @@ public class DebugCounterResource extends DebugCounterResourceBase { * all counters in the hierarchical level below. * So giving just the switch dpid will fetch * 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 public DebugCounterInfoOutput handleCounterInfoQuery() { diff --git a/src/main/java/net/floodlightcontroller/debugevent/web/DebugEventResource.java b/src/main/java/net/floodlightcontroller/debugevent/web/DebugEventResource.java index b6b5e2bad..c03d444e7 100644 --- a/src/main/java/net/floodlightcontroller/debugevent/web/DebugEventResource.java +++ b/src/main/java/net/floodlightcontroller/debugevent/web/DebugEventResource.java @@ -133,8 +133,9 @@ public class DebugEventResource extends DebugEventResourceBase { * * Not giving {param1} will reset all events * {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. - * {param2} must be an eventName for the given moduleName + * all events, while the latter will reset all events for the moduleName (if + * param2 is null).{param2} must be an eventName for the given moduleName to + * reset a specific event. */ @Post public ResetOutput postHandler(DebugEventPost postData) { @@ -195,9 +196,9 @@ public class DebugEventResource extends DebugEventResourceBase { /** * 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 - * registered events: - * "http://{controller-hostname}:8080/wm/debugevent/ + * URL must be in one of the following forms for retrieving a list + * moduleNames "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: * "http://{controller-hostname}:8080/wm/debugevent/{param1} @@ -205,16 +206,17 @@ public class DebugEventResource extends DebugEventResourceBase { * * where {param1} must be one of (no quotes): * null if nothing is given then by default the list - * of all events is returned, not their histories. - * "all" returns value/info on all active events. + * of all moduleNames is returned for which + * 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 * depending on the value of param2 * 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. * - * {param2} is optional; in which case the event history for all the events registered - * for that moduleName will be returned. - * */ @Get("json") public DebugEventInfoOutput handleEventInfoQuery() { -- GitLab