]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2869] Addressed some comments
authorFrancis Dupont <fdupont@isc.org>
Wed, 5 Jul 2023 09:19:12 +0000 (11:19 +0200)
committerFrancis Dupont <fdupont@isc.org>
Thu, 6 Jul 2023 20:12:40 +0000 (22:12 +0200)
src/lib/dhcpsrv/dhcpsrv_messages.mes
src/lib/dhcpsrv/mysql_lease_mgr.cc
src/lib/dhcpsrv/pgsql_lease_mgr.cc
src/lib/dhcpsrv/tests/mysql_lease_extended_info_unittest.cc
src/lib/dhcpsrv/tests/pgsql_lease_extended_info_unittest.cc

index 03d5014e714a863c28c5e458d997490f2ae66efe..67ce063d4daaae960b90b9c99615083086cb6014 100644 (file)
@@ -1013,8 +1013,8 @@ The server upgraded extended info. The number of pages and the final count of
 updated leases are displayed.
 
 % DHCPSRV_MYSQL_UPGRADE_EXTENDED_INFO6_ERROR upgrading extending info for IPv6 lease at %1 failed with %2
-A debug message issued when the server failed to upgrade an extended info.
-The address of the lease and the error message are displayed.
+A debug message issued when the server failed to upgrade the extended info
+for a lease. The address of the lease and the error message are displayed.
 
 % DHCPSRV_MYSQL_UPGRADE_EXTENDED_INFO6_PAGE upgrading IPv6 lease extended info at page %1 starting at %2 (updated %3)
 A debug message issued when the server upgrades IPv6 lease extended info.
@@ -1296,8 +1296,8 @@ The server upgraded extended info. The number of pages and the final count of
 updated leases are displayed.
 
 % DHCPSRV_PGSQL_UPGRADE_EXTENDED_INFO6_ERROR upgrading extending info for IPv6 lease at %1 failed with %2
-A debug message issued when the server failed to upgrade an extended info.
-The address of the lease and the error message are displayed.
+A debug message issued when the server failed to upgrade the extended info
+for a lease. The address of the lease and the error message are displayed.
 
 % DHCPSRV_PGSQL_UPGRADE_EXTENDED_INFO6_PAGE upgrading IPv6 lease extended info at page %1 starting at %2 (updated %3)
 A debug message issued when the server upgrades IPv6 lease extended info.
