From 7778730b5a92e45579cf14a55e4ed75ea6eed5a2 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Sat, 21 Nov 2015 12:01:40 +0100 Subject: [PATCH] openstack: enforce hints as an array All OpenStack hints have been converted to arrays (hammer, infernalis, master), raise an error if a hint is added old style to avoid mixing style. http://tracker.ceph.com/issues/13581 Fixes: #13581 Signed-off-by: Loic Dachary --- teuthology/openstack/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/teuthology/openstack/__init__.py b/teuthology/openstack/__init__.py index 36ab682650..cf64e9d645 100644 --- a/teuthology/openstack/__init__.py +++ b/teuthology/openstack/__init__.py @@ -189,9 +189,8 @@ class OpenStack(object): if not hints: return result if type(hints) is types.DictType: - hints = [hints] - # TODO: raise after converting all ceph-qa-suite to only use arrays (oct 2015) - # raise Exception("openstack: " + str(hints) + " must be an array, not a dict") + raise TypeError("openstack: " + str(hints) + + " must be an array, not a dict") for hint in hints: for resource in ('machine', 'volumes'): if resource in hint: -- 2.39.5