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:
parent
d71a71a949
commit
b692e3c730
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue