)]}'
{"ironic/common/images.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"0d1cf3e31bb651227ada60f460576feeff6b0cbd","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            image_service.download(image_href, image_file)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"def fetch_to_raw(context, image_href, path, image_service\u003dNone):"},{"line_number":75,"context_line":"    path_tmp \u003d \"%s.part\" % path"},{"line_number":76,"context_line":"    fetch(context, image_href, path_tmp, image_service)"},{"line_number":77,"context_line":"    image_to_raw(image_href, path, path_tmp)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_556c3bd0","line":74,"updated":"2014-08-21 14:07:33.000000000","message":"This method is not being used anywhere now, can\u0027t we just get rid of it?\n\nI also dislike that we have 2 variant functions, with almost the same name that lives in different modules. I would just get rid of this one if it\u0027s not going ot be used anywhere.","commit_id":"858935f5d9201829b1c0ebef006a09646ff30c0a"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"11309942589a852a85b4c0af290069d7d4865591","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    return image_service.show(image_href)[\u0027size\u0027]"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"def conversion_size(path):"},{"line_number":123,"context_line":"    data \u003d qemu_img_info(path)"},{"line_number":124,"context_line":"    if data.file_format \u003d\u003d \"raw\" or not CONF.force_raw_images:"},{"line_number":125,"context_line":"        return 0"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_dfd2395b","line":122,"updated":"2014-09-03 11:29:06.000000000","message":"nit: it would be really good to have a docstring here, something like you have in the commit message explaining what is the \"conversion size\".\n\nSomething along the line of: \n\n\"The size of image converted to raw format can be growing up to the virtual size of the image\"\n\nand \n\n\"If the image is already \"raw\" format the returned value is 0 because no conversion is needed in this case\"\n\nBecause otherwise I have to look at the code and try to figure out why when it\u0027s raw or if force_raw_images is False this is returning 0, etc... (And the comment by Ramakrishnan also shows that this will be a common doubt)","commit_id":"646543f4b0bf76424494ac43b56c48e49c8a0a12"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"efc96c6dcf9620b4043200ca39aef5719c9dbd30","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    return image_service.show(image_href)[\u0027size\u0027]"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"def conversion_size(path):"},{"line_number":123,"context_line":"    data \u003d qemu_img_info(path)"},{"line_number":124,"context_line":"    if data.file_format \u003d\u003d \"raw\" or not CONF.force_raw_images:"},{"line_number":125,"context_line":"        return 0"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_775ed177","line":122,"in_reply_to":"fa98f980_dfd2395b","updated":"2014-09-03 13:09:13.000000000","message":"Done","commit_id":"646543f4b0bf76424494ac43b56c48e49c8a0a12"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"9a8bcc4d1f9e42871b8c06106b5b4f51f2104558","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"def conversion_size(path):"},{"line_number":123,"context_line":"    data \u003d qemu_img_info(path)"},{"line_number":124,"context_line":"    if data.file_format \u003d\u003d \"raw\" or not CONF.force_raw_images:"},{"line_number":125,"context_line":"        return 0"},{"line_number":126,"context_line":"    return data.virtual_size"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_66a88e20","line":124,"updated":"2014-08-29 09:30:08.000000000","message":"The objective of this function is to return the uncompressed size of an image.  Why should it check CONF.force_raw_images ?","commit_id":"646543f4b0bf76424494ac43b56c48e49c8a0a12"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"4b8f855128f24f180831f6cac9cabe681fbcb8e6","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"def conversion_size(path):"},{"line_number":123,"context_line":"    data \u003d qemu_img_info(path)"},{"line_number":124,"context_line":"    if data.file_format \u003d\u003d \"raw\" or not CONF.force_raw_images:"},{"line_number":125,"context_line":"        return 0"},{"line_number":126,"context_line":"    return data.virtual_size"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa98f980_8c47df1c","line":124,"in_reply_to":"1abeadc6_66a88e20","updated":"2014-09-02 09:56:37.000000000","message":"IIRC because there\u0027ll be no conversion in this case","commit_id":"646543f4b0bf76424494ac43b56c48e49c8a0a12"}],"ironic/drivers/modules/image_cache.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d368971ce0bc30b2879c069deabde6261bb7b9bb","unresolved":false,"context_lines":[{"line_number":301,"context_line":"    \"\"\""},{"line_number":302,"context_line":"    free \u003d _free_disk_space_for(directory)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    if amount \u003e\u003d free:"},{"line_number":305,"context_line":"        # NOTE(dtantsur): filter caches, whose directory is on the same device"},{"line_number":306,"context_line":"        st_dev \u003d os.stat(directory).st_dev"},{"line_number":307,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_df8dca7d","line":304,"updated":"2014-08-21 13:14:47.000000000","message":"nit: I know it\u0027s a copy-paste, but it makes sense to me to invert if:\n\n if amount \u003c free:\n   return","commit_id":"858935f5d9201829b1c0ebef006a09646ff30c0a"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"000431879be9d28b15ccc1744684fbf9623318eb","unresolved":false,"context_lines":[{"line_number":301,"context_line":"    \"\"\""},{"line_number":302,"context_line":"    free \u003d _free_disk_space_for(directory)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    if amount \u003e\u003d free:"},{"line_number":305,"context_line":"        # NOTE(dtantsur): filter caches, whose directory is on the same device"},{"line_number":306,"context_line":"        st_dev \u003d os.stat(directory).st_dev"},{"line_number":307,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_fff9a180","line":304,"in_reply_to":"1abeadc6_df8dca7d","updated":"2014-08-21 15:25:26.000000000","message":"Done","commit_id":"858935f5d9201829b1c0ebef006a09646ff30c0a"}],"ironic/tests/drivers/test_image_cache.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"0d1cf3e31bb651227ada60f460576feeff6b0cbd","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                                           \u0027/foo/bar.part\u0027, None)"},{"line_number":484,"context_line":"        mock_clean.assert_called_once_with(\u0027/foo\u0027, 100)"},{"line_number":485,"context_line":"        mock_raw.assert_called_once_with(\u0027fake-uuid\u0027, \u0027/foo/bar\u0027,"},{"line_number":486,"context_line":"                                         \u0027/foo/bar.part\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_55f19bff","line":486,"updated":"2014-08-21 14:07:33.000000000","message":"if we agree in removing the images.fetch_to_raw() it would be good to also port the tests to this new function[1]\n\n[1] https://github.com/openstack/ironic/blob/master/ironic/tests/test_images.py#L96-L111","commit_id":"858935f5d9201829b1c0ebef006a09646ff30c0a"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"de119b939d7d5154ad2e2ce79eca5d1910c67c9a","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                                           \u0027/foo/bar.part\u0027, None)"},{"line_number":484,"context_line":"        mock_clean.assert_called_once_with(\u0027/foo\u0027, 100)"},{"line_number":485,"context_line":"        mock_raw.assert_called_once_with(\u0027fake-uuid\u0027, \u0027/foo/bar\u0027,"},{"line_number":486,"context_line":"                                         \u0027/foo/bar.part\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_bc81f7c4","line":486,"in_reply_to":"1abeadc6_55f19bff","updated":"2014-08-21 15:11:29.000000000","message":"Yes, agree, images.fetch_to_raw() should be removed. But images module contains another functions, which tested now via images.fetch_to_raw() in test_images. I think two patches needed 1) this with cache fix 2) remove images.fetch_to_raw() and full rewrite test_images with mock.  We need new tests for images.image_to_raw() etc.","commit_id":"858935f5d9201829b1c0ebef006a09646ff30c0a"}]}
