From: Naoki Kambe Date: Wed, 3 Jul 2013 06:15:22 +0000 (+0900) Subject: [2884] add a note for _add_counter() X-Git-Tag: bind10-1.2.0beta1-release~358^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ca3f4ecf2c5dc37dab7d9e89f4bc41ee000f12c1;p=thirdparty%2Fkea.git [2884] add a note for _add_counter() --- diff --git a/src/lib/python/isc/statistics/counters.py b/src/lib/python/isc/statistics/counters.py index 5d47f988e4..0c2c8273fc 100644 --- a/src/lib/python/isc/statistics/counters.py +++ b/src/lib/python/isc/statistics/counters.py @@ -81,6 +81,22 @@ def _add_counter(element, spec, identifier): return isc.cc.data.find(element, identifier) except isc.cc.data.DataNotFoundError: pass + + # Note: If there is a named_set type item in the statistics spec + # and if there are map type items under it, all of items under the + # map type item need to be added. For example, we're assuming that + # this method is now adding a counter whose identifier is like + # dir1/dir2/dir3/counter1. If both of dir1 and dir2 are named_set + # types, and if dir3 is a map type, and if counter1, counter2, and + # counter3 are defined as items under dir3 by the statistics spec, + # this method would add other two counters: + # + # dir1/dir2/dir3/counter2 + # dir1/dir2/dir3/counter3 + # + # Otherwise this method just adds the only counter + # dir1/dir2/dir3/counter1. + # examine spec from the top-level item and know whether # has_named_set, and check whether spec and identifier are correct pidr = ''