fix: add Opaque to constImports for buggy MIBs#16
Closed
Jellyfrog wants to merge 1 commit into
Closed
Conversation
MIB files that use Opaque without importing it (e.g. JUNIPER-SMI which uses SYNTAX Opaque in its Integer64 TEXTUAL-CONVENTION) would fail with "Unknown parents for symbols" errors. Adding Opaque to the auto-imported symbols from SNMPv2-SMI fixes this, consistent with how other types like TimeTicks, Counter32, and Gauge32 are already handled. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
You might need to disclose the revision of such MIB documents. |
Author
|
As Juniper is a major vendor and this JUNIPER-SMI document is at the core of its ecosystem, I think it makes sense to create a workaround. But I really dislike the |
|
v1.6.3 ships the new mechanism, so you can use the following in your code to specify that you want implicit_imports.IMPLICIT_IMPORTS["JUNIPER-SMI"] = [("SNMPv2-SMI", "Opaque")] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MIB files that use Opaque without importing it (e.g. JUNIPER-SMI which uses SYNTAX Opaque in its Integer64 TEXTUAL-CONVENTION) would fail with "Unknown parents for symbols" errors. Adding Opaque to the auto-imported symbols from SNMPv2-SMI fixes this, consistent with how other types like TimeTicks, Counter32, and Gauge32 are already handled.