fix nxos_bgp failure for graceful_restart warning (#34623)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
Trishna Guha 2018-01-10 10:51:30 +05:30 committed by GitHub
parent 5613ca4bab
commit c309315c1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)