1
0
Fork 1
mirror of https://github.com/thatmattlove/hyperglass.git synced 2026-01-17 08:48:05 +00:00

Merge pull request #22 from spencerryan/master

Disconnect from Netmiko devices after executing a command
This commit is contained in:
Matt Love 2019-11-19 13:33:25 -10:00 committed by GitHub
commit 1fc0ecdc62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -172,6 +172,7 @@ class Netmiko:
response = config["messages"]["general"]
status = codes["danger"]
logger.error(f"{netmiko_exception}, {status}")
nm_connect_direct.disconnect()
return response, status
def proxied(self):
@ -228,6 +229,7 @@ class Netmiko:
logger.error(
f'{netmiko_exception}, {status},Proxy: {self.nm_host["proxy"]}'
)
nm_connect_proxied.disconnect()
return response, status