Merge "Cleanup services decorator"

This commit is contained in:
Jenkins 2017-04-13 13:57:03 +00:00 committed by Gerrit Code Review
commit 6b06865f84
1 changed files with 3 additions and 3 deletions

View File

@ -82,10 +82,10 @@ def services(*args):
exercised by a test case.
"""
def decorator(f):
services = ['compute', 'image', 'baremetal', 'volume',
'network', 'identity', 'object_storage']
known_services = get_service_list()
for service in args:
if service not in services:
if service not in known_services:
raise exceptions.InvalidServiceTag('%s is not a valid '
'service' % service)
attr(type=list(args))(f)