From: Remi Gacogne Date: Thu, 10 Jul 2025 13:47:58 +0000 (+0200) Subject: dnsdist: Document changed YAML parameters X-Git-Tag: dnsdist-2.0.0-rc2~3^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e231f8f31fd0c64a91d942af428df026fc2ef7f2;p=thirdparty%2Fpdns.git dnsdist: Document changed YAML parameters Signed-off-by: Remi Gacogne (cherry picked from commit 852772af5e54aa2c5aeb17a4565c57a5251aba40) --- diff --git a/pdns/dnsdistdist/dnsdist-actions-definitions.yml b/pdns/dnsdistdist/dnsdist-actions-definitions.yml index 32e36556bf..1a254a6e22 100644 --- a/pdns/dnsdistdist/dnsdist-actions-definitions.yml +++ b/pdns/dnsdistdist/dnsdist-actions-definitions.yml @@ -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" diff --git a/pdns/dnsdistdist/dnsdist-selectors-definitions.yml b/pdns/dnsdistdist/dnsdist-selectors-definitions.yml index 702771fdb5..06172a6265 100644 --- a/pdns/dnsdistdist/dnsdist-selectors-definitions.yml +++ b/pdns/dnsdistdist/dnsdist-selectors-definitions.yml @@ -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" diff --git a/pdns/dnsdistdist/dnsdist-settings-definitions.yml b/pdns/dnsdistdist/dnsdist-settings-definitions.yml index f61107c0cf..e496355c0a 100644 --- a/pdns/dnsdistdist/dnsdist-settings-definitions.yml +++ b/pdns/dnsdistdist/dnsdist-settings-definitions.yml @@ -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" diff --git a/pdns/dnsdistdist/dnsdist-settings-documentation-generator.py b/pdns/dnsdistdist/dnsdist-settings-documentation-generator.py index 2ca36cad7a..ffdd907094 100644 --- a/pdns/dnsdistdist/dnsdist-settings-documentation-generator.py +++ b/pdns/dnsdistdist/dnsdist-settings-documentation-generator.py @@ -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'