]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
datamodel: docstrings annotatinons (stub-zone, forward-zone, rpz, cache)
authorAleš <ales.mrazek@nic.cz>
Fri, 4 Feb 2022 12:47:41 +0000 (13:47 +0100)
committerAleš Mrázek <ales.mrazek@nic.cz>
Fri, 8 Apr 2022 14:17:54 +0000 (16:17 +0200)
- related to #706

manager/knot_resolver_manager/datamodel/cache_schema.py
manager/knot_resolver_manager/datamodel/forward_zone.py
manager/knot_resolver_manager/datamodel/rpz_schema.py
manager/knot_resolver_manager/datamodel/stub_zone_schema.py

index 61efa39d54b9c747f38d4a1ccf32daf3e844dffb..49346480734ab5fe125ccf40fe36b8a6670d7ca8 100644 (file)
@@ -10,7 +10,7 @@ class PrefillSchema(SchemaNode):
 
     ---
     origin: Origin for the imported data. Cache prefilling is only supported for the root zone ('.').
-    url: URL of the zone file to be imported.
+    url: URL of the zone data to be imported.
     refresh_interval: Time interval between consecutive refreshes of the imported zone data.
     ca_file: Path to the file containing a CA certificate bundle that is used to authenticate the HTTPS connection.
     """
@@ -30,10 +30,10 @@ class CacheSchema(SchemaNode):
     DNS resolver cache configuration.
 
     ---
-    storage: DNS resolver cache storage.
+    storage: Cache storage of the DNS resolver.
     size_max: Maximum size of the cache.
-    ttl_min: Minimum time-to-live for cache entries.
-    ttl_max: Maximum time-to-live for cache entries.
+    ttl_min: Minimum time-to-live for the cache entries.
+    ttl_max: Maximum time-to-live for the cache entries.
     ns_timeout: Time interval for which a nameserver address will be ignored after determining that it does not return (useful) answers.
     prefill: Prefill the cache periodically by importing zone data obtained over HTTP.
     """
index 323bb69ec0ca8b967ffaab3d81c57c50d2eed910..defb13daaaa795f8a7fb98cc0304401eaf64b286 100644 (file)
@@ -5,6 +5,16 @@ from knot_resolver_manager.utils import SchemaNode
 
 
 class ForwardServerSchema(SchemaNode):
+    """
+    Configuration of Forward server.
+
+    ---
+    address: IP address of Forward server.
+    pin_sha256: Hash of accepted CA certificate.
+    hostname: Hostname of the Forward server.
+    ca_file: Path to CA certificate file.
+    """
+
     address: IPAddressOptionalPort
     pin_sha256: Optional[Union[str, List[str]]] = None
     hostname: Optional[DomainName] = None
@@ -12,6 +22,16 @@ class ForwardServerSchema(SchemaNode):
 
 
 class ForwardZoneSchema(SchemaNode):
+    """
+    Configuration of Forward Zone.
+
+    ---
+    tls: Enable/disable TLS for Forward servers.
+    servers: IP address of Forward server.
+    views: Use this Forward Zone only for clients defined by views.
+    options: Configuration flags for Forward Zone.
+    """
+
     tls: bool = False
     servers: Union[List[IPAddressOptionalPort], List[ForwardServerSchema]]
     views: Optional[List[str]] = None
index 5d3d12451687efc96f73646f18539b0af75bccb7..4a951c6f3659ef51de2b9f4c06a4f7262a474de5 100644 (file)
@@ -5,6 +5,18 @@ from knot_resolver_manager.utils import SchemaNode
 
 
 class RPZSchema(SchemaNode):
+    """
+    Configuration or Response Policy Zone (RPZ).
+
+    ---
+    action: RPZ rule action, typically 'deny'.
+    file: Path to the RPZ zone file.
+    watch: Reload the file when it changes.
+    views: Use RPZ rule only for clients defined by views.
+    options: Configuration flags for RPZ rule.
+    message: Deny message for 'deny' action.
+    """
+
     action: PolicyActionEnum
     file: CheckedPath
     watch: bool = True
index 4dfc5fd09008e2d1420657135ed3a4f1a09666df..21ce20532fdda37bf4ee8781e4b04e9ff78c1fc8 100644 (file)
@@ -5,10 +5,26 @@ from knot_resolver_manager.utils import SchemaNode
 
 
 class StubServerSchema(SchemaNode):
+    """
+    Configuration of Stub server.
+
+    ---
+    address: IP address of Stub server.
+    """
+
     address: IPAddressOptionalPort
 
 
 class StubZoneSchema(SchemaNode):
+    """
+    Configuration of Stub Zone.
+
+    ---
+    servers: IP address of Stub server.
+    views: Use this Stub Zone only for clients defined by views.
+    options: Configuration flags for Stub Zone.
+    """
+
     servers: Union[List[IPAddressOptionalPort], List[StubServerSchema]]
     views: Optional[List[str]] = None
     options: Optional[List[PolicyFlagEnum]] = None