Merge "Cleanup services decorator"
This commit is contained in:
commit
6b06865f84
|
@ -82,10 +82,10 @@ def services(*args):
|
||||||
exercised by a test case.
|
exercised by a test case.
|
||||||
"""
|
"""
|
||||||
def decorator(f):
|
def decorator(f):
|
||||||
services = ['compute', 'image', 'baremetal', 'volume',
|
known_services = get_service_list()
|
||||||
'network', 'identity', 'object_storage']
|
|
||||||
for service in args:
|
for service in args:
|
||||||
if service not in services:
|
if service not in known_services:
|
||||||
raise exceptions.InvalidServiceTag('%s is not a valid '
|
raise exceptions.InvalidServiceTag('%s is not a valid '
|
||||||
'service' % service)
|
'service' % service)
|
||||||
attr(type=list(args))(f)
|
attr(type=list(args))(f)
|
||||||
|
|
Loading…
Reference in New Issue