Skip to content

Commit

Permalink
[#2101] addressed review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Razvan Becheriu authored and fxdupont committed Dec 24, 2024
1 parent 45ff8e1 commit 3bf0079
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2315. [func] razvan
Kea can now load hook libraries specifying only the binary name.
It uses the default hook libraries installation path which is
provided in the config report as "Hooks directory".
(Gitlab #2101, #3579)

2314. [func] tmark
Added three new parameters which may be used to
influence DNS TTL to kea-dhcp4 and kea-dhcp6:
Expand Down
6 changes: 4 additions & 2 deletions doc/sphinx/arm/hooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,10 @@ configuration would be:
because the parameters specified for the library (or the files those
parameters point to) may have changed.

Since Kea-2.7.5, the server is able to load hooks specified only by name, if
they reside in the default install location (the path is OS specific).
Since Kea-2.7.6, the server is able to load hook libraries specifying only the binary name,
if they reside in the default installation directory (the path is OS specific).
The default hook libraries installation path is provided in the config report as
"Hooks directory".

::

Expand Down
4 changes: 2 additions & 2 deletions src/lib/hooks/hooks_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ class HooksLibrariesParser : public isc::data::SimpleParser {
/// @param value pointer to the content to be parsed
void parse(HooksConfig& libraries, isc::data::ConstElementPtr value);

/// @brief The default installation path for hooks, used to generate full
/// path if only the hook name is provided.
/// @brief The default installation path for hook libraries, used to generate
/// full path if only the hook library binary name is provided.
static std::string default_hooks_path_;
};

Expand Down
3 changes: 2 additions & 1 deletion src/lib/process/cfgrpt/tests/config_report_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ TEST(ConfigReportTest, getConfigReport) {
ASSERT_FALSE(cfgReport.empty());
EXPECT_NE(std::string::npos, cfgReport.find(VERSION));
EXPECT_NE(std::string::npos, cfgReport.find(EXTENDED_VERSION));
EXPECT_NE(std::string::npos, cfgReport.find(HooksLibrariesParser::default_hooks_path_));
EXPECT_NE(std::string::npos, cfgReport.find(std::string("Hooks directory: ") +
HooksLibrariesParser::default_hooks_path_));
}

0 comments on commit 3bf0079

Please sign in to comment.