mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-11-21 14:48:41 +00:00
The module documents and accepts import_method and uri, but nothing ever acts on them for a URL-based import. Its only import_image() call is hardcoded to glance-direct, so asking Glance to fetch an image itself is not possible. Worse, the two options are listed in attr_params, so they are handed to conn.create_image() as unrecognised keyword arguments and end up stored on the image as arbitrary properties. With no filename the create call then reaches the direct upload endpoint with no data, which Glance rejects: HttpException: 415: Client Error for url: .../v2/images/<id>/file, Unsupported Media Type Image disk_format qcow2 does not match stream data raw Import a queued image from its uri instead, defaulting the method to web-download, and drop the three behavioural options from attr_params so they stop becoming image properties. When creating the image, do not let create_image() wait for it to become active, since it stays queued until the import is started. Remove glance-download from the import_method choices. The module never used it. The glance-download method takes a remote region and a remote image ID, and the module has no options for these yet. Closes-Bug: #2167999 Change-Id: I11fa064567c36012cd51c78e4bca2c46152990d3 Signed-off-by: Moritz Tanner <moritz.tanner@linbit.com>