Browse Source

[3699] Addressed review comments.

Marcin Siodelski 10 years ago
parent
commit
18d3ee4138
2 changed files with 24 additions and 11 deletions
  1. 8 1
      src/lib/dhcpsrv/cfg_hosts.cc
  2. 16 10
      src/lib/dhcpsrv/hosts_messages.mes

+ 8 - 1
src/lib/dhcpsrv/cfg_hosts.cc

@@ -125,7 +125,7 @@ CfgHosts::getAllInternal(const std::vector<uint8_t>& identifier,
         storage.push_back(*host);
     }
 
-    // Log how many hosts found.
+    // Log how many hosts have been found.
     LOG_DEBUG(hosts_logger, HOSTS_DBG_RESULTS, HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT)
         .arg(identifier_text)
         .arg(storage.size());
@@ -416,6 +416,13 @@ CfgHosts::getHostInternal(const SubnetID& subnet_id, const bool subnet6,
             .arg(hwaddr ? hwaddr->toText() : "(no-hwaddr)")
             .arg(duid ? duid->toText() : "(no-duid)")
             .arg(host->toText());
+
+    } else {
+        LOG_DEBUG(hosts_logger, HOSTS_DBG_RESULTS,
+                  HOSTS_CFG_GET_ONE_SUBNET_ID_HWADDR_DUID_NULL)
+            .arg(subnet_id)
+            .arg(hwaddr ? hwaddr->toText() : "(no-hwaddr)")
+            .arg(duid ? duid->toText() : "(no-duid)");
     }
 
     return (host);

+ 16 - 10
src/lib/dhcpsrv/hosts_messages.mes

@@ -20,7 +20,7 @@ the server's configuration. The argument describes the host and its
 reservations in detail.
 
 % HOSTS_CFG_GET_ALL_ADDRESS4 get all hosts with reservations for IPv4 address %1
-This debug message is issued when retrieving all hosts, holding the
+This debug message is issued when starting to retrieve all hosts, holding the
 reservation for the specific IPv4 address, from the configuration. The
 argument specifies the IPv4 address used to search the hosts.
 
@@ -35,27 +35,27 @@ IPv4 address. The arguments specify the IPv4 address used and the number
 of hosts found respectively.
 
 % HOSTS_CFG_GET_ALL_ADDRESS6 get all hosts with reservations for IPv6 address %1
-This debug message is issued when retrieving all hosts, holding the
+This debug message is issued when starting to retrieve all hosts, holding the
 reservation for the specific IPv6 address, from the configuration.
 The argument specifies the IPv6 address used to search the hosts.
 
 % HOSTS_CFG_GET_ALL_ADDRESS6_HOST using address %1 found host: %2
 This debug message is issued when found host with the reservation
-for the specified IPv6 addres. The arguments specify the IPv6 address
+for the specified IPv6 address. The arguments specify the IPv6 address
 and the detailed description of the host found.
 
 % HOSTS_CFG_GET_ALL_ADDRESS6_COUNT using address %1, found %2 host(s)
 This debug message logs the number of hosts found using the specified
-IPv4 address. The arguments specify the IPv6 address used and the number
+IPv6 address. The arguments specify the IPv6 address used and the number
 of hosts found respectively.
 
 % HOSTS_CFG_GET_ALL_HWADDR_DUID get all hosts with reservations for HWADDR %1 and DUID %2
-This debug message is issued when retrieving reservations for all hosts
+This debug message is issued when starting to retrieve reservations for all hosts
 using specific HW address or DUID. The arguments specify the HW address and
 DUID respectively. The argument specify the HW address and DUID respectively.
 
 % HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts with reservations using identifier: %1
-This debug message is issued when retrieving reservations for all hosts
+This debug message is issued when starting to retrieve reservations for all hosts
 identified by HW address or DUID. The argument holds both the identifier
 type and the value.
 
@@ -70,7 +70,7 @@ identifier. The arguments specify the identifier used and the number
 of hosts found respectively.
 
 % HOSTS_CFG_GET_ALL_SUBNET_ID_ADDRESS6 get all hosts with reservations for subnet id %1 and IPv6 address %2
-This debug message is issued when retrieving all hosts connected to
+This debug message is issued when starting to retrieve all hosts connected to
 the specific subnet and having the specific IPv6 address reserved.
 The arguments specify subnet id and IPv6 address respectively.
 
@@ -85,7 +85,7 @@ subnet id and address. The arguments specify subnet id, address and
 found host details respectively.
 
 % HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4 get one host with reservation for subnet id %1 and IPv4 address %2
-This debug message is issued when retrieving a host connected to the
+This debug message is issued when starting to retrieve a host connected to the
 specific subnet and having the specific IPv4 address reserved. The
 arguments specify subnet id and IPv4 address respectively.
 
@@ -98,7 +98,7 @@ This debug message is issued when no host was found for the specified
 subnet id and IPv4 address.
 
 % HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS6 get one host with reservation for subnet id %1 and including IPv6 address %2
-This debug message is issued when retrieveing a host connected to the
+This debug message is issued when starting to retrieve a host connected to the
 specific subnet and having the specific IPv6 address reserved. The
 arguments specify subnet id and IPv6 address respectively.
 
@@ -111,12 +111,18 @@ This debug message is issued when no host was found using the specified
 subnet if and IPv6 address.
 
 % HOSTS_CFG_GET_ONE_SUBNET_ID_HWADDR_DUID get one host with %1 reservation for subnet id %2, HWADDR %3, DUID %4
-This debug message is issued when retrieving the host holding IPv4 or
+This debug message is issued when starting to retrieve the host holding IPv4 or
 IPv6 reservations, which is connected to the specific subnet and is
 identified by the specific HW address or DUID. The first argument
 identifies if the IPv4 or IPv6 reservation is desired.
 
 % HOSTS_CFG_GET_ONE_SUBNET_ID_HWADDR_DUID_HOST using subnet id %1, HWADDR %2 and DUID %3, found host: %4
+This debug message includes the details of the host found using the
+subnet id, HW address and/or DUID.
+
+% HOSTS_CFG_GET_ONE_SUBNET_ID_HWADDR_DUID_NULL host not found using subnet id %1, HW address %2 and DUID %3
+This debug message is issued when no host was found using the specified
+subnet id, HW address and DUID.
 
 % HOSTS_MGR_ALTERNATE_GET4_SUBNET_ID_HWADDR_DUID trying alternate source for host using subnet id %1, HWADDR %2, DUID%3
 This debug message is issued when the Host Manager doesn't find the