Drop logic for pysnmp < 5
According to the driver-requirements.txt, nironic requires pysnmp >= 5 now, so this logic is just useless. Change-Id: Iea843689ebf04fa0539c0ff2c783c18131646dff
This commit is contained in:
parent
9550eca761
commit
46f1962ea1
@ -46,46 +46,24 @@ if pysnmp:
|
|||||||
snmp_auth_protocols = {
|
snmp_auth_protocols = {
|
||||||
'md5': snmp.usmHMACMD5AuthProtocol,
|
'md5': snmp.usmHMACMD5AuthProtocol,
|
||||||
'sha': snmp.usmHMACSHAAuthProtocol,
|
'sha': snmp.usmHMACSHAAuthProtocol,
|
||||||
|
'sha224': snmp.usmHMAC128SHA224AuthProtocol,
|
||||||
|
'sha256': snmp.usmHMAC192SHA256AuthProtocol,
|
||||||
|
'sha384': snmp.usmHMAC256SHA384AuthProtocol,
|
||||||
|
'sha512': snmp.usmHMAC384SHA512AuthProtocol,
|
||||||
'none': snmp.usmNoAuthProtocol,
|
'none': snmp.usmNoAuthProtocol,
|
||||||
}
|
}
|
||||||
|
|
||||||
# available since pysnmp 4.4.1
|
|
||||||
try:
|
|
||||||
snmp_auth_protocols.update(
|
|
||||||
{
|
|
||||||
'sha224': snmp.usmHMAC128SHA224AuthProtocol,
|
|
||||||
'sha256': snmp.usmHMAC192SHA256AuthProtocol,
|
|
||||||
'sha384': snmp.usmHMAC256SHA384AuthProtocol,
|
|
||||||
'sha512': snmp.usmHMAC384SHA512AuthProtocol,
|
|
||||||
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
except AttributeError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
snmp_priv_protocols = {
|
snmp_priv_protocols = {
|
||||||
'des': snmp.usmDESPrivProtocol,
|
'des': snmp.usmDESPrivProtocol,
|
||||||
'3des': snmp.usm3DESEDEPrivProtocol,
|
'3des': snmp.usm3DESEDEPrivProtocol,
|
||||||
'aes': snmp.usmAesCfb128Protocol,
|
'aes': snmp.usmAesCfb128Protocol,
|
||||||
'aes192': snmp.usmAesCfb192Protocol,
|
'aes192': snmp.usmAesCfb192Protocol,
|
||||||
'aes256': snmp.usmAesCfb256Protocol,
|
'aes256': snmp.usmAesCfb256Protocol,
|
||||||
|
'aes192blmt': snmp.usmAesBlumenthalCfb192Protocol,
|
||||||
|
'aes256blmt': snmp.usmAesBlumenthalCfb256Protocol,
|
||||||
'none': snmp.usmNoPrivProtocol,
|
'none': snmp.usmNoPrivProtocol,
|
||||||
}
|
}
|
||||||
|
|
||||||
# available since pysnmp 4.4.3
|
|
||||||
try:
|
|
||||||
snmp_priv_protocols.update(
|
|
||||||
{
|
|
||||||
'aes192blmt': snmp.usmAesBlumenthalCfb192Protocol,
|
|
||||||
'aes256blmt': snmp.usmAesBlumenthalCfb256Protocol,
|
|
||||||
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
except AttributeError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
snmp = None
|
snmp = None
|
||||||
snmp_error = None
|
snmp_error = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user