roll up of eos fixes (#21987)

* fixes to_command function in eos to not iterate over commands twice
* fixes lots of minor issues with _eos_template
This commit is contained in:
Peter Sprygada 2017-02-27 09:24:05 -05:00 committed by GitHub
parent 888c8614fb
commit c1c54f1bf4
2 changed files with 22 additions and 20 deletions

View file

@ -432,15 +432,7 @@ def to_command(module, commands):
answer=dict()
), module)
commands = transform(to_list(commands))
for index, item in enumerate(commands):
if is_json(item['command']):
item['output'] = 'json'
elif is_text(item['command']):
item['output'] = 'text'
return commands
return transform(to_list(commands))
def get_config(module, flags=[]):
conn = get_connection(module)