]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2571] Added BLQ query stubs to lease mgrs
authorThomas Markwalder <tmark@isc.org>
Thu, 22 Sep 2022 15:38:19 +0000 (11:38 -0400)
committerThomas Markwalder <tmark@isc.org>
Fri, 23 Sep 2022 09:52:43 +0000 (05:52 -0400)
src/lib/dhcpsrv/lease_mgr.*
    Removed BQL query implemenetations

src/lib/dhcpsrv/memfile_lease_mgr.*
src/lib/dhcpsrv/mysql_lease_mgr.*
src/lib/dhcpsrv/pgsql_lease_mgr.*
    Added BQL query implemenetations

src/lib/dhcpsrv/lease_mgr.cc
src/lib/dhcpsrv/lease_mgr.h
src/lib/dhcpsrv/memfile_lease_mgr.cc
src/lib/dhcpsrv/memfile_lease_mgr.h
src/lib/dhcpsrv/mysql_lease_mgr.cc
src/lib/dhcpsrv/mysql_lease_mgr.h
src/lib/dhcpsrv/pgsql_lease_mgr.cc
src/lib/dhcpsrv/pgsql_lease_mgr.h

index 56534eac3f577d7e561179677c673754d6be2e2c..6cd02c3d8e9729fe8127b793cec97b97408abba0 100644 (file)
@@ -356,46 +356,5 @@ LeaseMgr::getDBVersion() {
 }
 
 
-Lease4Collection
-LeaseMgr::getLeases4ByRelayId(const OptionBuffer& /* relay_id */,
-                              const IOAddress& /* lower_bound_address */,
-                              const LeasePageSize& /* page_size */,
-                              const time_t& /* qry_start_time = 0 */,
-                              const time_t& /* qry_end_time = 0 */) {
-    isc_throw(NotImplemented, "LeaseMgr::getLeases4ByRelayId not implemented");
-}
-
-Lease4Collection
-LeaseMgr::getLeases4ByRemoteId(const OptionBuffer& /* remote_id */,
-                               const IOAddress& /* lower_bound_address */,
-                               const LeasePageSize& /* page_size */,
-                               const time_t& /* qry_start_time = 0 */,
-                               const time_t& /* qry_end_time = 0 */) {
-    isc_throw(NotImplemented, "LeaseMgr::getLeases4ByRemoteId not implemented");
-}
-
-Lease6Collection
-LeaseMgr::getLeases6ByRelayId(const DUID& /* relay_id */,
-                              const IOAddress& /* link_addr */,
-                              const IOAddress& /* lower_bound_address */,
-                              const LeasePageSize& /* page_size */) {
-    isc_throw(NotImplemented, "LeaseMgr::getLeases6ByRelayId not implemented");
-}
-
-Lease6Collection
-LeaseMgr::getLeases6ByRemoteId(const OptionBuffer& /* remote_id */,
-                               const IOAddress& /* link_addr */,
-                               const IOAddress& /* lower_bound_address */,
-                               const LeasePageSize& /* page_size*/) {
-    isc_throw(NotImplemented, "LeaseMgr::getLeases6ByRemoteId not implemented");
-}
-
-Lease6Collection
-LeaseMgr::getLeases6ByLink(const IOAddress& /* link_addr */,
-                           const IOAddress& /* lower_bound_address */,
-                           const LeasePageSize& /* page_size */) {
-    isc_throw(NotImplemented, "LeaseMgr::getLeases6ByLink not implemented");
-}
-
 } // namespace isc::dhcp
 } // namespace isc
index c61e966dbc2215f248d60f6b1aa8038f7040c057..04764cbe35175196a5495b8b2e2c37e4c2af9eef 100644 (file)
@@ -833,7 +833,7 @@ public:
                                                  const asiolink::IOAddress& lower_bound_address,
                                                  const LeasePageSize& page_size,
                                                  const time_t& qry_start_time = 0,
-                                                 const time_t& qry_end_time = 0);
+                                                 const time_t& qry_end_time = 0) = 0;
 
     /// @brief Returns existing IPv4 leases with a given remote-id.
     ///
@@ -851,7 +851,7 @@ public:
                                                   const asiolink::IOAddress& lower_bound_address,
                                                   const LeasePageSize& page_size,
                                                   const time_t& qry_start_time = 0,
-                                                  const time_t& qry_end_time = 0);
+                                                  const time_t& qry_end_time = 0) = 0;
 
     /// @brief Returns existing IPv6 leases with a given relay-id.
     ///
@@ -865,7 +865,7 @@ public:
     virtual Lease6Collection getLeases6ByRelayId(const DUID& relay_id,
                                                  const asiolink::IOAddress& link_addr,
                                                  const asiolink::IOAddress& lower_bound_address,
-                                                 const LeasePageSize& page_size);
+                                                 const LeasePageSize& page_size) = 0;
 
     /// @brief Returns existing IPv6 leases with a given remote-id.
     ///
@@ -879,7 +879,7 @@ public:
     virtual Lease6Collection getLeases6ByRemoteId(const OptionBuffer& remote_id,
                                                   const asiolink::IOAddress& link_addr,
                                                   const asiolink::IOAddress& lower_bound_address,
-                                                  const LeasePageSize& page_size);
+                                                  const LeasePageSize& page_size) = 0;
 
     /// @brief Returns existing IPv6 leases with on a given link.
     ///
@@ -891,7 +891,7 @@ public:
     /// @return collection of IPv6 leases
     virtual Lease6Collection getLeases6ByLink(const asiolink::IOAddress& link_addr,
                                               const asiolink::IOAddress& lower_bound_address,
-                                              const LeasePageSize& page_size);
+                                              const LeasePageSize& page_size) = 0;
 
 private:
     /// The IOService object, used for all ASIO operations.
index 9352cf9746be6fbeceee729ba85b10c578acb263..131667b5b39f9bd282eec58a67d817b59995564b 100644 (file)
@@ -2387,7 +2387,46 @@ Memfile_LeaseMgr::getLeaseLimit(ConstElementPtr parent, Lease::Type ltype, size_
     return (false);
 }
 
+Lease4Collection
+Memfile_LeaseMgr::getLeases4ByRelayId(const OptionBuffer& /* relay_id */,
+                                      const IOAddress& /* lower_bound_address */,
+                                      const LeasePageSize& /* page_size */,
+                                      const time_t& /* qry_start_time = 0 */,
+                                      const time_t& /* qry_end_time = 0 */) {
+    isc_throw(NotImplemented, "Memfile_LeaseMgr::getLeases4ByRelayId not implemented");
+}
 
+Lease4Collection
+Memfile_LeaseMgr::getLeases4ByRemoteId(const OptionBuffer& /* remote_id */,
+                                       const IOAddress& /* lower_bound_address */,
+                                       const LeasePageSize& /* page_size */,
+                                       const time_t& /* qry_start_time = 0 */,
+                                       const time_t& /* qry_end_time = 0 */) {
+    isc_throw(NotImplemented, "Memfile_LeaseMgr::getLeases4ByRemoteId not implemented");
+}
+
+Lease6Collection
+Memfile_LeaseMgr::getLeases6ByRelayId(const DUID& /* relay_id */,
+                                      const IOAddress& /* link_addr */,
+                                      const IOAddress& /* lower_bound_address */,
+                                      const LeasePageSize& /* page_size */) {
+    isc_throw(NotImplemented, "Memfile_LeaseMgr::getLeases6ByRelayId not implemented");
+}
+
+Lease6Collection
+Memfile_LeaseMgr::getLeases6ByRemoteId(const OptionBuffer& /* remote_id */,
+                                       const IOAddress& /* link_addr */,
+                                       const IOAddress& /* lower_bound_address */,
+                                       const LeasePageSize& /* page_size*/) {
+    isc_throw(NotImplemented, "Memfile_LeaseMgr::getLeases6ByRemoteId not implemented");
+}
+
+Lease6Collection
+Memfile_LeaseMgr::getLeases6ByLink(const IOAddress& /* link_addr */,
+                                   const IOAddress& /* lower_bound_address */,
+                                   const LeasePageSize& /* page_size */) {
+    isc_throw(NotImplemented, "Memfile_LeaseMgr::getLeases6ByLink not implemented");
+}
 
 }  // namespace dhcp
 }  // namespace isc
index 5f3cbac3eabfca8086e2c9c745835fe9f8e7b442..44d9cae82329c730de50828011596f03c4aacce6 100644 (file)
@@ -1271,6 +1271,86 @@ public:
     ///
     /// Must be called from a thread-safe context.
     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.
