]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
doc/manager-client.rst: kresctl documentation update
authorAleš Mrázek <ales.mrazek@nic.cz>
Wed, 1 Mar 2023 00:18:13 +0000 (01:18 +0100)
committerAleš Mrázek <ales.mrazek@nic.cz>
Thu, 2 Mar 2023 10:39:46 +0000 (11:39 +0100)
doc/manager-client.rst

index 57affee0ee4d5e5b6bbfe81017e0db057decd635..d5c8157c480ed8072b3211997be46350b2ac0f63 100644 (file)
@@ -51,54 +51,75 @@ Only one of these arguments can be selected during the execution of a single ``k
     Performs operations on the running resolver's configuration.
     Requires connection to the management API.
 
-    .. option:: <path>
 
-        Path (JSON pointer, RFC6901) to the configuration resources to work with.
+    **Operations:**
 
-    .. option:: <value_or_file>
+    Use one of the following operations to be performed on the configuration.
 
-        Optional, new configuration value, path to file with new configuraion or path to file where to save exported configuration data.
-        If not specified, the configuration is printed.
 
+    .. option:: get
 
-    **Operations:**
+        Get current configuration from the resolver.
+
+        .. option:: -p <path>, --path <path>
+
+            Optional, path (JSON pointer, RFC6901) to the configuration resources.
+            By default, the entire configuration is selected.
+
+        .. option:: --json, --yaml
+
+            :default: :option:`--json`
+
+            Get configuration data in JSON or YAML format.
+
+        .. option:: <file>
 
-        One of the following operations is always performed on the configuration.
-        Default operation is :option:`--get`.
+            Optional, path to the file where to save exported configuration data.
+            If not specified, data will be printed.
 
-        .. option:: -g, --get
 
-            Get current configuration from the resolver.
+    .. option:: set
 
-        .. option:: -s, --set
+        Set new configuration for the resolver.
 
-            Set new configuration for the resolver.
+        .. option:: -p <path>, --path <path>
 
-        .. option:: -d, --delete
+            Optional, path (JSON pointer, RFC6901) to the configuration resources.
+            By default, the entire configuration is selected.
 
-            Delete given configuration property or list item at the given index.
+        .. option:: --json, --yaml
 
-    .. option:: --json, --yaml
+            :default: :option:`--json`
 
-        :default: :option:`--json`
+            Set configuration data in JSON or YAML format.
 
-        Expected format for input configuration or required format for exported configuration.
+        .. option:: [ <file> | <value> ]
 
-    .. option:: --stdin
+            Optional, path to file with new configuraion or new configuration value.
+            If not specified, value will be readed from stdin.
 
-        Read config values from stdin.
 
-    This command reads current ``network`` configuration subtree from the resolver and exports it to file in YAML format
+    .. option:: delete
+
+        Delete given configuration property or list item at the given index.
+
+        .. option:: -p <path>, --path <path>
+
+            Optional, path (JSON pointer, RFC6901) to the configuration resources.
+            By default, the entire configuration is selected.
+
+
+    This command reads current ``network`` configuration subtree from the resolver and exports it to file in YAML format.
 
     .. code-block:: bash
 
-        $ kresctl config --yaml --get /network ./network-config.yaml
+        $ kresctl config get --yaml -p /network ./network-config.yaml
 
     Next command changes workers configuration to ``8``.
 
     .. code-block:: bash
 
-        $ kresctl config --set /workers 8
+        $ kresctl config set -p /workers 8
 
 .. option:: metrics
 
@@ -161,10 +182,6 @@ Only one of these arguments can be selected during the execution of a single ``k
         Optional, output file for converted configuration in Lua script.
         If not specified, converted configuration is printed.
 
-    .. option:: --stdin
-
-        Read config values from stdin.
-
     .. code-block:: bash
 
         $ kresctl convert input-config.yaml output-script.lua