diff options
author | Marcin Siodelski <marcin@isc.org> | 2016-04-26 17:18:45 +0200 |
---|---|---|
committer | Marcin Siodelski <marcin@isc.org> | 2016-04-26 17:18:45 +0200 |
commit | 9a34bbb53c1a7906e1e052028c04311f0dba02d7 (patch) | |
tree | 9a4e7708b12a6269d8a89d59ce491f0bbeed2a9f /src/lib/dhcpsrv | |
parent | [4303] Values in 'host-reservation-identifiers' used by the servers. (diff) | |
download | kea-9a34bbb53c1a7906e1e052028c04311f0dba02d7.tar.xz kea-9a34bbb53c1a7906e1e052028c04311f0dba02d7.zip |
[4303] Renamed CfgHostReservations to CfgHostOperations.
This change was suggested during a ticket review.
Diffstat (limited to 'src/lib/dhcpsrv')
-rwxr-xr-x | src/lib/dhcpsrv/Makefile.am | 2 | ||||
-rw-r--r-- | src/lib/dhcpsrv/alloc_engine.cc | 10 | ||||
-rw-r--r-- | src/lib/dhcpsrv/alloc_engine.h | 4 | ||||
-rw-r--r-- | src/lib/dhcpsrv/cfg_host_operations.cc (renamed from src/lib/dhcpsrv/cfg_host_reservations.cc) | 20 | ||||
-rw-r--r-- | src/lib/dhcpsrv/cfg_host_operations.h (renamed from src/lib/dhcpsrv/cfg_host_reservations.h) | 26 | ||||
-rw-r--r-- | src/lib/dhcpsrv/parsers/host_reservation_parser.cc | 4 | ||||
-rw-r--r-- | src/lib/dhcpsrv/parsers/host_reservation_parser.h | 2 | ||||
-rw-r--r-- | src/lib/dhcpsrv/srv_config.cc | 8 | ||||
-rw-r--r-- | src/lib/dhcpsrv/srv_config.h | 22 | ||||
-rwxr-xr-x | src/lib/dhcpsrv/tests/Makefile.am | 2 | ||||
-rw-r--r-- | src/lib/dhcpsrv/tests/cfg_host_operations_unittest.cc (renamed from src/lib/dhcpsrv/tests/cfg_host_reservations_unittest.cc) | 22 | ||||
-rw-r--r-- | src/lib/dhcpsrv/tests/host_reservation_parser_unittest.cc | 32 |
12 files changed, 77 insertions, 77 deletions
diff --git a/src/lib/dhcpsrv/Makefile.am b/src/lib/dhcpsrv/Makefile.am index f6a364737c..f09f20b445 100755 --- a/src/lib/dhcpsrv/Makefile.am +++ b/src/lib/dhcpsrv/Makefile.am @@ -90,7 +90,7 @@ libkea_dhcpsrv_la_SOURCES += cfg_duid.cc cfg_duid.h libkea_dhcpsrv_la_SOURCES += cfg_hosts.cc cfg_hosts.h libkea_dhcpsrv_la_SOURCES += cfg_iface.cc cfg_iface.h libkea_dhcpsrv_la_SOURCES += cfg_expiration.cc cfg_expiration.h -libkea_dhcpsrv_la_SOURCES += cfg_host_reservations.cc cfg_host_reservations.h +libkea_dhcpsrv_la_SOURCES += cfg_host_operations.cc cfg_host_operations.h libkea_dhcpsrv_la_SOURCES += cfg_option.cc cfg_option.h libkea_dhcpsrv_la_SOURCES += cfg_option_def.cc cfg_option_def.h libkea_dhcpsrv_la_SOURCES += cfg_rsoo.cc cfg_rsoo.h diff --git a/src/lib/dhcpsrv/alloc_engine.cc b/src/lib/dhcpsrv/alloc_engine.cc index aa5c703ae5..4058b26a99 100644 --- a/src/lib/dhcpsrv/alloc_engine.cc +++ b/src/lib/dhcpsrv/alloc_engine.cc @@ -306,7 +306,7 @@ AllocEngine::AllocatorPtr AllocEngine::getAllocator(Lease::Type type) { template<typename ContextType> void AllocEngine::findReservationInternal(ContextType& ctx, - const ConstCfgHostReservationsPtr& cfg, + const ConstCfgHostOperationsPtr& cfg, const AllocEngine::HostGetFunc& host_get) { ctx.host_.reset(); @@ -376,8 +376,8 @@ AllocEngine::ClientContext6::ClientContext6(const Subnet6Ptr& subnet, const Duid void AllocEngine::findReservation(ClientContext6& ctx) { - ConstCfgHostReservationsPtr cfg = - CfgMgr::instance().getCurrentCfg()->getCfgHostReservations6(); + ConstCfgHostOperationsPtr cfg = + CfgMgr::instance().getCurrentCfg()->getCfgHostOperations6(); findReservationInternal(ctx, cfg, boost::bind(&HostMgr::get6, &HostMgr::instance(), _1, _2, _3, _4)); @@ -2135,8 +2135,8 @@ AllocEngine::allocateLease4(ClientContext4& ctx) { void AllocEngine::findReservation(ClientContext4& ctx) { - ConstCfgHostReservationsPtr cfg = - CfgMgr::instance().getCurrentCfg()->getCfgHostReservations4(); + ConstCfgHostOperationsPtr cfg = + CfgMgr::instance().getCurrentCfg()->getCfgHostOperations4(); findReservationInternal(ctx, cfg, boost::bind(&HostMgr::get4, &HostMgr::instance(), _1, _2, _3, _4)); diff --git a/src/lib/dhcpsrv/alloc_engine.h b/src/lib/dhcpsrv/alloc_engine.h index 25d2c975f3..d1557e141f 100644 --- a/src/lib/dhcpsrv/alloc_engine.h +++ b/src/lib/dhcpsrv/alloc_engine.h @@ -13,7 +13,7 @@ #include <dhcp/pkt4.h> #include <dhcp/pkt6.h> #include <dhcp/option6_ia.h> -#include <dhcpsrv/cfg_host_reservations.h> +#include <dhcpsrv/cfg_host_operations.h> #include <dhcpsrv/host.h> #include <dhcpsrv/subnet.h> #include <dhcpsrv/lease_mgr.h> @@ -642,7 +642,7 @@ private: /// @tparam ContextType Either @ref ClientContext6 or @ref ClientContext4. template<typename ContextType> static void findReservationInternal(ContextType& ctx, - const ConstCfgHostReservationsPtr& cfg, + const ConstCfgHostOperationsPtr& cfg, const HostGetFunc& host_get); /// @brief creates a lease and inserts it in LeaseMgr if necessary diff --git a/src/lib/dhcpsrv/cfg_host_reservations.cc b/src/lib/dhcpsrv/cfg_host_operations.cc index ffed69306b..7eb233b21f 100644 --- a/src/lib/dhcpsrv/cfg_host_reservations.cc +++ b/src/lib/dhcpsrv/cfg_host_operations.cc @@ -5,35 +5,35 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. #include <exceptions/exceptions.h> -#include <dhcpsrv/cfg_host_reservations.h> +#include <dhcpsrv/cfg_host_operations.h> #include <algorithm> namespace isc { namespace dhcp { -CfgHostReservations::CfgHostReservations() +CfgHostOperations::CfgHostOperations() : identifier_types_() { } -CfgHostReservationsPtr -CfgHostReservations::createConfig4() { - CfgHostReservationsPtr cfg(new CfgHostReservations()); +CfgHostOperationsPtr +CfgHostOperations::createConfig4() { + CfgHostOperationsPtr cfg(new CfgHostOperations()); cfg->addIdentifierType("hw-address"); cfg->addIdentifierType("duid"); cfg->addIdentifierType("circuit-id"); return (cfg); } -CfgHostReservationsPtr -CfgHostReservations::createConfig6() { - CfgHostReservationsPtr cfg(new CfgHostReservations()); +CfgHostOperationsPtr +CfgHostOperations::createConfig6() { + CfgHostOperationsPtr cfg(new CfgHostOperations()); cfg->addIdentifierType("hw-address"); cfg->addIdentifierType("duid"); return (cfg); } void -CfgHostReservations::addIdentifierType(const std::string& identifier_name) { +CfgHostOperations::addIdentifierType(const std::string& identifier_name) { Host::IdentifierType identifier_type = Host::getIdentifierType(identifier_name); if (std::find(identifier_types_.begin(), identifier_types_.end(), identifier_type) != identifier_types_.end()) { @@ -44,7 +44,7 @@ CfgHostReservations::addIdentifierType(const std::string& identifier_name) { } void -CfgHostReservations::clear() { +CfgHostOperations::clear() { identifier_types_.clear(); } diff --git a/src/lib/dhcpsrv/cfg_host_reservations.h b/src/lib/dhcpsrv/cfg_host_operations.h index d846aaa8eb..fcb3a577ae 100644 --- a/src/lib/dhcpsrv/cfg_host_reservations.h +++ b/src/lib/dhcpsrv/cfg_host_operations.h @@ -4,8 +4,8 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. -#ifndef CFG_HOST_RESERVATIONS_H -#define CFG_HOST_RESERVATIONS_H +#ifndef CFG_HOST_OPERATIONS_H +#define CFG_HOST_OPERATIONS_H #include <dhcpsrv/host.h> #include <boost/shared_ptr.hpp> @@ -15,17 +15,17 @@ namespace isc { namespace dhcp { -/// @brief Forward declaration of the @ref CfgHostReservations. -class CfgHostReservations; +/// @brief Forward declaration of the @ref CfgHostOperations. +class CfgHostOperations; -/// @name Pointers to the @ref CfgHostReservations objects. +/// @name Pointers to the @ref CfgHostOperations objects. //@{ /// @brief Pointer to the Non-const object. -typedef boost::shared_ptr<CfgHostReservations> CfgHostReservationsPtr; +typedef boost::shared_ptr<CfgHostOperations> CfgHostOperationsPtr; /// @brief Pointer to the const object. -typedef boost::shared_ptr<const CfgHostReservations> -ConstCfgHostReservationsPtr; +typedef boost::shared_ptr<const CfgHostOperations> +ConstCfgHostOperationsPtr; //@} @@ -39,7 +39,7 @@ ConstCfgHostReservationsPtr; /// An administrator selects which identifiers the server should /// use and in which order to search for host reservations to /// optimize performance of the server. -class CfgHostReservations { +class CfgHostOperations { public: /// @brief Type of the container holding ordered list of identifiers. @@ -49,15 +49,15 @@ public: /// /// The default confguration: /// - no identifiers selected for host reservations searches. - CfgHostReservations(); + CfgHostOperations(); /// @name Factory functions for creating default configurations. //@{ /// @brief Factory function for DHCPv4. - static CfgHostReservationsPtr createConfig4(); + static CfgHostOperationsPtr createConfig4(); /// @brief Factory function for DHCPv6. - static CfgHostReservationsPtr createConfig6(); + static CfgHostOperationsPtr createConfig6(); //@} /// @brief Adds new identifier type to a collection of identifiers @@ -88,4 +88,4 @@ private: } } -#endif // CFG_HOST_RESERVATIONS_H +#endif // CFG_HOST_OPERATIONS_H diff --git a/src/lib/dhcpsrv/parsers/host_reservation_parser.cc b/src/lib/dhcpsrv/parsers/host_reservation_parser.cc index ed5cd45ce6..8443c079d8 100644 --- a/src/lib/dhcpsrv/parsers/host_reservation_parser.cc +++ b/src/lib/dhcpsrv/parsers/host_reservation_parser.cc @@ -377,7 +377,7 @@ HostReservationIdsParser::build(isc::data::ConstElementPtr ids_list) { HostReservationIdsParser4::HostReservationIdsParser4() : HostReservationIdsParser() { - staging_cfg_ = CfgMgr::instance().getStagingCfg()->getCfgHostReservations4(); + staging_cfg_ = CfgMgr::instance().getStagingCfg()->getCfgHostOperations4(); } bool @@ -387,7 +387,7 @@ HostReservationIdsParser4::isSupportedIdentifier(const std::string& id_name) con HostReservationIdsParser6::HostReservationIdsParser6() : HostReservationIdsParser() { - staging_cfg_ = CfgMgr::instance().getStagingCfg()->getCfgHostReservations6(); + staging_cfg_ = CfgMgr::instance().getStagingCfg()->getCfgHostOperations6(); } bool diff --git a/src/lib/dhcpsrv/parsers/host_reservation_parser.h b/src/lib/dhcpsrv/parsers/host_reservation_parser.h index 992d9accb4..42ded9c68f 100644 --- a/src/lib/dhcpsrv/parsers/host_reservation_parser.h +++ b/src/lib/dhcpsrv/parsers/host_reservation_parser.h @@ -182,7 +182,7 @@ protected: virtual bool isSupportedIdentifier(const std::string& id_name) const = 0; /// @brief Pointer to the object holding configuration. - CfgHostReservationsPtr staging_cfg_; + CfgHostOperationsPtr staging_cfg_; }; diff --git a/src/lib/dhcpsrv/srv_config.cc b/src/lib/dhcpsrv/srv_config.cc index 07c5729a0f..c9316d2474 100644 --- a/src/lib/dhcpsrv/srv_config.cc +++ b/src/lib/dhcpsrv/srv_config.cc @@ -25,8 +25,8 @@ SrvConfig::SrvConfig() cfg_hosts_(new CfgHosts()), cfg_rsoo_(new CfgRSOO()), cfg_expiration_(new CfgExpiration()), cfg_duid_(new CfgDUID()), cfg_db_access_(new CfgDbAccess()), - cfg_host_reservations4_(CfgHostReservations::createConfig4()), - cfg_host_reservations6_(CfgHostReservations::createConfig6()), + cfg_host_operations4_(CfgHostOperations::createConfig4()), + cfg_host_operations6_(CfgHostOperations::createConfig6()), class_dictionary_(new ClientClassDictionary()), decline_timer_(0) { } @@ -38,8 +38,8 @@ SrvConfig::SrvConfig(const uint32_t sequence) cfg_hosts_(new CfgHosts()), cfg_rsoo_(new CfgRSOO()), cfg_expiration_(new CfgExpiration()), cfg_duid_(new CfgDUID()), cfg_db_access_(new CfgDbAccess()), - cfg_host_reservations4_(CfgHostReservations::createConfig4()), - cfg_host_reservations6_(CfgHostReservations::createConfig6()), + cfg_host_operations4_(CfgHostOperations::createConfig4()), + cfg_host_operations6_(CfgHostOperations::createConfig6()), class_dictionary_(new ClientClassDictionary()), decline_timer_(0) { } diff --git a/src/lib/dhcpsrv/srv_config.h b/src/lib/dhcpsrv/srv_config.h index b07b7b21c2..4abb5f7b9b 100644 --- a/src/lib/dhcpsrv/srv_config.h +++ b/src/lib/dhcpsrv/srv_config.h @@ -10,7 +10,7 @@ #include <dhcpsrv/cfg_db_access.h> #include <dhcpsrv/cfg_duid.h> #include <dhcpsrv/cfg_expiration.h> -#include <dhcpsrv/cfg_host_reservations.h> +#include <dhcpsrv/cfg_host_operations.h> #include <dhcpsrv/cfg_hosts.h> #include <dhcpsrv/cfg_iface.h> #include <dhcpsrv/cfg_option.h> @@ -294,26 +294,26 @@ public: /// @brief Returns pointer to the object holding general configuration /// for host reservations in DHCPv4. - CfgHostReservationsPtr getCfgHostReservations4() { - return (cfg_host_reservations4_); + CfgHostOperationsPtr getCfgHostOperations4() { + return (cfg_host_operations4_); } /// @brief Returns const pointer to the object holding general /// configuration for host reservations in DHCPv4 - ConstCfgHostReservationsPtr getCfgHostReservations4() const { - return (cfg_host_reservations4_); + ConstCfgHostOperationsPtr getCfgHostOperations4() const { + return (cfg_host_operations4_); } /// @brief Returns pointer to the object holding general configuration /// for host reservations in DHCPv6. - CfgHostReservationsPtr getCfgHostReservations6() { - return (cfg_host_reservations6_); + CfgHostOperationsPtr getCfgHostOperations6() { + return (cfg_host_operations6_); } /// @brief Returns const pointer to the object holding general /// configuration for host reservations in DHCPv6 - ConstCfgHostReservationsPtr getCfgHostReservations6() const { - return (cfg_host_reservations6_); + ConstCfgHostOperationsPtr getCfgHostOperations6() const { + return (cfg_host_operations6_); } //@} @@ -529,11 +529,11 @@ private: /// @brief Pointer to the general configuration for host reservations in /// DHCPv4. - CfgHostReservationsPtr cfg_host_reservations4_; + CfgHostOperationsPtr cfg_host_operations4_; /// @brief Pointer to the general configuration for host reservations in /// DHCPv6. - CfgHostReservationsPtr cfg_host_reservations6_; + CfgHostOperationsPtr cfg_host_operations6_; /// @brief Pointer to the control-socket information isc::data::ConstElementPtr control_socket_; diff --git a/src/lib/dhcpsrv/tests/Makefile.am b/src/lib/dhcpsrv/tests/Makefile.am index 517079bfab..acb916f5f0 100755 --- a/src/lib/dhcpsrv/tests/Makefile.am +++ b/src/lib/dhcpsrv/tests/Makefile.am @@ -68,7 +68,7 @@ libdhcpsrv_unittests_SOURCES += callout_handle_store_unittest.cc libdhcpsrv_unittests_SOURCES += cfg_db_access_unittest.cc libdhcpsrv_unittests_SOURCES += cfg_duid_unittest.cc libdhcpsrv_unittests_SOURCES += cfg_expiration_unittest.cc -libdhcpsrv_unittests_SOURCES += cfg_host_reservations_unittest.cc +libdhcpsrv_unittests_SOURCES += cfg_host_operations_unittest.cc libdhcpsrv_unittests_SOURCES += cfg_hosts_unittest.cc libdhcpsrv_unittests_SOURCES += cfg_iface_unittest.cc libdhcpsrv_unittests_SOURCES += cfg_mac_source_unittest.cc diff --git a/src/lib/dhcpsrv/tests/cfg_host_reservations_unittest.cc b/src/lib/dhcpsrv/tests/cfg_host_operations_unittest.cc index df59dcb207..0a6e718e46 100644 --- a/src/lib/dhcpsrv/tests/cfg_host_reservations_unittest.cc +++ b/src/lib/dhcpsrv/tests/cfg_host_operations_unittest.cc @@ -6,7 +6,7 @@ #include <config.h> #include <dhcp/dhcp6.h> -#include <dhcpsrv/cfg_host_reservations.h> +#include <dhcpsrv/cfg_host_operations.h> #include <dhcpsrv/host.h> #include <gtest/gtest.h> #include <algorithm> @@ -21,21 +21,21 @@ namespace { /// @param cfg Object holding current configuration. /// @param id Identifier type which presence should be checked. bool -identifierAdded(const CfgHostReservations& cfg, const Host::IdentifierType& id) { - CfgHostReservations::IdentifierTypes types = cfg.getIdentifierTypes(); +identifierAdded(const CfgHostOperations& cfg, const Host::IdentifierType& id) { + CfgHostOperations::IdentifierTypes types = cfg.getIdentifierTypes(); return (std::find(types.begin(), types.end(), id) != types.end()); } // This test checks default configuration. -TEST(CfgHostReservationsTest, defaults) { - CfgHostReservations cfg; +TEST(CfgHostOperationsTest, defaults) { + CfgHostOperations cfg; EXPECT_TRUE(cfg.getIdentifierTypes().empty()); } // This test verifies that identifier types can be added into an // ordered collection and then removed. -TEST(CfgHostReservationsTest, addIdentifier) { - CfgHostReservations cfg; +TEST(CfgHostOperationsTest, addIdentifier) { + CfgHostOperations cfg; // Only HW address added. ASSERT_NO_THROW(cfg.addIdentifierType("hw-address")); @@ -62,8 +62,8 @@ TEST(CfgHostReservationsTest, addIdentifier) { // This test verfies that the default DHCPv4 configuration is created // as expected. -TEST(CfgHostReservationsTest, createConfig4) { - CfgHostReservationsPtr cfg = CfgHostReservations::createConfig4(); +TEST(CfgHostOperationsTest, createConfig4) { + CfgHostOperationsPtr cfg = CfgHostOperations::createConfig4(); EXPECT_TRUE(identifierAdded(*cfg, Host::IDENT_HWADDR)); EXPECT_TRUE(identifierAdded(*cfg, Host::IDENT_DUID)); @@ -72,8 +72,8 @@ TEST(CfgHostReservationsTest, createConfig4) { // This test verfies that the default DHCPv6 configuration is created // as expected. -TEST(CfgHostReservationsTest, createConfig6) { - CfgHostReservationsPtr cfg = CfgHostReservations::createConfig6(); +TEST(CfgHostOperationsTest, createConfig6) { + CfgHostOperationsPtr cfg = CfgHostOperations::createConfig6(); EXPECT_TRUE(identifierAdded(*cfg, Host::IDENT_HWADDR)); EXPECT_TRUE(identifierAdded(*cfg, Host::IDENT_DUID)); diff --git a/src/lib/dhcpsrv/tests/host_reservation_parser_unittest.cc b/src/lib/dhcpsrv/tests/host_reservation_parser_unittest.cc index 54637d355a..88d879b912 100644 --- a/src/lib/dhcpsrv/tests/host_reservation_parser_unittest.cc +++ b/src/lib/dhcpsrv/tests/host_reservation_parser_unittest.cc @@ -825,12 +825,12 @@ TEST_F(HostReservationIdsParserTest, dhcp4Identifiers) { HostReservationIdsParser4 parser; ASSERT_NO_THROW(parser.build(config_element)); - ConstCfgHostReservationsPtr cfg = CfgMgr::instance().getStagingCfg()-> - getCfgHostReservations4(); - const CfgHostReservations::IdentifierTypes& ids = cfg->getIdentifierTypes(); + ConstCfgHostOperationsPtr cfg = CfgMgr::instance().getStagingCfg()-> + getCfgHostOperations4(); + const CfgHostOperations::IdentifierTypes& ids = cfg->getIdentifierTypes(); ASSERT_EQ(3, ids.size()); - CfgHostReservations::IdentifierTypes::const_iterator id = ids.begin(); + CfgHostOperations::IdentifierTypes::const_iterator id = ids.begin(); EXPECT_EQ(*id++, Host::IDENT_CIRCUIT_ID); EXPECT_EQ(*id++, Host::IDENT_DUID); EXPECT_EQ(*id++, Host::IDENT_HWADDR); @@ -846,12 +846,12 @@ TEST_F(HostReservationIdsParserTest, dhcp6Identifiers) { HostReservationIdsParser6 parser; ASSERT_NO_THROW(parser.build(config_element)); - ConstCfgHostReservationsPtr cfg = CfgMgr::instance().getStagingCfg()-> - getCfgHostReservations6(); - const CfgHostReservations::IdentifierTypes& ids = cfg->getIdentifierTypes(); + ConstCfgHostOperationsPtr cfg = CfgMgr::instance().getStagingCfg()-> + getCfgHostOperations6(); + const CfgHostOperations::IdentifierTypes& ids = cfg->getIdentifierTypes(); ASSERT_EQ(2, ids.size()); - CfgHostReservations::IdentifierTypes::const_iterator id = ids.begin(); + CfgHostOperations::IdentifierTypes::const_iterator id = ids.begin(); EXPECT_EQ(*id++, Host::IDENT_DUID); EXPECT_EQ(*id++, Host::IDENT_HWADDR); } @@ -880,12 +880,12 @@ TEST_F(HostReservationIdsParserTest, dhcp4AutoIdentifiers) { HostReservationIdsParser4 parser; ASSERT_NO_THROW(parser.build(config_element)); - ConstCfgHostReservationsPtr cfg = CfgMgr::instance().getStagingCfg()-> - getCfgHostReservations4(); - const CfgHostReservations::IdentifierTypes& ids = cfg->getIdentifierTypes(); + ConstCfgHostOperationsPtr cfg = CfgMgr::instance().getStagingCfg()-> + getCfgHostOperations4(); + const CfgHostOperations::IdentifierTypes& ids = cfg->getIdentifierTypes(); ASSERT_EQ(3, ids.size()); - CfgHostReservations::IdentifierTypes::const_iterator id = ids.begin(); + CfgHostOperations::IdentifierTypes::const_iterator id = ids.begin(); EXPECT_EQ(*id++, Host::IDENT_HWADDR); EXPECT_EQ(*id++, Host::IDENT_DUID); EXPECT_EQ(*id++, Host::IDENT_CIRCUIT_ID); @@ -922,12 +922,12 @@ TEST_F(HostReservationIdsParserTest, dhcp6AutoIdentifiers) { HostReservationIdsParser6 parser; ASSERT_NO_THROW(parser.build(config_element)); - ConstCfgHostReservationsPtr cfg = CfgMgr::instance().getStagingCfg()-> - getCfgHostReservations6(); - const CfgHostReservations::IdentifierTypes& ids = cfg->getIdentifierTypes(); + ConstCfgHostOperationsPtr cfg = CfgMgr::instance().getStagingCfg()-> + getCfgHostOperations6(); + const CfgHostOperations::IdentifierTypes& ids = cfg->getIdentifierTypes(); ASSERT_EQ(2, ids.size()); - CfgHostReservations::IdentifierTypes::const_iterator id = ids.begin(); + CfgHostOperations::IdentifierTypes::const_iterator id = ids.begin(); EXPECT_EQ(*id++, Host::IDENT_HWADDR); EXPECT_EQ(*id++, Host::IDENT_DUID); } |