)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"aa84cb2fd659e0204a939b0004d189a0c5c44142","unresolved":false,"context_lines":[{"line_number":12,"context_line":"instead of generating Forbidden exception."},{"line_number":13,"context_line":"Otherwise, the policies such as get_image_location is not useful."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"bp change-location-policy-v2"},{"line_number":16,"context_line":"APIImpact"},{"line_number":17,"context_line":"Change-Id: I5a6f587086e926a1f7e9b3f1dac9d7e10710d72a"},{"line_number":18,"context_line":"Closes-bug: #1502136"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9a8ffd7b_9f2b7f82","line":15,"updated":"2015-11-26 18:32:08.000000000","message":"Why is this change referencing a blueprint? It\u0027s a bug, right?","commit_id":"ccc9ab06d7b2b5270f483a4ffc42867ca54bd05a"}],"glance/api/v2/images.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"212229ed6d63241a41bebb614d5fb278d99b4e1e","unresolved":false,"context_lines":[{"line_number":722,"context_line":"        \"\"\"Format image attribute to dict that contains image info."},{"line_number":723,"context_line":""},{"line_number":724,"context_line":"        Format image info and prepare image info for output. If access to some"},{"line_number":725,"context_line":"        of images is forbidden then the method skips these attributes i.e. it"},{"line_number":726,"context_line":"        will not be included into output."},{"line_number":727,"context_line":""},{"line_number":728,"context_line":"        :param image: source image."}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_125a012b","line":725,"updated":"2015-11-23 10:27:57.000000000","message":"some of images \u003e\u003e some of image attributes?","commit_id":"ccc9ab06d7b2b5270f483a4ffc42867ca54bd05a"},{"author":{"_account_id":16658,"name":"Darja Shakhray","email":"damalyavkina@gmail.com","username":"dshakhray"},"change_message_id":"7478518b82b6c9080f346eec1e41e9896b08421a","unresolved":false,"context_lines":[{"line_number":753,"context_line":"        # the dict consists from attribute name and transformation function"},{"line_number":754,"context_line":"        # if transformation function if None then execute"},{"line_number":755,"context_line":"        # getattr(image, attribute_name)"},{"line_number":756,"context_line":"        attr_transformations \u003d {"},{"line_number":757,"context_line":"            \u0027name\u0027: None, \u0027disk_format\u0027: None, \u0027container_format\u0027: None,"},{"line_number":758,"context_line":"            \u0027visibility\u0027: None, \u0027size\u0027: None, \u0027virtual_size\u0027: None,"},{"line_number":759,"context_line":"            \u0027status\u0027: None, \u0027checksum\u0027: None, \u0027protected\u0027: None,"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa80f949_a94e156d","line":756,"updated":"2015-11-05 10:26:16.000000000","message":"LGTM, but maybe better to write in a column to make it easier to read?","commit_id":"ccc9ab06d7b2b5270f483a4ffc42867ca54bd05a"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"a2c70dbaab052dd21a00e4ec9e34f5a756ed4d5b","unresolved":false,"context_lines":[{"line_number":754,"context_line":"        # if transformation function if None then execute"},{"line_number":755,"context_line":"        # getattr(image, attribute_name)"},{"line_number":756,"context_line":"        attr_transformations \u003d {"},{"line_number":757,"context_line":"            \u0027name\u0027: None, \u0027disk_format\u0027: None, \u0027container_format\u0027: None,"},{"line_number":758,"context_line":"            \u0027visibility\u0027: None, \u0027size\u0027: None, \u0027virtual_size\u0027: None,"},{"line_number":759,"context_line":"            \u0027status\u0027: None, \u0027checksum\u0027: None, \u0027protected\u0027: None,"},{"line_number":760,"context_line":"            \u0027min_ram\u0027: None, \u0027min_disk\u0027: None, \u0027owner\u0027: None,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_7f5660cf","line":757,"updated":"2015-11-26 17:58:32.000000000","message":"I have to confess I find this a bit hard to read (sorry).\n\nThe original code first added all the untransformed attributes (name, disk_format etc) to image_view.\n\nThen it added the transformed ones, specifying the transformation each time. It may be a matter of taste but I find that a bit easier to read.\n\nIt would also make it a bit easier to understand which parts are specific to this change.\n\nSo what about we go back a bit closer to the original, add the two new transformation functions and do:\n\nif CONF.show_multiple_locations:\n image_view[\u0027locations\u0027] \u003d transform_location_attr()\n\nif CONF.show_image_direct_url:\n image_view[\u0027direct_url\u0027] \u003d transform_direct_url()\n\nthen we don\u0027t need the except/pass.","commit_id":"ccc9ab06d7b2b5270f483a4ffc42867ca54bd05a"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"19ca777bb6f2026cca3216d7e4bc997c208eb6ac","unresolved":false,"context_lines":[{"line_number":748,"context_line":"                    # image.locations is None to indicate it\u0027s allowed to show"},{"line_number":749,"context_line":"                    # locations but it\u0027s just non-existent."},{"line_number":750,"context_line":"                    image_view[\u0027locations\u0027] \u003d []"},{"line_number":751,"context_line":"                    LOG.debug(\"There is not available location \""},{"line_number":752,"context_line":"                              \"for image %s\", image.image_id)"},{"line_number":753,"context_line":""},{"line_number":754,"context_line":"            if CONF.show_image_direct_url:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a68dd71_706f5d2b","line":751,"updated":"2016-01-23 08:17:12.000000000","message":"Nit: or the policy forbids fetching the locations.","commit_id":"f07f36fa3789a4997b84639530e5d6ab1c603983"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"19ca777bb6f2026cca3216d7e4bc997c208eb6ac","unresolved":false,"context_lines":[{"line_number":759,"context_line":"                    image_view[\u0027direct_url\u0027] \u003d l[\u0027url\u0027]"},{"line_number":760,"context_line":"                else:"},{"line_number":761,"context_line":"                    LOG.debug(\"There is not available location \""},{"line_number":762,"context_line":"                              \"for image %s\", image.image_id)"},{"line_number":763,"context_line":""},{"line_number":764,"context_line":"            image_view[\u0027tags\u0027] \u003d list(image.tags)"},{"line_number":765,"context_line":"            image_view[\u0027self\u0027] \u003d self._get_image_href(image)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a68dd71_504499b5","line":762,"range":{"start_line":762,"start_character":35,"end_line":762,"end_character":40},"updated":"2016-01-23 08:17:12.000000000","message":"Nit: or the policy forbids fetching the locations.","commit_id":"f07f36fa3789a4997b84639530e5d6ab1c603983"}]}
