Commit 49bfad5b authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰

[5422] reservation-{add,del,get} documented.

parent b20dd55c
{
"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>"
}
{
"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)."
}
{
"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."
}
......@@ -1432,7 +1432,7 @@ Requirements </link> document.</para>
</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
......@@ -1524,7 +1524,7 @@ Here is an example of complex IPv6 reservation:
</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
......@@ -1560,7 +1560,7 @@ An example query by (subnet-id, identifier-type, identifier) looks as follows:
<screen>
{
"command": "reservation-get",
"arguments":
"arguments": {
"subnet-id": 4,
"identifier-type": "hw-address",
"identifier": "01:02:03:04:05:06"
......@@ -1602,7 +1602,7 @@ An example result returned when the query was malformed:<screen>
</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
......@@ -2568,4 +2568,4 @@ both the command and the response.
of server id which is DHCPv6 only.
</para>
</section>
</chapter>
</chapter>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment