]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
openstack: enforce hints as an array 712/head
authorLoic Dachary <ldachary@redhat.com>
Sat, 21 Nov 2015 11:01:40 +0000 (12:01 +0100)
committerLoic Dachary <ldachary@redhat.com>
Tue, 1 Dec 2015 19:10:32 +0000 (20:10 +0100)
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 <loic@dachary.org>
teuthology/openstack/__init__.py

index 36ab6826508d8dcaca3d02fb2d2ffac147ede480..cf64e9d64576954bf3b6faceda2e6a14a7c9f9ff 100644 (file)
@@ -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: