2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 05:55:28 +00:00

[#1434] addressed comments

- replaced all occurences to old_cltt and old_valid_lft in unittests
- renamed syncInternalTimestamp to syncExistingLifetime and changed order
of parameters
- renamed updateInternalTimestamp to updateExistingLifetime
- updated doxygen
- added extra check for all occurences of deleteLease (either call
EXPECT or ASSERT), and only use cast to void if explicitly specified
- updated ChangeLog
- updated old_cltt and old_valid_lft on fromElementCommon and added
unittests
- throw exception with different message on memfile with persitence
disabled for easier debugging
This commit is contained in:
Razvan Becheriu
2020-10-20 20:09:22 +03:00
parent c56703ea3d
commit 49b073f12d
22 changed files with 250 additions and 279 deletions

View File

@@ -1872,10 +1872,9 @@ MySqlLeaseMgr::addLease(const Lease4Ptr& lease) {
// ... and drop to common code.
auto result = addLeaseCommon(ctx, INSERT_LEASE4, bind);
// Update lease internal information with new values (allows update of the
// internal state between the creation of the Lease up to the point of
// insertion in the database).
lease->updateInternalTimestamp();
// Update lease lifetime with new values (allows update between the creation
// of the Lease up to the point of insertion in the database).
lease->updateExistingLifetime();
return (result);
}
@@ -1896,10 +1895,9 @@ MySqlLeaseMgr::addLease(const Lease6Ptr& lease) {
// ... and drop to common code.
auto result = addLeaseCommon(ctx, INSERT_LEASE6, bind);
// Update lease internal information with new values (allows update of the
// internal state between the creation of the Lease up to the point of
// insertion in the database).
lease->updateInternalTimestamp();
// Update lease lifetime with new values (allows update between the creation
// of the Lease up to the point of insertion in the database).
lease->updateExistingLifetime();
return (result);
}
@@ -2774,8 +2772,8 @@ MySqlLeaseMgr::updateLease4(const Lease4Ptr& lease) {
// Drop to common update code
updateLeaseCommon(ctx, stindex, &bind[0], lease);
// Update lease internal information with new values.
lease->updateInternalTimestamp();
// Update lease lifetime with new values.
lease->updateExistingLifetime();
}
void
@@ -2821,8 +2819,8 @@ MySqlLeaseMgr::updateLease6(const Lease6Ptr& lease) {
// Drop to common update code
updateLeaseCommon(ctx, stindex, &bind[0], lease);
// Update lease internal information with new values.
lease->updateInternalTimestamp();
// Update lease lifetime with new values.
lease->updateExistingLifetime();
}
// Delete lease methods. Similar to other groups of methods, these comprise