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

Disconnect from Netmiko devices after executing a command

This commit is contained in:
Ryan 2019-11-18 11:53:33 -05:00
parent d71a71a949
commit b692e3c730

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