From: Oleh Prypin Date: Thu, 26 May 2016 21:17:13 +0000 (+0300) Subject: tasks/ceph-deploy: Run on multiple Python versions (2, 3) X-Git-Tag: v11.1.1~58^2^2~161^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9c1a28210e06318303bb7fe2eccef7d8fb982a0b;p=ceph.git tasks/ceph-deploy: Run on multiple Python versions (2, 3) Related to RM-15016 Signed-off-by: Oleh Prypin --- diff --git a/suites/ceph-deploy/basic/python_versions/python_2.yaml b/suites/ceph-deploy/basic/python_versions/python_2.yaml new file mode 100644 index 00000000000..51c865bfa87 --- /dev/null +++ b/suites/ceph-deploy/basic/python_versions/python_2.yaml @@ -0,0 +1,3 @@ +overrides: + ceph-deploy: + python_version: "2" diff --git a/suites/ceph-deploy/basic/python_versions/python_3.yaml b/suites/ceph-deploy/basic/python_versions/python_3.yaml new file mode 100644 index 00000000000..22deecaeab6 --- /dev/null +++ b/suites/ceph-deploy/basic/python_versions/python_3.yaml @@ -0,0 +1,3 @@ +overrides: + ceph-deploy: + python_version: "3" diff --git a/tasks/ceph_deploy.py b/tasks/ceph_deploy.py index bb985e294c4..30ef01d433f 100644 --- a/tasks/ceph_deploy.py +++ b/tasks/ceph_deploy.py @@ -24,7 +24,8 @@ 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. + will use that instead. The `bootstrap` script is ran, with the argument + obtained from `python_version`, if specified. """ log.info('Downloading ceph-deploy...') testdir = teuthology.get_testdir(ctx) @@ -38,14 +39,17 @@ def download_ceph_deploy(ctx, config): '{tdir}/ceph-deploy'.format(tdir=testdir), ], ) - ceph_admin.run( - args=[ - 'cd', - '{tdir}/ceph-deploy'.format(tdir=testdir), - run.Raw('&&'), - './bootstrap', - ], - ) + args = [ + 'cd', + '{tdir}/ceph-deploy'.format(tdir=testdir), + run.Raw('&&'), + './bootstrap', + ] + try: + args.append(str(config['python_version'])) + except KeyError: + pass + ceph_admin.run(args=args) try: yield