From 2da8f7fa4a92ce4feff738a87b6def1ea05c96d2 Mon Sep 17 00:00:00 2001 From: Marcin Godzina Date: Wed, 1 Jun 2022 20:11:01 +0000 Subject: [PATCH] Update doc/sphinx/arm/config.rst, doc/sphinx/arm/hooks.rst --- doc/sphinx/arm/config.rst | 17 +++++++++++++---- doc/sphinx/arm/hooks.rst | 7 +++++-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/doc/sphinx/arm/config.rst b/doc/sphinx/arm/config.rst index 95636a0d63..51608fbb72 100644 --- a/doc/sphinx/arm/config.rst +++ b/doc/sphinx/arm/config.rst @@ -190,7 +190,10 @@ reservations, control socket, DHCP-DDNS, loggers, leases and server ID. These are supported in both DHCPv4 and DHCPv6, with the exception of server ID, which is DHCPv6 only. -User context can be added and edited in structures suported by Commands. +User context can be added and edited easily in structures suported by API commands. + +We encourage Kea users to utilize this functions to store information +used by other systems and custom hooks. For example `subnet4-update` command can be used to add user context data to existing subnet. @@ -206,11 +209,15 @@ to existing subnet. } } ] +The same can be done with manyu other commands like lease6-add etc. + Kea also uses user context to store non standart data. -As of this moment only Storing Extended Lease Information uses this feature. -When enabled it adds ISC key in `user-context` to differentiate automaticly +As of this moment only :ref:`dhcp4-store-extended-info` uses this feature. + +When enabled it adds ISC key in `user-context` to differentiate automatically added content. -Example of relay information stored in lease: + +Example of relay information stored in a lease: :: @@ -245,6 +252,8 @@ Example of relay information stored in lease: } +Of course user context can store configuration for multiple hooks and comments at once. + For a discussion about user-context used in hooks, see :ref:`user-context-hooks`. diff --git a/doc/sphinx/arm/hooks.rst b/doc/sphinx/arm/hooks.rst index cd0d19bf2b..dea04fa961 100644 --- a/doc/sphinx/arm/hooks.rst +++ b/doc/sphinx/arm/hooks.rst @@ -229,6 +229,8 @@ be used if the library supports it. This topic is explained in detail in the `Hooks Developer's Guide section of the Kea Developer's Guide `__. +Some hooks use user context to set the parameters. See :ref:`user-context-hooks`. + Notes: - The full path to each library should be given. @@ -3624,9 +3626,10 @@ operations, for example. If user context is supported in a given context, the parser translates "comment" entries into user context with a "comment" entry. +Of course user context can store configuration for multiple hooks and comments at once. - -Some hooks use user-context for configuration to enable easy changes by commands. +Some hooks use user-context for configuration that can be easily edited +without the need to restart of the server. DDNS-Tuning Hook uses user-context to configure per subner behavior. Example: