]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2136] removed the obsoleted command 'sendstats' from the mock modules
authorNaoki Kambe <kambe@jprs.co.jp>
Sat, 21 Jul 2012 17:24:16 +0000 (02:24 +0900)
committerNaoki Kambe <kambe@jprs.co.jp>
Wed, 8 Aug 2012 11:51:16 +0000 (20:51 +0900)
src/bin/stats/tests/test_utils.py

index 0e30ed64894ee43fcadc25c3ef0056605bade073..1089a4fe137e492a185d61f1819374a08b0c8c45 100644 (file)
@@ -206,11 +206,6 @@ class MockBoss:
         "command_description": "Shut down BIND 10",
         "command_args": []
       },
-      {
-        "command_name": "sendstats",
-        "command_description": "Send data to a statistics module at once",
-        "command_args": []
-      },
       {
         "command_name": "ping",
         "command_description": "Ping the boss process",
@@ -280,10 +275,7 @@ class MockBoss:
         params = { "owner": "Boss",
                    "data": sdata
                    }
-        if command == 'sendstats':
-            send_command("set", "Stats", params=params, session=self.cc_session)
-            return isc.config.create_answer(0)
-        elif command == 'getstats':
+        if command == 'getstats':
             notfound = [ t for t in args[0]['trees'] if t not in sdata ]
             if notfound:
                 return isc.config.create_answer(1, notfound)
@@ -302,13 +294,7 @@ class MockAuth:
     "module_name": "Auth",
     "module_description": "Mock Authoritative service",
     "config_data": [],
-    "commands": [
-      {
-        "command_name": "sendstats",
-        "command_description": "Send data to a statistics module at once",
-        "command_args": []
-      }
-    ],
+    "commands": [],
     "statistics": [
       {
         "item_name": "queries.tcp",
@@ -422,11 +408,7 @@ class MockAuth:
         sdata = { 'queries.tcp': self.queries_tcp,
                        'queries.udp': self.queries_udp,
                        'queries.perzone' : self.queries_per_zone }
-        if command == 'sendstats':
-            params = { "owner": "Auth",
-                       "data":  sdata }
-            return send_command("set", "Stats", params=params, session=self.cc_session)
-        elif command == 'getstats':
+        if command == 'getstats':
             notfound = [ t for t in args[0]['trees'] if t not in sdata ]
             if notfound:
                 return isc.config.create_answer(1, notfound)