image_file parameter not supported anymore

Despite the image_file parameter not being configurable anymore,
image_file is still an internal attribute from the UrlGlanceImageFixture
class, which depends on the configurable image_url parameter,
whose value could be either an http(s):// URL or a file:// URL.

Hence, local stored images can still be used by setting image_url to
something like this: file:///tmp/images/myimage.qcow2

Change-Id: Iee77359037ecab4536ea3e904a7d659fbf2aa7b0
This commit is contained in:
Eduardo Olivares 2024-12-18 11:10:55 +01:00
parent 3dfa428120
commit 22503c28a2
4 changed files with 18 additions and 10 deletions

View File

@ -26,9 +26,6 @@
# Default cirros image URL (string value) # Default cirros image URL (string value)
#image_url = <None> #image_url = <None>
# Default cirros image filename (string value)
#image_file = <None>
# Default cirros container format (string value) # Default cirros container format (string value)
#container_format = <None> #container_format = <None>
@ -528,9 +525,6 @@
# Default ubuntu image URL (string value) # Default ubuntu image URL (string value)
#image_url = <None> #image_url = <None>
# Default ubuntu image filename (string value)
#image_file = <None>
# Default ubuntu container format (string value) # Default ubuntu container format (string value)
#container_format = <None> #container_format = <None>

View File

@ -0,0 +1,15 @@
---
deprecations:
- |
The config parameter `image_file` is not available anymore.
With this parameter, it was possible to configure the local path to the
images that could be used to create either Cirros or Ubuntu VM instances.
It is still possible to do this, using the existing parameter `image_url`:
.. code-block:: text
[cirros]
image_url=file:///tmp/cirros.img
Internally, the `image_file` attribute is still part of the `UrlGlanceImageFixture` class
and it indicates where the image file is saved locally.

View File

@ -47,9 +47,9 @@ def get_images_options():
[cfg.StrOpt('image_name', [cfg.StrOpt('image_name',
help="Default " + name + " image name"), help="Default " + name + " image name"),
cfg.StrOpt('image_url', cfg.StrOpt('image_url',
help="Default " + name + " image URL"), help="Default " + name + " image URL. A local path "
cfg.StrOpt('image_file', "could be defined. Example: "
help="Default " + name + " image filename"), "file:///tmp/cirros.img"),
cfg.StrOpt('container_format', cfg.StrOpt('container_format',
help="Default " + name + " container format"), help="Default " + name + " container format"),
cfg.StrOpt('disk_format', cfg.StrOpt('disk_format',

View File

@ -59,7 +59,6 @@ class UbuntuImageFixture(glance.CustomizedGlanceImageFixture):
- iperf3 server listening on TCP port 5201 - iperf3 server listening on TCP port 5201
""" """
image_url = CONF.tobiko.ubuntu.image_url image_url = CONF.tobiko.ubuntu.image_url
image_file = CONF.tobiko.ubuntu.image_file
image_name = CONF.tobiko.ubuntu.image_name image_name = CONF.tobiko.ubuntu.image_name
disk_format = CONF.tobiko.ubuntu.disk_format or "qcow2" disk_format = CONF.tobiko.ubuntu.disk_format or "qcow2"
container_format = CONF.tobiko.ubuntu.container_format or "bare" container_format = CONF.tobiko.ubuntu.container_format or "bare"