Make disk_format configurable

This patch makes disk_format configurable in
rally/verification/tempest/config.py

Change-Id: I9825c407192946dce9f59924745b0c6d7f688112
Closes-Bug: #1522693
This commit is contained in:
Bo Chi 2015-12-06 21:01:43 -05:00
parent e8ba46705b
commit 38aef19a4b
2 changed files with 15 additions and 3 deletions

View File

@ -655,6 +655,12 @@
# CirrOS image URL (string value)
#cirros_img_url = http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
# Image disk format (string value)
#disk_format = qcow2
# Image container formate (string value)
#container_format = bare
[role]

View File

@ -37,7 +37,13 @@ IMAGE_OPTS = [
cfg.StrOpt("cirros_img_url",
default="http://download.cirros-cloud.net/"
"0.3.4/cirros-0.3.4-x86_64-disk.img",
help="CirrOS image URL")
help="CirrOS image URL"),
cfg.StrOpt("disk_format",
default="qcow2",
help="Image disk format"),
cfg.StrOpt("container_format",
default="bare",
help="Image container formate")
]
ROLE_OPTS = [
@ -360,8 +366,8 @@ class TempestResourcesContext(object):
glanceclient = self.clients.glance()
params = {
"name": "rally-verify-cirros-img-%s" % uuid.uuid4(),
"disk_format": "qcow2",
"container_format": "bare",
"disk_format": CONF.image.disk_format,
"container_format": CONF.image.container_format,
"is_public": True
}
LOG.debug("Creating image '%s'" % params["name"])