pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Pull in Fix #4281 Add timeout param to junos_config module
Module Name: pkgsrc-wip
Committed By: Havard Eidnes <he%NetBSD.org@localhost>
Pushed By: he
Date: Mon Jan 30 16:28:20 2017 +0100
Changeset: bda10c04f0daef9977ad28036dbe416d19884731
Modified Files:
ansible/Makefile
ansible/distinfo
Added Files:
ansible/patches/patch-lib_ansible_modules_core_network_junos_junos__config.py
Log Message:
Pull in Fix #4281 Add timeout param to junos_config module
from
https://github.com/ganeshnalawade/ansible-modules-core/commit/da4105a45615bd59bcc138ab926765ef8bdd5cff
Add NETCONF RPC timeout beyond the default value of
30 seconds. Set this value to accommodate configuration
changes (commits) that might take longer than the default
timeout interval.
Also fix a typo in a pkgsrc dependency.
Bump PKGREVISION.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=bda10c04f0daef9977ad28036dbe416d19884731
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
ansible/Makefile | 1 +
ansible/distinfo | 1 +
...ble_modules_core_network_junos_junos__config.py | 64 ++++++++++++++++++++++
3 files changed, 66 insertions(+)
diffs:
diff --git a/ansible/Makefile b/ansible/Makefile
index 586a628..b3e5cc6 100644
--- a/ansible/Makefile
+++ b/ansible/Makefile
@@ -2,6 +2,7 @@
DISTNAME= ansible-2.2.0.0
#PKGNAME= ${PYPKGPREFIX}-${DISTNAME} # XXX: for when package is py3x-ready
+PKGREVISION= 1
CATEGORIES= python sysutils
MASTER_SITES= http://releases.ansible.com/ansible/
diff --git a/ansible/distinfo b/ansible/distinfo
index a2bb608..b3fb652 100644
--- a/ansible/distinfo
+++ b/ansible/distinfo
@@ -24,6 +24,7 @@ SHA1 (patch-examples_ansible.cfg) = 35bc550e1d4e498d4d4f588ce2fe6bd8af8ad5bc
SHA1 (patch-examples_hosts) = d6df854be7ea6fa4978681238f722cc9698bd34e
SHA1 (patch-lib_ansible_cli_galaxy.py) = 9701c4434c5a39c0d3ce244007e7663fb06d97d3
SHA1 (patch-lib_ansible_constants.py) = 2ba1813f47e89dc79c4c8ee5698292aa9017c9da
+SHA1 (patch-lib_ansible_modules_core_network_junos_junos__config.py) = c0c4c7710f81464deb687096cbdd1f262288b2ce
SHA1 (patch-lib_ansible_modules_core_system_ping.py) = 5fbb798d79e22de60ec736a7e7e96be0fadf4b1f
SHA1 (patch-lib_ansible_modules_core_system_setup.py) = 44c35e7ba94cb96b1fc4a0501470d2d4d9747150
SHA1 (patch-lib_ansible_modules_extras_monitoring_nagios.py) = d263a9414d9fdd3c061d7ef2653f0ef648bf359b
diff --git a/ansible/patches/patch-lib_ansible_modules_core_network_junos_junos__config.py b/ansible/patches/patch-lib_ansible_modules_core_network_junos_junos__config.py
new file mode 100644
index 0000000..cd41608
--- /dev/null
+++ b/ansible/patches/patch-lib_ansible_modules_core_network_junos_junos__config.py
@@ -0,0 +1,64 @@
+$NetBSD$
+
+Add NETCONF RPC timeout beyond the default value of
+30 seconds. Set this value to accommodate configuration
+changes (commits) that might take longer than the default
+timeout interval.
+
+From https://github.com/ganeshnalawade/ansible-modules-core/commit/da4105a45615bd59bcc138ab926765ef8bdd5cff
+
+--- lib/ansible/modules/core/network/junos/junos_config.py.orig 2016-11-01 03:43:28.000000000 +0000
++++ lib/ansible/modules/core/network/junos/junos_config.py
+@@ -113,6 +113,14 @@ options:
+ default: no
+ choices: ['yes', 'no']
+ version_added: "2.2"
++ timeout:
++ description:
++ - Extend the NETCONF RPC timeout beyond the default value of
++ 30 seconds. Set this value to accommodate configuration
++ changes (commits) that might take longer than the default
++ timeout interval.
++ required: false
++ default: 0
+ requirements:
+ - junos-eznc
+ notes:
+@@ -133,6 +141,7 @@ vars:
+ junos_config:
+ src: srx.cfg
+ comment: update config
++ timeout: 60
+ provider: "{{ netconf }}"
+
+ - name: rollback the configuration to id 10
+@@ -231,7 +240,7 @@ def diff_commands(commands, config):
+ return updates
+
+ def load_config(module, result):
+- candidate = module.params['lines'] or module.params['src']
++ candidate = module.params['lines'] or module.params['src']
+ if isinstance(candidate, basestring):
+ candidate = candidate.split('\n')
+
+@@ -282,6 +291,10 @@ def confirm_config(module, result):
+ result['changed'] = module.connection.confirm_commit(checkonly)
+
+ def run(module, result):
++ timeout = module.params['timeout']
++ if timeout > 0 and module.params['transport'] == 'netconf':
++ module.connection.device.timeout = timeout
++
+ if module.params['rollback']:
+ return rollback_config(module, result)
+ elif module.params['zeroize']:
+@@ -311,6 +324,9 @@ def main():
+ rollback=dict(type='int'),
+ zeroize=dict(default=False, type='bool'),
+
++ # timeout
++ timeout=dict(default=0, type='int'),
++
+ transport=dict(default='netconf', choices=['netconf'])
+ )
+
Home |
Main Index |
Thread Index |
Old Index