mirror of https://github.com/ansible/ansible.git
fix handling of nics argument
The existing code was receiving a list of strings and erroneously assuming it was being given a list of dictionaries, leading it to fail with: AttributeError: 'str' object has no attribute 'get' This commit corrects the list handling code to check the type of each item and handle it appropriately. Also, based on bcoca's comment in #2253, thie code removes the special case for a string-only argument. By transforming string arguments into dicts and then handling them like any other dict argument, this also permits arguments of the form: nics: net-name=mynet Or: nics: port-name=mynet Previous versions of this code only supported `net-id` and `port-id` in string specifications.reviewable/pr18780/r1
parent
77646818ae
commit
06098a9d69
Loading…
Reference in New Issue