Remove ansible-test obsolete `net_*` target logic.

pull/34718/head
Matt Clay 7 years ago
parent 60b3a191e6
commit f968776d86

@ -373,7 +373,6 @@ def network_init(args, internal_targets):
return
platform_targets = set(a for t in internal_targets for a in t.aliases if a.startswith('network/'))
net_commands = set(a[4:] for t in internal_targets for a in t.aliases if a.startswith('net_'))
instances = [] # type: list [lib.thread.WrappedThread]
@ -384,10 +383,7 @@ def network_init(args, internal_targets):
platform, version = platform_version.split('/', 1)
platform_target = 'network/%s/' % platform
# check to see if the platform supports any of the platform agnostic tests we're going to run (if any)
platform_agnostic = any(os.path.exists('lib/ansible/modules/network/%s/%s_%s.py' % (platform, platform, command)) for command in net_commands)
if platform_target not in platform_targets and not platform_agnostic:
if platform_target not in platform_targets:
display.warning('Skipping "%s" because selected tests do not target the "%s" platform.' % (
platform_version, platform))
continue

Loading…
Cancel
Save