BIND 10 trac2136, updated. 2a0dd303927d9405b35b7e440f39335fb08b9093 [2136] Add back part of a deleted comment

BIND 10 source code commits bind10-changes at lists.isc.org
Sun Aug 5 15:25:26 UTC 2012


The branch, trac2136 has been updated
       via  2a0dd303927d9405b35b7e440f39335fb08b9093 (commit)
       via  a768351ad6526b5c8563ab3145b0e24fdd542dc0 (commit)
       via  795f84a22aaf809c44c4739afd60eda3a0e9d0f8 (commit)
       via  347c79485e7e38fbcfa2ed77cb689063b5b016f8 (commit)
      from  3f922de50497aaac2c1454e8614db268fd45cdd1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2a0dd303927d9405b35b7e440f39335fb08b9093
Author: Mukund Sivaraman <muks at isc.org>
Date:   Sun Aug 5 20:30:14 2012 +0530

    [2136] Add back part of a deleted comment

commit a768351ad6526b5c8563ab3145b0e24fdd542dc0
Author: Mukund Sivaraman <muks at isc.org>
Date:   Sun Aug 5 20:29:59 2012 +0530

    [2136] Make minor text updates

commit 795f84a22aaf809c44c4739afd60eda3a0e9d0f8
Author: Mukund Sivaraman <muks at isc.org>
Date:   Sun Aug 5 19:47:55 2012 +0530

    [2136] Re-indent code

commit 347c79485e7e38fbcfa2ed77cb689063b5b016f8
Author: Mukund Sivaraman <muks at isc.org>
Date:   Sun Aug 5 18:31:38 2012 +0530

    [2136] Make some minor changes to poll-interval's description

-----------------------------------------------------------------------

Summary of changes:
 src/bin/stats/b10-stats.xml           |   14 +++++++-------
 src/bin/stats/stats.py.in             |   11 ++++++-----
 src/bin/stats/tests/b10-stats_test.py |    3 ++-
 src/bin/stats/tests/test_utils.py     |    4 ++--
 4 files changed, 17 insertions(+), 15 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/stats/b10-stats.xml b/src/bin/stats/b10-stats.xml
index 5c86c44..88a01ed 100644
--- a/src/bin/stats/b10-stats.xml
+++ b/src/bin/stats/b10-stats.xml
@@ -60,7 +60,7 @@
       Command Channel by <command>b10-msgq</command> with other
       modules like <command>bind10</command>, <command>b10-auth</command>
       and so on. <command>b10-stats</command> periodically requests statistics
-      data to each module and receives. The interval time can be configured
+      data from each module. The interval time can be configured
       via <command>bindctl</command>. <command>b10-stats</command> cannot
       accept any command from other modules for updating statistics data. The
       stats module collects data and
@@ -90,7 +90,8 @@
     <title>CONFIGURATION AND COMMANDS</title>
 
     <para>
-      The configurable setting in <filename>stats.spec</filename> is:
+      The only configurable setting in <filename>stats.spec</filename>
+      is:
     </para>
 
     <variablelist>
@@ -98,11 +99,10 @@
         <term><varname>poll-interval</varname></term>
         <listitem>
           <para>
-            is a timer interval in seconds for <command>b10-stats</command> to
-            request each module to return its statistics data. The default is 60
-            second. Polling can be disabled by setting it to 0. The type of the
-            value should be an unsigned integer. A negative integer
-            is ignored.
+            is a time interval in seconds at which <command>b10-stats</command>
+            requests each module to return its statistics data. The default is 60
+            seconds. Polling can be disabled by setting it to 0. The type of the
+            value should be an unsigned integer. Negative integers are ignored.
           </para>
         </listitem>
       </varlistentry>
diff --git a/src/bin/stats/stats.py.in b/src/bin/stats/stats.py.in
index 7135084..a712748 100755
--- a/src/bin/stats/stats.py.in
+++ b/src/bin/stats/stats.py.in
@@ -196,7 +196,8 @@ class Stats:
         sequences = []
         for (module_name, data) in self.get_statistics_data().items():
             # skip if module_name is 'Stats'
-            if module_name == self.module_name: continue
+            if module_name == self.module_name:
+                continue
             logger.debug(DBG_STATS_MESSAGING, STATS_SEND_STATISTICS_REQUEST,
                          module_name)
             cmd = isc.config.ccsession.create_command(
@@ -370,12 +371,12 @@ class Stats:
 
     def update_statistics_data(self, owner=None, mid=None, data=None):
         """
-        change statistics date of specified module into specified
+        change statistics data of specified module into specified
         data. It updates information of each module first, and it
         updates statistics data. If specified data is invalid for
         statistics spec of specified owner, it returns a list of error
         messages. If there is no error or if neither owner nor data is
-        specified in args, it returns None. The 'mid' argument is a identifier of
+        specified in args, it returns None. The 'mid' argument is an identifier of
         the sender module in order for stats to identify which
         instance sends statistics data in the situation that multiple
         instances are working.
@@ -383,9 +384,9 @@ class Stats:
         # Note:
         # The fix of #1751 is for multiple instances working. It is
         # assumed here that they send different statistics data with
-        # each the sender module id(mid) . Stats should save their statistics data by
+        # each sender module id (mid). Stats should save their statistics data by
         # mid. The statistics data, which is the existing variable, is
-        # preserved by accumlating from statistics data by the module id. This
+        # preserved by accumlating from statistics data by the mid. This
         # is an ad-hoc fix because administrators can not see
         # statistics by each instance via bindctl or HTTP/XML. These
         # interfaces aren't changed in this fix.
diff --git a/src/bin/stats/tests/b10-stats_test.py b/src/bin/stats/tests/b10-stats_test.py
index 0cca50e..a965f5f 100644
--- a/src/bin/stats/tests/b10-stats_test.py
+++ b/src/bin/stats/tests/b10-stats_test.py
@@ -391,7 +391,8 @@ class TestStats(unittest.TestCase):
                          bar1_tcp)
         self.assertEqual(self.stats.statistics_data_bymid['Auth']['bar1 at foo'],
                          {'queries.tcp': bar1_tcp})
-        # check consolidation of statistics data
+        # check consolidation of statistics data even if there is
+        # non-existent mid of Auth
         self.stats.update_statistics_data('Auth', "bar2 at foo",
                                           {'queries.tcp': bar2_tcp})
         self.assertTrue('Auth' in self.stats.statistics_data)
diff --git a/src/bin/stats/tests/test_utils.py b/src/bin/stats/tests/test_utils.py
index a9f0a33..f213852 100644
--- a/src/bin/stats/tests/test_utils.py
+++ b/src/bin/stats/tests/test_utils.py
@@ -398,8 +398,8 @@ class MockAuth:
     def command_handler(self, command, *args, **kwargs):
         self.got_command_name = command
         sdata = { 'queries.tcp': self.queries_tcp,
-                       'queries.udp': self.queries_udp,
-                       'queries.perzone' : self.queries_per_zone }
+                  'queries.udp': self.queries_udp,
+                  'queries.perzone' : self.queries_per_zone }
         if command == 'getstats':
             return isc.config.create_answer(0, sdata)
         return isc.config.create_answer(1, "Unknown Command")



More information about the bind10-changes mailing list