From 0638e4e51698a9aa7f482e7cd54feccc2ef2cf04 Mon Sep 17 00:00:00 2001 From: Razvan Becheriu Date: Thu, 24 Jul 2025 13:59:55 +0300 Subject: [PATCH] [#3944] addressed review comments --- doc/sphinx/arm/dhcp4-srv.rst | 2 +- doc/sphinx/arm/dhcp6-srv.rst | 2 +- src/lib/dhcpsrv/parsers/host_reservation_parser.h | 9 +++++++++ src/lib/dhcpsrv/tests/srv_config_unittest.cc | 4 ++-- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/doc/sphinx/arm/dhcp4-srv.rst b/doc/sphinx/arm/dhcp4-srv.rst index 9fb21f8f64..aec25d71c2 100644 --- a/doc/sphinx/arm/dhcp4-srv.rst +++ b/doc/sphinx/arm/dhcp4-srv.rst @@ -8569,7 +8569,7 @@ Some scalar parameters contained by top-level global maps are supported by the c | dhcp-queue-control.capacity | dhcp-queue-control | capacity | +------------------------------------------------------------------+------------------------------+----------------------------------+ -Some scalar parameters contained by top-level global list are supported by the configuration backend. +Some global list parameters containing only scalar types are supported by the configuration backend. .. table:: List of DHCPv4 list parameters supported by the configuration backend diff --git a/doc/sphinx/arm/dhcp6-srv.rst b/doc/sphinx/arm/dhcp6-srv.rst index 7275043484..b280905185 100644 --- a/doc/sphinx/arm/dhcp6-srv.rst +++ b/doc/sphinx/arm/dhcp6-srv.rst @@ -8404,7 +8404,7 @@ Some scalar parameters contained by top level global maps are supported by the c | dhcp-queue-control.capacity | dhcp-queue-control | capacity | +------------------------------------------------------------------+------------------------------+----------------------------------+ -Some scalar parameters contained by top-level global list are supported by the configuration backend. +Some global list parameters containing only scalar types are supported by the configuration backend. .. table:: List of DHCPv6 list parameters supported by the configuration backend diff --git a/src/lib/dhcpsrv/parsers/host_reservation_parser.h b/src/lib/dhcpsrv/parsers/host_reservation_parser.h index d4eacb7c32..202ba38235 100644 --- a/src/lib/dhcpsrv/parsers/host_reservation_parser.h +++ b/src/lib/dhcpsrv/parsers/host_reservation_parser.h @@ -155,6 +155,9 @@ public: /// @brief Constructor. /// /// @param cfg Pointer to the object holding configuration. + /// The configuration provided will be updated by + /// @ref HostReservationIdsParser::parse with the list of host + /// identifiers. HostReservationIdsParser(CfgHostOperationsPtr cfg); /// @brief Destructor. @@ -207,6 +210,9 @@ public: /// configuration. /// /// @param cfg Pointer to the object holding configuration. + /// The configuration provided will be updated by + /// @ref HostReservationIdsParser::parse with the list of host + /// identifiers. HostReservationIdsParser4(CfgHostOperationsPtr cfg); protected: @@ -230,6 +236,9 @@ public: /// configuration. /// /// @param cfg Pointer to the object holding configuration. + /// The configuration provided will be updated by + /// @ref HostReservationIdsParser::parse with the list of host + /// identifiers. HostReservationIdsParser6(CfgHostOperationsPtr cfg); protected: diff --git a/src/lib/dhcpsrv/tests/srv_config_unittest.cc b/src/lib/dhcpsrv/tests/srv_config_unittest.cc index 962c60bf0e..9e4d11d142 100644 --- a/src/lib/dhcpsrv/tests/srv_config_unittest.cc +++ b/src/lib/dhcpsrv/tests/srv_config_unittest.cc @@ -1122,9 +1122,9 @@ TEST_F(SrvConfigTest, mergeGlobals4) { mt->set("enable-multi-threading", Element::create(false)); mt->set("thread-pool-size", Element::create(256)); ElementPtr hr_i = Element::createList(); - cfg_from.addConfiguredGlobal("host-reservation-identifiers", hr_i); hr_i->add(Element::create("hw-address")); hr_i->add(Element::create("flex-id")); + cfg_from.addConfiguredGlobal("host-reservation-identifiers", hr_i); // Now let's merge. ASSERT_NO_THROW(cfg_to.merge(cfg_from)); @@ -1226,9 +1226,9 @@ TEST_F(SrvConfigTest, mergeGlobals6) { mt->set("enable-multi-threading", Element::create(false)); mt->set("thread-pool-size", Element::create(256)); ElementPtr hr_i = Element::createList(); - cfg_from.addConfiguredGlobal("host-reservation-identifiers", hr_i); hr_i->add(Element::create("hw-address")); hr_i->add(Element::create("flex-id")); + cfg_from.addConfiguredGlobal("host-reservation-identifiers", hr_i); // Now let's merge. ASSERT_NO_THROW(cfg_to.merge(cfg_from)); -- 2.47.2