]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/ceph-deploy: Run on multiple Python versions (2, 3)
authorOleh Prypin <oleh@pryp.in>
Thu, 26 May 2016 21:17:13 +0000 (00:17 +0300)
committerOleh Prypin <oleh@pryp.in>
Wed, 15 Jun 2016 09:55:18 +0000 (12:55 +0300)
Related to RM-15016

Signed-off-by: Oleh Prypin <oleh@pryp.in>
suites/ceph-deploy/basic/python_versions/python_2.yaml [new file with mode: 0644]
suites/ceph-deploy/basic/python_versions/python_3.yaml [new file with mode: 0644]
tasks/ceph_deploy.py

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 (file)
index 0000000..51c865b
--- /dev/null
@@ -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 (file)
index 0000000..22deeca
--- /dev/null
@@ -0,0 +1,3 @@
+overrides:
+  ceph-deploy:
+    python_version: "3"
index bb985e294c4cbebba07b4297f842cd6e6fa06d95..30ef01d433f1d73f5067a1240d65882bfd916102 100644 (file)
@@ -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