ncdiff.ModelCompiler class¶
-
class
ncdiff.
ModelCompiler
(folder)[source]¶ Bases:
object
Abstraction of a YANG file compiler.
-
dir_yang
¶ Path to yang files.
Type: str
-
dependencies
¶ Dependency infomation stored in an Element object.
Type: Element
-
context
¶ A CompilerContext object that holds the context of all modules.
Type: CompilerContext
-
module_prefixes
¶ A dictionary that stores module prefixes. It is keyed by module names.
Type: dict
-
module_namespaces
¶ A dictionary that stores module namespaces. It is keyed by module names.
Type: dict
-
identity_deps
¶ A dictionary that stores module identities. It is keyed by bases.
Type: dict
-
pyang_errors
¶ A list of tuples. Each tuple contains a pyang error.Position object, an error tag and a tuple of some error arguments. It is possible to call pyang.error.err_to_str() to print out detailed error messages.
Type: list
__init__ instantiates a ModelCompiler instance.
-
build_dependencies
()[source]¶ High-level api: Briefly compile all yang files and find out dependency infomation of all modules.
Returns: Nothing returns. Return type: None
-