{
"name": "class-get",
- "brief": "This command is used to return detailed information about an existing client class.",
+ "brief": "This command is used to return detailed information about an
+ existing client class.",
"description": "See <xref linkend=\"command-class-get\"/>",
"support": [ "kea-dhcp4", "kea-dhcp6" ],
"avail": "1.5.0",
"cmd-syntax": "{
\"command\": \"class-get\",
\"arguments\": {
- \"name\": \"pxeclient\"
+ \"name\": <name of the class>
}
}",
"resp-syntax": "{
\"result\": 0,
- \"text\": \"Class 'pxeclient' definition returned\",
+ \"text\": \"Class '<class-name>' 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\"
+ \"name\": <name of the class>,
+ \"only-if-required\": <only if required boolean value>,
+ \"test\": <test expression to be evaluated on incoming packets>,
+ \"option-data\": [ <option values here> ],
+ \"option-def\": [ <option defintions here> ],
+ \"next-server\": <ipv4 address>,
+ \"server-hostname\": <string>,
+ \"boot-file-name\": <name of the boot file>
}
]
}
}",
- "resp-comment": "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."
+ "resp-comment": "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 (empty) is returned. If the client class
+ is found, the result of 0 is returned. If there is an error
+ while processing the command, the result of 1 is returned."
}
{
"name": "class-update",
- "brief": "This command is used to update an existing client class in the server configuration.",
+ "brief": "This command is used to update an existing client class in
+ the server configuration.",
"description": "See <xref linkend=\"command-class-update\"/>",
"support": [ "kea-dhcp4", "kea-dhcp6" ],
"avail": "1.5.0",
\"command\": \"class-update\",
\"arguments\": {
\"client-classes\": [ {
- \"name\": \"ipxe_efi_x64\",
- \"test\": \"option[93].hex == 0x0009\",
- ...
+ \"name\": <name of the class>,
+ \"test\": <test expression to be evaluated on incoming packets>,
+ \"option-data\": [ <option values here> ],
+ \"option-def\": [ <option defintions here> ],
+ \"next-server\": <ipv4 address>,
+ \"server-hostname\": <string>,
+ \"boot-file-name\": <name of the boot file>
} ]
}
}",
- "cmd-comment": "Only one client class can be updated with a single command..",
+ "cmd-comment": "The <command>next-server</command>,
+ <command>server-hostname</command> and
+ <command>boot-file-name</command> are DHCPv4 specific. Only
+ one client class can be updated with a single command. ",
"resp-syntax": "{
\"result\": 0,
- \"text\": \"Class 'ipxe_efi_x64' updated.\"
-}"
+ \"text\": \"Class '<class-name>' updated.\",
+}",
+ "resp-comment": "The command will return a result of 3 (empty) if the client
+ class doesn't exist. If the client class exists, the retured
+ result is 0 if the update was successful and the result is 1
+ if the update is unsuccessful."
}
} ]
}
}</screen>
-The <command>next-server</command>,
- <command>server-hostname</command> and
+The <command>next-server</command>,
+ <command>server-hostname</command> and
<command>boot-file-name</command> are DHCPv4 specific. Only
one client class can be added with a single command. </para>
"text": "Class '<class-name>' added.",
}</screen>
The command will be successful (result 0), unless the
- class name is a duplicate (result 1).</para>
+ class name is a duplicate or another error occurs (result 1).</para>
</section>
<!-- end of class-add -->
<screen>{
"command": "class-del",
"arguments": {
- "name": "ipxe_efi_x64",
+ "name": <name of the class>,
}
}</screen>
</para>
<para>Response syntax:
<screen>{
"result": 0,
- "text": "Class 'ipxe_efi_x64' deleted."
+ "text": "Class '<class-name>' 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>
+The command will return a result of 3 (empty) if the client
+ class doesn't exist. If the client class exists, the retured
+ result is 0 if the deletion was successful and the result is 1
+ if the deletion is unsuccessful.</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 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>
<screen>{
"command": "class-get",
"arguments": {
- "name": "pxeclient"
+ "name": <name of the class>
}
}</screen>
</para>
<para>Response syntax:
<screen>{
"result": 0,
- "text": "Class 'pxeclient' definition returned",
+ "text": "Class '<class-name>' 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"
+ "name": <name of the class>,
+ "only-if-required": <only if required boolean value>,
+ "test": <test expression to be evaluated on incoming packets>,
+ "option-data": [ <option values here> ],
+ "option-def": [ <option defintions here> ],
+ "next-server": <ipv4 address>,
+ "server-hostname": <string>,
+ "boot-file-name": <name of the boot file>
}
]
}
}</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>
+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 (empty) is returned. If the client class
+ is found, the result of 0 is returned. If there is an error
+ while processing the command, the result of 1 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 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>Response syntax:
<screen>{
"result": 0,
- "text": "2 classes found",
+ "text": "<number of> classes found",
"arguments": {
"client-classes": [
{
- "name": "ipxe_efi_x64"
+ "name": <first class name>
},
{
- "name": "pxeclient"
+ "name": <second class name>
}
]
}
}</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>
+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"/>.
+ The returned result is 3 (empty) if no classes are found.
+ If the command is processed successfully and the list of
+ client classes is not empty, the result of 0 is returned.
+ If there is an error while processing the command, the
+ result of 1 is returned.</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 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>
"command": "class-update",
"arguments": {
"client-classes": [ {
- "name": "ipxe_efi_x64",
- "test": "option[93].hex == 0x0009",
- ...
+ "name": <name of the class>,
+ "test": <test expression to be evaluated on incoming packets>,
+ "option-data": [ <option values here> ],
+ "option-def": [ <option defintions here> ],
+ "next-server": <ipv4 address>,
+ "server-hostname": <string>,
+ "boot-file-name": <name of the boot file>
} ]
}
}</screen>
-Only one client class can be updated with a single command..</para>
+The <command>next-server</command>,
+ <command>server-hostname</command> and
+ <command>boot-file-name</command> are DHCPv4 specific. Only
+ one client class can be updated with a single command. </para>
<para>Response syntax:
<screen>{
"result": 0,
- "text": "Class 'ipxe_efi_x64' updated."
+ "text": "Class '<class-name>' 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>
+The command will return a result of 3 (empty) if the client
+ class doesn't exist. If the client class exists, the retured
+ result is 0 if the update was successful and the result is 1
+ if the update is unsuccessful.</para>
</section>
<!-- end of class-update -->