]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add option to suppress grammar rendering
authorPetr Špaček <pspacek@isc.org>
Fri, 24 Jun 2022 11:30:53 +0000 (13:30 +0200)
committerPetr Špaček <pspacek@isc.org>
Fri, 1 Jul 2022 06:59:23 +0000 (08:59 +0200)
A new flag
.. namedconf:statement::
   :suppress_grammar:
suppresses pretty-printing grammar.

It is useful mostly for zones because each zone has it's own grammar, so
printing all of them at once usually does not make sense.

doc/arm/_ext/iscconf.py
doc/arm/reference.rst

index f4a74897e778bc798e019262f49d6badf9fab41c..c4252c4202ed509946c66e860499c9d898ee4f5d 100644 (file)
@@ -96,6 +96,7 @@ def domain_factory(domainname, domainlabel, todolist, grammar):
                 "tags": lambda arg: split_csv(arg, required=False),
                 # one-sentece description for use in summary tables
                 "short": directives.unchanged_required,
+                "suppress_grammar": directives.flag,
             }
 
             @property
@@ -237,6 +238,8 @@ def domain_factory(domainname, domainlabel, todolist, grammar):
                         union_flags = union_flags.union(
                             set(one_grammar_dict.subgrammar.get("_flags", []))
                         )
+                    if "suppress_grammar" in self.options:
+                        continue
                     grammarnode = self.format_grammar(multi_grammar, grammar_grp)
                     contentnode.insert(0, grammarnode)
 
index 91ba4937506ee8218e2c649ed08837cd2395244e..6cec9157b75bf86eb20d6e160cd3a62928522229 100644 (file)
@@ -6156,6 +6156,7 @@ Here is an example of a typical split DNS setup implemented using
 ``zone`` Statement Grammar
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 .. namedconf:statement:: zone
+   :suppress_grammar:
 
 .. _zone_statement:
 
@@ -6169,6 +6170,7 @@ Here is an example of a typical split DNS setup implemented using
 Zone Types
 ^^^^^^^^^^
 .. namedconf:statement:: type
+   :suppress_grammar:
 
    The ``type`` keyword is required for the ``zone`` configuration unless
    it is an ``in-view`` configuration. Its acceptable values are: