Commit 71131063 authored by Thomas Markwalder's avatar Thomas Markwalder
Browse files

[5589] Addressed more review comments

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;
parent 1b3d7e14
......@@ -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
......
......@@ -315,10 +315,10 @@
<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>
......@@ -446,6 +446,15 @@
</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
......
......@@ -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);
}
......
......@@ -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!
......@@ -591,8 +591,6 @@ TEST_F(StatCmdsTest, multipleLoads) {
testMultipleLoads();
}
using namespace isc::dhcp;
struct TestScenario {
std::string description_;
std::string command_txt_;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment