Expose ASN.1 `Null` type through `rfc1902` module
parent
4aac8b23d5
commit
9ebd0c0fab
|
@ -61,6 +61,7 @@ Revision 5.0.0, released 2018-10-??
|
||||||
Revision 4.4.7, released 2018-11-XX
|
Revision 4.4.7, released 2018-11-XX
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
|
- Exposed ASN.1 `Null` type through `rfc1902` module for convenience.
|
||||||
- Use `compile()` before `exec`'ing MIB modules to attach filename to
|
- Use `compile()` before `exec`'ing MIB modules to attach filename to
|
||||||
the stack frames (ultimately shown in traceback/debugger)
|
the stack frames (ultimately shown in traceback/debugger)
|
||||||
- Fixed hlapi/v3arch transport target caching to ensure transport targets
|
- Fixed hlapi/v3arch transport target caching to ensure transport targets
|
||||||
|
|
|
@ -441,6 +441,20 @@ data description language. PySNMP types are derived from
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
|
.. _null:
|
||||||
|
|
||||||
|
Null type
|
||||||
|
+++++++++
|
||||||
|
|
||||||
|
.. autoclass:: pysnmp.proto.rfc1902.Null(initializer)
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
The `NULL` type actually belongs to the base ASN.1 types. It is not defined
|
||||||
|
in :RFC:`1902#section-2` as an SNMP type. The `Null` type is exposed through
|
||||||
|
`rfc1902` module just for convenience.
|
||||||
|
|
||||||
.. _integer32:
|
.. _integer32:
|
||||||
|
|
||||||
Integer32 type
|
Integer32 type
|
||||||
|
|
|
@ -10,7 +10,32 @@ from pysnmp.proto import rfc1155, error
|
||||||
|
|
||||||
__all__ = ['Opaque', 'TimeTicks', 'Bits', 'Integer', 'OctetString',
|
__all__ = ['Opaque', 'TimeTicks', 'Bits', 'Integer', 'OctetString',
|
||||||
'IpAddress', 'Counter64', 'Unsigned32', 'Gauge32', 'Integer32',
|
'IpAddress', 'Counter64', 'Unsigned32', 'Gauge32', 'Integer32',
|
||||||
'ObjectIdentifier', 'Counter32']
|
'ObjectIdentifier', 'Counter32', 'Null']
|
||||||
|
|
||||||
|
|
||||||
|
class Null(univ.Null):
|
||||||
|
"""Creates an instance of SNMP Null class.
|
||||||
|
|
||||||
|
:py:class:`~pysnmp.proto.rfc1902.Null` type represents the absence
|
||||||
|
of value.
|
||||||
|
|
||||||
|
Parameters
|
||||||
|
----------
|
||||||
|
initializer: str
|
||||||
|
Python string object. Must be an empty string.
|
||||||
|
|
||||||
|
Raises
|
||||||
|
------
|
||||||
|
PyAsn1Error :
|
||||||
|
On constraint violation or bad initializer.
|
||||||
|
|
||||||
|
Examples
|
||||||
|
--------
|
||||||
|
>>> from pysnmp.proto.rfc1902 import *
|
||||||
|
>>> Null('')
|
||||||
|
Null('')
|
||||||
|
>>>
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
class Integer32(univ.Integer):
|
class Integer32(univ.Integer):
|
||||||
|
|
Loading…
Reference in New Issue