puresnmp.types module
SMI Types / Structure types which are not defined in the x690 protocol (see
also x690
).
See RFC 1155 section 3.2.3 for a description of the types and RFC 3416 for the definition of the new types.
Note
The IPv6 type is not defined in the default RFCs and needs to be post-processed.
- class puresnmp.types.Counter(value: ~typing.Union[int, ~x690.types._SENTINEL_UNINITIALISED] = <x690.types._SENTINEL_UNINITIALISED object>)
Bases:
Integer
SNMP type for counters.
- SIGNED = False
- class puresnmp.types.Counter64(value: ~typing.Union[int, ~x690.types._SENTINEL_UNINITIALISED] = <x690.types._SENTINEL_UNINITIALISED object>)
Bases:
Integer
As defined in RFC 2578
- SIGNED = False
- class puresnmp.types.Gauge(value: ~typing.Union[~x690.types.TWrappedPyType, ~x690.types._SENTINEL_UNINITIALISED] = <x690.types._SENTINEL_UNINITIALISED object>)
Bases:
Integer
SNMP type for gauges.
- SIGNED = False
- class puresnmp.types.IpAddress(value: ~typing.Union[~x690.types.TWrappedPyType, ~x690.types._SENTINEL_UNINITIALISED] = <x690.types._SENTINEL_UNINITIALISED object>)
Bases:
X690Type
[IPv4Address
]SNMP Type for IPv4 Addresses
- NATURE = [<TypeNature.PRIMITIVE: 'primitive'>, <TypeNature.CONSTRUCTED: 'constructed'>]
The x690 “private/constructed” information
- static decode_raw(data: bytes, slc: slice = slice(None, None, None)) IPv4Address
Converts raw-bytes to an ip-address instance
>>> IpAddress.decode_raw(b"\xc0\x00\x02\x01") IPv4Address('192.0.2.1')
- class puresnmp.types.NsapAddress(value: ~typing.Union[~x690.types.TWrappedPyType, ~x690.types._SENTINEL_UNINITIALISED] = <x690.types._SENTINEL_UNINITIALISED object>)
Bases:
Integer
Wrapped type for an NSAP Address
- class puresnmp.types.Opaque(value: Union[str, bytes, _SENTINEL_UNINITIALISED] = b'')
Bases:
OctetString
The Opaque type is to be considered to carry “any” binary data.
It is up to the application to know how to interpret this data and is passed through transparently by the SNMP protocol.
- class puresnmp.types.TimeTicks(value: ~typing.Union[~datetime.timedelta, int, ~x690.types._SENTINEL_UNINITIALISED] = <x690.types._SENTINEL_UNINITIALISED object>)
Bases:
Integer
SNMP type for time ticks exposed as Python
datetime.timedelta
- SIGNED = False