index c2e23e4d7d4315ef84d74768e844561dc9b57937..21d6c143cdbe47524065144a87445369acae8455 100644 (file)
@@ -4408,7 +4408,7 @@ MySqlLeaseMgr::getLeases6ByRelayId(const DUID& relay_id,
 
     // Expecting IPv6 valid prefix and address.
     if (!link_addr.isV6()) {
-        isc_throw(InvalidAddressFamily, "expected IPv6 address while "
+        isc_throw(InvalidAddressFamily, "expected IPv6 link address while "
                   "retrieving leases from the lease database, got "
                   << link_addr);
     }
@@ -4417,7 +4417,7 @@ MySqlLeaseMgr::getLeases6ByRelayId(const DUID& relay_id,
                   << static_cast<unsigned>(link_len));
     }
     if (!lower_bound_address.isV6()) {
-        isc_throw(InvalidAddressFamily, "expected IPv6 address while "
+        isc_throw(InvalidAddressFamily, "expected IPv6 start address while "
                   "retrieving leases from the lease database, got "
                   << lower_bound_address);
     }
@@ -4577,7 +4577,7 @@ MySqlLeaseMgr::getLeases6ByRemoteId(const OptionBuffer& remote_id,
 
     // Expecting IPv6 valid prefix and address.
     if (!link_addr.isV6()) {
-        isc_throw(InvalidAddressFamily, "expected IPv6 address while "
+        isc_throw(InvalidAddressFamily, "expected IPv6 link address while "
                   "retrieving leases from the lease database, got "
                   << link_addr);
     }
@@ -4586,7 +4586,7 @@ MySqlLeaseMgr::getLeases6ByRemoteId(const OptionBuffer& remote_id,
                   << static_cast<unsigned>(link_len));
     }
     if (!lower_bound_address.isV6()) {
-        isc_throw(InvalidAddressFamily, "expected IPv6 address while "
+        isc_throw(InvalidAddressFamily, "expected IPv6 start address while "
                   "retrieving leases from the lease database, got "
                   << lower_bound_address);
     }
@@ -4744,7 +4744,7 @@ MySqlLeaseMgr::getLeases6ByLink(const IOAddress& link_addr,
 
     // Expecting IPv6 valid prefix and address.
     if (!link_addr.isV6()) {
-        isc_throw(InvalidAddressFamily, "expected IPv6 address while "
+        isc_throw(InvalidAddressFamily, "expected IPv6 link address while "
                   "retrieving leases from the lease database, got "
                   << link_addr);
     }
@@ -4753,7 +4753,7 @@ MySqlLeaseMgr::getLeases6ByLink(const IOAddress& link_addr,
                   << static_cast<unsigned>(link_len));
     }
     if (!lower_bound_address.isV6()) {
-        isc_throw(InvalidAddressFamily, "expected IPv6 address while "
+        isc_throw(InvalidAddressFamily, "expected IPv6 start address while "
                   "retrieving leases from the lease database, got "
                   << lower_bound_address);
     }
index 02ed0c2bf7287b6c8e7c0138aa78d8eb483f3448..a52f5d7355064a20144b8ec25195d01fb1401789 100644 (file)
@@ -3485,7 +3485,7 @@ PgSqlLeaseMgr::getLeases6ByRelayId(const DUID& relay_id,
 
     // Expecting IPv6 valid prefix and address.
     if (!link_addr.isV6()) {
-        isc_throw(InvalidAddressFamily, "expected IPv6 address while "
+        isc_throw(InvalidAddressFamily, "expected IPv6 link address while "
                   "retrieving leases from the lease database, got "
                   << link_addr);
     }
@@ -3494,7 +3494,7 @@ PgSqlLeaseMgr::getLeases6ByRelayId(const DUID& relay_id,
                   << static_cast<unsigned>(link_len));
     }
     if (!lower_bound_address.isV6()) {
-        isc_throw(InvalidAddressFamily, "expected IPv6 address while "
+        isc_throw(InvalidAddressFamily, "expected IPv6 start address while "
                   "retrieving leases from the lease database, got "
                   << lower_bound_address);
     }
@@ -3621,7 +3621,7 @@ PgSqlLeaseMgr::getLeases6ByRemoteId(const OptionBuffer& remote_id,
 
     // Expecting IPv6 valid prefix and address.
     if (!link_addr.isV6()) {
-        isc_throw(InvalidAddressFamily, "expected IPv6 address while "
+        isc_throw(InvalidAddressFamily, "expected IPv6 link address while "
                   "retrieving leases from the lease database, got "
                   << link_addr);
     }
@@ -3630,7 +3630,7 @@ PgSqlLeaseMgr::getLeases6ByRemoteId(const OptionBuffer& remote_id,
                   << static_cast<unsigned>(link_len));
     }
     if (!lower_bound_address.isV6()) {
-        isc_throw(InvalidAddressFamily, "expected IPv6 address while "
+        isc_throw(InvalidAddressFamily, "expected IPv6 start address while "
                   "retrieving leases from the lease database, got "
                   << lower_bound_address);
     }
@@ -3754,7 +3754,7 @@ PgSqlLeaseMgr::getLeases6ByLink(const IOAddress& link_addr,
 
     // Expecting IPv6 valid prefix and address.
     if (!link_addr.isV6()) {
-        isc_throw(InvalidAddressFamily, "expected IPv6 address while "
+        isc_throw(InvalidAddressFamily, "expected IPv6 link address while "
                   "retrieving leases from the lease database, got "
                   << link_addr);
     }
@@ -3765,7 +3765,7 @@ PgSqlLeaseMgr::getLeases6ByLink(const IOAddress& link_addr,
     }
 
     if (!lower_bound_address.isV6()) {
-        isc_throw(InvalidAddressFamily, "expected IPv6 address while "
+        isc_throw(InvalidAddressFamily, "expected IPv6 start address while "
                   "retrieving leases from the lease database, got "
                   << lower_bound_address);
     }
index 46b22a266d6911d05cb92b18fb005cbb6461a154..d9014e04224a1f6cbbd7b7fce5edea94c2ccf9e2 100644 (file)
@@ -240,23 +240,23 @@ public:
 };
 
 /// @brief Verifies that the lease manager can start.
-TEST_F(MySqlExtendedInfoTest, startFalse) {
+TEST_F(MySqlExtendedInfoTest, startWithoutExtendedTables) {
     start(false);
 }
 
 /// @brief Verifies that the lease manager can start with MT.
-TEST_F(MySqlExtendedInfoTest, startFalseMultiThreading) {
+TEST_F(MySqlExtendedInfoTest, startWithoutExtendedTablesMultiThreading) {
     MultiThreadingTest mt(true);
     start(false);
 }
 
 /// @brief Verifies that the lease manager can start with tables.
-TEST_F(MySqlExtendedInfoTest, startTrue) {
+TEST_F(MySqlExtendedInfoTest, startWithExtendedTables) {
     start(true);
 }
 
 /// @brief Verifies that the lease manager can start with tables and MT.
-TEST_F(MySqlExtendedInfoTest, startTrueMultiThreading) {
+TEST_F(MySqlExtendedInfoTest, startWithExtendedTablesMultiThreading) {
     MultiThreadingTest mt(true);
     start(true);
 }
index 08ae6fec25fa0e928d6243fde4471d2db1f460c6..83f65993fe5dfe5eadade2b9f16aba58487b5092 100644 (file)
@@ -240,23 +240,23 @@ public:
 };
 
 /// @brief Verifies that the lease manager can start.
-TEST_F(PgSqlExtendedInfoTest, startFalse) {
+TEST_F(PgSqlExtendedInfoTest, startWithoutExtendedTables) {
     start(false);
 }
 
 /// @brief Verifies that the lease manager can start with MT.
-TEST_F(PgSqlExtendedInfoTest, startFalseMultiThreading) {
+TEST_F(PgSqlExtendedInfoTest, startWithoutExtendedTablesMultiThreading) {
     MultiThreadingTest mt(true);
     start(false);
 }
 
 /// @brief Verifies that the lease manager can start with tables.
-TEST_F(PgSqlExtendedInfoTest, startTrue) {
+TEST_F(PgSqlExtendedInfoTest, startWithExtendedTables) {
     start(true);
 }
 
 /// @brief Verifies that the lease manager can start with tables and MT.
-TEST_F(PgSqlExtendedInfoTest, startTrueMultiThreading) {
+TEST_F(PgSqlExtendedInfoTest, startWithExtendedTablesMultiThreading) {
     MultiThreadingTest mt(true);
     start(true);
 }