mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
JunOS: Add alive function to proxy
New in Nitrogen is a proxy_keep_alive option to poll the connection periodicaly to keep it alive. This is predicated on having an alive function in the proxy code to see if the connection still exists. This code implements the alive function so that the proxy_keep_alive can work.
This commit is contained in:
parent
97baddaa10
commit
10e51e4367
@ -116,6 +116,15 @@ def conn():
|
||||
return thisproxy['conn']
|
||||
|
||||
|
||||
def alive(opts):
|
||||
'''
|
||||
Return the connection status with the remote device.
|
||||
|
||||
.. versionadded:: Oxygen
|
||||
'''
|
||||
return thisproxy['conn'].connected
|
||||
|
||||
|
||||
def proxytype():
|
||||
'''
|
||||
Returns the name of this proxy
|
||||
|
Loading…
Reference in New Issue
Block a user