]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/qemu: support overriding the cloud image
authorJason Dillaman <dillaman@redhat.com>
Tue, 20 Dec 2016 01:52:06 +0000 (20:52 -0500)
committerJason Dillaman <dillaman@redhat.com>
Thu, 26 Jan 2017 19:16:16 +0000 (14:16 -0500)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
qa/tasks/qemu.py

index 5cd7d883cdd401e75bcc45e05819e216b7f54056..75ea23c4efd46b1887e2d29e6cb9a08669f67182 100644 (file)
@@ -201,9 +201,10 @@ def download_image(ctx, config):
     for client, client_config in config.iteritems():
         (remote,) = ctx.cluster.only(client).remotes.keys()
         base_file = '{tdir}/qemu/base.{client}.qcow2'.format(tdir=testdir, client=client)
+        image_url = client_config.get('image_url', DEFAULT_IMAGE_URL)
         remote.run(
             args=[
-                'wget', '-nv', '-O', base_file, DEFAULT_IMAGE_URL,
+                'wget', '-nv', '-O', base_file, image_url,
                 ]
             )
     try:
@@ -481,6 +482,15 @@ def task(ctx, config):
                         test data
                       type: text/plain
                       filename: /tmp/data
+
+    If you need to override the default cloud image, set image_url:
+
+        tasks:
+        - ceph
+        - qemu:
+            client.0:
+                test: http://ceph.com/qa/test.sh
+                image_url: https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img
     """
     assert isinstance(config, dict), \
            "task qemu only supports a dictionary for configuration"