From: Tomek Mrugalski Date: Wed, 21 Jun 2023 20:37:05 +0000 (+0200) Subject: [#2707] Changes after review: X-Git-Tag: Kea-2.4.0~125 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd3d1df33e5424738b8d99e75a313400779ed5fc;p=thirdparty%2Fkea.git [#2707] Changes after review: - config-get API docs updated - ctrl-channel section not mentions hashes --- diff --git a/doc/sphinx/arm/ctrl-channel.rst b/doc/sphinx/arm/ctrl-channel.rst index 017fe6bf19..0ad0549ad2 100644 --- a/doc/sphinx/arm/ctrl-channel.rst +++ b/doc/sphinx/arm/ctrl-channel.rst @@ -352,7 +352,9 @@ returned is roughly equal to the configuration that was loaded using the :isccmd:`config-set` command. However, there may be certain differences, as comments are not retained. If the original configuration used file inclusion, the returned configuration includes all parameters from -all included files. +all included files. Starting with 2.4.0, the successful response also +contains a SHA-256 digest that can be used to easily determine if a +configuration has changed or not. .. warning:: @@ -398,6 +400,10 @@ And the server's response: } } +Starting with 2.4.0, also ``config-set`` and ``config-get`` return the SHA-256 hash +of the new or current configuration. This may be used to later determine if a configuration +has changed or not. + .. isccmd:: config-reload .. _command-config-reload: @@ -637,6 +643,9 @@ string, ``text``, describing the outcome: {"result": 1, "text": "unsupported parameter: BOGUS (:16:26)" } +Starting with 2.4.0, the successful response also contains a SHA-256 digest of the newly set configuration. +The digest can be used to easily determine if a configuration has changed or not. + .. isccmd:: shutdown .. _command-shutdown: diff --git a/src/share/api/config-get.json b/src/share/api/config-get.json index 3a49afbaff..61c130e0cd 100644 --- a/src/share/api/config-get.json +++ b/src/share/api/config-get.json @@ -21,6 +21,11 @@ " }", "}" ], + "resp-comment": [ + "Starting with Kea 2.4.0, the successful response contains an SHA256 digest of the configuration that was ", + "just retrieved. It might be used to determine if a configuration has been modified or not, possibly with the ", + "use of config-hash-get." + ], "support": [ "kea-dhcp4", "kea-dhcp6",