NamedConf parser - file /etc/named.conf

NamedConf parser the file named configuration file. Named is a name server used by BIND.

class insights.parsers.named_conf.NamedConf(context)[source]

Bases: NamedCheckconf

Class for parsing the file /etc/named.conf`, We use class NamedCheckConf to parse most of the named.conf configurations and class NamedConf to parse the include directives and the allow-recursion values.

Note

Please refer to the super-class insights.parsers.named_checkconf:NamedCheckConf for more usage information.

includes

List of files in ‘include’ section.

Type:

list

allow_recursion_address

List of address in ‘allow-recursion’ section.

Type:

list

Raises:

SkipComponent -- When content is empty or cannot be parsed.

Examples

>>> named_conf.includes
['/etc/crypto-policies/back-ends/bind.config']
>>> named_conf.allow_recursion_address
['localnets', 'localhost', '192.168.10.1/24']
parse_content(content)[source]

This method must be implemented by classes based on this class.