+
+    /// @brief Returns existing IPv4 leases with a given relay-id.
+    ///
+    /// @param relay_id RAI Relay-ID sub-option value for relay_id of interest
+    /// @param lower_bound_address IPv4 address used as lower bound for the
+    /// returned range.
+    /// @param page_size maximum size of the page returned.
+    /// @param qry_start_time when not zero, only leases whose CLTT is greater than
+    /// or equal to this value will be included
+    /// @param qry_end_time when not zero, only leases whose CLTT is less than
+    /// or equal to this value will be included
+    ///
+    /// @return collection of IPv4 leases
+    virtual Lease4Collection getLeases4ByRelayId(const OptionBuffer& relay_id,
+                                                 const asiolink::IOAddress& lower_bound_address,
+                                                 const LeasePageSize& page_size,
+                                                 const time_t& qry_start_time = 0,
+                                                 const time_t& qry_end_time = 0);
+
+    /// @brief Returns existing IPv4 leases with a given remote-id.
+    ///
+    /// @param remote_id RAI Remote-ID sub-option value for remote-id of interest
+    /// @param lower_bound_address IPv4 address used as lower bound for the
+    /// returned range.
+    /// @param page_size maximum size of the page returned.
+    /// @param qry_start_time when not zero, only leases whose CLTT is greater than
+    /// or equal to this value will be included. Defaults to zero.
+    /// @param qry_end_time when not zero, only leases whose CLTT is less than
+    /// or equal to this value will be included. Defaults to zero.
+    ///
+    /// @return collection of IPv4 leases
+    virtual Lease4Collection getLeases4ByRemoteId(const OptionBuffer& remote_id,
+                                                  const asiolink::IOAddress& lower_bound_address,
+                                                  const LeasePageSize& page_size,
+                                                  const time_t& qry_start_time = 0,
+                                                  const time_t& qry_end_time = 0);
+
+    /// @brief Returns existing IPv6 leases with a given relay-id.
+    ///
+    /// @param relay_id DUID for relay_id of interest
+    /// @param link_addr limit results to leases on this link when not ::
+    /// @param lower_bound_address IPv4 address used as lower bound for the
+    /// returned range.
+    /// @param page_size maximum size of the page returned.
+    ///
+    /// @return collection of IPv6 leases
+    virtual Lease6Collection getLeases6ByRelayId(const DUID& relay_id,
+                                                 const asiolink::IOAddress& link_addr,
+                                                 const asiolink::IOAddress& lower_bound_address,
+                                                 const LeasePageSize& page_size);
+
+    /// @brief Returns existing IPv6 leases with a given remote-id.
+    ///
+    /// @param remote_id remote-id option data of interest
+    /// @param link_addr limit results to leases on this link when not ::
+    /// @param lower_bound_address IPv4 address used as lower bound for the
+    /// returned range.
+    /// @param page_size maximum size of the page returned.
+    ///
+    /// @return collection of IPv6 leases
+    virtual Lease6Collection getLeases6ByRemoteId(const OptionBuffer& remote_id,
+                                                  const asiolink::IOAddress& link_addr,
+                                                  const asiolink::IOAddress& lower_bound_address,
+                                                  const LeasePageSize& page_size);
+
+    /// @brief Returns existing IPv6 leases with on a given link.
+    ///
+    /// @param link_addr limit results to leases on this link when not ::
+    /// @param lower_bound_address IPv4 address used as lower bound for the
+    /// returned range.
+    /// @param page_size maximum size of the page returned.
+    ///
+    /// @return collection of IPv6 leases
+    virtual Lease6Collection getLeases6ByLink(const asiolink::IOAddress& link_addr,
+                                              const asiolink::IOAddress& lower_bound_address,
+                                              const LeasePageSize& page_size);
 };
 
 }  // namespace dhcp
index dfdb097f5b6e6dde0178117262bb22dc5ff86a93..d541cc82db2cdb110ca014cd9a4c22a699a008dc 100644 (file)
@@ -3352,5 +3352,46 @@ MySqlLeaseMgr::checkError(MySqlLeaseContextPtr& ctx,
     ctx->conn_.checkError(status, index, what);
 }
 
