]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[313-return-a-list-of-all-reservations-by-subnet-id] Addressed some comments
authorFrancis Dupont <fdupont@isc.org>
Wed, 23 Jan 2019 12:34:08 +0000 (13:34 +0100)
committerFrancis Dupont <fdupont@isc.org>
Tue, 29 Jan 2019 09:49:05 +0000 (04:49 -0500)
src/lib/dhcpsrv/pgsql_host_data_source.h
src/lib/dhcpsrv/testutils/generic_host_data_source_unittest.h
src/lib/dhcpsrv/writable_host_data_source.h

index e5094e1011be4ab17566ffe1688a532370e7ae13..f3b1f55205fd3bbeb82cbd6cc72e6b7e0a5e39cd 100644 (file)
@@ -161,7 +161,8 @@ public:
     /// @brief Return all hosts in a DHCPv4 subnet.
     ///
     /// This method returns all @ref Host objects which represent reservations
-    /// in a specified subnet.
+    /// in a specified subnet. Global reservations are returned for the
+    /// subnet id 0.
     ///
     /// @param subnet_id subnet identifier to filter by
     ///
@@ -172,7 +173,8 @@ public:
     /// @brief Return all hosts in a DHCPv6 subnet.
     ///
     /// This method returns all @ref Host objects which represent reservations
-    /// in a specified subnet.
+    /// in a specified subnet. Global reservations are returned for the
+    /// subnet id 0.
     ///
     /// @param subnet_id subnet identifier to filter by
     ///
@@ -182,8 +184,13 @@ public:
 
     /// @brief Returns range of hosts in a DHCPv4 subnet.
     ///
-    /// This method returns a page of @c Host objects which represent
-    /// reservations in a specified subnet.
+    /// This method implements paged browsing of host databases. The
+    /// parameters specify a page size, an index in sources and the
+    /// starting host id of the range. If not zero this host id is
+    /// excluded from the returned range. When a source is exhausted
+    /// the index is updated. There is no guarantee about the order
+    /// of returned host reservations, only the sources and
+    /// reservations from the same source are ordered.
     ///
     /// @param subnet_id Subnet identifier.
     /// @param source_index Index of the source (unused).
@@ -200,8 +207,13 @@ public:
 
     /// @brief Returns range of hosts in a DHCPv6 subnet.
     ///
-    /// This method returns a page of @c Host objects which represent
-    /// reservations in a specified subnet.
+    /// This method implements paged browsing of host databases. The
+    /// parameters specify a page size, an index in sources and the
+    /// starting host id of the range. If not zero this host id is
+    /// excluded from the returned range. When a source is exhausted
+    /// the index is updated. There is no guarantee about the order
+    /// of returned host reservations, only the sources and
+    /// reservations from the same source are ordered.
     ///
     /// @param subnet_id Subnet identifier.
     /// @param source_index Index of the source (unused).
index e9eaef3f4924f96de5cc44199912a4f778df9456..8661dfae38b82ceefb75f8c6f69109991e1f1b3f 100644 (file)
@@ -182,28 +182,28 @@ public:
     /// same subnet can be retrieved properly.
     ///
     /// Uses gtest macros to report failures.
-    /// @param id Identifier type.
+    /// @param id Identifier type (hwaddr or duid).
     void testGetAll4(const Host::IdentifierType& id);
 
     /// @brief Test that Verifies that IPv6 host reservations in the
     /// same subnet can be retrieved properly.
     ///
     /// Uses gtest macros to report failures.
-    /// @param id Identifier type.
+    /// @param id Identifier type (hwaddr or duid).
     void testGetAll6(const Host::IdentifierType& id);
 
     /// @brief Test that Verifies that pages of host reservations in the
     /// same subnet can be retrieved properly.
     ///
     /// Uses gtest macros to report failures.
-    /// @param id Identifier type.
+    /// @param id Identifier type (hwaddr or duid).
     void testGetPage4(const Host::IdentifierType& id);
 
     /// @brief Test that Verifies that pages of host reservations in the
     /// same subnet can be retrieved properly.
     ///
     /// Uses gtest macros to report failures.
-    /// @param id Identifier type.
+    /// @param id Identifier type (hwaddr or duid).
     void testGetPage6(const Host::IdentifierType& id);
 
     /// @brief Test inserts several hosts with unique IPv4 address and
index 1a398064f3afd4fb661b7690c8473f31423cb041..38a3842517bf25d3dc3ab73b050d2f57bcc96f72 100644 (file)
@@ -59,6 +59,14 @@ public:
 
     /// @brief Returns range of hosts in a DHCPv4 subnet.
     ///
+    /// This method implements paged browsing of host databases. The
+    /// parameters specify a page size, an index in sources and the
+    /// starting host id of the range. If not zero this host id is
+    /// excluded from the returned range. When a source is exhausted
+    /// the index is updated. There is no guarantee about the order
+    /// of returned host reservations, only the sources and
+    /// reservations from the same source are ordered.
+    ///
     /// @param subnet_id Subnet identifier.
     /// @param source_index Index of the source.
     /// @param lower_host_id Host identifier used as lower bound for the
@@ -74,6 +82,14 @@ public:
 
     /// @brief Returns range of hosts in a DHCPv6 subnet.
     ///
+    /// This method implements paged browsing of host databases. The
+    /// parameters specify a page size, an index in sources and the
+    /// starting host id of the range. If not zero this host id is
+    /// excluded from the returned range. When a source is exhausted
+    /// the index is updated. There is no guarantee about the order
+    /// of returned host reservations, only the sources and
+    /// reservations from the same source are ordered.
+    ///
     /// @param subnet_id Subnet identifier.
     /// @param source_index Index of the source.
     /// @param lower_host_id Host identifier used as lower bound for the