const auto t = boost::make_tuple(std::vector<uint8_t>(identifier_begin,
identifier_begin + identifier_len),
identifier_type);
- const auto& range = idx.equal_range(t);
+ const auto& range = idx.equal_range(t);
size_t erased = 0;
for (auto key = range.first; key != range.second;) {
if ((*key)->getIPv4SubnetID() != subnet_id) {
const auto t = boost::make_tuple(std::vector<uint8_t>(identifier_begin,
identifier_begin + identifier_len),
identifier_type);
- const auto& range = idx.equal_range(t);
+ const auto& range = idx.equal_range(t);
size_t erased_hosts = 0;
size_t erased_reservations = 0;
for (auto key = range.first; key != range.second;) {
HostMgr::getAll(const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin,
const size_t identifier_len) const {
- return getAll(identifier_type, identifier_begin, identifier_len,
+ return getAll(identifier_type, identifier_begin, identifier_len,
HostMgrOperationTarget::ALL_SOURCES);
}
if (alternate_sources_.empty() && !(target & HostMgrOperationTarget::PRIMARY_SOURCE)) {
isc_throw(NoHostDataSourceManager, "Unable to add new host because there is "
"no hosts-database configured.");
-
+
}
for (auto source : alternate_sources_) {
isc_throw(NoHostDataSourceManager,
"Unable to update existing host because there is no hosts-database configured.");
}
-
+
for (HostDataSourcePtr const& source : alternate_sources_) {
source->update(host);
}
% HOSTS_CFG_DEL4 deleted %1 host(s) for subnet id %2 and identifier %3
This debug message is issued when IPv4 reservations are deleted for the specified
subnet and identifier. The first argument specifies how many hosts have been
-deleted. The second argument is the subnet identifier. The third argument is
+deleted. The second argument is the subnet identifier. The third argument is
the identifier.
% HOSTS_CFG_DEL6 deleted %1 host(s) having %2 IPv6 reservation(s) for subnet id %3 and identifier %4
// Make sure the hosts and IP reservations were added.
ASSERT_EQ(host_count, hosts_by_subnet.size());
ASSERT_EQ(1, hosts_by_address.size());
-
+
// Delete one host.
EXPECT_TRUE(cfg.del(subnet_id, address));
increase(IOAddress(address), i)));
cfg.add(host);
}
-
+
// Get all inserted hosts.
auto hosts_by_subnet_and_address = cfg.getAll6(subnet_id, address);
// Make sure the hosts and IP reservations were added.
ASSERT_EQ(1, hosts_by_subnet_and_address.size());
ASSERT_EQ(host_count, hosts_by_subnet.size());
-
+
// Delete one host.
EXPECT_TRUE(cfg.del(subnet_id, address));
// Delete one host.
EXPECT_TRUE(cfg.del4(subnet_id, Host::IdentifierType::IDENT_DUID,
&duids_[host_id]->getDuid()[0], duids_[host_id]->getDuid().size()));
-
+
// Check if the host is actually deleted.
hosts_by_subnet = cfg.getAll4(subnet_id);
hosts_by_address = cfg.getAll4(increase(address, host_id));
// Delete one host.
EXPECT_TRUE(cfg.del6(subnet_id, Host::IdentifierType::IDENT_DUID,
&duids_[host_id]->getDuid()[0], duids_[host_id]->getDuid().size()));
-
+
// Check if the host is actually deleted.
hosts_by_subnet = cfg.getAll6(subnet_id);
hosts_by_address = cfg.getAll6(increase(address, host_id));
HostMgr::instance().add(host, HostMgrOperationTarget::UNSPECIFIED_SOURCE);
// Verify the hosts were added.
- // ALL_SOURCES + PRIMARY_SOURCE targets for IPv4 and IPv6.
+ // ALL_SOURCES + PRIMARY_SOURCE targets for IPv4 and IPv6.
size_t hosts_in_primary_source = 2 * 2 * (is_first_source_primary || is_second_source_primary);
// Default + ALL_SOURCES + ALTERNATE_SOURCES targets for IPv4 and IPv6.
size_t hosts_in_alternate_sources = 3 * 2 * (!is_first_source_primary || !is_second_source_primary);