)]}'
{"rally/plugins/openstack/wrappers/glance.py":[{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"b9f8435fe70f024be63859bbab95e835daeb16b0","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                # stream the image to a tempfile first and then upload"},{"line_number":173,"context_line":"                # it to Glance. this is less efficient, but I don\u0027t"},{"line_number":174,"context_line":"                # think it\u0027s possible to stream the file directly to"},{"line_number":175,"context_line":"                # glance."},{"line_number":176,"context_line":"                image_data \u003d tempfile.TemporaryFile()"},{"line_number":177,"context_line":"                response \u003d requests.get(image_location, stream\u003dTrue)"},{"line_number":178,"context_line":"                for chunk in response.iter_content(chunk_size\u003d1024):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa0719c6_8e28af9b","line":175,"updated":"2016-03-24 14:38:01.000000000","message":"Glance client supports streams. Requests library wraps it and sends by chunks.","commit_id":"7ef8c5ca0b5606fd3e2b1d4c4b90bb41e03de307"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"beb961d0f17afc5e094da3bf8928743d515b85d3","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                # stream the image to a tempfile first and then upload"},{"line_number":173,"context_line":"                # it to Glance. this is less efficient, but I don\u0027t"},{"line_number":174,"context_line":"                # think it\u0027s possible to stream the file directly to"},{"line_number":175,"context_line":"                # glance."},{"line_number":176,"context_line":"                image_data \u003d tempfile.TemporaryFile()"},{"line_number":177,"context_line":"                response \u003d requests.get(image_location, stream\u003dTrue)"},{"line_number":178,"context_line":"                for chunk in response.iter_content(chunk_size\u003d1024):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa0719c6_94fc40b9","line":175,"in_reply_to":"fa0719c6_8e28af9b","updated":"2016-03-24 14:55:04.000000000","message":"Got any information on how to actually do that? I tinkered quite a bit and couldn\u0027t figure it out.","commit_id":"7ef8c5ca0b5606fd3e2b1d4c4b90bb41e03de307"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"93b666449fd16bcf5411299dbda7ee95b489f93e","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                # stream the image to a tempfile first and then upload"},{"line_number":173,"context_line":"                # it to Glance. this is less efficient, but I don\u0027t"},{"line_number":174,"context_line":"                # think it\u0027s possible to stream the file directly to"},{"line_number":175,"context_line":"                # glance."},{"line_number":176,"context_line":"                image_data \u003d tempfile.TemporaryFile()"},{"line_number":177,"context_line":"                response \u003d requests.get(image_location, stream\u003dTrue)"},{"line_number":178,"context_line":"                for chunk in response.iter_content(chunk_size\u003d1024):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da0c15f0_a23a8d34","line":175,"in_reply_to":"fa0719c6_94fc40b9","updated":"2016-03-25 19:48:22.000000000","message":"I\u0027ve looked at this more, and glanceclient accepts one of three types: JSON data, string, or a file-like object: https://github.com/openstack/python-glanceclient/blob/master/glanceclient/common/http.py#L64-L73\n\nIt expects the file-like object to have a .read() method: https://github.com/openstack/python-glanceclient/blob/master/glanceclient/common/http.py#L51\n\nThe obvious solution (https://review.openstack.org/#/c/297808/2) doesn\u0027t work with larger images.","commit_id":"7ef8c5ca0b5606fd3e2b1d4c4b90bb41e03de307"}]}