+Lease4Collection
+MySqlLeaseMgr::getLeases4ByRelayId(const OptionBuffer& /* relay_id */,
+                                   const IOAddress& /* lower_bound_address */,
+                                   const LeasePageSize& /* page_size */,
+                                   const time_t& /* qry_start_time = 0 */,
+                                   const time_t& /* qry_end_time = 0 */) {
+    isc_throw(NotImplemented, "MySqlLeaseMgr::getLeases4ByRelayId not implemented");
+}
+
+Lease4Collection
+MySqlLeaseMgr::getLeases4ByRemoteId(const OptionBuffer& /* remote_id */,
+                                    const IOAddress& /* lower_bound_address */,
+                                    const LeasePageSize& /* page_size */,
+                                    const time_t& /* qry_start_time = 0 */,
+                                    const time_t& /* qry_end_time = 0 */) {
+    isc_throw(NotImplemented, "MySqlLeaseMgr::getLeases4ByRemoteId not implemented");
+}
+
+Lease6Collection
+MySqlLeaseMgr::getLeases6ByRelayId(const DUID& /* relay_id */,
+                                   const IOAddress& /* link_addr */,
+                                   const IOAddress& /* lower_bound_address */,
+                                   const LeasePageSize& /* page_size */) {
+    isc_throw(NotImplemented, "MySqlLeaseMgr::getLeases6ByRelayId not implemented");
+}
+
+Lease6Collection
+MySqlLeaseMgr::getLeases6ByRemoteId(const OptionBuffer& /* remote_id */,
+                                    const IOAddress& /* link_addr */,
+                                    const IOAddress& /* lower_bound_address */,
+                                    const LeasePageSize& /* page_size*/) {
+    isc_throw(NotImplemented, "MySqlLeaseMgr::getLeases6ByRemoteId not implemented");
+}
+
+Lease6Collection
+MySqlLeaseMgr::getLeases6ByLink(const IOAddress& /* link_addr */,
+                                const IOAddress& /* lower_bound_address */,
+                                const LeasePageSize& /* page_size */) {
+    isc_throw(NotImplemented, "MySqlLeaseMgr::getLeases6ByLink not implemented");
+}
+
 }  // namespace dhcp
 }  // namespace isc
index 6bafd05f44eacc1f69b41987d6c904af62ce5f9d..1218b62345c2620cbdbcf0dd0697044b37a23f4c 100644 (file)
@@ -1012,6 +1012,86 @@ private:
                     int status, StatementIndex index,
                     const char* what) const;
 
