Commit 5db1f8ff authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[github88] Removed remaining instances of getLeases6(DUID)

parent 61267ca8
......@@ -499,7 +499,7 @@ public:
virtual Lease6Collection
getLeases6(const asiolink::IOAddress& lower_bound_address,
const LeasePageSize& page_size) const = 0;
/// @brief Returns a collection of expired DHCPv4 leases.
///
/// This method returns at most @c max_leases expired leases. The leases
......
......@@ -1048,19 +1048,6 @@ Memfile_LeaseMgr::getLeases6(const asiolink::IOAddress& lower_bound_address,
return (collection);
}
Lease6Collection
Memfile_LeaseMgr::getLeases6(const DUID& duid) const {
LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL, DHCPSRV_MEMFILE_GET6);
Lease6Collection collection;
for (auto lease = storage6_.begin(); lease != storage6_.end(); ++lease ) {
if ( (**lease).duid_->getDuid() == duid.getDuid() )
collection.push_back(Lease6Ptr(new Lease6(**lease)));
}
return (collection);
}
void
Memfile_LeaseMgr::getExpiredLeases4(Lease4Collection& expired_leases,
const size_t max_leases) const {
......
......@@ -340,11 +340,6 @@ public:
getLeases6(const asiolink::IOAddress& lower_bound_address,
const LeasePageSize& page_size) const;
/// @brief Returns all IPv6 leases.
///
/// @return Lease collection (may be empty if no IPv6 lease found).
virtual Lease6Collection getLeases6(const DUID& duid) const;
/// @brief Returns a collection of expired DHCPv4 leases.
///
/// This method returns at most @c max_leases expired leases. The leases
......
......@@ -2266,23 +2266,6 @@ MySqlLeaseMgr::getLeases6(const asiolink::IOAddress& lower_bound_address,
return (result);
}
Lease6Collection
MySqlLeaseMgr::getLeases6(const DUID& duid) const {
LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL, DHCPSRV_MYSQL_GET_DUID);
Lease6Collection result = getLeases6();
//erase the ones not containing the matching DUID
for (auto iter = result.begin(); iter != result.end();
iter++) {
if ((*iter)->duid_->getDuid() != duid.getDuid()) {
result.erase(iter);
}
}
return (result);
}
void
MySqlLeaseMgr::getExpiredLeases4(Lease4Collection& expired_leases,
const size_t max_leases) const {
......
......@@ -337,11 +337,6 @@ public:
getLeases6(const asiolink::IOAddress& lower_bound_address,
const LeasePageSize& page_size) const;
/// @brief Returns all IPv6 leases.
///
/// @return Lease collection (may be empty if no IPv6 lease found).
virtual Lease6Collection getLeases6(const DUID& duid) const;
/// @brief Returns a collection of expired DHCPv4 leases.
///
/// This method returns at most @c max_leases expired leases. The leases
......
......@@ -208,14 +208,6 @@ public:
return (leases6_);
}
/// @brief Returns collection of lease for matching DUID
///
/// @param duid ignored
/// @return whatever is set in leases6_ field
virtual Lease6Collection getLeases6(const DUID& duid) const {
return (leases6_);
}
/// @brief Returns all IPv6 leases for the particular subnet identifier.
///
/// @param subnet_id subnet identifier.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment