Compilation status¶
MibStatus class instance is used by compile() to
indicate the outcome of MIB transformation operation.
- class pysmi.compiler.MibStatus¶
Indicate MIB transformation result.
MibStatus is a subclass of Python string type. Some additional attributes may be set to indicate the details.
The following MibStatus class instances are defined:
compiled - MIB is successfully transformed
untouched - fresh transformed version of this MIB already exisits
failed - MIB transformation failed. error attribute carries details.
unprocessed - MIB transformation required but waived for some reason
missing - ASN.1 MIB source can’t be found
borrowed - MIB transformation failed but pre-transformed version was used
- error: PySmiError¶
Why the transformation failed.
- precedence: str¶
Which rule picked the copy that was used, one of the
PRECEDENCE_*constants. Set only when something wasshadowed, since with one copy there was nothing to decide.
- repaired: dict[str, str]¶
Symbols imported to repair a missing IMPORTS entry, mapped to the module each came from. Empty unless
repairImportswas asked for.
- setOptions(**kwargs: Any) MibStatus¶
Deprecated alias for
set_options().
- set_options(**kwargs: Any) MibStatus¶
Return a copy of this status carrying extra attributes.
The module-level statuses are shared constants, so detail about one particular MIB is attached to a copy rather than to the original.
Detail already on this status is carried over, so a second call adds to the first rather than replacing it – a status is built up in more than one place (what a module resolved to is known before whether it compiled), and dropping the earlier half would take
erroroff a failure with it.