]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5589] Addressed more review comments
authorThomas Markwalder <tmark@isc.org>
Wed, 16 May 2018 11:27:01 +0000 (07:27 -0400)
committerThomas Markwalder <tmark@isc.org>
Wed, 16 May 2018 11:27:01 +0000 (07:27 -0400)
doc/guide/hooks-stat-cmds.xml
    Fixed return values

doc/guide/logging.xml
    Added entry for kea-dhcp6.stat-cmds-hooks logger

src/hooks/dhcp/stat_cmds/stat_cmds_messages.mes
src/hooks/dhcp/stat_cmds/stat_cmds_callouts.cc
    Removed extra _CMDS from logger IDs

src/hooks/dhcp/stat_cmds/tests/stat_cmds_unittest.cc
    Removed extraneous using statement;

doc/guide/hooks-stat-cmds.xml
doc/guide/logging.xml
src/hooks/dhcp/stat_cmds/stat_cmds_callouts.cc
src/hooks/dhcp/stat_cmds/stat_cmds_messages.mes
src/hooks/dhcp/stat_cmds/tests/stat_cmds_unittest.cc

index 8f2cdff98e7098d3f7021d15a42be1156985cc4a..2201b640c57571d5f0feaeea52301ae8bd844b9f 100644 (file)
@@ -80,7 +80,7 @@
             <para><command>subnet-id</command> - ID of the subnet for which
             lease statistics should be fetched. Use this to get statistics for
             a single subnet.  If the subnet does not exist the command result
-            code will be 2 (i.e. CONTROL_RESULT_EMPTY).
+            code will be 3 (i.e. CONTROL_RESULT_EMPTY).
             </para>
           </listitem>
           <listitem>
@@ -89,7 +89,7 @@
             be retrieved.  Note that fuzzy values are supported thus allowing
             for a query for statistics using approximate ID values. If the
             range does not include any known subnets, the command result code
-            will be 2 (i.e. CONTROL_RESULT_EMPTY).
+            will be 3 (i.e. CONTROL_RESULT_EMPTY).
             <itemizedlist>
               <listitem>
                 <para><command>first-subnet-id</command> - ID of the first
index a9f41e4a706152be6ff6b3d439a5b0428f70b714..e92009f9a9382a22b645c516c9828d11ad3ab7c0 100644 (file)
 
           <listitem>
             <simpara>
-              <command>kea-dhcp4.stat-cmds-hooks</command> - this logger is used
-              to log messages related to operation of the Stats Cmds hooks library.
-              In general these will pertain to loading and unloading the library,
-              as well as execution of commands by the library.
+              <command>kea-dhcp4.stat-cmds-hooks</command> - this logger is
+              used to log messages related to operation of the Stats Cmds hooks
+              library. In general these will pertain to loading and unloading
+              the library and the execution of commands by the library.
             </simpara>
           </listitem>
 
             </simpara>
           </listitem>
 
+          <listitem>
+            <simpara>
+              <command>kea-dhcp6.stat-cmds-hooks</command> - this logger is
+              used to log messages related to operation of the Stats Cmds hooks
+              library. In general these will pertain to loading and unloading
+              the library and the execution of commands by the library.
+            </simpara>
+          </listitem>
+
           <listitem>
             <simpara>
               <command>kea-dhcp-ddns</command> - the root logger for the
index a0da474396ae3c06c2f1783b207b0b6101b8bd60..768ff05d00243577109d2a8792746240f609258b 100644 (file)
@@ -47,7 +47,7 @@ int stat_lease6_get(CalloutHandle& handle) {
 int load(LibraryHandle& handle) {
     handle.registerCommandCallout("stat-lease4-get", stat_lease4_get);
     handle.registerCommandCallout("stat-lease6-get", stat_lease6_get);
-    LOG_INFO(stat_cmds_logger, STAT_CMDS_CMDS_INIT_OK);
+    LOG_INFO(stat_cmds_logger, STAT_CMDS_INIT_OK);
     return (0);
 }
 
@@ -55,7 +55,7 @@ int load(LibraryHandle& handle) {
 ///
 /// @return 0 if deregistration was successful, 1 otherwise
 int unload() {
-    LOG_INFO(stat_cmds_logger, STAT_CMDS_CMDS_DEINIT_OK);
+    LOG_INFO(stat_cmds_logger, STAT_CMDS_DEINIT_OK);
     return (0);
 }
 
index 636262a2c00aad4ad41a42a6c50503dfc5460779..7b5083349e82602763594b8228cc33de398d530b 100644 (file)
@@ -34,20 +34,20 @@ The parameters submitted with stat-lease6-get were valid but excluded all
 known subnets.  The parameters supplied along with an explanation should
 be logged.
 
-% STAT_CMDS_CMDS_DEINIT_FAILED unloading Stat Commands hooks library failed: %1
+% STAT_CMDS_DEINIT_FAILED unloading Stat Commands hooks library failed: %1
 This error message indicates an error during unloading the Lease Commands
 hooks library. The details of the error are provided as argument of
 the log message.
 
-% STAT_CMDS_CMDS_DEINIT_OK unloading Stat Commands hooks library successful
+% STAT_CMDS_DEINIT_OK unloading Stat Commands hooks library successful
 This info message indicates that the Stat Commands hooks library has been
 removed successfully.
 
-% STAT_CMDS_CMDS_INIT_FAILED loading Stat Commands hooks library failed: %1
+% STAT_CMDS_INIT_FAILED loading Stat Commands hooks library failed: %1
 This error message indicates an error during loading the Lease Commands
 hooks library. The details of the error are provided as argument of
 the log message.
 
-% STAT_CMDS_CMDS_INIT_OK loading Stat Commands hooks library successful
+% STAT_CMDS_INIT_OK loading Stat Commands hooks library successful
 This info message indicates that the Stat Commands hooks library has been
 loaded successfully. Enjoy!
index c09ac0c871707ae0e1d5b323a5dabb38700bc04b..4e8a8a0489a3f96f40e2b93796e40db7086e23c1 100644 (file)
@@ -591,8 +591,6 @@ TEST_F(StatCmdsTest, multipleLoads) {
     testMultipleLoads();
 }
 
-using namespace isc::dhcp;
-
 struct TestScenario {
     std::string description_;
     std::string command_txt_;