From: Loic Dachary Date: Sat, 21 Nov 2015 11:01:40 +0000 (+0100) Subject: openstack: enforce hints as an array X-Git-Tag: 1.1.0~731^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F712%2Fhead;p=teuthology.git 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 --- diff --git a/teuthology/openstack/__init__.py b/teuthology/openstack/__init__.py index 36ab68265..cf64e9d64 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: