mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Fix structured output not supported in nxos_pim_interface (#28125)
* fixed unstructured error * fix unit tests so they accept commands in dictionary form
This commit is contained in:
committed by
Trishna Guha
parent
12460dd713
commit
a01aa6e9df
@@ -170,10 +170,17 @@ PARAM_TO_COMMAND_KEYMAP = {
|
||||
|
||||
|
||||
def execute_show_command(command, module, text=False):
|
||||
if text is False:
|
||||
command += ' | json'
|
||||
if text:
|
||||
cmds = [{
|
||||
'command': command,
|
||||
'output': 'text'
|
||||
}]
|
||||
else:
|
||||
cmds = [{
|
||||
'command': command,
|
||||
'output': 'json'
|
||||
}]
|
||||
|
||||
cmds = [command]
|
||||
return run_commands(module, cmds)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user