, <command><link linkend="ref-reservation-del">reservation-del</link></command>
, <command><link linkend="ref-reservation-get">reservation-get</link></command>
, <command><link linkend="ref-reservation-get-all">reservation-get-all</link></command>
+, <command><link linkend="ref-reservation-get-page">reservation-get-page</link></command>
, <command><link linkend="ref-shutdown">shutdown</link></command>
, <command><link linkend="ref-stat-lease4-get">stat-lease4-get</link></command>
, <command><link linkend="ref-stat-lease6-get">stat-lease6-get</link></command>
, <command><link linkend="ref-reservation-del">reservation-del</link></command>
, <command><link linkend="ref-reservation-get">reservation-get</link></command>
, <command><link linkend="ref-reservation-get-all">reservation-get-all</link></command>
+, <command><link linkend="ref-reservation-get-page">reservation-get-page</link></command>
, <command><link linkend="ref-shutdown">shutdown</link></command>
, <command><link linkend="ref-stat-lease4-get">stat-lease4-get</link></command>
, <command><link linkend="ref-statistic-get">statistic-get</link></command>
, <command><link linkend="ref-reservation-del">reservation-del</link></command>
, <command><link linkend="ref-reservation-get">reservation-get</link></command>
, <command><link linkend="ref-reservation-get-all">reservation-get-all</link></command>
+, <command><link linkend="ref-reservation-get-page">reservation-get-page</link></command>
, <command><link linkend="ref-shutdown">shutdown</link></command>
, <command><link linkend="ref-stat-lease6-get">stat-lease6-get</link></command>
, <command><link linkend="ref-statistic-get">statistic-get</link></command>
, <command><link linkend="ref-reservation-del">reservation-del</link></command>
, <command><link linkend="ref-reservation-get">reservation-get</link></command>
, <command><link linkend="ref-reservation-get-all">reservation-get-all</link></command>
+, <command><link linkend="ref-reservation-get-page">reservation-get-page</link></command>
.</para>
<para xml:id="commands-lease_cmds-lib">Commands supported by lease_cmds hook library: <command><link linkend="ref-lease4-add">lease4-add</link></command>
, <command><link linkend="ref-lease4-del">lease4-del</link></command>
</section>
<!-- end of reservation-get-all -->
+<!-- start of reservation-get-page -->
+<section xml:id="reference-reservation-get-page">
+<title>reservation-get reference</title>
+<para xml:id="ref-reservation-get-page"><command>reservation-get-page</command> - Retrieve all host reservations for a specified subnet by pages.</para>
+
+<para>Supported by: <command><link linkend="commands-kea-dhcp4">kea-dhcp4</link></command>, <command><link linkend="commands-kea-dhcp6">kea-dhcp6</link></command></para>
+
+<para>Availability: 1.6.0 (<link linkend="commands-host_cmds-lib">host_cmds</link> hook)</para>
+
+<para>Description and examples: See <xref linkend="command-reservation-get-page"/></para>
+
+<para>Command syntax:
+ <screen>{
+ "command": "reservation-get-page",
+ "arguments": {
+ "subnet-id": <integer>,
+ "limit": <integer>,
+ "source-index": <integer>,
+ "from": <integer>
+ }
+}</screen>
+Returned host reservations are from the specified subnet. Page size is
+limited by the limit parameter. Start of the page is given by the optional
+source index (default 0 i.e. configuration file) and from host id (default
+0).
+</para>
+
+<para>Response syntax:
+ <screen>{
+ "result": <integer>,
+ "text": <string>,
+ "arguments": {
+ "source-index": <string>,
+ "count": <string>,
+ "next": <integer>,
+ "hosts": [
+ {
+ "boot-file-name": <string>,
+ "comment": <string>
+ "client-id": <string>,
+ "circuit-id": <string>,
+ "duid": <string>,
+ "flex-id": <string>,
+ "ip-address": <string (IPv4 address)>,
+ "ip-addresses": [ <comma separated strings> ],
+ "hw-address": <string>,
+ "hostname": <string>,
+ "next-server": <string (IPv4 address)>,
+ "option-data-list": [ <comma separated structures defining options> ],
+ "prefixes": [ <comma separated IPv6 prefixes> ],
+ "reservation-client-classes": [ <comma separated strings> ],
+ "server-hostname": <string>,
+ "subnet-id": <integer>,
+ "user-context": <any valid JSON>,
+ },
+ ...
+ ]
+ }
+}</screen>
+The source index and the next host id should be used getting the next page.
+After the last page the result is 3 (empty).
+</para>
+</section>
+<!-- end of reservation-get-page -->
+
<!-- start of shutdown -->
<section xml:id="reference-shutdown">
<title>shutdown reference</title>
Currently four commands are supported: reservation-add (which adds
new host reservation), reservation-get (which returns existing
reservation if specified criteria are matched), reservation-get-all
- (which returns all reservations in a specified subnet) and
- reservation-del
+ (which returns all reservations in a specified subnet),
+ reservation-get-page (variant of reservation-get-all which returns
+ all reservations in a specified subnet by pages) and reservation-del
(which attempts to delete a reservation matching specified
criteria). To use commands that change the reservation information
(currently these are reservation-add and reservation-del, but this
<para>The response returned by <command>reservation-get-all</command>
can be very long.
</para>
- </section>
+ </section>
+
+ <section xml:id="command-reservation-get-page">
+ <title>reservation-get-page command</title>
+ <para><command>reservation-get-page</command> can be used to
+ query the host database and retrieve all reservations in a
+ specified subnet by pages. This command uses parameters providing the
+ mandatory subnet-id. Use a value of zero (0) to fetch global
+ reservations. The second mandatory parameter is the page size limit.
+ Optional source-index and from host id, both defaulting to 0, are
+ uses to chain page queries.
+ </para>
+
+ <!-- Add example -->
+
+ <para>The first page is queried without source-index and from,
+ for next pages source-index and from should be set using
+ the preceeding result source-index and next. After the last page
+ the result is empty (code 3).
+ </para>
+ </section>
<section xml:id="command-reservation-del">
<title>reservation-del command</title>