-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes#27314 - Handled issue in parsing "exit" in dellos6 running config #28060
Conversation
The module_utils changes has to be back-ported to 2.3 and 2.2. |
@skg-net Could you please review this. This will be for
|
rebuild_merge |
Given that we are close to 2.4, this is for |
@@ -48,7 +48,7 @@ def on_authorize(self, passwd=None): | |||
|
|||
cmd = {u'command': u'enable'} | |||
if passwd: | |||
cmd[u'prompt'] = to_text(r"[\r\n]?password: $", errors='surrogate_or_strict') | |||
cmd[u'prompt'] = to_text(r"[\r\n]?password:$", errors='surrogate_or_strict') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prexisting but note that you're still operating on a string literal here so you can write it like this:
cmd[u'promt'] = ur"[\r\n]?password:$"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string literals are quicker than calling to_text() so that's why I mention it.
(cherry picked from commit adc5338)
cherry-picked to stable-2.4 for the 2.4.0rc3 release. |
Thanks @abadger |
SUMMARY
Included changes to handle "exit" in dellos6 running-config.
Fixes #27314
ISSUE TYPE
COMPONENT NAME
ansible.module_utils.dellos6
ANSIBLE VERSION
ADDITIONAL INFORMATION
Included change in plugin file of dellos6.py to support in devel.