summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcpsrv/pgsql_lease_mgr.h
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2022-10-14 17:01:57 +0200
committerFrancis Dupont <fdupont@isc.org>2022-10-18 19:28:45 +0200
commitd857f781253a8b741f8ae02ed0513651ce82c3ac (patch)
treed752077ce32c60b4957b284dd0bb539a4c2335e1 /src/lib/dhcpsrv/pgsql_lease_mgr.h
parent[#2585] Checkpoint: tests to add (diff)
downloadkea-d857f781253a8b741f8ae02ed0513651ce82c3ac.tar.xz
kea-d857f781253a8b741f8ae02ed0513651ce82c3ac.zip
[#2585] Checkpoint: finish unit tests
Diffstat (limited to 'src/lib/dhcpsrv/pgsql_lease_mgr.h')
-rw-r--r--src/lib/dhcpsrv/pgsql_lease_mgr.h96
1 files changed, 50 insertions, 46 deletions
diff --git a/src/lib/dhcpsrv/pgsql_lease_mgr.h b/src/lib/dhcpsrv/pgsql_lease_mgr.h
index afb0082f34..ad59ffa790 100644
--- a/src/lib/dhcpsrv/pgsql_lease_mgr.h
+++ b/src/lib/dhcpsrv/pgsql_lease_mgr.h
@@ -971,9 +971,9 @@ private:
/// @brief Clears the class-lease count map.
virtual void clearClassLeaseCounts() override;
- /// The following queries are used to fulfill Bulk LeaseQuery queries. They rely
- /// on relay data contained in lease's user-context when the extended-store-info flag
- /// is enabled.
+ /// The following queries are used to fulfill Bulk Lease Query
+ /// queries. They rely on relay data contained in lease's
+ /// user-context when the extended-store-info flag is enabled.
/// @brief Returns existing IPv4 leases with a given relay-id.
///
@@ -1045,7 +1045,7 @@ private:
/// @brief Returns existing IPv6 leases with on a given link.
///
- /// @param link_addr limit results to leases on this link when not ::
+ /// @param link_addr limit results to leases on this link.
/// @param lower_bound_address IPv4 address used as lower bound for the
/// returned range.
/// @param page_size maximum size of the page returned.
@@ -1056,54 +1056,12 @@ private:
const asiolink::IOAddress& lower_bound_address,
const LeasePageSize& page_size) override;
- /// @brief Delete lease6 extended info from tables.
- ///
- /// @param addr The address of the lease.
- virtual void deleteExtendedInfo6(const isc::asiolink::IOAddress& addr) override;
-
- /// @brief Add lease6 extended info into by-relay-id table.
- ///
- /// @param lease_addr The address of the lease.
- /// @param link_addr The link address from the relay header.
- /// @param relay_id The relay id from the relay header options.
- virtual void addRelayId6(const isc::asiolink::IOAddress& lease_addr,
- const isc::asiolink::IOAddress& link_addr,
- const std::vector<uint8_t>& relay_id) override;
-
- /// @brief Add lease6 extended info into by-remote-id table.
- ///
- /// @param lease_addr The address of the lease.
- /// @param link_addr The link address from the remote header.
- /// @param remote_id The remote id from the relay header options.
- virtual void addRemoteId6(const isc::asiolink::IOAddress& lease_addr,
- const isc::asiolink::IOAddress& link_addr,
- const std::vector<uint8_t>& remote_id) override;
-
- /// @brief Add lease6 extended info into by-link-addr table.
- ///
- /// @param lease_addr The address of the lease.
- /// @param link_addr The link address from the remote header.
- virtual void addLinkAddr6(const isc::asiolink::IOAddress& lease_addr,
- const isc::asiolink::IOAddress& link_addr) override;
-
/// @brief Write V4 leases to a file.
virtual void writeLeases4(const std::string& /*filename*/) override;
/// @brief Write V6 leases to a file.
virtual void writeLeases6(const std::string& /*filename*/) override;
- /// @brief Modifies the setting whether the lease extended info tables
- /// are enabled.
- ///
- /// Transient redefine to refuse the enable setting.
- /// @param enabled new setting.
- virtual void setExtendedInfoEnabled(const bool enabled) override {
- if (enabled) {
- isc_throw(isc::NotImplemented,
- "extended info tables are not yet supported by postgresql");
- }
- }
-
/// @brief Context RAII Allocator.
class PgSqlLeaseContextAlloc {
public:
@@ -1130,6 +1088,52 @@ private:
const PgSqlLeaseMgr& mgr_;
};
+protected:
+
+ /// Extended information / Bulk Lease Query shared interface.
+
+ /// @brief Modifies the setting whether the lease extended info tables
+ /// are enabled.
+ ///
+ /// Transient redefine to refuse the enable setting.
+ /// @param enabled new setting.
+ virtual void setExtendedInfoEnabled(const bool enabled) override {
+ if (enabled) {
+ isc_throw(isc::NotImplemented,
+ "extended info tables are not yet supported by postgresql");
+ }
+ }
+
+ /// @brief Delete lease6 extended info from tables.
+ ///
+ /// @param addr The address of the lease.
+ virtual void deleteExtendedInfo6(const isc::asiolink::IOAddress& addr) override;
+
+ /// @brief Add lease6 extended info into by-relay-id table.
+ ///
+ /// @param lease_addr The address of the lease.
+ /// @param link_addr The link address from the relay header.
+ /// @param relay_id The relay id from the relay header options.
+ virtual void addRelayId6(const isc::asiolink::IOAddress& lease_addr,
+ const isc::asiolink::IOAddress& link_addr,
+ const std::vector<uint8_t>& relay_id) override;
+
+ /// @brief Add lease6 extended info into by-remote-id table.
+ ///
+ /// @param lease_addr The address of the lease.
+ /// @param link_addr The link address from the remote header.
+ /// @param remote_id The remote id from the relay header options.
+ virtual void addRemoteId6(const isc::asiolink::IOAddress& lease_addr,
+ const isc::asiolink::IOAddress& link_addr,
+ const std::vector<uint8_t>& remote_id) override;
+
+ /// @brief Add lease6 extended info into by-link-addr table.
+ ///
+ /// @param lease_addr The address of the lease.
+ /// @param link_addr The link address from the remote header.
+ virtual void addLinkAddr6(const isc::asiolink::IOAddress& lease_addr,
+ const isc::asiolink::IOAddress& link_addr) override;
+
private:
// Members