From: Francis Dupont Date: Tue, 19 Feb 2019 22:38:15 +0000 (+0100) Subject: [458-config-backend-support-in-src-lib] Addressed comments X-Git-Tag: 397-cb-implement-mysqlconfigbackenddhcpv6_base~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91dbfc59ee68668ff2e602a4f04650426bad9c8c;p=thirdparty%2Fkea.git [458-config-backend-support-in-src-lib] Addressed comments --- diff --git a/src/lib/dhcpsrv/Makefile.am b/src/lib/dhcpsrv/Makefile.am index 383760e442..e72952892e 100644 --- a/src/lib/dhcpsrv/Makefile.am +++ b/src/lib/dhcpsrv/Makefile.am @@ -281,8 +281,11 @@ libkea_dhcpsrv_include_HEADERS = \ cfgmgr.h \ client_class_def.h \ config_backend_dhcp4.h \ + config_backend_dhcp6.h \ config_backend_dhcp4_mgr.h \ + config_backend_dhcp6_mgr.h \ config_backend_pool_dhcp4.h \ + config_backend_pool_dhcp6.h \ csv_lease_file4.h \ csv_lease_file6.h \ dhcpsrv_exceptions.h \ diff --git a/src/lib/dhcpsrv/config_backend_dhcp4.h b/src/lib/dhcpsrv/config_backend_dhcp4.h index 9b0b3d49a4..338a8db970 100644 --- a/src/lib/dhcpsrv/config_backend_dhcp4.h +++ b/src/lib/dhcpsrv/config_backend_dhcp4.h @@ -151,7 +151,7 @@ public: virtual OptionContainer getAllOptions4(const db::ServerSelector& server_selector) const = 0; - /// @brief Retrieves option modified after specified time. + /// @brief Retrieves options modified after specified time. /// /// @param selector Server selector. /// @param modification_time Lower bound option modification time. @@ -171,6 +171,10 @@ public: getGlobalParameter4(const db::ServerSelector& selector, const std::string& name) const = 0; + /// @brief Retrieves all global parameters modified after specified time. + /// + /// @param selector Server selector. + /// @param modification_time Lower bound parameter modification time. /// @return Collection of global parameters. virtual data::StampedValueCollection getAllGlobalParameters4(const db::ServerSelector& selector) const = 0; diff --git a/src/lib/dhcpsrv/config_backend_dhcp4_mgr.cc b/src/lib/dhcpsrv/config_backend_dhcp4_mgr.cc index 134f0200c4..587cbc8e8f 100644 --- a/src/lib/dhcpsrv/config_backend_dhcp4_mgr.cc +++ b/src/lib/dhcpsrv/config_backend_dhcp4_mgr.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC") +// Copyright (C) 2018-2019 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this @@ -25,7 +25,7 @@ ConfigBackendDHCPv4Mgr::create() { void ConfigBackendDHCPv4Mgr::destroy() { - getConfigBackendDHCPv4MgrPtr().reset(new ConfigBackendDHCPv4Mgr()); + getConfigBackendDHCPv4MgrPtr().reset(); } ConfigBackendDHCPv4Mgr& diff --git a/src/lib/dhcpsrv/config_backend_dhcp6.h b/src/lib/dhcpsrv/config_backend_dhcp6.h index f667fd2186..3bba27646b 100644 --- a/src/lib/dhcpsrv/config_backend_dhcp6.h +++ b/src/lib/dhcpsrv/config_backend_dhcp6.h @@ -151,7 +151,7 @@ public: virtual OptionContainer getAllOptions6(const db::ServerSelector& server_selector) const = 0; - /// @brief Retrieves option modified after specified time. + /// @brief Retrieves options modified after specified time. /// /// @param selector Server selector. /// @param modification_time Lower bound option modification time. @@ -171,6 +171,10 @@ public: getGlobalParameter6(const db::ServerSelector& selector, const std::string& name) const = 0; + /// @brief Retrieves all global parameters modified after specified time. + /// + /// @param selector Server selector. + /// @param modification_time Lower bound parameter modification time. /// @return Collection of global parameters. virtual data::StampedValueCollection getAllGlobalParameters6(const db::ServerSelector& selector) const = 0; diff --git a/src/lib/dhcpsrv/config_backend_dhcp6_mgr.cc b/src/lib/dhcpsrv/config_backend_dhcp6_mgr.cc index 9d14e0ea8c..9fc5231f8d 100644 --- a/src/lib/dhcpsrv/config_backend_dhcp6_mgr.cc +++ b/src/lib/dhcpsrv/config_backend_dhcp6_mgr.cc @@ -25,7 +25,7 @@ ConfigBackendDHCPv6Mgr::create() { void ConfigBackendDHCPv6Mgr::destroy() { - getConfigBackendDHCPv6MgrPtr().reset(new ConfigBackendDHCPv6Mgr()); + getConfigBackendDHCPv6MgrPtr().reset(); } ConfigBackendDHCPv6Mgr&