| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Add the missing defaults (pyasn1 fault), add non-existing
'vacmContextStatus' MIB object which is required for table
management.
|
|
|
|
|
| |
The base Pythonized MIBs being shipped with pysnmp have been rebuilt
with the latest pysmi mainly for the purpose of making them
PEP-8 compliant.
|
|
|
|
| |
To make them PEP8-compliant
|
|
|
|
|
|
|
|
|
| |
This is a massive patch essentially upper-casing global/class attributes
that mean to be constants.
Some previously exposed constants have been preserved for compatibility
reasons (notably, in `hlapi`), though the rest might break user code relying
on pysnmp 4.
|
| |
|
| |
|
|
|
|
|
| |
Added missing SNMP PDU error classes and their handling in
Command Responder
|
| |
|
|
|
|
|
| |
Also fixed crash on MIB load failure in case of directory
access error
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The primary motivation behind this redesign is to allow asynchronous
operations between SNMP responder and the data source feeding its
MIB.
This is achieved by redesigning all `read*`, `write*`, `create*` and
`destroy*` methods of the `SNMPv2-SMI` MIB objects to return
immediately and deliver their results via a call back.
This modification brings significant and backward incompatible
changes to the low-level MIB operations.
The pysnmp MIB modules compiled for older pysnmp remain compatible.
|
| |
|
|
|
|
|
| |
Also, updated thr `.update` and `__init__` methods signatures to
match `dict` interface. Implementation details renewed.
|
|
|
|
|
|
| |
This change attaches the file name to the stack frames
what is helpful when reading traceback or debugging
interactively.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert to async MIB instrumentation API (#210)
MIB instrumentation API changed to allow for asynchronous
managed objects access. The MIB instrumentation methods
called by the state machine now return immediately and
resume once the callback is called.
The built-in SNMPv2-SMI objects are still synchronous.
This change is a prerequisite for fully asynchronous managed objects
implementation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MIB instrumentation API changed to allow for asynchronous
managed objects access. Although built-in SNMPv2-SMI objects
are still synchronous, the MIB instrumentation API is async
what allows users to replace default MIB instrumentation
with their own, potentially asynchronous.
CommandResponder refactored to facilitate asynchronous
MIB instrumentation routines. The `readVars`, `readNextVars`
and `writeVars` MIB controller methods return immediately and
deliver their results via a call back.
SMI/MIB managed objects API overhauled for simplicity and
flexibility breaking backward compatibility.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Overhaul SMI/MIB instrumentation API
SMI/MIB managed objects API overhauled for simplicity and
flexibility breaking backward compatibility.
This change would allow way more control over custom MIB
managed objects and also is the prerequisite for
asynchronous MIB instrumentation.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Doc Update: in resolveWithMib docstring, document getting controller
* Expand on the "use mibbuilder" comment as to *how* to use it
Basically how to make the modules you compile with mibbuilder
available to your application via MibBuilder settings
* Add a note explaining that "ASN.1 MIB" means the textual format
Users of the library seeing "ASN.1" may assume (as I did) that
the meaning is "ASN.1 encoded binary version of the MIB" (i.e.
a precompiled version of the MIB in compact internal format).
* Describe how to configure all OIDs to use the ASN.1 mib directories
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Non-implied OIDs, when laid in index, should be prefixed with the length
of the OID, but the current code erroneously uses len(self.name), that
is, the length of the MibTableRow's name instead.
|
|
|
|
| |
This is a prerequisite for pyasn1 0.4.x
|
|
|
|
| |
This is a prerequisite for pyasn1 0.4.x
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix InetAddress-to-InetAddressIPv{4,6} index cast
Previously, the pretty value of the InetAddress instance was being used.
Since InetAddress does not know how to format the raw octets to
protocol-specific syntax (IPv4 or IPv6), the pretty value was something
like u'\x00\x00\x00\x00' instead of u'0.0.0.0', which in turn caused
parse error in the protocol-specific subclass.
Passing the raw value (4- or 16-byte octet string) itself works as the
protocol-specific subclasses know how to handle these.
|
|
|
| |
NetworkAddress is one such index value.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
That is, reverse the supertype-subtype direction in the type matching
call: Previously it was checking if the value was a supertype of OID,
whereas the correct check should be whether the value is a subtype of
OID. This had gone undetected so far because all values were of simple,
tagged types, and if a value is not an OID, their tag set differed, i.e.
neither is a subtype of the other.
Recent introduction of NetworkAddress revealed this bug: Being an
untagged Choice type, NetworkAddress's tag set is empty, and it counts
as a supertype of OID: resolveWithMib() then erroneously treated it as
an OID.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add OID-index roundtrip methods to NetworkAddress
This enables use of NetworkAddress as a table index.
* Use NetworkAddress for RFC1213-MIB::atNetAddress
Previously atNetAddress defined to be an IpAddress, whose table index
mapping was different from that of NetworkAddress. This prevented
proper use of RFC1213-MIB::atTable instances, because:
- OID-to-symbol resolution was failing;
- Symbol-to-OID mapping result was invalid.
* Move clone() from Choice to NetworkAddress
Previously it was implemented in pyasn1.type.univ.Choice in case there
may be more Choice-based types—such as NetworkAddress—used as a table
index. However, SMIv2 (RFC 2578) limits the SYNTAX of an OBJECT-TYPE to
be only PyASN1 “simple” types, and NetworkAddress is the only known
Choice-based type used as a table index in MIB-I, so there is little
reason to clutter PyASN1 with the one-off logic in anticipation of
something will probably never happen.
Having NetworkAddress's own clone() method also allows use of string
literals as the value, so the following invocations are all valid:
na = NetworkAddress()
na1234 = na.clone('1.2.3.4')
na1234_2 = na1234.clone()
na1234_3 = na.clone(na1234)
na4321 = na.clone(IpAddress('4.3.2.1'))
To elaborate on simple types, SMIv2 limits the object syntax to be:
- a base type (or its refinement)
- a textual convention (or its refinement); or
- a BITS pseudo-type.
All base types descend from ASN.1 integer, octet string, or OID, all of
which are simple types. PySNMP defines SMIv2 BITS as a subclass of
OctetString, which is again a simple type. Finally, a SMIv2 textual
convention (RFC 2579) is simply a syntactic sugar applied on top of
either a base type a BITS type, so it is a simple type.
|
|
|
|
|
| |
Commit 30167082cd3f2706f733168da8647bbc4126696d fixed string index
rendering except for implied string types, which were left broken.
Close that gap by applying the same workaround.
|
|
|
|
|
|
| |
Also added a workaround to pyasn1 constraints
relationships resolution bug that affected SNMP table
indices rendering.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
To make the timestamp growing in time as it should
|