diff options
author | Francis Dupont <fdupont@isc.org> | 2024-12-02 19:02:52 +0100 |
---|---|---|
committer | Francis Dupont <fdupont@isc.org> | 2024-12-05 09:51:48 +0100 |
commit | bd3932cc59a035f5d318c4b1185394ede7092d77 (patch) | |
tree | 79ac22a3255cd00e6e59a63f7a57779b0d6d4026 /src | |
parent | [#3655] Improve wording for ha-maintenance-notify (diff) | |
download | kea-bd3932cc59a035f5d318c4b1185394ede7092d77.tar.xz kea-bd3932cc59a035f5d318c4b1185394ede7092d77.zip |
[#3268] Updated hooks
Diffstat (limited to 'src')
-rw-r--r-- | src/hooks/dhcp/perfmon/perfmon_callouts.cc | 4 | ||||
-rw-r--r-- | src/hooks/dhcp/perfmon/perfmon_mgr.cc | 3 | ||||
-rw-r--r-- | src/hooks/dhcp/perfmon/perfmon_mgr.h | 2 | ||||
-rw-r--r-- | src/hooks/dhcp/run_script/run_script.cc | 4 | ||||
-rw-r--r-- | src/hooks/dhcp/run_script/run_script.h | 4 | ||||
-rw-r--r-- | src/hooks/dhcp/run_script/run_script_callouts.cc | 2 | ||||
-rw-r--r-- | src/hooks/dhcp/run_script/tests/run_script_unittests.cc | 2 |
7 files changed, 11 insertions, 10 deletions
diff --git a/src/hooks/dhcp/perfmon/perfmon_callouts.cc b/src/hooks/dhcp/perfmon/perfmon_callouts.cc index b995fe47c0..4a7b4db407 100644 --- a/src/hooks/dhcp/perfmon/perfmon_callouts.cc +++ b/src/hooks/dhcp/perfmon/perfmon_callouts.cc @@ -69,7 +69,7 @@ int pkt4_send(CalloutHandle& handle) { Pkt4Ptr response; handle.getArgument("response4", response); - Subnet4Ptr subnet; + ConstSubnet4Ptr subnet; handle.getArgument("subnet4", subnet); try { @@ -101,7 +101,7 @@ int pkt6_send(CalloutHandle& handle) { Pkt6Ptr response; handle.getArgument("response6", response); - Subnet6Ptr subnet; + ConstSubnet6Ptr subnet; handle.getArgument("subnet6", subnet); try { diff --git a/src/hooks/dhcp/perfmon/perfmon_mgr.cc b/src/hooks/dhcp/perfmon/perfmon_mgr.cc index cc3c0238db..dcd044fcac 100644 --- a/src/hooks/dhcp/perfmon/perfmon_mgr.cc +++ b/src/hooks/dhcp/perfmon/perfmon_mgr.cc @@ -68,7 +68,8 @@ PerfMonMgr::configure(const ConstElementPtr& params) { } void -PerfMonMgr::processPktEventStack(PktPtr query, PktPtr response, SubnetPtr subnet) { +PerfMonMgr::processPktEventStack(PktPtr query, PktPtr response, + ConstSubnetPtr subnet) { if (!query) { isc_throw(Unexpected, "PerfMonMgr::processPktEventStack - query is empty!"); } diff --git a/src/hooks/dhcp/perfmon/perfmon_mgr.h b/src/hooks/dhcp/perfmon/perfmon_mgr.h index e9b59ad14e..13afce1a72 100644 --- a/src/hooks/dhcp/perfmon/perfmon_mgr.h +++ b/src/hooks/dhcp/perfmon/perfmon_mgr.h @@ -64,7 +64,7 @@ public: /// subnet id. void processPktEventStack(isc::dhcp::PktPtr query, isc::dhcp::PktPtr response, - const isc::dhcp::SubnetPtr subnet); + const isc::dhcp::ConstSubnetPtr subnet); /// @brief Adds a duration sample to a MonitoredDuration. /// diff --git a/src/hooks/dhcp/run_script/run_script.cc b/src/hooks/dhcp/run_script/run_script.cc index 6aecc7ab7b..cc82dc2737 100644 --- a/src/hooks/dhcp/run_script/run_script.cc +++ b/src/hooks/dhcp/run_script/run_script.cc @@ -175,7 +175,7 @@ RunScriptImpl::extractOptionIA(ProcessEnvVars& vars, void RunScriptImpl::extractSubnet4(ProcessEnvVars& vars, - const Subnet4Ptr subnet4, + const ConstSubnet4Ptr subnet4, const string& prefix, const string& suffix) { if (subnet4) { @@ -198,7 +198,7 @@ RunScriptImpl::extractSubnet4(ProcessEnvVars& vars, void RunScriptImpl::extractSubnet6(ProcessEnvVars& vars, - const Subnet6Ptr subnet6, + const ConstSubnet6Ptr subnet6, const string& prefix, const string& suffix) { if (subnet6) { diff --git a/src/hooks/dhcp/run_script/run_script.h b/src/hooks/dhcp/run_script/run_script.h index 31fd2454d3..5ab6d2ab3f 100644 --- a/src/hooks/dhcp/run_script/run_script.h +++ b/src/hooks/dhcp/run_script/run_script.h @@ -131,7 +131,7 @@ public: /// @param prefix The prefix for the name of the environment variable. /// @param suffix The suffix for the name of the environment variable. static void extractSubnet4(isc::asiolink::ProcessEnvVars& vars, - const isc::dhcp::Subnet4Ptr subnet4, + const isc::dhcp::ConstSubnet4Ptr subnet4, const std::string& prefix = "", const std::string& suffix = ""); @@ -141,7 +141,7 @@ public: /// @param prefix The prefix for the name of the environment variable. /// @param suffix The suffix for the name of the environment variable. static void extractSubnet6(isc::asiolink::ProcessEnvVars& vars, - const isc::dhcp::Subnet6Ptr subnet6, + const isc::dhcp::ConstSubnet6Ptr subnet6, const std::string& prefix = "", const std::string& suffix = ""); diff --git a/src/hooks/dhcp/run_script/run_script_callouts.cc b/src/hooks/dhcp/run_script/run_script_callouts.cc index 22b4a54fd3..fc365f2140 100644 --- a/src/hooks/dhcp/run_script/run_script_callouts.cc +++ b/src/hooks/dhcp/run_script/run_script_callouts.cc @@ -100,7 +100,7 @@ int lease4_renew(CalloutHandle& handle) { Pkt4Ptr pkt4; handle.getArgument("query4", pkt4); RunScriptImpl::extractPkt4(vars, pkt4, "QUERY4"); - Subnet4Ptr subnet4; + ConstSubnet4Ptr subnet4; handle.getArgument("subnet4", subnet4); RunScriptImpl::extractSubnet4(vars, subnet4, "SUBNET4"); ClientIdPtr clientid; diff --git a/src/hooks/dhcp/run_script/tests/run_script_unittests.cc b/src/hooks/dhcp/run_script/tests/run_script_unittests.cc index 1ada762b60..468d0bb33d 100644 --- a/src/hooks/dhcp/run_script/tests/run_script_unittests.cc +++ b/src/hooks/dhcp/run_script/tests/run_script_unittests.cc @@ -877,7 +877,7 @@ TEST_F(RunScriptTest, lease4Renew) { CalloutHandle handle(getCalloutManager()); Pkt4Ptr pkt4 = generatePkt4(); handle.setArgument("query4", pkt4); - Subnet4Ptr subnet4 = generateSubnet4(); + ConstSubnet4Ptr subnet4 = generateSubnet4(); handle.setArgument("subnet4", subnet4); ClientIdPtr clientid = generateClientId(); handle.setArgument("clientid", clientid); |