Commit f551e0e4 authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[4302] Refactored host data source classes.

The updated API exposes functions which retrieve hosts
by any identifier and identifier type, rather than DUID
or HW address.
parent 14cc8ad6
// Copyright (C) 2014-2015 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2014-2016 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
......@@ -98,6 +98,23 @@ public:
virtual ConstHostCollection
getAll(const HWAddrPtr& hwaddr, const DuidPtr& duid = DuidPtr()) const = 0;
/// @brief Return all hosts connected to any subnet for which reservations
/// have been made using a specified identifier.
///
/// This method returns all @c Host objects which represent reservations
/// for a specified identifier. This method may return multiple hosts
/// because a particular client may have reservations in multiple subnets.
///
/// @param identifier_begin Pointer to a begining of a buffer containing
/// an identifier.
/// @param identifier_len Identifier length.
///
/// @return Collection of const @c Host objects.
virtual ConstHostCollection
getAll(const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin,
const size_t identifier_len) const = 0;
/// @brief Returns a collection of hosts using the specified IPv4 address.
///
/// This method may return multiple @c Host objects if they are connected
......@@ -127,6 +144,23 @@ public:
get4(const SubnetID& subnet_id, const HWAddrPtr& hwaddr,
const DuidPtr& duid = DuidPtr()) const = 0;
/// @brief Returns a host connected to the IPv4 subnet.
///
/// @param subnet_id Subnet identifier.
/// @param identifier_type Identifier type.
/// @param identifier_begin Pointer to a begining of a buffer containing
/// an identifier.
/// @param identifier_len Identifier length.
///
/// @return Const @c Host object for which reservation has been made using
/// the specified identifier.
virtual ConstHostPtr
get4(const SubnetID& subnet_id,
const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin,
const size_t identifier_len) const = 0;
/// @brief Returns a host connected to the IPv4 subnet and having
/// a reservation for a specified IPv4 address.
///
......@@ -165,6 +199,21 @@ public:
get6(const SubnetID& subnet_id, const DuidPtr& duid,
const HWAddrPtr& hwaddr = HWAddrPtr()) const = 0;
/// @brief Returns a host connected to the IPv6 subnet.
///
/// @param subnet_id Subnet identifier.
/// @param identifier_type Identifier type.
/// @param identifier_begin Pointer to a begining of a buffer containing
/// an identifier.
/// @param identifier_len Identifier length.
///
/// @return Const @c Host object for which reservation has been made using
/// the specified identifier.
virtual ConstHostPtr
get6(const SubnetID& subnet_id,
const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin,
const size_t identifier_len) const = 0;
/// @brief Returns a host using the specified IPv6 prefix.
///
......
// Copyright (C) 2014-2015 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2014-2016 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
......@@ -33,6 +33,29 @@ CfgHosts::getAll(const HWAddrPtr& hwaddr, const DuidPtr& duid) {
return (collection);
}
ConstHostCollection
CfgHosts::getAll(const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin,
const size_t identifier_len) const {
// Do not issue logging message here because it will be logged by
// the getAllInternal method.
ConstHostCollection collection;
getAllInternal<ConstHostCollection>(identifier_type, identifier_begin,
identifier_len, collection);
return (collection);
}
HostCollection
CfgHosts::getAll(const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin, const size_t identifier_len) {
// Do not issue logging message here because it will be logged by
// the getAllInternal method.
HostCollection collection;
getAllInternal<HostCollection>(identifier_type, identifier_begin,
identifier_len, collection);
return (collection);
}
ConstHostCollection
CfgHosts::getAll4(const IOAddress& address) const {
// Do not issue logging message here because it will be logged by
......@@ -71,27 +94,26 @@ CfgHosts::getAll6(const IOAddress& address) {
template<typename Storage>
void
CfgHosts::getAllInternal(const std::vector<uint8_t>& identifier,
const Host::IdentifierType& identifier_type,
CfgHosts::getAllInternal(const Host::IdentifierType& identifier_type,
const uint8_t* identifier,
const size_t identifier_len,
Storage& storage) const {
// We will need to transform the identifier into the textual format.
// Until we do it, we mark it as invalid.
std::string identifier_text = "(invalid)";
if (!identifier.empty()) {
try {
// Use Host object to find the textual form of the identifier.
// This may throw exception if the identifier is invalid.
Host host(&identifier[0], identifier.size(), identifier_type,
SubnetID(0), SubnetID(0), IOAddress::IPV4_ZERO_ADDRESS());
identifier_text = host.getIdentifierAsText();
} catch (...) {
// Suppress exception and keep using (invalid) as an
// identifier. We will log that the identifier is
// invalid and return.
}
try {
// Use Host object to find the textual form of the identifier.
// This may throw exception if the identifier is invalid.
Host host(identifier, identifier_len, identifier_type,
SubnetID(0), SubnetID(0), IOAddress::IPV4_ZERO_ADDRESS());
identifier_text = host.getIdentifierAsText();
} catch (...) {
// Suppress exception and keep using (invalid) as an
// identifier. We will log that the identifier is
// invalid and return.
}
// This will log that we're invoking this function with the specified
// identifier. The identifier may also be marked as (invalid) if it
// had 0 length or its type is unsupported.
......@@ -106,10 +128,13 @@ CfgHosts::getAllInternal(const std::vector<uint8_t>& identifier,
// Use the identifier and identifier type as a composite key.
const HostContainerIndex0& idx = hosts_.get<0>();
boost::tuple<const std::vector<uint8_t>, const Host::IdentifierType> t =
boost::make_tuple(identifier, identifier_type);
boost::make_tuple(std::vector<uint8_t>(identifier,
identifier + identifier_len),
identifier_type);
// Append each Host object to the storage.
for (HostContainerIndex0::iterator host = idx.lower_bound(t); host != idx.upper_bound(t);
for (HostContainerIndex0::iterator host = idx.lower_bound(t);
host != idx.upper_bound(t);
++host) {
LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE_DETAIL_DATA,
HOSTS_CFG_GET_ALL_IDENTIFIER_HOST)
......@@ -133,12 +158,14 @@ CfgHosts::getAllInternal(const HWAddrPtr& hwaddr, const DuidPtr& duid,
.arg(duid ? duid->toText() : "(no-duid)");
// Get hosts using HW address.
if (hwaddr) {
getAllInternal<Storage>(hwaddr->hwaddr_, Host::IDENT_HWADDR, storage);
if (hwaddr && !hwaddr->hwaddr_.empty()) {
getAllInternal<Storage>(Host::IDENT_HWADDR, &hwaddr->hwaddr_[0],
hwaddr->hwaddr_.size(), storage);
}
// Get hosts using DUID.
if (duid) {
getAllInternal<Storage>(duid->getDuid(), Host::IDENT_DUID, storage);
if (duid && !duid->getDuid().empty()) {
getAllInternal<Storage>(Host::IDENT_DUID, &duid->getDuid()[0],
duid->getDuid().size(), storage);
}
}
......@@ -206,7 +233,18 @@ CfgHosts::get4(const SubnetID& subnet_id, const HWAddrPtr& hwaddr,
const DuidPtr& duid) const {
// Do not log here because getHostInternal logs.
// The false value indicates that it is an IPv4 subnet.
return (getHostInternal(subnet_id, false, hwaddr, duid));
HostPtr host;
if (hwaddr && !hwaddr->hwaddr_.empty()) {
host = getHostInternal(subnet_id, false, Host::IDENT_HWADDR,
&hwaddr->hwaddr_[0],
hwaddr->hwaddr_.size());
}
if (!host && duid && !duid->getDuid().empty()) {
host = getHostInternal(subnet_id, false, Host::IDENT_DUID,
&duid->getDuid()[0],
duid->getDuid().size());
}
return (host);
}
HostPtr
......@@ -214,7 +252,36 @@ CfgHosts::get4(const SubnetID& subnet_id, const HWAddrPtr& hwaddr,
const DuidPtr& duid) {
// Do not log here because getHostInternal logs.
// The false value indicates that it is an IPv4 subnet.
return (getHostInternal(subnet_id, false, hwaddr, duid));
HostPtr host;
if (hwaddr && !hwaddr->hwaddr_.empty()) {
host = getHostInternal(subnet_id, false, Host::IDENT_HWADDR,
&hwaddr->hwaddr_[0],
hwaddr->hwaddr_.size());
}
if (!host && duid && !duid->getDuid().empty()) {
host = getHostInternal(subnet_id, false, Host::IDENT_DUID,
&duid->getDuid()[0],
duid->getDuid().size());
}
return (host);
}
ConstHostPtr
CfgHosts::get4(const SubnetID& subnet_id,
const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin,
const size_t identifier_len) const {
return (getHostInternal(subnet_id, false, identifier_type, identifier_begin,
identifier_len));
}
HostPtr
CfgHosts::get4(const SubnetID& subnet_id,
const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin,
const size_t identifier_len) {
return (getHostInternal(subnet_id, false, identifier_type, identifier_begin,
identifier_len));
}
ConstHostPtr
......@@ -246,7 +313,19 @@ CfgHosts::get6(const SubnetID& subnet_id, const DuidPtr& duid,
const HWAddrPtr& hwaddr) const {
// Do not log here because getHostInternal logs.
// The true value indicates that it is an IPv6 subnet.
return (getHostInternal(subnet_id, true, hwaddr, duid));
HostPtr host;
if (duid && !duid->getDuid().empty()) {
host = getHostInternal(subnet_id, true, Host::IDENT_DUID,
&duid->getDuid()[0],
duid->getDuid().size());
}
if (!host && hwaddr && !hwaddr->hwaddr_.empty()) {
host = getHostInternal(subnet_id, true, Host::IDENT_HWADDR,
&hwaddr->hwaddr_[0],
hwaddr->hwaddr_.size());
}
return (host);
}
HostPtr
......@@ -254,7 +333,37 @@ CfgHosts::get6(const SubnetID& subnet_id, const DuidPtr& duid,
const HWAddrPtr& hwaddr) {
// Do not log here because getHostInternal logs.
// The true value indicates that it is an IPv6 subnet.
return (getHostInternal(subnet_id, true, hwaddr, duid));
HostPtr host;
if (duid && !duid->getDuid().empty()) {
host = getHostInternal(subnet_id, true, Host::IDENT_DUID,
&duid->getDuid()[0],
duid->getDuid().size());
}
if (!host && hwaddr && !hwaddr->hwaddr_.empty()) {
host = getHostInternal(subnet_id, true, Host::IDENT_HWADDR,
&hwaddr->hwaddr_[0],
hwaddr->hwaddr_.size());
}
return (host);
}
ConstHostPtr
CfgHosts::get6(const SubnetID& subnet_id,
const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin,
const size_t identifier_len) const {
return (getHostInternal(subnet_id, true, identifier_type, identifier_begin,
identifier_len));
}
HostPtr
CfgHosts::get6(const SubnetID& subnet_id,
const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin,
const size_t identifier_len) {
return (getHostInternal(subnet_id, true, identifier_type, identifier_begin,
identifier_len));
}
ConstHostPtr
......@@ -357,18 +466,22 @@ CfgHosts::getAllInternal6(const SubnetID& subnet_id,
HostPtr
CfgHosts::getHostInternal(const SubnetID& subnet_id, const bool subnet6,
const HWAddrPtr& hwaddr, const DuidPtr& duid) const {
LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE, HOSTS_CFG_GET_ONE_SUBNET_ID_HWADDR_DUID)
const Host::IdentifierType& identifier_type,
const uint8_t* identifier,
const size_t identifier_len) const {
/* LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE, HOSTS_CFG_GET_ONE_SUBNET_ID_HWADDR_DUID)
.arg(subnet6 ? "IPv6" : "IPv4")
.arg(subnet_id)
.arg(hwaddr ? hwaddr->toText() : "(no-hwaddr)")
.arg(duid ? duid->toText() : "(no-duid)");
.arg(duid ? duid->toText() : "(no-duid)"); */
// Get all hosts for the HW address and DUID. This may return multiple hosts
// Get all hosts for a specified identifier. This may return multiple hosts
// for different subnets, but the number of hosts returned should be low
// because one host presumably doesn't show up in many subnets.
HostCollection hosts;
getAllInternal<HostCollection>(hwaddr, duid, hosts);
getAllInternal<HostCollection>(identifier_type, identifier, identifier_len,
hosts);
HostPtr host;
// Iterate over the returned hosts and select those for which the
......@@ -394,15 +507,15 @@ CfgHosts::getHostInternal(const SubnetID& subnet_id, const bool subnet6,
isc_throw(DuplicateHost, "more than one reservation found"
" for the host belonging to the subnet with id '"
<< subnet_id << "' and using the HW address '"
<< (hwaddr ? hwaddr->toText(false) : "(null)")
<< "' and DUID '"
<< (duid ? duid->toText() : "(null)")
// << (hwaddr ? hwaddr->toText(false) : "(null)")
// << "' and DUID '"
// << (duid ? duid->toText() : "(null)")
<< "'");
}
}
}
if (host) {
/* if (host) {
LOG_DEBUG(hosts_logger, HOSTS_DBG_RESULTS,
HOSTS_CFG_GET_ONE_SUBNET_ID_HWADDR_DUID)
.arg(subnet_id)
......@@ -416,12 +529,11 @@ CfgHosts::getHostInternal(const SubnetID& subnet_id, const bool subnet6,
.arg(subnet_id)
.arg(hwaddr ? hwaddr->toText() : "(no-hwaddr)")
.arg(duid ? duid->toText() : "(no-duid)");
}
} */
return (host);
}
void
CfgHosts::add(const HostPtr& host) {
LOG_DEBUG(hosts_logger, HOSTS_DBG_TRACE, HOSTS_CFG_ADD_HOST)
......
// Copyright (C) 2014-2015 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2014-2016 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
......@@ -69,6 +69,38 @@ public:
virtual HostCollection
getAll(const HWAddrPtr& hwaddr, const DuidPtr& duid = DuidPtr());
/// @brief Return all hosts connected to any subnet for which reservations
/// have been made using a specified identifier.
///
/// This method returns all @c Host objects which represent reservations
/// for a specified identifier. This method may return multiple hosts
/// because a particular client may have reservations in multiple subnets.
///
/// @param identifier_begin Pointer to a begining of a buffer containing
/// an identifier.
/// @param identifier_len Identifier length.
///
/// @return Collection of const @c Host objects.
virtual ConstHostCollection
getAll(const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin, const size_t identifier_len) const;
/// @brief Non-const version of the @c getAll const method.
///
/// This method returns all @c Host objects which represent reservations
/// for a specified identifier. This method may return multiple hosts
/// because a particular client may have reservations in multiple subnets.
///
/// @param identifier_begin Pointer to a begining of a buffer containing
/// an identifier.
/// @param identifier_len Identifier length.
///
/// @return Collection of non-const @c Host objects.
virtual HostCollection
getAll(const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin,
const size_t identifier_len);
/// @brief Returns a collection of hosts using the specified IPv4 address.
///
/// This method may return multiple @c Host objects if they are connected
......@@ -143,6 +175,34 @@ public:
get4(const SubnetID& subnet_id, const HWAddrPtr& hwaddr,
const DuidPtr& duid = DuidPtr());
/// @brief Returns a host connected to the IPv4 subnet.
///
/// @param subnet_id Subnet identifier.
/// @param identifier_type Identifier type.
/// @param identifier_begin Pointer to a begining of a buffer containing
/// an identifier.
/// @param identifier_len Identifier length.
///
/// @return Const @c Host object for which reservation has been made using
/// the specified identifier.
virtual ConstHostPtr
get4(const SubnetID& subnet_id, const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin, const size_t identifier_len) const;
/// @brief Returns a host connected to the IPv4 subnet.
///
/// @param subnet_id Subnet identifier.
/// @param identifier_type Identifier type.
/// @param identifier_begin Pointer to a begining of a buffer containing
/// an identifier.
/// @param identifier_len Identifier length.
///
/// @return Non-const @c Host object for which reservation has been made
/// using the specified identifier.
virtual HostPtr
get4(const SubnetID& subnet_id, const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin, const size_t identifier_len);
/// @brief Returns a host connected to the IPv4 subnet and having
/// a reservation for a specified IPv4 address.
///
......@@ -183,6 +243,34 @@ public:
get6(const SubnetID& subnet_id, const DuidPtr& duid,
const HWAddrPtr& hwaddr = HWAddrPtr());
/// @brief Returns a host connected to the IPv6 subnet.
///
/// @param subnet_id Subnet identifier.
/// @param identifier_type Identifier type.
/// @param identifier_begin Pointer to a begining of a buffer containing
/// an identifier.
/// @param identifier_len Identifier length.
///
/// @return Const @c Host object for which reservation has been made using
/// the specified identifier.
virtual ConstHostPtr
get6(const SubnetID& subnet_id, const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin, const size_t identifier_len) const;
/// @brief Returns a host connected to the IPv6 subnet.
///
/// @param subnet_id Subnet identifier.
/// @param identifier_type Identifier type.
/// @param identifier_begin Pointer to a begining of a buffer containing
/// an identifier.
/// @param identifier_len Identifier length.
///
/// @return Non-const @c Host object for which reservation has been made
/// using the specified identifier.
virtual HostPtr
get6(const SubnetID& subnet_id, const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin, const size_t identifier_len);
/// @brief Returns a host using the specified IPv6 prefix.
///
/// @param prefix IPv6 prefix for which the @c Host object is searched.
......@@ -243,18 +331,19 @@ private:
/// @brief Returns @c Host objects for the specific identifier and type.
///
/// This private method is called by the @c CfgHosts::getAllInternal
/// method which finds the @c Host objects using HW address or DUID.
/// method which finds the @c Host objects using specified identifier.
/// The retrieved objects are appended to the @c storage container.
///
/// @param identifier Binary representation of the HW addres or DUID (or
/// other future identifier).
/// @param identifier_type The type of the supplied identifier.
/// @param identifier Pointer to a first byte of the identifier.
/// @param identifier_len Length of the identifier.
/// @param [out] storage Container to which the retreived objects are
/// appended.
/// @tparam One of the @c ConstHostCollection of @c HostCollection.
template<typename Storage>
void getAllInternal(const std::vector<uint8_t>& identifier,
const Host::IdentifierType& identifier_type,
void getAllInternal(const Host::IdentifierType& identifier_type,
const uint8_t* identifier,
const size_t identifier_len,
Storage& storage) const;
/// @brief Returns @c Host objects for the specified HW address or DUID.
......@@ -323,22 +412,25 @@ private:
/// @brief Returns @c Host object connected to a subnet.
///
/// This private method returns a pointer to the @c Host object identified
/// by the HW address or DUID and connected to an IPv4 or IPv6 subnet.
/// This private method returns a pointer to the @c Host object using
/// a specified identifier and connected to an IPv4 or IPv6 subnet.
///
/// @param subnet_id IPv4 or IPv6 subnet identifier.
/// @param subnet6 A boolean flag which indicates if the subnet identifier
/// points to a IPv4 (if false) or IPv6 subnet (if true).
/// @param hwaddr HW address identifying a host.
/// @param duid DUID identifying a host.
/// @param identifier_type Indentifier type.
/// @param identifier Pointer to a first byte of the buffer holding an
/// identifier.
/// @param identifier_len Identifier length.
///
/// @return Pointer to the found host, or NULL if no host found.
/// @throw isc::dhcp::DuplicateHost if method found more than one matching
/// @c Host object.
HostPtr getHostInternal(const SubnetID& subnet_id,
const bool subnet6,
const HWAddrPtr& hwaddr,
const DuidPtr& duid) const;
HostPtr
getHostInternal(const SubnetID& subnet_id, const bool subnet6,
const Host::IdentifierType& identifier_type,
const uint8_t* identifier,
const size_t identifier_len) const;
/// @brief Returns the @c Host object holding reservation for the IPv6
/// address and connected to the specific subnet.
......
// Copyright (C) 2014-2015 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2014-2016 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
......@@ -76,6 +76,23 @@ HostMgr::getAll(const HWAddrPtr& hwaddr, const DuidPtr& duid) const {
return (hosts);
}
ConstHostCollection
HostMgr::getAll(const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin,
const size_t identifier_len) const {
ConstHostCollection hosts = getCfgHosts()->getAll(identifier_type,
identifier_begin,
identifier_len);
if (alternate_source_) {
ConstHostCollection hosts_plus =
alternate_source_->getAll(identifier_type, identifier_begin,
identifier_len);
hosts.insert(hosts.end(), hosts_plus.begin(), hosts_plus.end());
}
return (hosts);
}
ConstHostCollection
HostMgr::getAll4(const IOAddress& address) const {
ConstHostCollection hosts = getCfgHosts()->getAll4(address);
......@@ -106,6 +123,20 @@ HostMgr::get4(const SubnetID& subnet_id, const HWAddrPtr& hwaddr,
return (host);
}
ConstHostPtr
HostMgr::get4(const SubnetID& subnet_id,
const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin,
const size_t identifier_len) const {
ConstHostPtr host = getCfgHosts()->get4(subnet_id, identifier_type,
identifier_begin, identifier_len);
if (!host && alternate_source_) {
host = alternate_source_->get4(subnet_id, identifier_type,
identifier_begin, identifier_len);
}
return (host);
}
ConstHostPtr
HostMgr::get4(const SubnetID& subnet_id,
const asiolink::IOAddress& address) const {
......@@ -154,6 +185,20 @@ HostMgr::get6(const IOAddress& prefix, const uint8_t prefix_len) const {
return (host);
}
ConstHostPtr
HostMgr::get6(const SubnetID& subnet_id,
const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin,
const size_t identifier_len) const {
ConstHostPtr host = getCfgHosts()->get6(subnet_id, identifier_type,
identifier_begin, identifier_len);
if (!host && alternate_source_) {
host = alternate_source_->get6(subnet_id, identifier_type,
identifier_begin, identifier_len);
}
return (host);
}
ConstHostPtr
HostMgr::get6(const SubnetID& subnet_id,
const asiolink::IOAddress& addr) const {
......
// Copyright (C) 2014-2015 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2014-2016 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
......@@ -101,6 +101,27 @@ public:
virtual ConstHostCollection
getAll(const HWAddrPtr& hwaddr, const DuidPtr& duid = DuidPtr()) const;
/// @brief Return all hosts connected to any subnet for which reservations
/// have been made using a specified identifier.
///
/// This method returns all @c Host objects representing reservations for
/// a specified identifier as documented in the