Populate image.http_qcow2_image

Since https://review.opendev.org/c/openstack/tempest/+/923357
there is a new config image parameter which requires a qcow2 image.

Populate it (even in case it's not going to be used) using
the same value of DEFAULT_IMAGE, which happens to be qcow2,
trying to balance reducing duplication of the definition
of external resources (cirros images) and the need to have
a separate variable to track this default.

Change-Id: I01187f061b809b4beb29ae5d96e16325052619ed
This commit is contained in:
Luigi Toscano 2024-07-17 18:10:58 +02:00
parent f30afbb1bc
commit 8909ed83c6
2 changed files with 4 additions and 0 deletions

View File

@ -26,6 +26,9 @@ DEPLOYER_INPUT = os.path.join(os.path.expanduser("~"),
DEFAULT_IMAGE_DIR = 'etc'
DEFAULT_IMAGE = ("https://download.cirros-cloud.net/0.6.2/"
"cirros-0.6.2-x86_64-disk.img")
# Should DEFAULT_IMAGE be changed to a format which is not qcow2,
# then disconnect DEFAULT_IMAGE from DEFAULT_QCOW2_IMAGE
DEFAULT_QCOW2_IMAGE = DEFAULT_IMAGE
DEFAULT_IMAGES = [("https://download.cirros-cloud.net/0.6.2/"
"cirros-0.6.2-x86_64-disk.img"),

View File

@ -79,6 +79,7 @@ class ImageService(VersionedService):
# this value can't be set to image.http_image, therefor set the
# default value
conf.set('image', 'http_image', C.DEFAULT_IMAGE)
conf.set('image', 'http_qcow2_image', C.DEFAULT_QCOW2_IMAGE)
def _is_multistore_enabled(self):
try: