]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3961] fixed typos
authorRazvan Becheriu <razvan@isc.org>
Tue, 9 Sep 2025 17:12:57 +0000 (20:12 +0300)
committerRazvan Becheriu <razvan@isc.org>
Tue, 9 Sep 2025 17:12:57 +0000 (20:12 +0300)
18 files changed:
doc/sphinx/arm/hooks-cb-cmds.rst
src/hooks/dhcp/mysql/mysql_cb_dhcp4.cc
src/hooks/dhcp/mysql/mysql_cb_dhcp6.cc
src/hooks/dhcp/pgsql/pgsql_cb_dhcp4.cc
src/hooks/dhcp/pgsql/pgsql_cb_dhcp6.cc
src/lib/dhcpsrv/cfg_option.cc
src/lib/dhcpsrv/dhcpsrv_messages.mes
src/lib/dhcpsrv/tests/cfg_option_unittest.cc
src/lib/dhcpsrv/testutils/alloc_engine_utils.cc
src/lib/dhcpsrv/testutils/generic_cb_dhcp4_unittest.cc
src/lib/dhcpsrv/testutils/generic_cb_dhcp4_unittest.h
src/lib/dhcpsrv/testutils/generic_cb_dhcp6_unittest.cc
src/lib/dhcpsrv/testutils/generic_cb_dhcp6_unittest.h
src/lib/dhcpsrv/testutils/test_config_backend_dhcp4.cc
src/lib/dhcpsrv/testutils/test_config_backend_dhcp6.cc
src/lib/yang/adaptor_option.h
src/share/api/remote-option-def4-del.json
src/share/api/remote-option-def6-del.json

index 1bcd06da9bdbeaf8b9841f80545cbfe1eab527ff..39c8407d647a0c8872ed66cd761ccd76b506c587 100644 (file)
@@ -996,7 +996,7 @@ the keyword "all" must be used as the server tag. The ``server-tags`` list must
 contain exactly one tag and cannot include the ``null`` value.
 
 As of Kea 3.1.2, before deleting an option definition, the server will first
-check if there are any options specified that depend upon that defintion. If
+check if there are any options specified that depend upon that definition. If
 so the delete command will be rejected with an error message explaining why.
 This default behavior may be overridden by setting the optional ``force``
 parameter to true as shown below:
@@ -1023,7 +1023,7 @@ parameter to true as shown below:
 .. note::
 
     The ``force`` parameter should only be used after careful consideration.
-    Removing an option definition while a dependent option specfication exists
+    Removing an option definition while a dependent option specification exists
     will cause that option to be excluded from the running configuration.
     This parameter is provided to handle use cases where a definition may
     need to be corrected while leaving the option in place.
index 7e1d3461bfc448d64d3a17537081f13af1497567..0d39c888038a544ef1a32c7b0027c048033645f7 100644 (file)
@@ -2197,6 +2197,7 @@ public:
     /// @param force When true, delete is done without checking for
     /// dependent options.
     /// @return Number of deleted option definitions.
