From: Aleš Date: Mon, 7 Feb 2022 15:34:07 +0000 (+0100) Subject: datamodel: docstrings annotatinons (dns64, logging, lua) X-Git-Tag: v6.0.0a1~44^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7770cf1fcde1f14dc7613ffe543ca2984c030c1d;p=thirdparty%2Fknot-resolver.git datamodel: docstrings annotatinons (dns64, logging, lua) - related to #706 --- diff --git a/manager/knot_resolver_manager/datamodel/config_schema.py b/manager/knot_resolver_manager/datamodel/config_schema.py index 101e5f31e..526d9b86a 100644 --- a/manager/knot_resolver_manager/datamodel/config_schema.py +++ b/manager/knot_resolver_manager/datamodel/config_schema.py @@ -69,7 +69,7 @@ class KresConfig(SchemaNode): forward_zones: List of Forward Zones and its configuration. cache: DNS resolver cache configuration. dnssec: Disable DNSSEC, enable with defaults or set new configuration. - dns64: Disable DNS64, enable with defaults or set new configuration. + dns64: Disable DNS64 (RFC 6147), enable with defaults or set new configuration. logging: Logging and debugging configuration. lua: Custom Lua configuration. """ diff --git a/manager/knot_resolver_manager/datamodel/dns64_schema.py b/manager/knot_resolver_manager/datamodel/dns64_schema.py index 36b25aba5..ec3385f17 100644 --- a/manager/knot_resolver_manager/datamodel/dns64_schema.py +++ b/manager/knot_resolver_manager/datamodel/dns64_schema.py @@ -3,4 +3,11 @@ from knot_resolver_manager.utils import SchemaNode class Dns64Schema(SchemaNode): + """ + DNS64 (RFC 6147) configuration. + + --- + prefix: IPv6 prefix to be used for synthesizing AAAA records. + """ + prefix: IPv6Network96 = IPv6Network96("64:ff9b::/96") diff --git a/manager/knot_resolver_manager/datamodel/logging_config.py b/manager/knot_resolver_manager/datamodel/logging_config.py index 65dc50580..3e4ce9fd5 100644 --- a/manager/knot_resolver_manager/datamodel/logging_config.py +++ b/manager/knot_resolver_manager/datamodel/logging_config.py @@ -59,13 +59,13 @@ LogGroupsEnum: TypeAlias = Literal[ class DnstapSchema(SchemaNode): """ - Logging DNS queries and responses to a unix socket + Logging DNS queries and responses to a unix socket. --- - unix_socket: The unix socket file where dnstap messages will be sent. - log_queries: If true queries from downstream in wire format will be logged. - log_responses: If true responses to downstream in wire format will be logged. - log_tcp_rtt: If true TCP RTT (Round-trip time) will be logged. + unix_socket: Path to unix domain socket where dnstap messages will be sent. + log_queries: Log queries from downstream in wire format. + log_responses: Log responses to downstream in wire format. + log_tcp_rtt: Log TCP RTT (Round-trip time). """ unix_socket: CheckedPath @@ -75,6 +75,14 @@ class DnstapSchema(SchemaNode): class DebuggingSchema(SchemaNode): + """ + Advanced debugging parameters for kresd (Knot Resolver daemon). + + --- + assertion_abort: Allow the process to be aborted in case it encounters a failed assertion. + assertion_fork: Fork and abord child kresd process to obtain a coredump, while the parent process recovers and keeps running. + """ + assertion_abort: bool = False assertion_fork: TimeUnit = TimeUnit("5m") @@ -84,12 +92,12 @@ class LoggingSchema(SchemaNode): Logging and debugging configuration. --- - level: Logging level for all processes. - target: Logging stream target for all processes. + level: Global logging level. + target: Global logging stream target. groups: List of groups for which 'debug' logging level is set. dnssec_bogus: Logging a message for each DNSSEC validation failure. dnstap: Logging DNS requests and responses to a unix socket. - debugging: Advanced debugging parameters for Knot Resolver daemon (kresd). + debugging: Advanced debugging parameters for kresd (Knot Resolver daemon). """ level: LogLevelEnum = "notice" diff --git a/manager/knot_resolver_manager/datamodel/lua_schema.py b/manager/knot_resolver_manager/datamodel/lua_schema.py index 34b671aec..9de468f41 100644 --- a/manager/knot_resolver_manager/datamodel/lua_schema.py +++ b/manager/knot_resolver_manager/datamodel/lua_schema.py @@ -8,9 +8,9 @@ class LuaSchema(SchemaNode): Custom Lua configuration. --- - script_only: Ignore all declarative configuration and use only Lua script or file. + script_only: Ignore declarative configuration and use only Lua script or file defined in this section. script: Custom Lua configuration script. - script_file: Path to custom Lua configuration script file. + script_file: Path to file that contains Lua configuration script. """ script_only: bool = False