updates network_common lib (#21306)

* removes connection functions refactored into connection
* updates ComplexDict and ComplexList objects to use with AnsibleModule
* updates modules to add new argument to ComplexList & ComplexDict
This commit is contained in:
Peter Sprygada 2017-02-14 14:38:30 -05:00 committed by GitHub
commit b0c01bbb82
7 changed files with 111 additions and 103 deletions

View file

@ -143,13 +143,14 @@ def to_lines(stdout):
return lines
def parse_commands(module, warnings):
transform = ComplexList(dict(
spec = dict(
command=dict(key=True),
output=dict(),
prompt=dict(),
response=dict()
))
)
transform = ComplexList(spec, module)
commands = transform(module.params['commands'])
for index, item in enumerate(commands):