+    /// 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.
+
+    /// @brief Returns existing IPv4 leases with a given relay-id.
+    ///
+    /// @param relay_id RAI Relay-ID sub-option value for relay_id of interest
+    /// @param lower_bound_address IPv4 address used as lower bound for the
+    /// returned range.
+    /// @param page_size maximum size of the page returned.
+    /// @param qry_start_time when not zero, only leases whose CLTT is greater than
+    /// or equal to this value will be included
+    /// @param qry_end_time when not zero, only leases whose CLTT is less than
+    /// or equal to this value will be included
+    ///
+    /// @return collection of IPv4 leases
+    virtual Lease4Collection getLeases4ByRelayId(const OptionBuffer& relay_id,
+                                                 const asiolink::IOAddress& lower_bound_address,
+                                                 const LeasePageSize& page_size,
+                                                 const time_t& qry_start_time = 0,
+                                                 const time_t& qry_end_time = 0);
+
+    /// @brief Returns existing IPv4 leases with a given remote-id.
+    ///
+    /// @param remote_id RAI Remote-ID sub-option value for remote-id of interest
+    /// @param lower_bound_address IPv4 address used as lower bound for the
+    /// returned range.
+    /// @param page_size maximum size of the page returned.
+    /// @param qry_start_time when not zero, only leases whose CLTT is greater than
+    /// or equal to this value will be included. Defaults to zero.
+    /// @param qry_end_time when not zero, only leases whose CLTT is less than
+    /// or equal to this value will be included. Defaults to zero.
+    ///
+    /// @return collection of IPv4 leases
+    virtual Lease4Collection getLeases4ByRemoteId(const OptionBuffer& remote_id,
+                                                  const asiolink::IOAddress& lower_bound_address,
+                                                  const LeasePageSize& page_size,
+                                                  const time_t& qry_start_time = 0,
+                                                  const time_t& qry_end_time = 0);
+
+    /// @brief Returns existing IPv6 leases with a given relay-id.
+    ///
+    /// @param relay_id DUID for relay_id of interest
+    /// @param link_addr limit results to leases on this link when not ::
+    /// @param lower_bound_address IPv4 address used as lower bound for the
+    /// returned range.
+    /// @param page_size maximum size of the page returned.
+    ///
+    /// @return collection of IPv6 leases
+    virtual Lease6Collection getLeases6ByRelayId(const DUID& relay_id,
+                                                 const asiolink::IOAddress& link_addr,
+                                                 const asiolink::IOAddress& lower_bound_address,
+                                                 const LeasePageSize& page_size);
+
+    /// @brief Returns existing IPv6 leases with a given remote-id.
+    ///
+    /// @param remote_id remote-id option data of interest
+    /// @param link_addr limit results to leases on this link when not ::
+    /// @param lower_bound_address IPv4 address used as lower bound for the
+    /// returned range.
+    /// @param page_size maximum size of the page returned.
+    ///
+    /// @return collection of IPv6 leases
+    virtual Lease6Collection getLeases6ByRemoteId(const OptionBuffer& remote_id,
+                                                  const asiolink::IOAddress& link_addr,
+                                                  const asiolink::IOAddress& lower_bound_address,
+                                                  const LeasePageSize& page_size);
+
+    /// @brief Returns existing IPv6 leases with on a given link.
+    ///
+    /// @param link_addr limit results to leases on this link when not ::
+    /// @param lower_bound_address IPv4 address used as lower bound for the
+    /// returned range.
+    /// @param page_size maximum size of the page returned.
+    ///
+    /// @return collection of IPv6 leases
+    virtual Lease6Collection getLeases6ByLink(const asiolink::IOAddress& link_addr,
+                                              const asiolink::IOAddress& lower_bound_address,
+                                              const LeasePageSize& page_size);
+
     /// @brief Context RAII Allocator.
     class MySqlLeaseContextAlloc {
     public:
index 3701d9a811a83bd51d8b22e626d0e87be9c5f778..c4c4d8dc34c9e27b0a3a077bfce419a9d5e1ccaf 100644 (file)
@@ -2546,5 +2546,46 @@ PgSqlLeaseMgr::rollback() {
     LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL, DHCPSRV_PGSQL_ROLLBACK);
 }
 
+Lease4Collection
+PgSqlLeaseMgr::getLeases4ByRelayId(const OptionBuffer& /* relay_id */,
+                                   const IOAddress& /* lower_bound_address */,
+                                   const LeasePageSize& /* page_size */,
+                                   const time_t& /* qry_start_time = 0 */,
+                                   const time_t& /* qry_end_time = 0 */) {
+    isc_throw(NotImplemented, "PgSqlLeaseMgr::getLeases4ByRelayId not implemented");
+}
+
+Lease4Collection
+PgSqlLeaseMgr::getLeases4ByRemoteId(const OptionBuffer& /* remote_id */,
+                                    const IOAddress& /* lower_bound_address */,
+                                    const LeasePageSize& /* page_size */,
+                                    const time_t& /* qry_start_time = 0 */,
+                                    const time_t& /* qry_end_time = 0 */) {
+    isc_throw(NotImplemented, "PgSqlLeaseMgr::getLeases4ByRemoteId not implemented");
+}
+
+Lease6Collection
+PgSqlLeaseMgr::getLeases6ByRelayId(const DUID& /* relay_id */,
+                                   const IOAddress& /* link_addr */,
+                                   const IOAddress& /* lower_bound_address */,
+                                   const LeasePageSize& /* page_size */) {
+    isc_throw(NotImplemented, "PgSqlLeaseMgr::getLeases6ByRelayId not implemented");
+}
+
+Lease6Collection
+PgSqlLeaseMgr::getLeases6ByRemoteId(const OptionBuffer& /* remote_id */,
+                                    const IOAddress& /* link_addr */,
+                                    const IOAddress& /* lower_bound_address */,
+                                    const LeasePageSize& /* page_size*/) {
+    isc_throw(NotImplemented, "PgSqlLeaseMgr::getLeases6ByRemoteId not implemented");
+}
+
+Lease6Collection
+PgSqlLeaseMgr::getLeases6ByLink(const IOAddress& /* link_addr */,
+                                const IOAddress& /* lower_bound_address */,
+                                const LeasePageSize& /* page_size */) {
+    isc_throw(NotImplemented, "PgSqlLeaseMgr::getLeases6ByLink not implemented");
+}
+
 }  // namespace dhcp
 }  // namespace isc
