From 6f0530762936153bc3eb777d0001f8f660e8f37a Mon Sep 17 00:00:00 2001 From: Andrea Frittoli Date: Sun, 9 Apr 2017 19:22:47 +0200 Subject: [PATCH] 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 --- tempest/test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tempest/test.py b/tempest/test.py index 70421fd1c5..4eecbd6c5c 100644 --- a/tempest/test.py +++ b/tempest/test.py @@ -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)