]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Lines formerly of the form '(remote,) = ctx.cluster.only(role).remotes.keys()'
authorWarren Usui <warren.usui@inktank.com>
Sat, 1 Mar 2014 03:13:40 +0000 (19:13 -0800)
committerJosh Durgin <josh.durgin@inktank.com>
Thu, 27 Mar 2014 01:43:48 +0000 (18:43 -0700)
and '(remote,) = ctx.cluster.only(role).remotes.iterkeys()' would fail with
ValueError and no message if there were less than 0 or more than 1 key.
Now a new function, get_single_remote_value() is called which prints out
more understandable messages.

Fixes: 7510
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Warren Usui <warren.usui@inktank.com>
s3tests.py
swift.py

index abbacb9bfaa3a9cd1957f136067210f48aebe276..f2c2b072848656f97c91a5220aa702082bf5e4ce 100644 (file)
@@ -246,7 +246,7 @@ def configure(ctx, config):
         else:
             s3tests_conf['DEFAULT']['host'] = 'localhost'
 
-        (remote,) = ctx.cluster.only(client).remotes.keys()
+        remote = teuthology.get_single_remote_value(ctx, client)
         remote.run(
             args=[
                 'cd',
index 6285eb6b1c510d69113063109ad75193d6a701f1..efc8587765923a600e61588abec47dfda6f04b68 100644 (file)
--- a/swift.py
+++ b/swift.py
@@ -133,7 +133,7 @@ def configure(ctx, config):
             testswift_conf['func_test']['auth_host'] = 'localhost'
 
         log.info(client)
-        (remote,) = ctx.cluster.only(client).remotes.keys()
+        remote = teuthology.get_single_remote_value(ctx, client)
         remote.run(
             args=[
                 'cd',