]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Document changed YAML parameters
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 10 Jul 2025 13:47:58 +0000 (15:47 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 15 Jul 2025 08:07:24 +0000 (10:07 +0200)
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
(cherry picked from commit 852772af5e54aa2c5aeb17a4565c57a5251aba40)

pdns/dnsdistdist/dnsdist-actions-definitions.yml
pdns/dnsdistdist/dnsdist-selectors-definitions.yml
pdns/dnsdistdist/dnsdist-settings-definitions.yml
pdns/dnsdistdist/dnsdist-settings-documentation-generator.py

index 32e36556bfcaca5a1c3b1a82a8912a43e8bde73a..1a254a6e22e4a7acd206fa964b63e28b159a26e0 100644 (file)
@@ -53,6 +53,9 @@
 - name: "ERCode"
   description: "Reply immediately by turning the query into a response with the specified EDNS extended rcode"
   skip-cpp: true
+  changes:
+    - version: 2.1.0
+      content: "The ``rcode`` parameter used to be an unsigned integer and is now a string"
   parameters:
     - name: "rcode"
       type: "RCode"
@@ -254,6 +257,9 @@ The function will be invoked in a per-thread Lua state, without access to the gl
       description: "Whether subsequent rules should be executed after this one"
 - name: "RCode"
   description: "Reply immediately by turning the query into a response with the specified rcode"
+  changes:
+    - version: 2.1.0
+      content: "The ``rcode`` parameter used to be an unsigned integer and is now a string"
   skip-cpp: true
   parameters:
     - name: "rcode"
index 702771fdb58633ddf9791106ea871781c77f0236..06172a6265049d3fc83d2596ec071796758c3247 100644 (file)
@@ -42,6 +42,9 @@
       description: "The EDNS version to match on"
 - name: "ERCode"
   description: "Matches queries or responses with the specified rcode. The full 16bit RCode will be matched. If no EDNS OPT RR is present, the upper 12 bits are treated as 0"
+  changes:
+    - version: 2.1.0
+      content: "The ``rcode`` parameter used to be an unsigned integer and is now a string"
   parameters:
     - name: "rcode"
       type: "RCode"
@@ -339,6 +342,9 @@ Set the ``source`` parameter to ``false`` to match against destination address i
       description: "The qtype, as a numerical value"
 - name: "RCode"
   description: "Matches queries or responses with the specified rcode"
+  changes:
+    - version: 2.1.0
+      content: "The ``rcode`` parameter used to be an unsigned integer and is now a string"
   parameters:
     - name: "rcode"
       type: "RCode"
index f61107c0cfce3b6eef88cb9983023fd09887f4e5..e496355c0a5dc1c25887ab29ee82debb247d93db 100644 (file)
@@ -578,6 +578,9 @@ dynamic_rules_settings:
 
 dynamic_rule:
   description: "Dynamic rule settings"
+  changes:
+    - version: 2.1.0
+      content: "The ``rcode`` parameter used to be an unsigned integer and is now a string"
   parameters:
     - name: "type"
       rename: "rule_type"
index 2ca36cad7a37b8c0916c9c4c9df02f9a78dbf00e..ffdd90709447ad0d9d930778e9840bfb634cc449 100644 (file)
@@ -105,6 +105,20 @@ def process_object(object_name, entries, entry_type, is_setting_struct=False, lu
     output += '-' * len(object_name) + '\n'
     output += '\n'
 
+    if 'version_added' in entries:
+        output += '  .. versionadded:: ' + entries['version_added'] + '\n'
+        output += '\n'
+
+    if 'changes' in entries:
+        for change in entries['changes']:
+            if not 'version' in change or not 'content' in change:
+                continue
+            version = change['version']
+            content = change['content']
+        output += f' .. versionchanged:: {version}\n'
+        output += f'   {content}\n'
+        output += '\n'
+
     if 'description' in entries:
         description = entries['description']
         output += description + '\n'