mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-08 17:34:01 -07:00
Complete initial network-integration support.
This commit is contained in:
parent
e40ad1ac17
commit
d8733a5455
7 changed files with 168 additions and 12 deletions
|
@ -194,6 +194,11 @@ def parse_args():
|
|||
targets=walk_network_integration_targets,
|
||||
config=NetworkIntegrationConfig)
|
||||
|
||||
network_integration.add_argument('--platform',
|
||||
metavar='PLATFORM',
|
||||
action='append',
|
||||
help='network platform/version').completer = complete_network_platform
|
||||
|
||||
windows_integration = subparsers.add_parser('windows-integration',
|
||||
parents=[integration],
|
||||
help='windows integration tests')
|
||||
|
@ -503,5 +508,17 @@ def complete_windows(prefix, parsed_args, **_):
|
|||
return [i for i in images if i.startswith(prefix) and (not parsed_args.windows or i not in parsed_args.windows)]
|
||||
|
||||
|
||||
def complete_network_platform(prefix, parsed_args, **_):
|
||||
"""
|
||||
:type prefix: unicode
|
||||
:type parsed_args: any
|
||||
:rtype: list[str]
|
||||
"""
|
||||
with open('test/runner/completion/network.txt', 'r') as completion_fd:
|
||||
images = completion_fd.read().splitlines()
|
||||
|
||||
return [i for i in images if i.startswith(prefix) and (not parsed_args.platform or i not in parsed_args.platform)]
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue