Switch image_data to be a file-like object instead of bare string in image creating and updating
Without this Glance loads all image into memory, then copies it one time, then writes it to temp file, and only after all this copies image to target repository.
This commit is contained in:
commit
2ea83f6de8
1
Authors
1
Authors
@ -19,3 +19,4 @@ Soren Hansen <soren.hansen@rackspace.com>
|
||||
Taku Fukushima <tfukushima@dcl.info.waseda.ac.jp>
|
||||
Thierry Carrez <thierry@openstack.org>
|
||||
Vishvananda Ishaya <vishvananda@gmail.com>
|
||||
Yuriy Taraday <yorik.sar@gmail.com>
|
||||
|
@ -509,7 +509,7 @@ class ImageDeserializer(wsgi.JSONRequestDeserializer):
|
||||
def _deserialize(self, request):
|
||||
result = {}
|
||||
result['image_meta'] = utils.get_image_meta_from_headers(request)
|
||||
data = request.body if self.has_body(request) else None
|
||||
data = request.body_file if self.has_body(request) else None
|
||||
result['image_data'] = data
|
||||
return result
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user