From: Razvan Becheriu Date: Wed, 30 Jul 2025 13:44:26 +0000 (+0300) Subject: [#4014] addressed review comments X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=be9faa8f0d2dfa7394e392bdf913390935b617a0;p=thirdparty%2Fkea.git [#4014] addressed review comments --- diff --git a/doc/sphinx/arm/hooks-cb-cmds.rst b/doc/sphinx/arm/hooks-cb-cmds.rst index 5084a15af8..c345682f2b 100644 --- a/doc/sphinx/arm/hooks-cb-cmds.rst +++ b/doc/sphinx/arm/hooks-cb-cmds.rst @@ -1343,7 +1343,7 @@ The ``remote-option4-network-del``, ``remote-option6-network-del`` Commands These commands are used to delete a shared-network-specific DHCP option from the database. The option is identified by an option code -and option space and as of Kea 3.1.1, an optional ``client-classes`` +and option space, and as of Kea 3.1.1, an optional ``client-classes`` parameter may also be specified (see :ref:`cb-cmds-option-class-tags-as-keys`). These parameters are passed within the ``options`` list. Another list, ``shared-networks``, contains a map @@ -1438,8 +1438,10 @@ The ``remote-option6-pd-pool-del`` Command ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This command is used to delete a prefix delegation pool-specific DHCPv6 -option from the database. The option is identified by an option code -and option space. These two parameters are passed within the ``options`` list. +option from the database. The option is identified by an option code and +option space, and as of Kea 3.1.1, an optional ``client-classes`` parameter +may also be specified (see :ref:`cb-cmds-option-class-tags-as-keys`). +These parameters are passed within the ``options`` list. Another list, ``pd-pools``, contains a map with the prefix-delegation-pool prefix and length identifying the pool. If the option is not explicitly specified for this pool, no option is deleted. diff --git a/src/hooks/dhcp/mysql/mysql_cb_dhcp4.cc b/src/hooks/dhcp/mysql/mysql_cb_dhcp4.cc index aff111d6ca..4701444544 100644 --- a/src/hooks/dhcp/mysql/mysql_cb_dhcp4.cc +++ b/src/hooks/dhcp/mysql/mysql_cb_dhcp4.cc @@ -3517,7 +3517,8 @@ TaggedStatementArray tagged_statements = { { // Update existing global option. { MySqlConfigBackendDHCPv4Impl::UPDATE_OPTION4, - MYSQL_UPDATE_OPTION4_WITH_TAG(AND o.scope_id = 0 AND o.code = ? AND o.space = ? AND o.client_classes = ?) + MYSQL_UPDATE_OPTION4_WITH_TAG(AND o.scope_id = 0 AND o.code = ? AND o.space = ? + AND o.client_classes = ?) }, // Update existing subnet level option. diff --git a/src/hooks/dhcp/mysql/mysql_cb_dhcp4.h b/src/hooks/dhcp/mysql/mysql_cb_dhcp4.h index 8f41b4ba61..7fa7858f35 100644 --- a/src/hooks/dhcp/mysql/mysql_cb_dhcp4.h +++ b/src/hooks/dhcp/mysql/mysql_cb_dhcp4.h @@ -487,6 +487,7 @@ public: /// @param space Option space of the deleted option. /// @param client_classes Optional client classes list of the option to be deleted. /// Defaults to an empty pointer. + /// @return Number of deleted options. /// @throw NotImplemented if server selector is "unassigned". virtual uint64_t deleteOption4(const db::ServerSelector& server_selector, diff --git a/src/hooks/dhcp/mysql/mysql_cb_dhcp6.cc b/src/hooks/dhcp/mysql/mysql_cb_dhcp6.cc index b5249b23cb..6efda22e90 100644 --- a/src/hooks/dhcp/mysql/mysql_cb_dhcp6.cc +++ b/src/hooks/dhcp/mysql/mysql_cb_dhcp6.cc @@ -3950,14 +3950,14 @@ TaggedStatementArray tagged_statements = { { // Update existing shared network level option. { MySqlConfigBackendDHCPv6Impl::UPDATE_OPTION6_SHARED_NETWORK, - MYSQL_UPDATE_OPTION6_NO_TAG(o.scope_id = 4 AND o.shared_network_name = ? AND o.code = ? - AND o.space = ? AND o.client_classes = ?) + MYSQL_UPDATE_OPTION6_NO_TAG(o.scope_id = 4 AND o.shared_network_name = ? AND o.code = ? AND o.space = ? + AND o.client_classes = ?) }, // Update existing client class level option. { MySqlConfigBackendDHCPv6Impl::UPDATE_OPTION6_CLIENT_CLASS, - MYSQL_UPDATE_OPTION6_NO_TAG(o.scope_id = 2 AND o.dhcp_client_class = ? AND o.code = ? - AND o.space = ? AND o.client_classes = ?) + MYSQL_UPDATE_OPTION6_NO_TAG(o.scope_id = 2 AND o.dhcp_client_class = ? AND o.code = ? AND o.space = ? + AND o.client_classes = ?) }, // Update existing client class with specifying its position. @@ -4099,8 +4099,8 @@ TaggedStatementArray tagged_statements = { { // Delete single option from a subnet. { MySqlConfigBackendDHCPv6Impl::DELETE_OPTION6_SUBNET_ID, MYSQL_DELETE_OPTION_NO_TAG(dhcp6, - WHERE o.scope_id = 1 AND o.dhcp6_subnet_id = ? AND o.code = ? AND o.space = ? - AND o.client_classes LIKE ?) + WHERE (o.scope_id = 1 AND o.dhcp6_subnet_id = ? AND o.code = ? AND o.space = ? + AND o.client_classes LIKE ?)) }, // Delete single option from a pool. @@ -4118,8 +4118,8 @@ TaggedStatementArray tagged_statements = { { // Delete single option from a shared network. { MySqlConfigBackendDHCPv6Impl::DELETE_OPTION6_SHARED_NETWORK, MYSQL_DELETE_OPTION_NO_TAG(dhcp6, - WHERE o.scope_id = 4 AND o.shared_network_name = ? AND o.code = ? AND o.space = ? - AND o.client_classes LIKE ?) + WHERE (o.scope_id = 4 AND o.shared_network_name = ? AND o.code = ? AND o.space = ? + AND o.client_classes LIKE ?)) }, // Delete options belonging to a subnet. diff --git a/src/hooks/dhcp/mysql/mysql_cb_dhcp6.h b/src/hooks/dhcp/mysql/mysql_cb_dhcp6.h index 97d0682630..12fcc239f9 100644 --- a/src/hooks/dhcp/mysql/mysql_cb_dhcp6.h +++ b/src/hooks/dhcp/mysql/mysql_cb_dhcp6.h @@ -523,10 +523,8 @@ public: /// @return Number of deleted options. /// @throw NotImplemented if server selector is "unassigned". virtual uint64_t - deleteOption6(const db::ServerSelector& server_selector, - const SubnetID& subnet_id, - const uint16_t code, - const std::string& space, + deleteOption6(const db::ServerSelector& server_selector, const SubnetID& subnet_id, + const uint16_t code, const std::string& space, const ClientClassesPtr client_classes = ClientClassesPtr()); /// @brief Deletes pool level option. diff --git a/src/hooks/dhcp/mysql/mysql_cb_impl.cc b/src/hooks/dhcp/mysql/mysql_cb_impl.cc index 4418fccfbf..aa5f63f17b 100644 --- a/src/hooks/dhcp/mysql/mysql_cb_impl.cc +++ b/src/hooks/dhcp/mysql/mysql_cb_impl.cc @@ -587,7 +587,6 @@ MySqlConfigBackendImpl::getOption(const int index, OptionDescriptor::create(*options.begin())); } - OptionContainer MySqlConfigBackendImpl::getAllOptions(const int index, const Option::Universe& universe, diff --git a/src/hooks/dhcp/pgsql/pgsql_cb_dhcp4.cc b/src/hooks/dhcp/pgsql/pgsql_cb_dhcp4.cc index 2bdcb8b759..17d77f34e9 100644 --- a/src/hooks/dhcp/pgsql/pgsql_cb_dhcp4.cc +++ b/src/hooks/dhcp/pgsql/pgsql_cb_dhcp4.cc @@ -4054,7 +4054,8 @@ TaggedStatementArray tagged_statements = { { OID_TEXT // 18 client_classes (of option to update) }, "UPDATE_OPTION4", - PGSQL_UPDATE_OPTION4_WITH_TAG(AND o.scope_id = 0 AND o.code = $16 AND o.space = $17 AND o.client_classes = $18) + PGSQL_UPDATE_OPTION4_WITH_TAG(AND o.scope_id = 0 AND o.code = $16 AND o.space = $17 + AND o.client_classes = $18) }, // Update existing subnet level option. @@ -4082,7 +4083,8 @@ TaggedStatementArray tagged_statements = { { OID_TEXT // 18 client_classes (of option to update) }, "UPDATE_OPTION4_SUBNET_ID", - PGSQL_UPDATE_OPTION4_NO_TAG(o.scope_id = 1 AND o.dhcp4_subnet_id = $15 AND o.code = $16 AND o.space = $17 AND o.client_classes = $18) + PGSQL_UPDATE_OPTION4_NO_TAG(o.scope_id = 1 AND o.dhcp4_subnet_id = $15 AND o.code = $16 AND o.space = $17 + AND o.client_classes = $18) }, // Update existing pool level option. @@ -4110,7 +4112,8 @@ TaggedStatementArray tagged_statements = { { OID_TEXT // 18 client_classes (of option to update) }, "UPDATE_OPTION4_POOL_ID", - PGSQL_UPDATE_OPTION4_NO_TAG(o.scope_id = 5 AND o.pool_id = $15 AND o.code = $16 AND o.space = $17 AND o.client_classes = $18) + PGSQL_UPDATE_OPTION4_NO_TAG(o.scope_id = 5 AND o.pool_id = $15 AND o.code = $16 AND o.space = $17 + AND o.client_classes = $18) }, // Update existing shared network level option. @@ -4138,7 +4141,8 @@ TaggedStatementArray tagged_statements = { { OID_TEXT, // 18 client_classes (of option to update) }, "UPDATE_OPTION4_SHARED_NETWORK", - PGSQL_UPDATE_OPTION4_NO_TAG(o.scope_id = 4 AND o.shared_network_name = $15 AND o.code = $16 AND o.space = $17 AND o.client_classes = $18) + PGSQL_UPDATE_OPTION4_NO_TAG(o.scope_id = 4 AND o.shared_network_name = $15 AND o.code = $16 AND o.space = $17 + AND o.client_classes = $18) }, // Update existing client class level option. @@ -4166,7 +4170,8 @@ TaggedStatementArray tagged_statements = { { OID_TEXT // 18 client_classes (of option to update) }, "UPDATE_OPTION4_CLIENT_CLASS", - PGSQL_UPDATE_OPTION4_NO_TAG(o.scope_id = 2 AND o.dhcp_client_class = $15 AND o.code = $16 AND o.space = $17 AND o.client_classes = $18) + PGSQL_UPDATE_OPTION4_NO_TAG(o.scope_id = 2 AND o.dhcp_client_class = $15 AND o.code = $16 AND o.space = $17 + AND o.client_classes = $18) }, // Update existing client class with specifying its position. diff --git a/src/hooks/dhcp/pgsql/pgsql_cb_dhcp4.h b/src/hooks/dhcp/pgsql/pgsql_cb_dhcp4.h index eea5b9479d..517fcc65b8 100644 --- a/src/hooks/dhcp/pgsql/pgsql_cb_dhcp4.h +++ b/src/hooks/dhcp/pgsql/pgsql_cb_dhcp4.h @@ -487,6 +487,7 @@ public: /// @param space Option space of the deleted option. /// @param client_classes Optional client classes list of the option to be deleted. /// Defaults to an empty pointer. + /// @return Number of deleted options. /// @throw NotImplemented if server selector is "unassigned". virtual uint64_t deleteOption4(const db::ServerSelector& server_selector, diff --git a/src/hooks/dhcp/pgsql/pgsql_cb_dhcp6.cc b/src/hooks/dhcp/pgsql/pgsql_cb_dhcp6.cc index 3528292a37..c644dabad8 100644 --- a/src/hooks/dhcp/pgsql/pgsql_cb_dhcp6.cc +++ b/src/hooks/dhcp/pgsql/pgsql_cb_dhcp6.cc @@ -4492,8 +4492,8 @@ TaggedStatementArray tagged_statements = { { OID_TEXT // 19 client_classes (of option to update) }, "UPDATE_OPTION6_SUBNET_ID", - PGSQL_UPDATE_OPTION6_NO_TAG(o.scope_id = 1 AND o.dhcp6_subnet_id = $16 AND o.code = $17 - AND o.space = $18 AND o.client_classes = $19) + PGSQL_UPDATE_OPTION6_NO_TAG(o.scope_id = 1 AND o.dhcp6_subnet_id = $16 AND o.code = $17 AND o.space = $18 + AND o.client_classes = $19) }, // Update existing pool level option. @@ -4522,8 +4522,8 @@ TaggedStatementArray tagged_statements = { { OID_TEXT // 19 client_classes (of option to update) }, "UPDATE_OPTION6_POOL_ID", - PGSQL_UPDATE_OPTION6_NO_TAG(o.scope_id = 5 AND o.pool_id = $16 AND o.code = $17 - AND o.space = $18 AND o.client_classes = $19) + PGSQL_UPDATE_OPTION6_NO_TAG(o.scope_id = 5 AND o.pool_id = $16 AND o.code = $17 AND o.space = $18 + AND o.client_classes = $19) }, // Update existing pd pool level option. @@ -4552,8 +4552,8 @@ TaggedStatementArray tagged_statements = { { OID_TEXT // 19 client_classes (of option to update) }, "UPDATE_OPTION6_PD_POOL_ID", - PGSQL_UPDATE_OPTION6_NO_TAG(o.scope_id = 6 AND o.pd_pool_id = $16 AND o.code = $17 - AND o.space = $18 AND o.client_classes = $19) + PGSQL_UPDATE_OPTION6_NO_TAG(o.scope_id = 6 AND o.pd_pool_id = $16 AND o.code = $17 AND o.space = $18 + AND o.client_classes = $19) }, // Update existing shared network level option. @@ -4582,8 +4582,8 @@ TaggedStatementArray tagged_statements = { { OID_TEXT // 19 client_classes (of option to update) }, "UPDATE_OPTION6_SHARED_NETWORK", - PGSQL_UPDATE_OPTION6_NO_TAG(o.scope_id = 4 AND o.shared_network_name = $16 AND o.code = $17 - AND o.space = $18 AND o.client_classes = $19) + PGSQL_UPDATE_OPTION6_NO_TAG(o.scope_id = 4 AND o.shared_network_name = $16 AND o.code = $17 AND o.space = $18 + AND o.client_classes = $19) }, // Update existing client class level option. @@ -4612,8 +4612,8 @@ TaggedStatementArray tagged_statements = { { OID_TEXT // 19 client_classes (of option to update) }, "UPDATE_OPTION6_CLIENT_CLASS", - PGSQL_UPDATE_OPTION6_NO_TAG(o.scope_id = 2 AND o.dhcp_client_class = $16 AND o.code = $17 - AND o.space = $18 AND o.client_classes = $19) + PGSQL_UPDATE_OPTION6_NO_TAG(o.scope_id = 2 AND o.dhcp_client_class = $16 AND o.code = $17 AND o.space = $18 + AND o.client_classes = $19) }, // Update existing client class with specifying its position. @@ -5015,7 +5015,7 @@ TaggedStatementArray tagged_statements = { { "DELETE_OPTION6_SHARED_NETWORK", PGSQL_DELETE_OPTION_NO_TAG(dhcp6, WHERE o.scope_id = 4 AND o.shared_network_name = $1 AND o.code = $2 AND o.space = $3 - AND o.client_classes LIKE $4) + AND o.client_classes LIKE $4) }, // Delete options belonging to a subnet. diff --git a/src/hooks/dhcp/pgsql/tests/pgsql_cb_dhcp6_unittest.cc b/src/hooks/dhcp/pgsql/tests/pgsql_cb_dhcp6_unittest.cc index 4b5ff7019e..4778355bfc 100644 --- a/src/hooks/dhcp/pgsql/tests/pgsql_cb_dhcp6_unittest.cc +++ b/src/hooks/dhcp/pgsql/tests/pgsql_cb_dhcp6_unittest.cc @@ -349,7 +349,6 @@ TEST_F(PgSqlConfigBackendDHCPv6Test, getModifiedOptions6Test) { getModifiedOptions6Test(); } - TEST_F(PgSqlConfigBackendDHCPv6Test, globalOption6WithClientClassesTest) { globalOption6WithClientClassesTest(); } diff --git a/src/lib/dhcpsrv/config_backend_pool_dhcp4.h b/src/lib/dhcpsrv/config_backend_pool_dhcp4.h index b292c1e3b0..0523c3d092 100644 --- a/src/lib/dhcpsrv/config_backend_pool_dhcp4.h +++ b/src/lib/dhcpsrv/config_backend_pool_dhcp4.h @@ -521,6 +521,7 @@ public: /// @param space Option space of the option to be deleted. /// @param client_classes Optional client classes list of the option to be deleted. /// Defaults to an empty pointer. + /// @return Number of deleted options. virtual uint64_t deleteOption4(const db::BackendSelector& backend_selector, const db::ServerSelector& server_selector, diff --git a/src/lib/dhcpsrv/config_backend_pool_dhcp6.cc b/src/lib/dhcpsrv/config_backend_pool_dhcp6.cc index 405d59e996..e6ed8a1155 100644 --- a/src/lib/dhcpsrv/config_backend_pool_dhcp6.cc +++ b/src/lib/dhcpsrv/config_backend_pool_dhcp6.cc @@ -139,8 +139,7 @@ ConfigBackendPoolDHCPv6::getOption6(const BackendSelector& backend_selector, const ServerSelector& server_selector, const uint16_t code, const std::string& space, - const ClientClassesPtr client_classes - /* = ClientClassesPtr() */) const { + const ClientClassesPtr client_classes /* = ClientClassesPtr() */) const { OptionDescriptorPtr option; getPropertyPtrConst (&ConfigBackendDHCPv6::getOption6, backend_selector, server_selector, @@ -446,8 +445,7 @@ ConfigBackendPoolDHCPv6::deleteOption6(const BackendSelector& backend_selector, const ServerSelector& server_selector, const uint16_t code, const std::string& space, - const ClientClassesPtr client_classes - /* = ClientClassesPtr() */) { + const ClientClassesPtr client_classes /* = ClientClassesPtr() */) { return (createUpdateDeleteProperty (&ConfigBackendDHCPv6::deleteOption6, backend_selector, server_selector, @@ -460,8 +458,7 @@ ConfigBackendPoolDHCPv6::deleteOption6(const BackendSelector& backend_selector, const std::string& shared_network_name, const uint16_t code, const std::string& space, - const ClientClassesPtr client_classes - /* = ClientClassesPtr() */) { + const ClientClassesPtr client_classes /* = ClientClassesPtr() */) { return (createUpdateDeleteProperty @@ -475,8 +472,7 @@ ConfigBackendPoolDHCPv6::deleteOption6(const BackendSelector& backend_selector, const SubnetID& subnet_id, const uint16_t code, const std::string& space, - const ClientClassesPtr client_classes - /* = ClientClassesPtr() */) { + const ClientClassesPtr client_classes /* = ClientClassesPtr() */) { return (createUpdateDeleteProperty @@ -491,8 +487,7 @@ ConfigBackendPoolDHCPv6::deleteOption6(const BackendSelector& backend_selector, const asiolink::IOAddress& pool_end_address, const uint16_t code, const std::string& space, - const ClientClassesPtr client_classes - /* = ClientClassesPtr() */) { + const ClientClassesPtr client_classes /* = ClientClassesPtr() */) { return (createUpdateDeleteProperty @@ -507,8 +502,7 @@ ConfigBackendPoolDHCPv6::deleteOption6(const BackendSelector& backend_selector, const uint8_t pd_pool_prefix_length, const uint16_t code, const std::string& space, - const ClientClassesPtr client_classes - /* = ClientClassesPtr() */) { + const ClientClassesPtr client_classes /* = ClientClassesPtr() */) { return (createUpdateDeleteProperty diff --git a/src/lib/dhcpsrv/config_backend_pool_dhcp6.h b/src/lib/dhcpsrv/config_backend_pool_dhcp6.h index e122beb959..73e0435304 100644 --- a/src/lib/dhcpsrv/config_backend_pool_dhcp6.h +++ b/src/lib/dhcpsrv/config_backend_pool_dhcp6.h @@ -573,6 +573,8 @@ public: /// deleted option belongs. /// @param code Code of the deleted option. /// @param space Option space of the deleted option. + /// @param client_classes Optional client classes list of the option to be deleted. + /// Defaults to an empty pointer. /// @return Number of deleted options. virtual uint64_t deleteOption6(const db::BackendSelector& backend_selector, diff --git a/src/lib/dhcpsrv/testutils/generic_cb_dhcp4_unittest.cc b/src/lib/dhcpsrv/testutils/generic_cb_dhcp4_unittest.cc index ca7f9d6dae..a61b122e0c 100644 --- a/src/lib/dhcpsrv/testutils/generic_cb_dhcp4_unittest.cc +++ b/src/lib/dhcpsrv/testutils/generic_cb_dhcp4_unittest.cc @@ -3717,7 +3717,8 @@ GenericConfigBackendDHCPv4Test::globalOption4WithClientClassesTest() { ref_option->option_->getType(), DHCP4_OPTION_SPACE, ref_option->copyClientClasses()); - ASSERT_TRUE(found_option); + ASSERT_TRUE(found_option) << "ref_option" << ref_option->option_->toText() + << ", cc: " << ref_option->client_classes_.toText(); SCOPED_OPT_COMPARE((*ref_option), (*found_option)); } diff --git a/src/lib/dhcpsrv/testutils/generic_cb_dhcp6_unittest.cc b/src/lib/dhcpsrv/testutils/generic_cb_dhcp6_unittest.cc index 0056724bf2..3a411bba06 100644 --- a/src/lib/dhcpsrv/testutils/generic_cb_dhcp6_unittest.cc +++ b/src/lib/dhcpsrv/testutils/generic_cb_dhcp6_unittest.cc @@ -74,10 +74,10 @@ GenericConfigBackendDHCPv6Test::SetUp() { void GenericConfigBackendDHCPv6Test::TearDown() { cbptr_.reset(); + // If data wipe enabled, delete transient data otherwise destroy the schema. if (getenv("KEA_UNIT_TEST_KEEP_SCHEMA")) { std::cout << "KEA_UNIT_TEST_KEEP_SCHEMA set, avoid schema destruction" << std::endl; } else { - // If data wipe enabled, delete transient data otherwise destroy the schema. destroySchema(); } } @@ -5238,7 +5238,8 @@ GenericConfigBackendDHCPv6Test::poolOption6WithClientClassesTest() { subnet->getID()); ASSERT_TRUE(returned_subnet); - PoolPtr returned_pool = returned_subnet->getPool(Lease::TYPE_NA, IOAddress("2001:db8::10")); + PoolPtr returned_pool = returned_subnet->getPool(Lease::TYPE_NA, + IOAddress("2001:db8::10")); ASSERT_TRUE(returned_pool); // Make sure that CfgOption->get() with client_classes finds each ref option. @@ -5251,6 +5252,7 @@ GenericConfigBackendDHCPv6Test::poolOption6WithClientClassesTest() { // Now make sure that we can set the options individually. updateClassTaggedOptions(ref_options); + for (auto const& ref_option : ref_options) { cbptr_->createUpdateOption6(ServerSelector::ALL(), pool->getFirstAddress(), @@ -5262,7 +5264,8 @@ GenericConfigBackendDHCPv6Test::poolOption6WithClientClassesTest() { returned_subnet = cbptr_->getSubnet6(ServerSelector::ALL(), subnet->getID()); ASSERT_TRUE(returned_subnet); - returned_pool = returned_subnet->getPool(Lease::TYPE_NA, IOAddress("2001:db8::10")); + returned_pool = returned_subnet->getPool(Lease::TYPE_NA, + IOAddress("2001:db8::10")); ASSERT_TRUE(returned_pool); // Make sure that CfgOption->get() with client_classes finds each ref option. @@ -5287,7 +5290,8 @@ GenericConfigBackendDHCPv6Test::poolOption6WithClientClassesTest() { returned_subnet = cbptr_->getSubnet6(ServerSelector::ALL(), subnet->getID()); ASSERT_TRUE(returned_subnet); - returned_pool = returned_subnet->getPool(Lease::TYPE_NA, IOAddress("2001:db8::10")); + returned_pool = returned_subnet->getPool(Lease::TYPE_NA, + IOAddress("2001:db8::10")); ASSERT_TRUE(returned_pool); // Make sure that CfgOption is empty diff --git a/src/lib/dhcpsrv/testutils/test_config_backend_dhcp4.h b/src/lib/dhcpsrv/testutils/test_config_backend_dhcp4.h index 61a1a7d59c..b75d151c85 100644 --- a/src/lib/dhcpsrv/testutils/test_config_backend_dhcp4.h +++ b/src/lib/dhcpsrv/testutils/test_config_backend_dhcp4.h @@ -457,6 +457,7 @@ public: /// @param space Option space of the option to be deleted. /// @param client_classes Optional client classes list of the option to be deleted. /// Defaults to an empty pointer. + /// @return Number of deleted options. virtual uint64_t deleteOption4(const db::ServerSelector& server_selector, const std::string& shared_network_name, diff --git a/src/lib/dhcpsrv/testutils/test_config_backend_dhcp6.h b/src/lib/dhcpsrv/testutils/test_config_backend_dhcp6.h index bb247d3c06..6c2818b95d 100644 --- a/src/lib/dhcpsrv/testutils/test_config_backend_dhcp6.h +++ b/src/lib/dhcpsrv/testutils/test_config_backend_dhcp6.h @@ -487,10 +487,8 @@ public: /// @param space Option space of the deleted option. /// @return Number of deleted options. virtual uint64_t - deleteOption6(const db::ServerSelector& server_selector, - const SubnetID& subnet_id, - const uint16_t code, - const std::string& space, + deleteOption6(const db::ServerSelector& server_selector, const SubnetID& subnet_id, + const uint16_t code, const std::string& space, const ClientClassesPtr client_classes = ClientClassesPtr()); /// @brief Deletes pool level option.