Contributing a MIB¶
Missing modules and corrections go to pysnmp/mibs as pull requests. To add a
MIB, drop the file under src/vendor/<vendor>/ and open a pull request. There
is no registration step and no index to edit:
mibcorpus derives both
from the sources.
Record where the module came from. mib-sources.json holds the provenance of
every module under src/, in the form pysmi already uses for the base MIBs it
bundles:
checked-in text == the publisher's text + our patch
MIB sources and patches describes that record and what it is for.
What is and is not carried¶
The standard modules, and the widely published vendor ones. Not every MIB ever written. Where a device ships its own copy, that copy is authoritative and this one is a snapshot.
An SNMP engine does not need this distribution to start. The modules pysnmp
resolves during start-up are compiled into the package, which is why
pip install pysnmplib works on a machine with no network. The distribution
matters once you need to name something outside that set.
Removed modules lists the 194 modules this site once served and no longer carries, grouped by the reason each was dropped and what restoring it would take.
Before you open the pull request¶
The contract scripts under tests/ are what CI runs. Run them locally first:
script |
asserts |
|---|---|
|
the published indexes answer for what the corpus carries |
|
the published names are what |
|
the chart renders what |
|
the corpus image answers the paths the site does |
|
a released pysnmp compiles what this build publishes |
That the compact corpus is a byte-identical subset of the published one is
checked upstream, in pysmi’s tests/test_corpus_publish_invariance.py, because
publish: false is pysmi’s feature. See Corpus variants.
Run the lint and format that the four sibling repositories share:
uvx pre-commit run --all-files
Writing documentation¶
Prose in docs/, README.md and theme/ follows
STYLE.md. The short
version: state what a page is in its first sentence, put enumerable facts in
tables, keep the em dash for a genuine break in a sentence, and do not give
systems intentions.