1
0
mirror of https://github.com/ceph/ceph synced 2025-03-30 15:31:01 +00:00

qa/tasks/qemu: support arbitrary additions to cloud-init-archive

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
Jason Dillaman 2016-12-19 19:45:12 -05:00
parent 10a7ff0a75
commit 454348004b

View File

@ -6,6 +6,7 @@ from cStringIO import StringIO
import contextlib
import logging
import os
import yaml
from teuthology import misc as teuthology
from teuthology import contextutil
@ -136,6 +137,11 @@ def generate_iso(ctx, config):
mount -t xfs /dev/vd{dev_letter} /mnt/test_{dev_letter}
""".format(dev_letter=dev_letter)
cloud_config_archive = client_config.get('cloud_config_archive', [])
if cloud_config_archive:
user_data += yaml.safe_dump(cloud_config_archive, default_style='|',
default_flow_style=False)
# this may change later to pass the directories as args to the
# script or something. xfstests needs that.
user_data += """
@ -458,6 +464,23 @@ def task(ctx, config):
client.0:
test: http://download.ceph.com/qa/test.sh
clone: true
If you need to configure additional cloud-config options, set cloud_config
to the required data set::
tasks:
- ceph
- qemu:
client.0:
test: http://ceph.com/qa/test.sh
cloud_config_archive:
- |
#/bin/bash
touch foo1
- content: |
test data
type: text/plain
filename: /tmp/data
"""
assert isinstance(config, dict), \
"task qemu only supports a dictionary for configuration"