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

alias: str

Name the MIB was found under, when it differs from its module name.

compliance: tuple[str, ...]

MODULE-COMPLIANCE OIDs.

enterprise: tuple[str, ...]

Enterprise OID.

error: PySmiError

Why the transformation failed.

file: str

File the MIB was read from.

identity: str

MODULE-IDENTITY OID.

notification: tuple[str, ...]

NOTIFICATION-TYPE OIDs, including converted TRAP-TYPEs.

oid: str

MODULE-IDENTITY OID.

oids: tuple[str, ...]

All OIDs defined in the module.

path: str

URL the MIB was read from.

precedence: str

Which rule picked the copy that was used, one of the PRECEDENCE_* constants. Set only when something was shadowed, 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 repairImports was asked for.

revision: str

MIB revision.

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 error off a failure with it.

shadowed: tuple[str, ...]

Paths of the other copies of this module that were passed over, when their content differed from the one used. Empty in the usual case that only one configured source had the module.