2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-29 13:07:50 +00:00

Update doc/sphinx/arm/config.rst, doc/sphinx/arm/hooks.rst

This commit is contained in:
Marcin Godzina 2022-06-01 20:11:01 +00:00
parent 351186e077
commit 2da8f7fa4a
2 changed files with 18 additions and 6 deletions

View File

@ -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, are supported in both DHCPv4 and DHCPv6, with the exception of server ID,
which is DHCPv6 only. 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 For example `subnet4-update` command can be used to add user context data
to existing subnet. 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. Kea also uses user context to store non standart data.
As of this moment only Storing Extended Lease Information uses this feature. As of this moment only :ref:`dhcp4-store-extended-info` uses this feature.
When enabled it adds ISC key in `user-context` to differentiate automaticly
When enabled it adds ISC key in `user-context` to differentiate automatically
added content. 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`. For a discussion about user-context used in hooks, see :ref:`user-context-hooks`.

View File

@ -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 the `Hooks Developer's Guide section of the Kea Developer's Guide
<https://reports.kea.isc.org/dev_guide/df/d46/hooksdgDevelopersGuide.html>`__. <https://reports.kea.isc.org/dev_guide/df/d46/hooksdgDevelopersGuide.html>`__.
Some hooks use user context to set the parameters. See :ref:`user-context-hooks`.
Notes: Notes:
- The full path to each library should be given. - 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 If user context is supported in a given context, the parser translates
"comment" entries into user context with a "comment" entry. "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 that can be easily edited
Some hooks use user-context for configuration to enable easy changes by commands. without the need to restart of the server.
DDNS-Tuning Hook uses user-context to configure per subner behavior. Example: DDNS-Tuning Hook uses user-context to configure per subner behavior. Example: