]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#64,!41] Docs updated.
authorTomek Mrugalski <tomasz@isc.org>
Wed, 31 Oct 2018 17:48:41 +0000 (18:48 +0100)
committerMarcin Siodelski <marcin@isc.org>
Mon, 5 Nov 2018 16:38:48 +0000 (11:38 -0500)
doc/api/class-add.json
doc/guide/api.xml
doc/guide/hooks-class-cmds.xml

index 86fef277657156379d08b4f86d8c198215af5c5d..44afb25c438c293425163178fce4a2dac5d4ff1e 100644 (file)
@@ -1,6 +1,7 @@
 {
     "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)."
 }
index d0e49f580ca57c3ff4c1ab530cf4cb28b6313ba9..a693e8ad52377fef827a17be3d483ac3402ac952 100644 (file)
@@ -548,7 +548,8 @@ Result is an integer representation of the status. Currently supported statuses
 <!-- 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>
 
@@ -561,27 +562,28 @@ Result is an integer representation of the status. Currently supported statuses
     "command": "class-add",
     "arguments": {
         "client-classes": [ {
-           "name": "ipxe_efi_x64",
-           "test": "option[93].hex == 0x0009",
-            ...
+           "name": &lt;name of the class&gt;,
+           "test": &lt;test expression to be evaluated on incoming packets&gt;,
+           "option-data": [ &lt;option values here&gt; ],
+           "option-def": [ &lt;option defintions here&gt; ],
+           "next-server": &lt;ipv4 address&gt;,
+           "server-hostname": &lt;string&gt;,
+           "boot-file-name": &lt;name of the boot file&gt;
         } ]
     }
 }</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 '&lt;class-name&gt;' 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 -->
index 2792eb6aab7620437a9c6fab84d7531c1a460365..0c45236d44b89fbf363a190ffc18cafc1164e8c0 100644 (file)
@@ -22,7 +22,7 @@
         </note>
 
         <para>The Class Commands hooks library is available to premium Kea
-        customers only</para>
+        customers only.</para>
       </para>
 
       <section xml:id="command-class-add">