--- /dev/null
+{
+ "name": "reservation-add",
+ "brief": "adds a new host reservation. The reservation may include IPv4 address,
+ IPv6 addresses, IPv6 prefixes, various identifiers, a class
+ the client will be assigned to, DHCPv4 and DHCPv6 options and
+ more.",
+ "support": [ "kea-dhcp4", "kea-dhcp6" ],
+ "avail": "1.2.0, host_cmds library (premium)",
+ "description": "See <xref linkend=\"cmd-reservation-add\"/>",
+
+ "cmd-syntax": "{
+ \"command\": \"reservation-add\",
+ \"arguments\": {
+ \"reservation\": {
+ \"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>,
+ }
+ }
+}",
+ "cmd-comment": "Note the ip-address, client-id, next-server, server-hostname and
+boot-file-name are IPv4 specific. duid, ip-addresses and prefixes are
+IPv6 specific.",
+
+ "resp-syntax": "
+{
+ \"result\": <integer>,
+ \"text\": <string>
+}",
+ "resp-comment": "Result is an integer representation of the status. Currently supported statuses are:
+<itemizedlist>
+ <listitem><para>0 - success</para></listitem>
+ <listitem><para>1 - error</para></listitem>
+ <listitem><para>2 - unsupported</para></listitem>
+ <listitem><para>3 - empty (command was completed successfully, but no data was affected or returned)
+ </para></listitem>
+</itemizedlist>"
+}
+
--- /dev/null
+{
+ "name": "reservation-del",
+ "brief": "Deletes an existing host reservation.",
+ "support": [ "kea-dhcp4", "kea-dhcp6" ],
+ "avail": "1.2.0, host_cmds library (premium)",
+
+ "cmd-syntax": "{
+ \"command\": \"reservation-del\",
+ \"arguments\": {
+ \"subnet-id\": <integer>,
+ \"ip-address\": <string>,
+ \"identifier-type\": <one of \"hw-address\", \"duid\", \"circuit-id\", \"client-id\" and \"flex-id\">,
+ \"identifier\": <string>
+ }
+}",
+ "cmd-comment": "The host reservation can be identified by either (subnet-id, ip-address) pair or a triplet of (subnet-id, identifier-type, identifier)."
+}
--- /dev/null
+{
+ "name": "reservation-get",
+ "brief": "attempts to retrieve an existing host reservation",
+ "support": [ "kea-dhcp4", "kea-dhcp6" ],
+ "avail": "1.2.0, host_cmds library (premium)",
+
+ "cmd-syntax": "{
+ \"command\": \"reservation-get\",
+ \"arguments\": {
+ \"subnet-id\": <integer>,
+ \"identifier-type\": <string with one value out of: hw-address|duid|circuit-id|client-id|flex-id>,
+ \"identifier\": <string>;
+ }
+}",
+
+ "cmd-comment": "The host reservation can be identified by either (subnet-id, ip-address) pair or a triplet of (subnet-id, identifier-type, identifier).",
+
+ "resp-syntax": "{
+ \"result\": <integer>,
+ \"text\": <string>,
+ \"arguments\": {
+ \"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>,
+ }
+}",
+
+ "resp-comment": "Arguments object appear only if a host is found. Many fields in the arguments
+object appear only if specific field is set."
+}
</para>
</section>
- <section>
+ <section xml:id="cmd-reservation-add">
<title>reservation-add command</title>
<para>
<command>reservation-add</command> allows for the insertion of a new host. It
</para>
</section>
- <section>
+ <section xml:id="cmd-reservation-get">
<title>reservation-get command</title>
<para><command>reservation-get</command> can be used to query the host
database and retrieve existing reservations. There are two types of
<screen>
{
"command": "reservation-get",
- "arguments":
+ "arguments": {
"subnet-id": 4,
"identifier-type": "hw-address",
"identifier": "01:02:03:04:05:06"
</section>
- <section>
+ <section xml:id="cmd-reservation-del">
<title>reservation-del command</title>
<para><command>reservation-del</command> can be used to delete a
reservation from the host database. There are two types of parameters
of server id which is DHCPv6 only.
</para>
</section>
- </chapter>
+</chapter>