You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a common request, which goes something like this:
Connect to a device (or pool of devices)
Run a command
Stay connected
Delay for an interval (say, 60 seconds)
Goto 2
A simple use-case would be to maintain a connection to a device, and to fetch the ARP table (e.g. show arp) every 60 seconds and then "do something with the result". The ideal implementation would be to have this be possible using the trigger.cmds.Commando class.
There isn't really a built-in way to do this with SSH clients in Twisted, but there are some existing patterns for persistent HTTP connections. See:
This is a common request, which goes something like this:
A simple use-case would be to maintain a connection to a device, and to fetch the ARP table (e.g.
show arp
) every 60 seconds and then "do something with the result". The ideal implementation would be to have this be possible using thetrigger.cmds.Commando
class.There isn't really a built-in way to do this with SSH clients in Twisted, but there are some existing patterns for persistent HTTP connections. See:
http://twisted.readthedocs.org/en/latest/web/howto/client.html#http-persistent-connection
Additionally, I did a super hacky and rudimentary proof-of-concept to illustrate that it wouldn't be super hard. Gist here:
https://gist.github.com/jathanism/ea208742882afff89ded
The text was updated successfully, but these errors were encountered: