File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
networking_generic_switch/devices/netmiko_devices Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1515import atexit
1616import contextlib
1717import functools
18+ import hashlib
1819import uuid
1920
2021import netmiko
2122from oslo_config import cfg
2223from oslo_log import log as logging
23- import paramiko
24+ from paramiko import PKey as _pkey # noqa - This is for a monkeypatch
25+ import paramiko # noqa - Must load after the patch
2426import tenacity
2527from tooz import coordination
2628
3032from networking_generic_switch import exceptions as exc
3133from networking_generic_switch import locking as ngs_lock
3234
35+ # NOTE(TheJulia) monkey patch paramiko's get_finerprint function
36+ # to use sha256 instead of md5, since Paramiko's maintainer doesn't
37+ # seem to be concerned about FIPS compliance.
38+ _pkey .get_fingerprint = lambda x : hashlib .sha256 (x .asbytes ()).digest ()
39+
3340LOG = logging .getLogger (__name__ )
3441CONF = cfg .CONF
3542
You can’t perform that action at this time.
0 commit comments