reconfigure.includers

class reconfigure.includers.BaseIncluder(parser=None, content_map={})

A base includer class

Parameters:
  • parser – Parser instance that was used to parse the root config file
  • content_map – a dict that overrides config content for specific paths
compose(origin, tree)

Should locate the include nodes in the Node tree, replace them with reconfigure.nodes.IncludeNode, parse the specified include files and append them to tree, with correct node origin attributes

decompose(origin, tree)

Should detach the included subtrees from the Node tree and return a { origin: content-node-tree } dict.

class reconfigure.includers.AutoIncluder(parser=None, content_map={})

This base includer automatically walks the node tree and loads the include files from IncludeNode.files properties. files is supposed to contain absolute path, relative path or a shell wildcard.

compose(origin, tree)
compose_rec(root, origin, node)
decompose(tree)
decompose_rec(node, result)
is_include(node)

Should return whether the node is an include node and return file pattern glob if it is

remove_include(node)

Shoud transform reconfigure.nodes.IncludeNode into a normal Node to be stringified into the file

class reconfigure.includers.BIND9Includer(parser=None, content_map={})
is_include(node)
remove_include(node)
class reconfigure.includers.NginxIncluder(parser=None, content_map={})
is_include(node)
remove_include(node)
class reconfigure.includers.SupervisorIncluder(parser=None, content_map={})
is_include(node)
remove_include(node)

Previous topic

reconfigure.nodes

Next topic

reconfigure.builders

This Page