{
"name": "class-add",
- "brief": "This command is used to create and add a new class to the existing server configuration.",
+ "brief": "This command is used to create and add a new class to the existing
+ server configuration.",
"description": "See <xref linkend=\"command-class-add\"/>",
"support": [ "kea-dhcp4", "kea-dhcp6" ],
"avail": "1.5.0",
\"command\": \"class-add\",
\"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 added 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 added with a single command. ",
"resp-syntax": "{
\"result\": 0,
- \"text\": \"Class 'ipxe_efi_x64' added.\"
-}"
+ \"text\": \"Class '<class-name>' added.\",
+}",
+ "resp-comment": "The command will be successful (result 0), unless the
+ class name is a duplicate (result 1)."
}
<!-- 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 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>
"command": "class-add",
"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 added 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 added with a single command. </para>
<para>Response syntax:
<screen>{
"result": 0,
- "text": "Class 'ipxe_efi_x64' added."
+ "text": "Class '<class-name>' 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>
+The command will be successful (result 0), unless the
+ class name is a duplicate (result 1).</para>
</section>
<!-- end of class-add -->