From: Marcin Godzina Date: Wed, 1 Jun 2022 14:52:57 +0000 (+0000) Subject: Update doc/sphinx/arm/config.rst, doc/sphinx/arm/hooks.rst X-Git-Tag: Kea-2.1.7~162 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43e683ea1564e201101b88dde4476a0a13debfd7;p=thirdparty%2Fkea.git Update doc/sphinx/arm/config.rst, doc/sphinx/arm/hooks.rst --- diff --git a/doc/sphinx/arm/config.rst b/doc/sphinx/arm/config.rst index 684e4815d3..7f51135cf2 100644 --- a/doc/sphinx/arm/config.rst +++ b/doc/sphinx/arm/config.rst @@ -183,6 +183,30 @@ configuration. It is not uncommon for a call for ``config-set`` followed by a The best way to avoid this problem is simply to abandon JSON comments and use user-context. +Kea supports user contexts at the following levels: global scope, +interfaces configuration, shared networks, +subnets, client classes, option data and definitions, host +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. + +For example `subnet4-update` command can be used to add user context data +to existing subnet. + +:: + + "subnet4": [ { + "id": 1, + "subnet": "10.20.30.0/24", + "user-context": { + "building": "Main" + "floor": 1 + } + } ] + + 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 55d256b626..cd0d19bf2b 100644 --- a/doc/sphinx/arm/hooks.rst +++ b/doc/sphinx/arm/hooks.rst @@ -3624,12 +3624,7 @@ operations, for example. If user context is supported in a given context, the parser translates "comment" entries into user context with a "comment" entry. -Kea supports user contexts at the following levels: global scope, -interfaces configuration, shared networks, -subnets, client classes, option data and definitions, host -reservations, control socket, DHCP-DDNS, loggers, and server ID. These -are supported in both DHCPv4 and DHCPv6, with the exception of server ID, -which is DHCPv6 only. + Some hooks use user-context for configuration to enable easy changes by commands.