<!-- autogenerated using cmd_docgen. Do not edit by hand! -->
<appendix xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="api">
<title>API Reference</title>
- <para>Kea currently supports 66 commands:
+ <para>Kea currently supports 71 commands:
<command><link linkend="ref-build-report">build-report</link></command>
, <command><link linkend="ref-cache-clear">cache-clear</link></command>
, <command><link linkend="ref-cache-get">cache-get</link></command>
, <command><link linkend="ref-cache-load">cache-load</link></command>
, <command><link linkend="ref-cache-remove">cache-remove</link></command>
, <command><link linkend="ref-cache-write">cache-write</link></command>
+, <command><link linkend="ref-class-add">class-add</link></command>
+, <command><link linkend="ref-class-del">class-del</link></command>
+, <command><link linkend="ref-class-get">class-get</link></command>
+, <command><link linkend="ref-class-list">class-list</link></command>
+, <command><link linkend="ref-class-update">class-update</link></command>
, <command><link linkend="ref-config-get">config-get</link></command>
, <command><link linkend="ref-config-reload">config-reload</link></command>
, <command><link linkend="ref-config-set">config-set</link></command>
, <command><link linkend="ref-cache-load">cache-load</link></command>
, <command><link linkend="ref-cache-remove">cache-remove</link></command>
, <command><link linkend="ref-cache-write">cache-write</link></command>
+, <command><link linkend="ref-class-add">class-add</link></command>
+, <command><link linkend="ref-class-del">class-del</link></command>
+, <command><link linkend="ref-class-get">class-get</link></command>
+, <command><link linkend="ref-class-list">class-list</link></command>
+, <command><link linkend="ref-class-update">class-update</link></command>
, <command><link linkend="ref-config-get">config-get</link></command>
, <command><link linkend="ref-config-reload">config-reload</link></command>
, <command><link linkend="ref-config-set">config-set</link></command>
, <command><link linkend="ref-cache-load">cache-load</link></command>
, <command><link linkend="ref-cache-remove">cache-remove</link></command>
, <command><link linkend="ref-cache-write">cache-write</link></command>
+, <command><link linkend="ref-class-add">class-add</link></command>
+, <command><link linkend="ref-class-del">class-del</link></command>
+, <command><link linkend="ref-class-get">class-get</link></command>
+, <command><link linkend="ref-class-list">class-list</link></command>
+, <command><link linkend="ref-class-update">class-update</link></command>
, <command><link linkend="ref-config-get">config-get</link></command>
, <command><link linkend="ref-config-reload">config-reload</link></command>
, <command><link linkend="ref-config-set">config-set</link></command>
, <command><link linkend="ref-subnet6-list">subnet6-list</link></command>
, <command><link linkend="ref-version-get">version-get</link></command>
.</para>
+<para xml:id="commands-class_cmds-lib">Commands supported by class_cmds hook library: <command><link linkend="ref-class-add">class-add</link></command>
+, <command><link linkend="ref-class-del">class-del</link></command>
+, <command><link linkend="ref-class-get">class-get</link></command>
+, <command><link linkend="ref-class-list">class-list</link></command>
+, <command><link linkend="ref-class-update">class-update</link></command>
+.</para>
<para xml:id="commands-high_availability-lib">Commands supported by high_availability hook library: <command><link linkend="ref-ha-continue">ha-continue</link></command>
, <command><link linkend="ref-ha-heartbeat">ha-heartbeat</link></command>
, <command><link linkend="ref-ha-scopes">ha-scopes</link></command>
</section>
<!-- end of cache-write -->
+<!-- start of class-add -->
+<section xml:id="reference-class-add">
+<title>class-add reference</title>
+<para xml:id="ref-class-add"><command>class-add</command> - This command is used to create and add a new class to the existing server configuration.</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.5.0 (<link linkend="commands-class_cmds-lib">class_cmds</link> hook)</para>
+
+<para>Description and examples: See <xref linkend="command-class-add"/></para>
+
+<para>Command syntax:
+ <screen>{
+ "command": "class-add",
+ "arguments": {
+ "client-classes": [ {
+ "name": "ipxe_efi_x64",
+ "test": "option[93].hex == 0x0009",
+ ...
+ } ]
+ }
+}</screen>
+Only one client class can be added with a single command.</para>
+
+<para>Response syntax:
+ <screen>{
+ "result": 0,
+ "text": "Class 'ipxe_efi_x64' added."
+}</screen>
+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>
+</para>
+
+</section>
+<!-- end of class-add -->
+
+<!-- start of class-del -->
+<section xml:id="reference-class-del">
+<title>class-del reference</title>
+<para xml:id="ref-class-del"><command>class-del</command> - This command is used to remove a client class from the server configuration.</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.5.0 (<link linkend="commands-class_cmds-lib">class_cmds</link> hook)</para>
+
+<para>Description and examples: See <xref linkend="command-class-del"/></para>
+
+<para>Command syntax:
+ <screen>{
+ "command": "class-del",
+ "arguments": {
+ "name": "ipxe_efi_x64",
+ }
+}</screen>
+</para>
+
+<para>Response syntax:
+ <screen>{
+ "result": 0,
+ "text": "Class 'ipxe_efi_x64' deleted."
+}</screen>
+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>
+</para>
+
+</section>
+<!-- end of class-del -->
+
+<!-- start of class-get -->
+<section xml:id="reference-class-get">
+<title>class-get reference</title>
+<para xml:id="ref-class-get"><command>class-get</command> - This command is used to return detailed information about an existing client class.</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.5.0 (<link linkend="commands-class_cmds-lib">class_cmds</link> hook)</para>
+
+<para>Description and examples: See <xref linkend="command-class-get"/></para>
+
+<para>Command syntax:
+ <screen>{
+ "command": "class-get",
+ "arguments": {
+ "name": "pxeclient"
+ }
+}</screen>
+</para>
+
+<para>Response syntax:
+ <screen>{
+ "result": 0,
+ "text": "Class 'pxeclient' definition returned",
+ "arguments": {
+ "client-classes": [
+ {
+ "name": "pxeclient",
+ "only-if-required": true,
+ "test": "option[vendor-class-identifier].text == 'PXEClient'",
+ "option-def": [
+ {
+ "name": "configfile",
+ "code": 209,
+ "type": "string"
+ }
+ ],
+ "option-data": [ ],
+ "next-server": "0.0.0.0",
+ "server-hostname": "xfce",
+ "boot-file-name": "/dev/null"
+ }
+ ]
+ }
+}</screen>
+The returned information depends on the DHCP server type, i.e. some parameters are specific to DHCPv4 server. Also, some parameters may not be returned if they are not set for the client class. If the class with specified name doesn't exist a result of 3 is returned.</para>
+
+</section>
+<!-- end of class-get -->
+
+<!-- start of class-list -->
+<section xml:id="reference-class-list">
+<title>class-list reference</title>
+<para xml:id="ref-class-list"><command>class-list</command> - This command is used to retrieve a list of all client classes from the server configuration.</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.5.0 (<link linkend="commands-class_cmds-lib">class_cmds</link> hook)</para>
+
+<para>Description and examples: See <xref linkend="command-class-list"/></para>
+
+<para>Command syntax:
+ <screen>{
+ "command": "class-list"
+}</screen>
+This command includes no arguments.</para>
+
+<para>Response syntax:
+ <screen>{
+ "result": 0,
+ "text": "2 classes found",
+ "arguments": {
+ "client-classes": [
+ {
+ "name": "ipxe_efi_x64"
+ },
+ {
+ "name": "pxeclient"
+ }
+ ]
+ }
+}</screen>
+The returned list of classes merely contains their names. In order to retrieve full information about one of these classes use <xref linkend="command-class-get"/>.</para>
+
+</section>
+<!-- end of class-list -->
+
+<!-- start of class-update -->
+<section xml:id="reference-class-update">
+<title>class-update reference</title>
+<para xml:id="ref-class-update"><command>class-update</command> - This command is used to update an existing client class in the server configuration.</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.5.0 (<link linkend="commands-class_cmds-lib">class_cmds</link> hook)</para>
+
+<para>Description and examples: See <xref linkend="command-class-update"/></para>
+
+<para>Command syntax:
+ <screen>{
+ "command": "class-update",
+ "arguments": {
+ "client-classes": [ {
+ "name": "ipxe_efi_x64",
+ "test": "option[93].hex == 0x0009",
+ ...
+ } ]
+ }
+}</screen>
+Only one client class can be updated with a single command..</para>
+
+<para>Response syntax:
+ <screen>{
+ "result": 0,
+ "text": "Class 'ipxe_efi_x64' updated."
+}</screen>
+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>
+</para>
+
+</section>
+<!-- end of class-update -->
+
<!-- start of config-get -->
<section xml:id="reference-config-get">
<title>config-get reference</title>