Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for timeout option in pillar file for junos proxy #51325

Merged
merged 9 commits into from
Jan 29, 2019
9 changes: 9 additions & 0 deletions salt/proxy/junos.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,15 @@ def init(opts):
thisproxy['initialized'] = False
return

if 'timeout' in proxy_keys:
timeout = int(opts['proxy']['timeout'])
try:
thisproxy['conn'].timeout = timeout
except Exception as ex:
log.error('Not able to set timeout due to: %s', str(ex))
else:
log.debug('RPC timeout set to %d seconds', timeout)

try:
thisproxy['conn'].bind(cu=jnpr.junos.utils.config.Config)
except Exception as ex:
Expand Down