mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 08:13:08 +00:00
Support dash-separated leaf IDs (as documented) (#43846)
This commit is contained in:
@@ -312,8 +312,11 @@ def main():
|
||||
pod_id = module.params['pod_id']
|
||||
leafs = module.params['leafs']
|
||||
if leafs is not None:
|
||||
# Users are likely to use integers for leaf IDs, which would raise an exception when using the join method
|
||||
leafs = [str(leaf) for leaf in module.params['leafs']]
|
||||
# Process leafs, and support dash-delimited leafs
|
||||
leafs = []
|
||||
for leaf in module.params['leafs']:
|
||||
# Users are likely to use integers for leaf IDs, which would raise an exception when using the join method
|
||||
leafs.extend(str(leaf).split('-'))
|
||||
if len(leafs) == 1:
|
||||
if interface_type != 'vpc':
|
||||
leafs = leafs[0]
|
||||
|
||||
Reference in New Issue
Block a user