diff options
author | Razvan Becheriu <razvan@isc.org> | 2024-12-20 20:27:50 +0100 |
---|---|---|
committer | Francis Dupont <fdupont@isc.org> | 2024-12-24 14:03:04 +0100 |
commit | 3bf0079360ba66f7e0e5f67010606f0bbeadb84e (patch) | |
tree | 2d9fcdd4ed4b33d27eb087804daa5074871483d8 | |
parent | [#2101] check default hooks path in config report (diff) | |
download | kea-3bf0079360ba66f7e0e5f67010606f0bbeadb84e.tar.xz kea-3bf0079360ba66f7e0e5f67010606f0bbeadb84e.zip |
[#2101] addressed review comments
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | doc/sphinx/arm/hooks.rst | 6 | ||||
-rw-r--r-- | src/lib/hooks/hooks_parser.h | 4 | ||||
-rw-r--r-- | src/lib/process/cfgrpt/tests/config_report_unittests.cc | 3 |
4 files changed, 14 insertions, 5 deletions
@@ -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: diff --git a/doc/sphinx/arm/hooks.rst b/doc/sphinx/arm/hooks.rst index 1bd1bc4623..728a38acc6 100644 --- a/doc/sphinx/arm/hooks.rst +++ b/doc/sphinx/arm/hooks.rst @@ -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". :: diff --git a/src/lib/hooks/hooks_parser.h b/src/lib/hooks/hooks_parser.h index 0fea1fe26b..8815d8497d 100644 --- a/src/lib/hooks/hooks_parser.h +++ b/src/lib/hooks/hooks_parser.h @@ -58,8 +58,8 @@ public: /// @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_; }; diff --git a/src/lib/process/cfgrpt/tests/config_report_unittests.cc b/src/lib/process/cfgrpt/tests/config_report_unittests.cc index a783f3d196..cc756ce6f0 100644 --- a/src/lib/process/cfgrpt/tests/config_report_unittests.cc +++ b/src/lib/process/cfgrpt/tests/config_report_unittests.cc @@ -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_)); } |