Merge "Image uploads should always happen in the background"

This commit is contained in:
Jenkins 2014-06-10 10:14:40 +00:00 committed by Gerrit Code Review
commit 9da62c463d

View File

@ -90,14 +90,17 @@ def image_update(request, image_id, **kwargs):
def image_create(request, **kwargs):
copy_from = None
if kwargs.get('copy_from'):
copy_from = kwargs.pop('copy_from')
copy_from = kwargs.pop('copy_from', None)
data = kwargs.pop('data', None)
image = glanceclient(request).images.create(**kwargs)
if copy_from:
if data:
thread.start_new_thread(image_update,
(request, image.id),
{'data': data,
'purge_props': False})
elif copy_from:
thread.start_new_thread(image_update,
(request, image.id),
{'copy_from': copy_from,