]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5151] New commands documented.
authorTomek Mrugalski <tomasz@isc.org>
Wed, 15 Mar 2017 16:05:48 +0000 (17:05 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Wed, 15 Mar 2017 16:05:48 +0000 (17:05 +0100)
doc/guide/ctrl-channel.xml
doc/guide/dhcp4-srv.xml
doc/guide/dhcp6-srv.xml

index 3c49a554569c1d6b9e623eb0882ae817471cb407..2ba8adaf02d6dcadc904b8f83f62fcaba83ec975 100644 (file)
@@ -113,6 +113,57 @@ will be sent to Kea and the responses received from Kea printed to standard outp
     <section id="commands-common">
       <title>Commands Supported by Both the DHCPv4 and DHCPv6 Servers</title>
 
+      <section id="command-config-get">
+        <title>config-get</title>
+
+        <para>The <emphasis>config-get</emphasis> command retrieves the current
+        configuration used by the server. This command does not take any
+        parameters. The configuration returned is roughly equal to the
+        configuration that was loaded using -c command line option during server
+        start-up or later set using set-config command. However, there may be
+        certain differences. Comments are not retained. If the original
+        configuration used file inclusion, the returned configuration will
+        include all parameters from all the included files.</para>
+
+        <para> Note that returned configuration is not redacted, i.e. it will
+        contain database passwords in plain text if those were specified in the
+        original configuration. Care should be taken to not expose the command
+        channel to unprivileged users.</para>
+
+        <para>
+          An example command invocation looks like this:
+<screen>
+{
+    "command": "config-get"
+}
+</screen>
+        </para>
+      </section>
+
+      <section id="command-config-write">
+        <title>config-write</title>
+
+        <para>The <emphasis>config-write</emphasis> command instructs Kea server
+        to write its current configuration to a file on disk. It takes one
+        optional argument called <emphasis>filename</emphasis> that specifies
+        the name of the file to write configuration to. If not specifed, the
+        name used when starting Kea (passed as -c argument) will be used. Note
+        that the filename specified must not contain .. or backslashes. Kea
+        should be able to write its files only in the directory it is running
+        and any attempts to step out of that directory is rejected.</para>
+        <para>
+          An example command invocation looks like this:
+<screen>
+{
+    "command": "config-write",
+    "parameters": {
+        "filename": "config-modified-2017-03-15.json"
+    }
+}
+</screen>
+        </para>
+      </section>
+
       <section id="command-leases-reclaim">
         <title>leases-reclaim</title>
         <para>
index 5d55a6f70f8a27175ace4072163b75d5eb3263df..16456ce16d252548a9370d9f93587d206f95f719 100644 (file)
@@ -3723,6 +3723,8 @@ src/lib/dhcpsrv/cfg_host_operations.cc -->
 
       <para>The DHCPv4 server supports the following operational commands:
         <itemizedlist>
+            <listitem>config-get</listitem>
+            <listitem>config-write</listitem>
             <listitem>leases-reclaim</listitem>
             <listitem>list-commands</listitem>
             <listitem>set-config</listitem>
index 9a8aa45cbf2f8f5d15fdc3ae2e248aea0689a450..0383fc90d6a9f1671816a5a7976602ffabfb3b8d 100644 (file)
@@ -4131,6 +4131,8 @@ If not specified, the default value is:
 
       <para>The DHCPv6 server supports the following operational commands:
         <itemizedlist>
+            <listitem>config-get</listitem>
+            <listitem>config-write</listitem>
             <listitem>leases-reclaim</listitem>
             <listitem>list-commands</listitem>
             <listitem>set-config</listitem>