diff options
author | Ilya Etingof <etingof@gmail.com> | 2018-10-26 08:44:06 +0200 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2018-10-26 08:45:56 +0200 |
commit | 9ebd0c0fab207c02f2046a1d221f147aa69c6c26 (patch) | |
tree | ecec919e8d09c6f68b57116300cfb353c8985346 /pysnmp/proto | |
parent | 4aac8b23d50012979730557786b2962b185bd9c3 (diff) | |
download | pysnmp-git-9ebd0c0fab207c02f2046a1d221f147aa69c6c26.tar.gz |
Expose ASN.1 `Null` type through `rfc1902` module
Diffstat (limited to 'pysnmp/proto')
-rw-r--r-- | pysnmp/proto/rfc1902.py | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/pysnmp/proto/rfc1902.py b/pysnmp/proto/rfc1902.py index 3caa81d7..4bd82669 100644 --- a/pysnmp/proto/rfc1902.py +++ b/pysnmp/proto/rfc1902.py @@ -10,7 +10,32 @@ from pysnmp.proto import rfc1155, error __all__ = ['Opaque', 'TimeTicks', 'Bits', 'Integer', 'OctetString', '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): |