Cleanup services decorator
Rather than repeating the list of services twice, use the
one defined in get_service_list. Note that this removes
baremetal from the list of accepted services.
Change-Id: Ib5a9b33a54ef1064f5dc8f6206ddd1c7d218fc8e
diff --git a/tempest/test.py b/tempest/test.py
index 70421fd..4eecbd6 100644
--- a/tempest/test.py
+++ b/tempest/test.py
@@ -82,10 +82,10 @@
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)