From c309315c1da04c148806dec4e755a9fa08fffabd Mon Sep 17 00:00:00 2001 From: Trishna Guha Date: Wed, 10 Jan 2018 10:51:30 +0530 Subject: [PATCH] fix nxos_bgp failure for graceful_restart warning (#34623) Signed-off-by: Trishna Guha --- lib/ansible/module_utils/network/nxos/nxos.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/ansible/module_utils/network/nxos/nxos.py b/lib/ansible/module_utils/network/nxos/nxos.py index a60138dcb40..5c563097b76 100644 --- a/lib/ansible/module_utils/network/nxos/nxos.py +++ b/lib/ansible/module_utils/network/nxos/nxos.py @@ -201,6 +201,13 @@ class Cli: if opts.get('ignore_timeout') and code: msgs.append(code) return msgs + elif code and 'no graceful-restart' in err: + if 'ISSU/HA will be affected if Graceful Restart is disabled' in err: + msg = [''] + msgs.extend(msg) + return msgs + else: + self._module.fail_json(msg=err) elif code: self._module.fail_json(msg=err)