+    /// @throw NotImplemented if server selector is "unassigned".
     /// @throw InvalidOperation if force is false and there is an option
     /// matching server, code, and space.
     uint64_t deleteOptionDef4(const ServerSelector& server_selector,
@@ -2207,7 +2208,7 @@ public:
             auto option = getOption(GET_OPTION4_CODE_SPACE, Option::V4,
                                     server_selector, code, space);
             if (option) {
-                isc_throw(InvalidOperation, "option exists for option defintion: "
+                isc_throw(InvalidOperation, "option exists for option definition: "
                           << space << "." << code);
             }
         }
index ce1f36773c3693796780bfa050d8e6d423bddebb..6b337da757ac74f397abb4b38005457ac08dd6a5 100644 (file)
@@ -2589,7 +2589,7 @@ public:
             auto option = getOption(GET_OPTION6_CODE_SPACE, Option::V6,
                                     server_selector, code, space);
             if (option) {
-                isc_throw(InvalidOperation, "option exists for option defintion: "
+                isc_throw(InvalidOperation, "option exists for option definition: "
                           << space << "." << code);
             }
         }
@@ -4684,7 +4684,7 @@ uint64_t
 MySqlConfigBackendDHCPv6::deleteOptionDef6(const ServerSelector& server_selector,
                                            const uint16_t code,
                                            const std::string& space,
-                                           bool force /* = false*/) {
+                                           bool force /* = false */) {
     LOG_DEBUG(mysql_cb_logger, DBGLVL_TRACE_BASIC, MYSQL_CB_DELETE_OPTION_DEF6)
         .arg(code).arg(space);
     uint64_t result = impl_->deleteOptionDef6(server_selector, code, space, force);
index d7a8a8708357864c4b7b7d44b38ac508151b8aa2..fc2ef2d81cda588cb3ed59a8cf99a5102a119b57 100644 (file)
@@ -2059,6 +2059,7 @@ public:
     /// @param force When true, delete is done without checking for
     /// dependent options.
     /// @return Number of deleted option definitions.
+    /// @throw NotImplemented if server selector is "unassigned".
     /// @throw InvalidOperation if force is false and there is an option
     /// matching server, code, and space.
     uint64_t deleteOptionDef4(const ServerSelector& server_selector,
@@ -2069,7 +2070,7 @@ public:
             auto option = getOption(GET_OPTION4_CODE_SPACE, Option::V4,
                                     server_selector, code, space);
             if (option) {
-                isc_throw(InvalidOperation, "option exists for option defintion: "
+                isc_throw(InvalidOperation, "option exists for option definition: "
                           << space << "." << code);
             }
         }
index 268d4745239a6385fa66553f0f9da792428a6b02..e5edc18f0b694f0b94b6144c6b836897cd7fe4dc 100644 (file)
@@ -2363,6 +2363,7 @@ public:
     /// @param force When true, delete is done without checking for
     /// dependent options.
     /// @return Number of deleted option definitions.
+    /// @throw NotImplemented if server selector is "unassigned".
     /// @throw InvalidOperation if force is false and there is an option
     /// matching server, code, and space.
     uint64_t deleteOptionDef6(const ServerSelector& server_selector,
@@ -2373,7 +2374,7 @@ public:
             auto option = getOption(GET_OPTION6_CODE_SPACE, Option::V6,
                                     server_selector, code, space);
             if (option) {
-                isc_throw(InvalidOperation, "option exists for option defintion: "
+                isc_throw(InvalidOperation, "option exists for option definition: "
                           << space << "." << code);
             }
         }
index 213a7481150fb73853779b51cf35a331ede6ffa1..bccf7bb56101172698ebba4ba043e8e26c269887 100644 (file)
@@ -215,7 +215,7 @@ CfgOption::createDescriptorOption(CfgOptionDefPtr cfg_def, const std::string& sp
     Option::Universe universe = opt_desc.option_->getUniverse();
     uint16_t code = opt_desc.option_->getType();
 
-    // Find the option's defintion, if it has one.
+    // Find the option's definition, if it has one.
     // First, check for a standard definition.
     OptionDefinitionPtr def = LibDHCP::getOptionDef(space, code);
 
index a9083a52dd0035b8dacfda2c5d7b285a02a59c91..81806625e524772ebdad28bc8cea58423eec6469 100644 (file)
@@ -1024,8 +1024,8 @@ pose a security risk.
 
 % DHCPSRV_CFGMGR_OPTION_DEFINITION_MISMATCH failed to create option: %1
 This warning message is issued when an option has been specified for which
-there is no suitable option definition. Either there is no defintion at all
-or the option contents do not fit the option defintion. The argument will
+there is no suitable option definition. Either there is no definition at all
+or the option contents do not fit the option definition. The argument will
 provide a detailed reason for the failure. The server will continue to
 operate but it will exclude the option from packet processing until the
 situation is corrected. This is considered a configuration error.
index fa34d51b2149420e19b37079850cdaf586e4432b..f700b5e764e2f8767c04c82316b70928ce2002ab 100644 (file)
@@ -607,7 +607,7 @@ TEST_F(CfgOptionTest, mergeInvalid) {
     CfgOption this_cfg;
     CfgOption other_cfg;
 
-    // Create an empty dictionary of defintions pass into option merge.
+    // Create an empty dictionary of definitions pass into option merge.
     CfgOptionDefPtr defs(new CfgOptionDef());
 
     // Create our other config that will be merged from.
index 23be091ba2d6e28a87f5651cd129883426a2da2e..f51edf624b1bd9ea7dbebf84f17748181e164e72 100644 (file)
@@ -347,7 +347,7 @@ AllocEngine6Test::simpleAlloc6Test(const Pool6Ptr& pool, const IOAddress& hint,
     subnet_->setValid(Triplet<uint32_t>(300, 400, 500));
 
     if (class_def) {
-        std::cout << "adding class defintion" << std::endl;
+        std::cout << "adding class definition" << std::endl;
         CfgMgr::instance().getStagingCfg()->getClientClassDictionary()->addClass(class_def);
         ctx.query_->addClass(class_def->getName());
     }
index ecb0d00a97602f24179b86c315c91162ac6956e2..2a78e83b443120901919a907d172fd50bb2d3378 100644 (file)
@@ -5141,15 +5141,14 @@ GenericConfigBackendDHCPv4Test::poolOption4WithClientClassesTest() {
 
 void
 GenericConfigBackendDHCPv4Test::optionDef4DeleteForceTest() {
-    /// @brief This test verifies that option defintion delete:
-    /// 1. Does not delete a defintion if the force parameter is omitted and a
+    /// @brief This test verifies that option definition delete:
+    /// 1. Does not delete a definition if the force parameter is omitted and a
     /// dependent option exists.
-    /// 2. Does not delete a defintion if the force parameter is false and a
+    /// 2. Does not delete a definition if the force parameter is false and a
     /// dependent option exists.
-    /// 3. Deletes a defintion if the force parameter is true and a
+    /// 3. Deletes a definition if the force parameter is true and a
     /// dependent option exists.
 
-
     // Create an option definition.
     OptionDefinitionPtr option_def(new OptionDefinition("foo", 234,
                                                         DHCP4_OPTION_SPACE,
@@ -5165,19 +5164,19 @@ GenericConfigBackendDHCPv4Test::optionDef4DeleteForceTest() {
 
     ASSERT_NO_THROW_LOG(cbptr_->createUpdateOption4(ServerSelector::ALL(), option));
 
-    // Attempting to delete the defintion should fail by default.
+    // Attempting to delete the definition should fail by default.
     uint64_t deleted_num = 0;
     ASSERT_THROW_MSG(deleted_num = cbptr_->deleteOptionDef4(ServerSelector::ALL(),
                                                             234, DHCP4_OPTION_SPACE),
-                     InvalidOperation, "option exists for option defintion: dhcp4.234");
+                     InvalidOperation, "option exists for option definition: dhcp4.234");
     EXPECT_EQ(0, deleted_num);
 
     ASSERT_THROW_MSG(deleted_num = cbptr_->deleteOptionDef4(ServerSelector::ALL(),
                                                             234, DHCP4_OPTION_SPACE, false),
-                     InvalidOperation, "option exists for option defintion: dhcp4.234");
+                     InvalidOperation, "option exists for option definition: dhcp4.234");
     EXPECT_EQ(0, deleted_num);
 
     ASSERT_NO_THROW_LOG(deleted_num = cbptr_->deleteOptionDef4(ServerSelector::ALL(),
-                                                            234, DHCP4_OPTION_SPACE, true));
+                                                               234, DHCP4_OPTION_SPACE, true));
     EXPECT_EQ(1, deleted_num);
 }
index 156bb3e4811a0f9f3444d40a3dda3f4ecd3a8900..a96f29c63e2a8aba6b995486bab26c43d84702f8 100644 (file)
@@ -400,12 +400,12 @@ public:
     /// by their client-classes content.
     void poolOption4WithClientClassesTest();
 
-    /// @brief This test verifies that option defintion delete:
-    /// 1. Does not delete a defintion if the force parameter is omitted and a
+    /// @brief This test verifies that option definition delete:
+    /// 1. Does not delete a definition if the force parameter is omitted and a
     /// dependent option exists.
-    /// 2. Does not delete a defintion if the force parameter is false and a
+    /// 2. Does not delete a definition if the force parameter is false and a
     /// dependent option exists.
-    /// 3. Deletes a defintion if the force parameter is true and a
+    /// 3. Deletes a definition if the force parameter is true and a
     /// dependent option exists.
     void optionDef4DeleteForceTest();
 
index 53c825db99f11ad2eb6fc58d128288971c54dea6..ce561bf7ba918f64ac255f66054dae09140076f0 100644 (file)
@@ -5390,6 +5390,14 @@ GenericConfigBackendDHCPv6Test::pdPoolOption6WithClientClassesTest() {
 
 void
 GenericConfigBackendDHCPv6Test::optionDef6DeleteForceTest() {
+    /// @brief This test verifies that option definition delete:
+    /// 1. Does not delete a definition if the force parameter is omitted and a
+    /// dependent option exists.
+    /// 2. Does not delete a definition if the force parameter is false and a
+    /// dependent option exists.
+    /// 3. Deletes a definition if the force parameter is true and a
+    /// dependent option exists.
+
     // Create an option definition.
     OptionDefinitionPtr option_def(new OptionDefinition("foo", 700,
                                                         DHCP6_OPTION_SPACE,
@@ -5405,19 +5413,19 @@ GenericConfigBackendDHCPv6Test::optionDef6DeleteForceTest() {
 
     ASSERT_NO_THROW_LOG(cbptr_->createUpdateOption6(ServerSelector::ALL(), option));
 
-    // Attempting to delete the defintion should fail by default.
+    // Attempting to delete the definition should fail by default.
     uint64_t deleted_num = 0;
     ASSERT_THROW_MSG(deleted_num = cbptr_->deleteOptionDef6(ServerSelector::ALL(),
                                                             700, DHCP6_OPTION_SPACE),
-                     InvalidOperation, "option exists for option defintion: dhcp6.700");
+                     InvalidOperation, "option exists for option definition: dhcp6.700");
     EXPECT_EQ(0, deleted_num);
 
     ASSERT_THROW_MSG(deleted_num = cbptr_->deleteOptionDef6(ServerSelector::ALL(),
                                                             700, DHCP6_OPTION_SPACE, false),
-                     InvalidOperation, "option exists for option defintion: dhcp6.700");
+                     InvalidOperation, "option exists for option definition: dhcp6.700");
     EXPECT_EQ(0, deleted_num);
 
     ASSERT_NO_THROW_LOG(deleted_num = cbptr_->deleteOptionDef6(ServerSelector::ALL(),
-                                                            700, DHCP6_OPTION_SPACE, true));
+                                                               700, DHCP6_OPTION_SPACE, true));
     EXPECT_EQ(1, deleted_num);
 }
index 919fd781cbd603ddabd373965f386292ca1b0e17..98c78eb8ec29475585257d819fe9caf1704ad62c 100644 (file)
@@ -409,12 +409,12 @@ public:
     /// by their client-classes content.
     void pdPoolOption6WithClientClassesTest();
 
-    /// @brief This test verifies that option defintion delete:
-    /// 1. Does not delete a defintion if the force parameter is omitted and a
+    /// @brief This test verifies that option definition delete:
+    /// 1. Does not delete a definition if the force parameter is omitted and a
     /// dependent option exists.
-    /// 2. Does not delete a defintion if the force parameter is false and a
+    /// 2. Does not delete a definition if the force parameter is false and a
     /// dependent option exists.
-    /// 3. Deletes a defintion if the force parameter is true and a
+    /// 3. Deletes a definition if the force parameter is true and a
     /// dependent option exists.
     void optionDef6DeleteForceTest();
 
index e368ac1f9e404d1afaa27f0def08f2900b642da7..7280a5bf7699cdeebe69250dac2a1c92c1b1099c 100644 (file)
@@ -1155,7 +1155,7 @@ TestConfigBackendDHCPv4::deleteOptionDef4(const db::ServerSelector& server_selec
     if (!force) {
         auto option = getOption4(server_selector, code, space);
         if (option) {
-            isc_throw(InvalidOperation, "option exists for option definition: " 
+            isc_throw(InvalidOperation, "option exists for option definition: "
                       << space << "." << code);
         }
     }
index 85e7953ed0fa378bf273bcc5acb4c7f64f0e5f7f..3e7db69665e5b7f512cbfbef4a8aaabc8d449af2 100644 (file)
@@ -1212,7 +1212,6 @@ TestConfigBackendDHCPv6::deleteOptionDef6(const db::ServerSelector& server_selec
         if (option) {
             isc_throw(InvalidOperation, "option exists for option definition: "
                       << space << "." << code);
-
         }
     }
 
index 6acbeefed247b11991e9fac849a89309d6134ca5..f9c33274c8393bc4623fed0dc48adaff8b021138 100644 (file)
@@ -55,7 +55,7 @@ public:
     /// @throw MissingKey if the type is not present.
     static void checkType(isc::data::ConstElementPtr option);
 
-    /// @brief Check if code is specified in option defintion.
+    /// @brief Check if code is specified in option definition.
     ///
     /// @param option The option.
     /// @throw MissingKey if the code is not present.
index a2c497266d4cf81635ff67ece692b767d13ce518..128558b31fefd020795d6b4828c814e18e5d6f88 100644 (file)
@@ -5,7 +5,7 @@
         "This command deletes a DHCPv4 option definition from the configuration database."
     ],
     "cmd-comment": [
-        "This command includes a list with exactly one option definition specification, comprising an option name and code. The ``server-tags`` list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of ``null``, or multiple server tags will result in an error. As of Kea 3.1.2, before deleting an option definition, the server will first check if there are any options specified that depend upon that defintion. If so the delete command will be rejected with an error message explaining why.  This default behavior may be overridden by setting the optional ``force`` parameter to true."
+        "This command includes a list with exactly one option definition specification, comprising an option name and code. The ``server-tags`` list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of ``null``, or multiple server tags will result in an error. As of Kea 3.1.2, before deleting an option definition, the server will first check if there are any options specified that depend upon that definition. If so the delete command will be rejected with an error message explaining why.  This default behavior may be overridden by setting the optional ``force`` parameter to true."
     ],
     "cmd-syntax": [
         "{",
index 5e31a50a10cd00cdf63bdcdb0888dc495734db03..4e2840c172d99a9be3dab9908f4ff254248a0899 100644 (file)
@@ -5,7 +5,7 @@
         "This command deletes a DHCPv6 option definition from the configuration database."
     ],
     "cmd-comment": [
-        "This command includes a list with exactly one option definition specification, comprising an option name and code. The ``server-tags`` list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of ``null``, or multiple server tags will result in an error. As of Kea 3.1.2, before deleting an option definition, the server will first check if there are any options specified that depend upon that defintion. If so the delete command will be rejected with an error message explaining why.  This default behavior may be overridden by setting the optional ``force`` parameter to true."
+        "This command includes a list with exactly one option definition specification, comprising an option name and code. The ``server-tags`` list is mandatory and must contain exactly one server tag. Specifying an empty list, a value of ``null``, or multiple server tags will result in an error. As of Kea 3.1.2, before deleting an option definition, the server will first check if there are any options specified that depend upon that definition. If so the delete command will be rejected with an error message explaining why.  This default behavior may be overridden by setting the optional ``force`` parameter to true."
     ],
     "cmd-syntax": [
         "{",