index 7ef28e65faffba836fe7f7c19a5f5232f901df14..039c5a97ab506950538de6752cf84dcbcfd4517b 100644 (file)
@@ -971,6 +971,86 @@ 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.
+
+    /// @brief Returns existing IPv4 leases with a given relay-id.
+    ///
+    /// @param relay_id RAI Relay-ID sub-option value for relay_id of interest
+    /// @param lower_bound_address IPv4 address used as lower bound for the
+    /// returned range.
+    /// @param page_size maximum size of the page returned.
+    /// @param qry_start_time when not zero, only leases whose CLTT is greater than
+    /// or equal to this value will be included
+    /// @param qry_end_time when not zero, only leases whose CLTT is less than
+    /// or equal to this value will be included
+    ///
+    /// @return collection of IPv4 leases
+    virtual Lease4Collection getLeases4ByRelayId(const OptionBuffer& relay_id,
+                                                 const asiolink::IOAddress& lower_bound_address,
+                                                 const LeasePageSize& page_size,
+                                                 const time_t& qry_start_time = 0,
+                                                 const time_t& qry_end_time = 0);
+
+    /// @brief Returns existing IPv4 leases with a given remote-id.
+    ///
+    /// @param remote_id RAI Remote-ID sub-option value for remote-id of interest
+    /// @param lower_bound_address IPv4 address used as lower bound for the
+    /// returned range.
+    /// @param page_size maximum size of the page returned.
+    /// @param qry_start_time when not zero, only leases whose CLTT is greater than
+    /// or equal to this value will be included. Defaults to zero.
+    /// @param qry_end_time when not zero, only leases whose CLTT is less than
+    /// or equal to this value will be included. Defaults to zero.
+    ///
+    /// @return collection of IPv4 leases
+    virtual Lease4Collection getLeases4ByRemoteId(const OptionBuffer& remote_id,
+                                                  const asiolink::IOAddress& lower_bound_address,
+                                                  const LeasePageSize& page_size,
+                                                  const time_t& qry_start_time = 0,
+                                                  const time_t& qry_end_time = 0);
+
+    /// @brief Returns existing IPv6 leases with a given relay-id.
+    ///
+    /// @param relay_id DUID for relay_id of interest
+    /// @param link_addr limit results to leases on this link when not ::
+    /// @param lower_bound_address IPv4 address used as lower bound for the
+    /// returned range.
+    /// @param page_size maximum size of the page returned.
+    ///
+    /// @return collection of IPv6 leases
+    virtual Lease6Collection getLeases6ByRelayId(const DUID& relay_id,
+                                                 const asiolink::IOAddress& link_addr,
+                                                 const asiolink::IOAddress& lower_bound_address,
+                                                 const LeasePageSize& page_size);
+
+    /// @brief Returns existing IPv6 leases with a given remote-id.
+    ///
+    /// @param remote_id remote-id option data of interest
+    /// @param link_addr limit results to leases on this link when not ::
+    /// @param lower_bound_address IPv4 address used as lower bound for the
+    /// returned range.
+    /// @param page_size maximum size of the page returned.
+    ///
+    /// @return collection of IPv6 leases
+    virtual Lease6Collection getLeases6ByRemoteId(const OptionBuffer& remote_id,
+                                                  const asiolink::IOAddress& link_addr,
+                                                  const asiolink::IOAddress& lower_bound_address,
+                                                  const LeasePageSize& page_size);
+
+    /// @brief Returns existing IPv6 leases with on a given link.
+    ///
+    /// @param link_addr limit results to leases on this link when not ::
+    /// @param lower_bound_address IPv4 address used as lower bound for the
+    /// returned range.
+    /// @param page_size maximum size of the page returned.
+    ///
+    /// @return collection of IPv6 leases
+    virtual Lease6Collection getLeases6ByLink(const asiolink::IOAddress& link_addr,
+                                              const asiolink::IOAddress& lower_bound_address,
+                                              const LeasePageSize& page_size);
+
     /// @brief Context RAII Allocator.
     class PgSqlLeaseContextAlloc {
     public: