Skip to content

Commit

Permalink
Backport fix ups for Yoga
Browse files Browse the repository at this point in the history
  • Loading branch information
markgoddard committed Jul 2, 2024
1 parent 11d3b65 commit 543b1f3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion glance/async_/flows/plugins/image_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ def _execute(self, action, file_path, **kwargs):
'target': target_format}
self.dest_path = dest_path

source_format = action.image_disk_format
# Backport fixup due to lack of
# Ic51c5fd87caf04d38aeaf758ad2d0e2f28098e4d in Yoga:
#source_format = action.image_disk_format
source_format = action._image.disk_format
inspector_cls = format_inspector.get_inspector(source_format)
if not inspector_cls:
# We cannot convert from disk_format types that qemu-img doesn't
Expand Down
2 changes: 1 addition & 1 deletion glance/tests/unit/common/test_format_inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def _create_img(self, fmt, size, subformat=None, options=None,
suffix='.%s' % fmt)
self._created_files.append(fn)
subprocess.check_output(
'qemu-img create -f %s %s %i' % (fmt, fn, size),
'qemu-img create -f %s %s %s %i' % (fmt, opt, fn, size),
shell=True)
return fn

Expand Down
4 changes: 2 additions & 2 deletions glance/tests/unit/v2/test_tasks_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,8 @@ def test_create_with_wrong_import_form(self):
"non-local source of image data.")
else:
supported = ['http', ]
msg = ("The given uri is not valid. Please specify a "
"valid uri from the following list of supported uri "
msg = ("The given URI is not valid. Please specify a "
"valid URI from the following list of supported URI "
"%(supported)s") % {'supported': supported}
self.assertEqual(msg, final_task.message)

Expand Down

0 comments on commit 543b1f3

Please sign in to comment.