mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Add option to suppress grammar rendering
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.
(cherry picked from commit 1f5bc4fe3b)
This commit is contained in:
parent
243ae3b6a7
commit
bc729e39da
2 changed files with 5 additions and 0 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -6178,6 +6178,7 @@ Here is an example of a typical split DNS setup implemented using
|
|||
``zone`` Statement Grammar
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.. namedconf:statement:: zone
|
||||
:suppress_grammar:
|
||||
|
||||
.. _zone_statement:
|
||||
|
||||
|
|
@ -6191,6 +6192,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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue