]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
safer fallback. Updates docstring
authorAlfredo Deza <alfredo@deza.pe>
Tue, 13 Aug 2013 15:32:15 +0000 (11:32 -0400)
committerAlfredo Deza <alfredo@deza.pe>
Tue, 13 Aug 2013 15:42:22 +0000 (11:42 -0400)
Signed-off-by: Alfredo Deza <alfredo@deza.pe>
teuthology/task/ceph-deploy.py

index 7596e490baa5c4396ce6eafe3ec5ab98c27456cd..11f45185101ed46bc3d98a71a29d65486b221242 100644 (file)
@@ -12,12 +12,21 @@ from ..orchestra import run
 
 log = logging.getLogger(__name__)
 
+
 @contextlib.contextmanager
 def download_ceph_deploy(ctx, config):
+    """
+    Downloads ceph-deploy from the ceph.com git mirror and (by default)
+    switches to the master branch. If the `ceph-deploy-branch` is specified, it
+    will use that instead.
+    """
     log.info('Downloading ceph-deploy...')
     testdir = teuthology.get_testdir(ctx)
     ceph_admin = teuthology.get_first_mon(ctx, config)
-    ceph_deploy_branch = ctx.get('ceph-deploy', {}).get('ceph-deploy-branch', 'master')
+    default_cd_branch = {'ceph-deploy-branch': 'master'}
+    ceph_deploy_branch = ctx.get(
+        'ceph-deploy',
+        default_cd_branch).get('ceph-deploy-branch', 'master')
 
     ctx.cluster.only(ceph_admin).run(
         args=[
@@ -47,6 +56,7 @@ def download_ceph_deploy(ctx, config):
                 ],
             )
 
+
 def is_healthy(ctx, config):
     """Wait until a Ceph cluster is healthy."""
     testdir = teuthology.get_testdir(ctx)