From f9364344f843ada1f64361fa0d7d5724422c0ca4 Mon Sep 17 00:00:00 2001 From: sidhujasminder Date: Tue, 20 Feb 2018 15:56:52 +0530 Subject: [PATCH] Resolving dev_timeout issue for rpc and install_config --- salt/modules/junos.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/salt/modules/junos.py b/salt/modules/junos.py index e00ead2d06a9..83f38ab6fb36 100644 --- a/salt/modules/junos.py +++ b/salt/modules/junos.py @@ -184,7 +184,11 @@ def rpc(cmd=None, dest=None, format='xml', **kwargs): op[key] = value else: op.update(kwargs) - op['dev_timeout'] = six.text_type(op.pop('timeout', conn.timeout)) + + # The variable timeout is just being kept to preserve + # backward compatibility. + if 'dev_timeout' not in op: + op['dev_timeout'] = op.pop('timeout', conn.timeout) if cmd in ['get-config', 'get_config']: filter_reply = None @@ -905,6 +909,8 @@ def install_config(path=None, **kwargs): commit_params['confirm'] = op['confirm'] if 'comment' in op: commit_params['comment'] = op['comment'] + if 'dev_timeout' in op: + commit_params['timeout'] = op['dev_timeout'] try: check = cu.commit_check()