-
Notifications
You must be signed in to change notification settings - Fork 23.8k
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
To fix eos_vrf failure when transport method is eapi #41470
Conversation
@@ -189,7 +189,7 @@ def map_obj_to_commands(updates, module): | |||
|
|||
def map_config_to_obj(module): | |||
objs = [] | |||
output = run_commands(module, ['show vrf']) | |||
output = run_commands(module, ['show vrf | text']) |
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.
Rather than creating something not supported by the device which will inevitably confuse someone later, you should probably do run_commands(module, {'command': 'show vrf', 'output': 'text'})
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.
Yep.. makes sense, I have updated the code accordingly.
@justjais this PR contains the following merge commits: Please rebase your branch to remove these commits. |
@@ -409,7 +409,10 @@ def is_eapi(module): | |||
|
|||
|
|||
def to_command(module, commands): | |||
if is_eapi(module): | |||
if isinstance(commands, dict): |
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.
transform(to_list(commands))
already does this, with the bonus of not breaking if output
is not specified in the dictionary. You should not have to change this file for this to work.
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.
Sorry, my bad I'll revert the change and will upload again
* resolve bug 40930 * resolve bug 40930 * to fix review comments * to fix review comments * reverting the changes based on review (cherry picked from commit c989b62)
* resolve bug 40930 * resolve bug 40930 * to fix review comments * to fix review comments * reverting the changes based on review
…nsible#41771) * To fix eos_vrf failure when transport method is eapi (ansible#41470) * resolve bug 40930 * resolve bug 40930 * to fix review comments * to fix review comments * reverting the changes based on review (cherry picked from commit c989b62) * adding changelog for backport
SUMMARY
This PR is raised to resolve
eos_vrf
failure when the transport method iseapi
, and this issue was raised in bug #40930ISSUE TYPE
COMPONENT NAME
eos
ANSIBLE VERSION
ADDITIONAL INFORMATION