Skip to content

Commit 543b1f3

Browse files
committed
Backport fix ups for Yoga
1 parent 11d3b65 commit 543b1f3

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

glance/async_/flows/plugins/image_conversion.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ def _execute(self, action, file_path, **kwargs):
8989
'target': target_format}
9090
self.dest_path = dest_path
9191

92-
source_format = action.image_disk_format
92+
# Backport fixup due to lack of
93+
# Ic51c5fd87caf04d38aeaf758ad2d0e2f28098e4d in Yoga:
94+
#source_format = action.image_disk_format
95+
source_format = action._image.disk_format
9396
inspector_cls = format_inspector.get_inspector(source_format)
9497
if not inspector_cls:
9598
# We cannot convert from disk_format types that qemu-img doesn't

glance/tests/unit/common/test_format_inspector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def _create_img(self, fmt, size, subformat=None, options=None,
7676
suffix='.%s' % fmt)
7777
self._created_files.append(fn)
7878
subprocess.check_output(
79-
'qemu-img create -f %s %s %i' % (fmt, fn, size),
79+
'qemu-img create -f %s %s %s %i' % (fmt, opt, fn, size),
8080
shell=True)
8181
return fn
8282

glance/tests/unit/v2/test_tasks_resource.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,8 @@ def test_create_with_wrong_import_form(self):
415415
"non-local source of image data.")
416416
else:
417417
supported = ['http', ]
418-
msg = ("The given uri is not valid. Please specify a "
419-
"valid uri from the following list of supported uri "
418+
msg = ("The given URI is not valid. Please specify a "
419+
"valid URI from the following list of supported URI "
420420
"%(supported)s") % {'supported': supported}
421421
self.assertEqual(msg, final_task.message)
422422

0 commit comments

Comments
 (0)