From: Remi Gacogne Date: Thu, 10 Jul 2025 13:47:58 +0000 (+0200) Subject: dnsdist: Document changed YAML parameters X-Git-Tag: rec-5.4.0-alpha0~36^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=852772af5e54aa2c5aeb17a4565c57a5251aba40;p=thirdparty%2Fpdns.git dnsdist: Document changed YAML parameters Signed-off-by: Remi Gacogne --- 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 b957f42984..3c189eac77 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" @@ -346,6 +349,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 b6d4711cba..a81bce4afd 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 b53425d025..983b40c2b5 100644 --- a/pdns/dnsdistdist/dnsdist-settings-documentation-generator.py +++ b/pdns/dnsdistdist/dnsdist-settings-documentation-generator.py @@ -109,6 +109,16 @@ def process_object(object_name, entries, entry_type, is_setting_struct=False, lu 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'