Handle cases where normal commit operation throws a prompt (#62132)

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
(cherry picked from commit f1766457a2)

Add changelog for iosxr prompt fix
pull/62378/head
Nilashish Chakraborty 5 years ago committed by Toshio Kuratomi
parent 20fee691e3
commit 3765a08359

@ -0,0 +1,2 @@
bugfixes:
- iosxr - support cases where a normal commit operation also throws a prompt (https://github.com/ansible/ansible/pull/62132)

@ -191,6 +191,11 @@ class Cliconf(CliconfBase):
cmd_obj['command'] = 'commit label {0}'.format(label) cmd_obj['command'] = 'commit label {0}'.format(label)
else: else:
cmd_obj['command'] = 'commit show-error' cmd_obj['command'] = 'commit show-error'
# In some cases even a normal commit, i.e., !replace,
# throws a prompt and we need to handle it before
# proceeding further
cmd_obj['prompt'] = '(C|c)onfirm'
cmd_obj['answer'] = 'y'
self.send_command(**cmd_obj) self.send_command(**cmd_obj)

Loading…
Cancel
Save