]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
datamodel: hide /local-data/rpz/*/dry-run for now
authorVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 28 May 2025 12:35:46 +0000 (14:35 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 29 May 2025 08:34:03 +0000 (10:34 +0200)
While this can be practical, let's not promise this approach to
configuration until it's more clear how the more general score
will appear in the config.

doc/user/config-local-data.rst
python/knot_resolver/datamodel/local_data_schema.py
python/knot_resolver/datamodel/templates/macros/local_data_macros.lua.j2

index 27f9dd2021ea5275057933cc36390b051052cdb1..b655b0144e9a9b2c87a815c27126cdbe4bec4447 100644 (file)
@@ -110,6 +110,7 @@ It provides various input formats described in following subsections.
 
             [rules ] => local data applied, user: ::1, name: foo.bar.93.100.in-addr.arpa.
 
+   .. hide this for now
       .. option:: dry-run: <boolean, false by default>
 
          Do not apply these rules.  You want to combine this with ``log``.
index 1373e09e3f05552f3800006c0cb6802fb2c91d45..782142ed2b305dfec92efcdf9c963ac3ea854179 100644 (file)
@@ -71,7 +71,7 @@ class RPZSchema(ConfigSchema):
         watchdog: Union[Literal["auto"], bool] = "auto"
         tags: Optional[List[IDPattern]] = None
         log: Optional[List[Literal["ip", "name"]]] = None
-        dry_run: bool = False
+        #dry_run: bool = False
 
     _LAYER = Raw
 
@@ -79,7 +79,7 @@ class RPZSchema(ConfigSchema):
     watchdog: bool
     tags: Optional[List[IDPattern]]
     log: Optional[List[Literal["ip", "name"]]]
-    dry_run: bool
+    #dry_run: bool
 
     def _watchdog(self, obj: Raw) -> Any:
         if obj.watchdog == "auto":
index 518795dbcb4bb451e364384a05f4ca3b4238bf89..e91b82685c61213348511421b78d3aea9f02494f 100644 (file)
@@ -71,7 +71,7 @@ assert(C.kr_rule_local_hosts('{{ file }}', {{ boolean(nodata) }},
 {# .opts are complicated #}
 {{ id }}.opts = C.KR_RULE_OPTS_DEFAULT
 {% if extra is not none -%}
-{% if extra.dry_run is not none and extra.dry_run -%}
+{% if false and extra.dry_run is not none and extra.dry_run -%}
 {{ id }}.opts.score = 4
 {% else %}
 {{ id }}.opts.score = 9