Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """SNMP constants."""
2 
3 CONF_ACCEPT_ERRORS = "accept_errors"
4 CONF_AUTH_KEY = "auth_key"
5 CONF_AUTH_PROTOCOL = "auth_protocol"
6 CONF_BASEOID = "baseoid"
7 CONF_COMMUNITY = "community"
8 CONF_DEFAULT_VALUE = "default_value"
9 CONF_PRIV_KEY = "priv_key"
10 CONF_PRIV_PROTOCOL = "priv_protocol"
11 CONF_VERSION = "version"
12 CONF_VARTYPE = "vartype"
13 
14 DEFAULT_AUTH_PROTOCOL = "none"
15 DEFAULT_COMMUNITY = "public"
16 DEFAULT_HOST = "localhost"
17 DEFAULT_NAME = "SNMP"
18 DEFAULT_PORT = "161"
19 DEFAULT_PRIV_PROTOCOL = "none"
20 DEFAULT_TIMEOUT = 8
21 DEFAULT_VERSION = "1"
22 DEFAULT_VARTYPE = "none"
23 
24 SNMP_VERSIONS = {"1": 0, "2c": 1, "3": None}
25 
26 MAP_AUTH_PROTOCOLS = {
27  "none": "usmNoAuthProtocol",
28  "hmac-md5": "usmHMACMD5AuthProtocol",
29  "hmac-sha": "usmHMACSHAAuthProtocol",
30  "hmac128-sha224": "usmHMAC128SHA224AuthProtocol",
31  "hmac192-sha256": "usmHMAC192SHA256AuthProtocol",
32  "hmac256-sha384": "usmHMAC256SHA384AuthProtocol",
33  "hmac384-sha512": "usmHMAC384SHA512AuthProtocol",
34 }
35 
36 MAP_PRIV_PROTOCOLS = {
37  "none": "usmNoPrivProtocol",
38  "des": "usmDESPrivProtocol",
39  "3des-ede": "usm3DESEDEPrivProtocol",
40  "aes-cfb-128": "usmAesCfb128Protocol",
41  "aes-cfb-192": "usmAesCfb192Protocol",
42  "aes-cfb-256": "usmAesCfb256Protocol",
43 }