]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#549] document the overwrite behavior in the other update commands
authorAndrei Pavel <andrei@isc.org>
Wed, 5 Apr 2023 15:17:32 +0000 (18:17 +0300)
committerAndrei Pavel <andrei@isc.org>
Wed, 19 Apr 2023 20:56:01 +0000 (23:56 +0300)
doc/sphinx/arm/hooks-class-cmds.rst
doc/sphinx/arm/hooks-lease-cmds.rst
doc/sphinx/arm/hooks-subnet-cmds.rst

index d98c398c367542743d5d1b7302ef6a423188c88e..7d698c8ea14e94ced766395be7d522e3803269df 100644 (file)
@@ -108,6 +108,15 @@ be removed with the ``class-del`` command and then added again with a
 different name using ``class-add``. Note, however, that the class with
 the new name will be added at the end of the list of configured classes.
 
+As with other update commands, this command overwrites all the contents of the
+entry. If the client class previously had a resource assigned to it, and the
+``class-update`` command is missing the resource, it is deleted from the server
+configuration. If an incremental update of the class is desired, then this can
+be achieved by doing a `class-get <command-class-get_>`_ to get the full picture
+of the client class, picking the client class out of the response, modifying it
+to the required outcome, and then issuing the ``client-update`` command with the
+resulting client class attached.
+
 .. _command-class-del:
 
 The ``class-del`` Command
index 6f1f237ca973f24ba0094e95e853d650d8e9602b..cd5c671c18032f9127f1d82a8209a04ef688b869 100644 (file)
@@ -79,9 +79,9 @@ This library provides the following commands:
 
 -  ``lease6-del`` - deletes an IPv6 lease with the specified parameters.
 
--  ``lease4-update`` - updates an IPv4 lease.
+-  ``lease4-update`` - updates (replaces) an existing IPv4 lease.
 
--  ``lease6-update`` - updates an IPv6 lease.
+-  ``lease6-update`` - updates (replaces) an existing IPv6 lease.
 
 -  ``lease4-wipe`` - removes all leases from a specific IPv4 subnet or
    from all subnets.
@@ -902,6 +902,16 @@ An example of a command to update an IPv6 lease is:
      }
    }
 
+As with other update commands, this command overwrites all the contents of the
+entry. If the lease previously had a resource assigned to it, and the
+``lease4-update``/``lease6-update`` command is missing the resource, it is
+deleted from the lease database. If an incremental update of the lease is
+desired, then this can be achieved by doing a
+`lease4-get <command-lease4-get_>`_ / `lease6-get <command-lease6-get_>`_
+command to get the full picture of the lease, picking the lease out of the
+response, modifying it to the required outcome, and then issuing the
+``lease4-update``/``lease6-update`` command with the resulting lease attached.
+
 .. _command-lease4-wipe:
 
 .. _command-lease6-wipe:
index 45a9db7592e3764423fc227f84ac2975d02352ee..ff5b01423b941bc880ebbaa3368e432ba2c05f49 100644 (file)
@@ -412,6 +412,12 @@ The response to this command has the following structure:
        }
    }
 
+As with other update commands, this command overwrites all the contents of the
+entry. If the IPv4 subnet previously had a resource assigned to it, and the
+``subnet4-update`` command is missing the resource, it is deleted from the
+server configuration. If an incremental update of the subnet is desired, then
+this can be achieved with `subnet4-delta-add <command-subnet4-delta-add_>`_.
+
 .. _command-subnet6-update:
 
 The ``subnet6-update`` Command
@@ -459,6 +465,12 @@ The response to this command has the following structure:
        }
    }
 
+As with other update commands, this command overwrites all the contents of the
+entry. If the IPv4 subnet previously had a resource assigned to it, and the
+``subnet6-update`` command is missing the resource, it is deleted from the
+server configuration. If an incremental update of the subnet is desired, then
+this can be achieved with `subnet6-delta-add <command-subnet6-delta-add_>`_.
+
 .. _command-subnet4-del:
 
 The ``subnet4-del`` Command