)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"503ea5d1ae841fa9b8d18299f49282d27a9178a3","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    show_multiple_locations \u003d True"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"then the location and the location information is returned with the"},{"line_number":28,"context_line":"image information in the field \u0027location_data\u0027.  location_data is"},{"line_number":29,"context_line":"a list with the following format:"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"{\u0027url\u0027: \u0027\u003curl\u003e\u0027, \u0027metadata\u0027: \u003ca storage specific dict\u003e}"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAPn%2F%2Fiyo%3D","line":28,"updated":"2013-06-28 05:40:59.000000000","message":"\u0027location_data\u0027 \u003d\u003e \u0027locations\u0027","commit_id":"89f7f9cb822ae34a1217a40215254b2750c17c6e"},{"author":{"_account_id":1390,"name":"Paul Bourke","email":"pauldbourke@proton.me","username":"pauldbourke"},"change_message_id":"c0124aedaaa3196d3dc73d22429a9d9fe43addc2","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"If the API service is configured with the follow options:"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    show_multiple_locations \u003d True"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"then the location and the location information is returned with the"},{"line_number":28,"context_line":"image information in the field \u0027locations\u0027.  locations is"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"AAAAP3%2F%2F9f8%3D","line":25,"updated":"2013-07-08 15:37:37.000000000","message":"I can\u0027t seem to find any checks for this flag in the v1 implementation - so I\u0027m concerned the image locations will be returned by default now. (From a quick test in devstack this seems to be the case).\n\nAlso, does this need a \"docimpact\" flag?","commit_id":"e5c2136e3f05d0cdea30c73f33706b153551684c"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"587864c8b92bd2e1a8b70898eb8bbbfe3ef488f8","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"If the API service is configured with the follow options:"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    show_multiple_locations \u003d True"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"then the location and the location information is returned with the"},{"line_number":28,"context_line":"image information in the field \u0027locations\u0027.  locations is"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"AAAAP3%2F%2F8ok%3D","line":25,"in_reply_to":"AAAAP3%2F%2F9f8%3D","updated":"2013-07-08 22:45:33.000000000","message":"Locations should only be returned in v2.  This change should not effect v1 at all, if it does it is a bug.  I will add tests to verify this behavior. Which commands in devstack are returning this data?","commit_id":"e5c2136e3f05d0cdea30c73f33706b153551684c"}],"glance/api/middleware/cache.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"d0303cb368645ee679a792b58675d2e0e923d688","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        # Don\u0027t display location"},{"line_number":151,"context_line":"        if \u0027location\u0027 in image_meta:"},{"line_number":152,"context_line":"            del image_meta[\u0027location\u0027]"},{"line_number":153,"context_line":"        image_meta.pop(\u0027location_data\u0027, None)"},{"line_number":154,"context_line":"        self._verify_metadata(image_meta)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        response \u003d webob.Response(request\u003drequest)"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAP3%2F%2Fz6w%3D","line":153,"updated":"2013-07-11 03:21:51.000000000","message":"Really a good cache, Paul Bourke.","commit_id":"b1af05d75318e42fe9aa169aeb6ce6af688846fe"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"7de7de786401dd9fd59e541d3be2d9e468935808","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        # Don\u0027t display location"},{"line_number":151,"context_line":"        if \u0027location\u0027 in image_meta:"},{"line_number":152,"context_line":"            del image_meta[\u0027location\u0027]"},{"line_number":153,"context_line":"        image_meta.pop(\u0027location_data\u0027, None)"},{"line_number":154,"context_line":"        self._verify_metadata(image_meta)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        response \u003d webob.Response(request\u003drequest)"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAP3%2F%2Fzqk%3D","line":153,"in_reply_to":"AAAAP3%2F%2Fz6w%3D","updated":"2013-07-11 05:37:30.000000000","message":"Agreed!","commit_id":"b1af05d75318e42fe9aa169aeb6ce6af688846fe"}],"glance/api/v1/images.py":[{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"b82f23c0da6ddb26777d70958b5687cc3080e7a5","unresolved":false,"context_lines":[{"line_number":446,"context_line":""},{"line_number":447,"context_line":"        self.notifier.info(\"image.prepare\", redact_loc(image_meta))"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"        image_meta, location, loc_meta \u003d upload_utils.upload_data_to_store("},{"line_number":450,"context_line":"            req, image_meta, image_data, store, self.notifier)"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"        self.notifier.info(\u0027image.upload\u0027, redact_loc(image_meta))"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2Fghw%3D","line":449,"updated":"2013-06-28 20:56:12.000000000","message":"is there a reason why we return location and location metadata separately..\ncan we just return both in the location and then at the api level split it up? it may reduce the number of files affected by the change?\nbut i may be missing something","commit_id":"2c50fe32eab949f9969d5279d3063fff8bb77121"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"e063ab3bc87c50d04036fca72f6a64b53d6712ef","unresolved":false,"context_lines":[{"line_number":446,"context_line":""},{"line_number":447,"context_line":"        self.notifier.info(\"image.prepare\", redact_loc(image_meta))"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"        image_meta, location, loc_meta \u003d upload_utils.upload_data_to_store("},{"line_number":450,"context_line":"            req, image_meta, image_data, store, self.notifier)"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"        self.notifier.info(\u0027image.upload\u0027, redact_loc(image_meta))"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2FgDg%3D","line":449,"in_reply_to":"AAAAPn%2F%2Fghw%3D","updated":"2013-06-29 03:05:40.000000000","message":"I did do that in an earlier attempt but it made things a bit less explicit to me.  There is still a notion of locations which are just a url list in various places so separating them helped me keep things a bit more clear in my head.","commit_id":"2c50fe32eab949f9969d5279d3063fff8bb77121"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"d2f7c45eaf05d38312eaecc0267acc608f776224","unresolved":false,"context_lines":[{"line_number":460,"context_line":""},{"line_number":461,"context_line":"        :param req: The WSGI/Webob Request object"},{"line_number":462,"context_line":"        :param image_id: Opaque image identifier"},{"line_number":463,"context_line":"        :param location: Location of where Glance stored this image"},{"line_number":464,"context_line":"        \"\"\""},{"line_number":465,"context_line":"        image_meta \u003d {}"},{"line_number":466,"context_line":"        image_meta[\u0027location\u0027] \u003d location"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2FiD4%3D","line":463,"updated":"2013-06-28 13:08:05.000000000","message":"docstring for location_metadata","commit_id":"2c50fe32eab949f9969d5279d3063fff8bb77121"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"68efc8945156f2dd663a2c53484f41f83bfa9794","unresolved":false,"context_lines":[{"line_number":460,"context_line":""},{"line_number":461,"context_line":"        :param req: The WSGI/Webob Request object"},{"line_number":462,"context_line":"        :param image_id: Opaque image identifier"},{"line_number":463,"context_line":"        :param location: Location of where Glance stored this image"},{"line_number":464,"context_line":"        \"\"\""},{"line_number":465,"context_line":"        image_meta \u003d {}"},{"line_number":466,"context_line":"        image_meta[\u0027location\u0027] \u003d location"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2Fg6s%3D","line":463,"in_reply_to":"AAAAPn%2F%2FiD4%3D","updated":"2013-06-28 18:47:15.000000000","message":"Done","commit_id":"2c50fe32eab949f9969d5279d3063fff8bb77121"},{"author":{"_account_id":1390,"name":"Paul Bourke","email":"pauldbourke@proton.me","username":"pauldbourke"},"change_message_id":"c0124aedaaa3196d3dc73d22429a9d9fe43addc2","unresolved":false,"context_lines":[{"line_number":211,"context_line":"            # information to the API end user..."},{"line_number":212,"context_line":"            for image in images:"},{"line_number":213,"context_line":"                del image[\u0027location\u0027]"},{"line_number":214,"context_line":"                del image[\u0027location_data\u0027]"},{"line_number":215,"context_line":"        except exception.Invalid as e:"},{"line_number":216,"context_line":"            raise HTTPBadRequest(explanation\u003d\"%s\" % e)"},{"line_number":217,"context_line":"        return dict(images\u003dimages)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAP3%2F%2F9%2B0%3D","line":214,"updated":"2013-07-08 15:37:37.000000000","message":"We may also need this delete in redact_loc() ? (line 102)\nPerhaps these kind of deletes could be replaced with a call to redact_loc","commit_id":"e5c2136e3f05d0cdea30c73f33706b153551684c"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"587864c8b92bd2e1a8b70898eb8bbbfe3ef488f8","unresolved":false,"context_lines":[{"line_number":211,"context_line":"            # information to the API end user..."},{"line_number":212,"context_line":"            for image in images:"},{"line_number":213,"context_line":"                del image[\u0027location\u0027]"},{"line_number":214,"context_line":"                del image[\u0027location_data\u0027]"},{"line_number":215,"context_line":"        except exception.Invalid as e:"},{"line_number":216,"context_line":"            raise HTTPBadRequest(explanation\u003d\"%s\" % e)"},{"line_number":217,"context_line":"        return dict(images\u003dimages)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAP3%2F%2F7%2Fg%3D","line":214,"in_reply_to":"AAAAP3%2F%2F9%2B0%3D","updated":"2013-07-08 22:45:33.000000000","message":"That sounds right to me.  Will do.","commit_id":"e5c2136e3f05d0cdea30c73f33706b153551684c"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"d0303cb368645ee679a792b58675d2e0e923d688","unresolved":false,"context_lines":[{"line_number":713,"context_line":"        else:"},{"line_number":714,"context_line":"            self.notifier.info(\u0027image.update\u0027, redact_loc(image_meta))"},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"        # Prevent client from learning the location, as it"},{"line_number":717,"context_line":"        # could contain security credentials"},{"line_number":718,"context_line":"        image_meta.pop(\u0027location\u0027, None)"},{"line_number":719,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAP3%2F%2Fz6c%3D","line":716,"updated":"2013-07-11 03:21:51.000000000","message":"image_meta \u003d redact_loc(image_meta)","commit_id":"b1af05d75318e42fe9aa169aeb6ce6af688846fe"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"7de7de786401dd9fd59e541d3be2d9e468935808","unresolved":false,"context_lines":[{"line_number":713,"context_line":"        else:"},{"line_number":714,"context_line":"            self.notifier.info(\u0027image.update\u0027, redact_loc(image_meta))"},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"        # Prevent client from learning the location, as it"},{"line_number":717,"context_line":"        # could contain security credentials"},{"line_number":718,"context_line":"        image_meta.pop(\u0027location\u0027, None)"},{"line_number":719,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAP3%2F%2FzqI%3D","line":716,"in_reply_to":"AAAAP3%2F%2Fz6c%3D","updated":"2013-07-11 05:37:30.000000000","message":"yes!  thank you!","commit_id":"b1af05d75318e42fe9aa169aeb6ce6af688846fe"}],"glance/api/v2/images.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"738200d85d2ba1a52e5a2153e251d2934adfd523","unresolved":false,"context_lines":[{"line_number":434,"context_line":"        if image.locations:"},{"line_number":435,"context_line":"            if CONF.show_multiple_locations:"},{"line_number":436,"context_line":"                image_view[\u0027locations\u0027] \u003d image.locations"},{"line_number":437,"context_line":"            elif image.locations and CONF.show_image_direct_url:"},{"line_number":438,"context_line":"                image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]"},{"line_number":439,"context_line":"        image_view[\u0027tags\u0027] \u003d list(image.tags)"},{"line_number":440,"context_line":"        image_view[\u0027self\u0027] \u003d self._get_image_href(image)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FlY0%3D","line":437,"updated":"2013-06-27 10:18:03.000000000","message":"elif CONF.show_image_direct_url:","commit_id":"a2b293c5fb0ca22c1a0083cfe53176286cf93c5c"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"6cfc2e192d3fac73b63ccfa82798dfb3b0e75e25","unresolved":false,"context_lines":[{"line_number":434,"context_line":"        if image.locations:"},{"line_number":435,"context_line":"            if CONF.show_multiple_locations:"},{"line_number":436,"context_line":"                image_view[\u0027locations\u0027] \u003d image.locations"},{"line_number":437,"context_line":"            elif image.locations and CONF.show_image_direct_url:"},{"line_number":438,"context_line":"                image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]"},{"line_number":439,"context_line":"        image_view[\u0027tags\u0027] \u003d list(image.tags)"},{"line_number":440,"context_line":"        image_view[\u0027self\u0027] \u003d self._get_image_href(image)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FkNU%3D","line":437,"in_reply_to":"AAAAPn%2F%2FlY0%3D","updated":"2013-06-27 17:45:30.000000000","message":"Done","commit_id":"a2b293c5fb0ca22c1a0083cfe53176286cf93c5c"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"961586897a3dc3b72395147cd05842b1ac775d47","unresolved":false,"context_lines":[{"line_number":435,"context_line":"            if CONF.show_multiple_locations:"},{"line_number":436,"context_line":"                image_view[\u0027locations\u0027] \u003d image.locations"},{"line_number":437,"context_line":"            elif CONF.show_image_direct_url:"},{"line_number":438,"context_line":"                image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]"},{"line_number":439,"context_line":"        image_view[\u0027tags\u0027] \u003d list(image.tags)"},{"line_number":440,"context_line":"        image_view[\u0027self\u0027] \u003d self._get_image_href(image)"},{"line_number":441,"context_line":"        image_view[\u0027file\u0027] \u003d self._get_image_href(image, \u0027file\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2FiT8%3D","line":438,"updated":"2013-06-28 09:58:35.000000000","message":"I remember markwash commenters here: for backwards compatibility, should we keep direct_url and multiple_locations independent? Something like\n  if CONF.show_multiple_locations:\n      image_view[\u0027locations\u0027] \u003d image.locations\n  if CONF.show_image_direct_url:\n      image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]","commit_id":"2c50fe32eab949f9969d5279d3063fff8bb77121"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"b82f23c0da6ddb26777d70958b5687cc3080e7a5","unresolved":false,"context_lines":[{"line_number":435,"context_line":"            if CONF.show_multiple_locations:"},{"line_number":436,"context_line":"                image_view[\u0027locations\u0027] \u003d image.locations"},{"line_number":437,"context_line":"            elif CONF.show_image_direct_url:"},{"line_number":438,"context_line":"                image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]"},{"line_number":439,"context_line":"        image_view[\u0027tags\u0027] \u003d list(image.tags)"},{"line_number":440,"context_line":"        image_view[\u0027self\u0027] \u003d self._get_image_href(image)"},{"line_number":441,"context_line":"        image_view[\u0027file\u0027] \u003d self._get_image_href(image, \u0027file\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2Fgrw%3D","line":438,"in_reply_to":"AAAAPn%2F%2Fg6g%3D","updated":"2013-06-28 20:56:12.000000000","message":"is there a mechanism to indicate or ensure that [0] relates to the direct url?","commit_id":"2c50fe32eab949f9969d5279d3063fff8bb77121"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"e063ab3bc87c50d04036fca72f6a64b53d6712ef","unresolved":false,"context_lines":[{"line_number":435,"context_line":"            if CONF.show_multiple_locations:"},{"line_number":436,"context_line":"                image_view[\u0027locations\u0027] \u003d image.locations"},{"line_number":437,"context_line":"            elif CONF.show_image_direct_url:"},{"line_number":438,"context_line":"                image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]"},{"line_number":439,"context_line":"        image_view[\u0027tags\u0027] \u003d list(image.tags)"},{"line_number":440,"context_line":"        image_view[\u0027self\u0027] \u003d self._get_image_href(image)"},{"line_number":441,"context_line":"        image_view[\u0027file\u0027] \u003d self._get_image_href(image, \u0027file\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2FgDU%3D","line":438,"in_reply_to":"AAAAPn%2F%2Fgrw%3D","updated":"2013-06-29 03:05:40.000000000","message":"if you look at _normalize_image_location_for_db in glance/registry/api/v1/images.py i do preserve the original order when adding to the DB.  However after that we may be at the whim of the DB.  This patch does not allow for multiple locations to be added (it is really more about the metadata associated with it) so at this point it is not a problem (there can only be 1).  I would like to keep that change out of this patch as it is already complicated enough.  However we should be sure to address that before the changes that actually allow for more than 1 location to be added.","commit_id":"2c50fe32eab949f9969d5279d3063fff8bb77121"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"68efc8945156f2dd663a2c53484f41f83bfa9794","unresolved":false,"context_lines":[{"line_number":435,"context_line":"            if CONF.show_multiple_locations:"},{"line_number":436,"context_line":"                image_view[\u0027locations\u0027] \u003d image.locations"},{"line_number":437,"context_line":"            elif CONF.show_image_direct_url:"},{"line_number":438,"context_line":"                image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]"},{"line_number":439,"context_line":"        image_view[\u0027tags\u0027] \u003d list(image.tags)"},{"line_number":440,"context_line":"        image_view[\u0027self\u0027] \u003d self._get_image_href(image)"},{"line_number":441,"context_line":"        image_view[\u0027file\u0027] \u003d self._get_image_href(image, \u0027file\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2Fg6g%3D","line":438,"in_reply_to":"AAAAPn%2F%2FhY0%3D","updated":"2013-06-28 18:47:15.000000000","message":"I have no intention of getting rid of direct_url.  I will make both work as Zhi mentioned","commit_id":"2c50fe32eab949f9969d5279d3063fff8bb77121"},{"author":{"_account_id":1107,"name":"Josh Durgin","email":"jdurgin@redhat.com","username":"jdurgin"},"change_message_id":"c2117e71c064f90e23429aa07090e4f54972dcdd","unresolved":false,"context_lines":[{"line_number":435,"context_line":"            if CONF.show_multiple_locations:"},{"line_number":436,"context_line":"                image_view[\u0027locations\u0027] \u003d image.locations"},{"line_number":437,"context_line":"            elif CONF.show_image_direct_url:"},{"line_number":438,"context_line":"                image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]"},{"line_number":439,"context_line":"        image_view[\u0027tags\u0027] \u003d list(image.tags)"},{"line_number":440,"context_line":"        image_view[\u0027self\u0027] \u003d self._get_image_href(image)"},{"line_number":441,"context_line":"        image_view[\u0027file\u0027] \u003d self._get_image_href(image, \u0027file\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2FhY0%3D","line":438,"in_reply_to":"AAAAPn%2F%2FiDE%3D","updated":"2013-06-28 15:58:37.000000000","message":"Cinder and Nova can both use the direct_url, so this patch should keep backwards compatibility with the current behavior IMO. Also both will need to be updated to use multiple locations once the client supports it.","commit_id":"2c50fe32eab949f9969d5279d3063fff8bb77121"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"d2f7c45eaf05d38312eaecc0267acc608f776224","unresolved":false,"context_lines":[{"line_number":435,"context_line":"            if CONF.show_multiple_locations:"},{"line_number":436,"context_line":"                image_view[\u0027locations\u0027] \u003d image.locations"},{"line_number":437,"context_line":"            elif CONF.show_image_direct_url:"},{"line_number":438,"context_line":"                image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]"},{"line_number":439,"context_line":"        image_view[\u0027tags\u0027] \u003d list(image.tags)"},{"line_number":440,"context_line":"        image_view[\u0027self\u0027] \u003d self._get_image_href(image)"},{"line_number":441,"context_line":"        image_view[\u0027file\u0027] \u003d self._get_image_href(image, \u0027file\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2FiDE%3D","line":438,"in_reply_to":"AAAAPn%2F%2FiT8%3D","updated":"2013-06-28 13:08:05.000000000","message":"AFAIK, Nobody is using v2 yet since the client is not ready. That being said, I think having both is a contradiction. Why would, in the case of having multiple locations, the location at index 0 be the direct one and not the one at index 1 ?","commit_id":"2c50fe32eab949f9969d5279d3063fff8bb77121"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"66c0b7170fe6bf184fc647076eb9b237cb92cece","unresolved":false,"context_lines":[{"line_number":576,"context_line":"                \u0027type\u0027: \u0027string\u0027,"},{"line_number":577,"context_line":"                \u0027maxLength\u0027: 255,"},{"line_number":578,"context_line":"            },"},{"line_number":579,"context_line":"            \u0027metadata\u0027: {"},{"line_number":580,"context_line":"                \u0027type\u0027: \u0027string\u0027,"},{"line_number":581,"context_line":"                \u0027maxLength\u0027: 255,"},{"line_number":582,"context_line":"            },"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FRIc%3D","line":579,"updated":"2013-07-05 16:27:45.000000000","message":"This schema looks wrong--I think it should be type \u0027object\u0027, and there should be information about what kind of attributes the object must have.\n\nOr maybe we should just say that \u0027items\u0027 has type object, and is guaranteed to have \u0027url\u0027 of type string, and may have \u0027additionalProperties\u0027 of type \u0027string\u0027.","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"f4b4d4fd1d77ce0ae0c185db8c1309e9f9aa1735","unresolved":false,"context_lines":[{"line_number":576,"context_line":"                \u0027type\u0027: \u0027string\u0027,"},{"line_number":577,"context_line":"                \u0027maxLength\u0027: 255,"},{"line_number":578,"context_line":"            },"},{"line_number":579,"context_line":"            \u0027metadata\u0027: {"},{"line_number":580,"context_line":"                \u0027type\u0027: \u0027string\u0027,"},{"line_number":581,"context_line":"                \u0027maxLength\u0027: 255,"},{"line_number":582,"context_line":"            },"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FQ5o%3D","line":579,"in_reply_to":"AAAAPn%2F%2FRIc%3D","updated":"2013-07-05 17:52:35.000000000","message":"Lets talk about this on IRC soon.","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":1390,"name":"Paul Bourke","email":"pauldbourke@proton.me","username":"pauldbourke"},"change_message_id":"c0124aedaaa3196d3dc73d22429a9d9fe43addc2","unresolved":false,"context_lines":[{"line_number":577,"context_line":"                \u0027maxLength\u0027: 255,"},{"line_number":578,"context_line":"            },"},{"line_number":579,"context_line":"            \u0027metadata\u0027: {"},{"line_number":580,"context_line":"                \u0027type\u0027: \u0027string\u0027,"},{"line_number":581,"context_line":"                \u0027maxLength\u0027: 255,"},{"line_number":582,"context_line":"            },"},{"line_number":583,"context_line":"        },"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAP3%2F%2F9ac%3D","line":580,"updated":"2013-07-08 15:37:37.000000000","message":"Should metadata be a list?","commit_id":"e5c2136e3f05d0cdea30c73f33706b153551684c"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"587864c8b92bd2e1a8b70898eb8bbbfe3ef488f8","unresolved":false,"context_lines":[{"line_number":577,"context_line":"                \u0027maxLength\u0027: 255,"},{"line_number":578,"context_line":"            },"},{"line_number":579,"context_line":"            \u0027metadata\u0027: {"},{"line_number":580,"context_line":"                \u0027type\u0027: \u0027string\u0027,"},{"line_number":581,"context_line":"                \u0027maxLength\u0027: 255,"},{"line_number":582,"context_line":"            },"},{"line_number":583,"context_line":"        },"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAP3%2F%2F79g%3D","line":580,"in_reply_to":"AAAAP3%2F%2F9ac%3D","updated":"2013-07-08 22:45:33.000000000","message":"It should be a dictionary that contains dicts lists or unicode strings.  All leaf entries should be unicode strings.   But either way this part is not correct.","commit_id":"e5c2136e3f05d0cdea30c73f33706b153551684c"}],"glance/common/wsgi.py":[{"author":{"_account_id":1390,"name":"Paul Bourke","email":"pauldbourke@proton.me","username":"pauldbourke"},"change_message_id":"c0124aedaaa3196d3dc73d22429a9d9fe43addc2","unresolved":false,"context_lines":[{"line_number":610,"context_line":"            return method(*args, **kwargs)"},{"line_number":611,"context_line":"        except Exception as e:"},{"line_number":612,"context_line":"            LOG \u003d logging.getLogger(__name__)"},{"line_number":613,"context_line":"            LOG.exception(\"TOP LEVEL REMOVE THIS\")"},{"line_number":614,"context_line":"            raise"},{"line_number":615,"context_line":""},{"line_number":616,"context_line":"    def get_action_args(self, request_environment):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAP3%2F%2F9vw%3D","line":613,"updated":"2013-07-08 15:37:37.000000000","message":"I don\u0027t understand this exception message?","commit_id":"e5c2136e3f05d0cdea30c73f33706b153551684c"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"587864c8b92bd2e1a8b70898eb8bbbfe3ef488f8","unresolved":false,"context_lines":[{"line_number":610,"context_line":"            return method(*args, **kwargs)"},{"line_number":611,"context_line":"        except Exception as e:"},{"line_number":612,"context_line":"            LOG \u003d logging.getLogger(__name__)"},{"line_number":613,"context_line":"            LOG.exception(\"TOP LEVEL REMOVE THIS\")"},{"line_number":614,"context_line":"            raise"},{"line_number":615,"context_line":""},{"line_number":616,"context_line":"    def get_action_args(self, request_environment):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAP3%2F%2F8nQ%3D","line":613,"in_reply_to":"AAAAP3%2F%2F9vw%3D","updated":"2013-07-08 22:45:33.000000000","message":"yikes, that is cruft.","commit_id":"e5c2136e3f05d0cdea30c73f33706b153551684c"}],"glance/db/__init__.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"738200d85d2ba1a52e5a2153e251d2934adfd523","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                                      \u0027disk_format\u0027, \u0027container_format\u0027,"},{"line_number":44,"context_line":"                                      \u0027min_disk\u0027, \u0027min_ram\u0027, \u0027is_public\u0027,"},{"line_number":45,"context_line":"                                      \u0027locations\u0027, \u0027checksum\u0027, \u0027owner\u0027,"},{"line_number":46,"context_line":"                                      \u0027protected\u0027, \u0027location_data\u0027])"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"class ImageRepo(object):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FlZ0%3D","line":46,"updated":"2013-06-27 10:18:03.000000000","message":"Why need add \u0027location_data\u0027 here? In this PS, image object have not this field yet.","commit_id":"a2b293c5fb0ca22c1a0083cfe53176286cf93c5c"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"6cfc2e192d3fac73b63ccfa82798dfb3b0e75e25","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                                      \u0027disk_format\u0027, \u0027container_format\u0027,"},{"line_number":44,"context_line":"                                      \u0027min_disk\u0027, \u0027min_ram\u0027, \u0027is_public\u0027,"},{"line_number":45,"context_line":"                                      \u0027locations\u0027, \u0027checksum\u0027, \u0027owner\u0027,"},{"line_number":46,"context_line":"                                      \u0027protected\u0027, \u0027location_data\u0027])"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"class ImageRepo(object):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FkMA%3D","line":46,"in_reply_to":"AAAAPn%2F%2FlZ0%3D","updated":"2013-06-27 17:45:30.000000000","message":"Done","commit_id":"a2b293c5fb0ca22c1a0083cfe53176286cf93c5c"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"503ea5d1ae841fa9b8d18299f49282d27a9178a3","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                ld.append(ent)"},{"line_number":124,"context_line":"            #ld \u003d [{\u0027url\u0027: crypt.urlsafe_encrypt(key, l[\u0027url\u0027]),"},{"line_number":125,"context_line":"            #       \u0027metadata\u0027: l[\u0027metatdata\u0027]}"},{"line_number":126,"context_line":"            #      for l in location_data]"},{"line_number":127,"context_line":"            location_data \u003d ld"},{"line_number":128,"context_line":"        return {"},{"line_number":129,"context_line":"            \u0027id\u0027: image.image_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2Fiyg%3D","line":126,"updated":"2013-06-28 05:40:59.000000000","message":"Two ways 120-123 VS. 124-126 are all good, so can you choice one and remove one?","commit_id":"89f7f9cb822ae34a1217a40215254b2750c17c6e"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"d2f7c45eaf05d38312eaecc0267acc608f776224","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            for l in location_data:"},{"line_number":120,"context_line":"                url \u003d crypt.urlsafe_encrypt(key, l[\u0027url\u0027])"},{"line_number":121,"context_line":"                metadata \u003d l[\u0027metadata\u0027]"},{"line_number":122,"context_line":"                ent \u003d {\u0027url\u0027: url, \u0027metadata\u0027: metadata}"},{"line_number":123,"context_line":"                ld.append(ent)"},{"line_number":124,"context_line":"            location_data \u003d ld"},{"line_number":125,"context_line":"        return {"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2FiCQ%3D","line":122,"updated":"2013-06-28 13:08:05.000000000","message":"should the metadata be encrypted as well?","commit_id":"2c50fe32eab949f9969d5279d3063fff8bb77121"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"b82f23c0da6ddb26777d70958b5687cc3080e7a5","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            for l in location_data:"},{"line_number":120,"context_line":"                url \u003d crypt.urlsafe_encrypt(key, l[\u0027url\u0027])"},{"line_number":121,"context_line":"                metadata \u003d l[\u0027metadata\u0027]"},{"line_number":122,"context_line":"                ent \u003d {\u0027url\u0027: url, \u0027metadata\u0027: metadata}"},{"line_number":123,"context_line":"                ld.append(ent)"},{"line_number":124,"context_line":"            location_data \u003d ld"},{"line_number":125,"context_line":"        return {"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2FgrY%3D","line":122,"in_reply_to":"AAAAPn%2F%2Fg54%3D","updated":"2013-06-28 20:56:12.000000000","message":"I agree with John.","commit_id":"2c50fe32eab949f9969d5279d3063fff8bb77121"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"68efc8945156f2dd663a2c53484f41f83bfa9794","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            for l in location_data:"},{"line_number":120,"context_line":"                url \u003d crypt.urlsafe_encrypt(key, l[\u0027url\u0027])"},{"line_number":121,"context_line":"                metadata \u003d l[\u0027metadata\u0027]"},{"line_number":122,"context_line":"                ent \u003d {\u0027url\u0027: url, \u0027metadata\u0027: metadata}"},{"line_number":123,"context_line":"                ld.append(ent)"},{"line_number":124,"context_line":"            location_data \u003d ld"},{"line_number":125,"context_line":"        return {"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2Fg54%3D","line":122,"in_reply_to":"AAAAPn%2F%2FiCQ%3D","updated":"2013-06-28 18:47:15.000000000","message":"My feeling is no for now.  It is something the storage driver opaquely presents to the glance end user.  It doesn\u0027t have any meaning to glance and thus glance shouldn\u0027t mess with it.  If encryption is needed that can be handled out of band by the producer and consumer of that information.","commit_id":"2c50fe32eab949f9969d5279d3063fff8bb77121"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"66c0b7170fe6bf184fc647076eb9b237cb92cece","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            ld \u003d []"},{"line_number":90,"context_line":"            for l in locations:"},{"line_number":91,"context_line":"                url \u003d crypt.urlsafe_decrypt(key, l[\u0027url\u0027])"},{"line_number":92,"context_line":"                ld.append({\u0027url\u0027: url, \u0027metadata\u0027: l[\u0027metadata\u0027]})"},{"line_number":93,"context_line":"            locations \u003d ld"},{"line_number":94,"context_line":"        return glance.domain.Image("},{"line_number":95,"context_line":"            image_id\u003ddb_image[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FRNU%3D","line":92,"updated":"2013-07-05 16:27:45.000000000","message":"Just a style issue, but it feels like a bit of a style mismatch with the domain models to represent locations as dictionaries here.\n\nI\u0027d kind of love it if instead, locations here were simple objects. \n\n  class Location(object):\n      def __init__(self, url, metadata):\n          self.url \u003d url\n          self.metadata \u003d metadata\n\n\nThat would constitute a really extensible starting point in case we need to shift behaviors around in the future. The class above should probably live in glance/domain/__init__.py for now, and just be directly instantiated here.","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"f4b4d4fd1d77ce0ae0c185db8c1309e9f9aa1735","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            ld \u003d []"},{"line_number":90,"context_line":"            for l in locations:"},{"line_number":91,"context_line":"                url \u003d crypt.urlsafe_decrypt(key, l[\u0027url\u0027])"},{"line_number":92,"context_line":"                ld.append({\u0027url\u0027: url, \u0027metadata\u0027: l[\u0027metadata\u0027]})"},{"line_number":93,"context_line":"            locations \u003d ld"},{"line_number":94,"context_line":"        return glance.domain.Image("},{"line_number":95,"context_line":"            image_id\u003ddb_image[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FQ5Y%3D","line":92,"in_reply_to":"AAAAPn%2F%2FRNU%3D","updated":"2013-07-05 17:52:35.000000000","message":"If it is just stylistic I would prefer to not make the change.  However if it is for forward compatibility then we should talk about it.  I am concerned that this change will cause a wave of changes through the patch.","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":1390,"name":"Paul Bourke","email":"pauldbourke@proton.me","username":"pauldbourke"},"change_message_id":"c0124aedaaa3196d3dc73d22429a9d9fe43addc2","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                url \u003d crypt.urlsafe_encrypt(key, l[\u0027url\u0027])"},{"line_number":121,"context_line":"                metadata \u003d l[\u0027metadata\u0027]"},{"line_number":122,"context_line":"                ent \u003d {\u0027url\u0027: url, \u0027metadata\u0027: metadata}"},{"line_number":123,"context_line":"                ld.append(ent)"},{"line_number":124,"context_line":"            location_data \u003d ld"},{"line_number":125,"context_line":"        return {"},{"line_number":126,"context_line":"            \u0027id\u0027: image.image_id,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAP3%2F%2F9vE%3D","line":123,"updated":"2013-07-08 15:37:37.000000000","message":"Nit so feel free to ignore, but would be nice if this was symmetric with the change above - i.e. merge lines 121-123\n\nAlso if renaming locations to location_data, should probably be done above.","commit_id":"e5c2136e3f05d0cdea30c73f33706b153551684c"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"587864c8b92bd2e1a8b70898eb8bbbfe3ef488f8","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                url \u003d crypt.urlsafe_encrypt(key, l[\u0027url\u0027])"},{"line_number":121,"context_line":"                metadata \u003d l[\u0027metadata\u0027]"},{"line_number":122,"context_line":"                ent \u003d {\u0027url\u0027: url, \u0027metadata\u0027: metadata}"},{"line_number":123,"context_line":"                ld.append(ent)"},{"line_number":124,"context_line":"            location_data \u003d ld"},{"line_number":125,"context_line":"        return {"},{"line_number":126,"context_line":"            \u0027id\u0027: image.image_id,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAP3%2F%2F79I%3D","line":123,"in_reply_to":"AAAAP3%2F%2F9vE%3D","updated":"2013-07-08 22:45:33.000000000","message":"Done","commit_id":"e5c2136e3f05d0cdea30c73f33706b153551684c"}],"glance/db/simple/api.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"8e1ee2fcc2521d03c7191013bd94ce8a96ad610e","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    # defined functionality"},{"line_number":85,"context_line":"    ordered_keys \u003d image[\u0027locations\u0027][:]"},{"line_number":86,"context_line":"    for ld in image[\u0027location_data\u0027]:"},{"line_number":87,"context_line":"        if ld[\u0027value\u0027] not in ordered_keys:"},{"line_number":88,"context_line":"            ordered_keys.append(ld[\u0027value\u0027])"},{"line_number":89,"context_line":"    image[\u0027location_data\u0027] \u003d [{\u0027value\u0027: l, \u0027metadata\u0027: location_data_dict[l]}"},{"line_number":90,"context_line":"                              for l in ordered_keys]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPn%2F%2Fok4%3D","line":87,"updated":"2013-06-26 10:26:16.000000000","message":"Why it can different? a location url in \u0027locations\u0027 field but not in location_data?? So there is stink again since we should not store duplicate location URLs into two places. Also, if we store them use \u0027image.locations\u0027 and \u0027image.location_metadatas\u0027 structure (please refer my comments in \u0027glance/store/__init__.py\u0027), we will not need to handle them order hardly.","commit_id":"d67b9e227cff5876cc28f23b4aa7d80e28ed2f59"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"738200d85d2ba1a52e5a2153e251d2934adfd523","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        \u0027name\u0027: None,"},{"line_number":94,"context_line":"        \u0027owner\u0027: None,"},{"line_number":95,"context_line":"        \u0027locations\u0027: [],"},{"line_number":96,"context_line":"        \u0027location_data\u0027: [],"},{"line_number":97,"context_line":"        \u0027status\u0027: \u0027queued\u0027,"},{"line_number":98,"context_line":"        \u0027protected\u0027: False,"},{"line_number":99,"context_line":"        \u0027is_public\u0027: False,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Fljc%3D","line":96,"updated":"2013-06-27 10:18:03.000000000","message":"Seems external will never pass \u0027location_data\u0027 field to here. (_format_image_to_db()). So, Line369 also not need to change.","commit_id":"a2b293c5fb0ca22c1a0083cfe53176286cf93c5c"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"6cfc2e192d3fac73b63ccfa82798dfb3b0e75e25","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        \u0027name\u0027: None,"},{"line_number":94,"context_line":"        \u0027owner\u0027: None,"},{"line_number":95,"context_line":"        \u0027locations\u0027: [],"},{"line_number":96,"context_line":"        \u0027location_data\u0027: [],"},{"line_number":97,"context_line":"        \u0027status\u0027: \u0027queued\u0027,"},{"line_number":98,"context_line":"        \u0027protected\u0027: False,"},{"line_number":99,"context_line":"        \u0027is_public\u0027: False,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FkKo%3D","line":96,"in_reply_to":"AAAAPn%2F%2Fljc%3D","updated":"2013-06-27 17:45:30.000000000","message":"Done","commit_id":"a2b293c5fb0ca22c1a0083cfe53176286cf93c5c"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"738200d85d2ba1a52e5a2153e251d2934adfd523","unresolved":false,"context_lines":[{"line_number":366,"context_line":"                        \u0027checksum\u0027, \u0027locations\u0027, \u0027owner\u0027, \u0027protected\u0027,"},{"line_number":367,"context_line":"                        \u0027is_public\u0027, \u0027container_format\u0027, \u0027disk_format\u0027,"},{"line_number":368,"context_line":"                        \u0027created_at\u0027, \u0027updated_at\u0027, \u0027deleted_at\u0027, \u0027deleted\u0027,"},{"line_number":369,"context_line":"                        \u0027properties\u0027, \u0027tags\u0027, \u0027location_data\u0027])"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    incorrect_keys \u003d set(image_values.keys()) - allowed_keys"},{"line_number":372,"context_line":"    if incorrect_keys:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FlZg%3D","line":369,"updated":"2013-06-27 10:18:03.000000000","message":"Why need add \u0027location_data\u0027 here? In this PS, image object have not this field.","commit_id":"a2b293c5fb0ca22c1a0083cfe53176286cf93c5c"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"6cfc2e192d3fac73b63ccfa82798dfb3b0e75e25","unresolved":false,"context_lines":[{"line_number":366,"context_line":"                        \u0027checksum\u0027, \u0027locations\u0027, \u0027owner\u0027, \u0027protected\u0027,"},{"line_number":367,"context_line":"                        \u0027is_public\u0027, \u0027container_format\u0027, \u0027disk_format\u0027,"},{"line_number":368,"context_line":"                        \u0027created_at\u0027, \u0027updated_at\u0027, \u0027deleted_at\u0027, \u0027deleted\u0027,"},{"line_number":369,"context_line":"                        \u0027properties\u0027, \u0027tags\u0027, \u0027location_data\u0027])"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    incorrect_keys \u003d set(image_values.keys()) - allowed_keys"},{"line_number":372,"context_line":"    if incorrect_keys:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FkKc%3D","line":369,"in_reply_to":"AAAAPn%2F%2FlZg%3D","updated":"2013-06-27 17:45:30.000000000","message":"Done","commit_id":"a2b293c5fb0ca22c1a0083cfe53176286cf93c5c"}],"glance/db/sqlalchemy/api.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"8e1ee2fcc2521d03c7191013bd94ce8a96ad610e","unresolved":false,"context_lines":[{"line_number":713,"context_line":"        # not a dict."},{"line_number":714,"context_line":"        properties \u003d values.pop(\u0027properties\u0027, {})"},{"line_number":715,"context_line":"        location_data \u003d _convert_locations(values.pop(\u0027locations\u0027, []))"},{"line_number":716,"context_line":"        location_data.extend(values.pop(\u0027location_data\u0027, []))"},{"line_number":717,"context_line":""},{"line_number":718,"context_line":"        if image_id:"},{"line_number":719,"context_line":"            image_ref \u003d _image_get(context, image_id, session\u003dsession)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPn%2F%2Fol8%3D","line":716,"updated":"2013-06-26 10:26:16.000000000","message":"seems \u0027values\u0027 object will never have \u0027location_data\u0027 field, since \u0027_format_image_to_db\u0027 have not made it. Also, \u0027extend\u0027 method will cause duplicate location item to \u0027location_data\u0027 result.","commit_id":"d67b9e227cff5876cc28f23b4aa7d80e28ed2f59"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"738200d85d2ba1a52e5a2153e251d2934adfd523","unresolved":false,"context_lines":[{"line_number":686,"context_line":"            setattr(image_ref, k, values[k])"},{"line_number":687,"context_line":""},{"line_number":688,"context_line":""},{"line_number":689,"context_line":"def _convert_locations(locations):"},{"line_number":690,"context_line":"    return [{\u0027value\u0027: l, \u0027metadata\u0027: {}} for l in locations]"},{"line_number":691,"context_line":""},{"line_number":692,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Flmk%3D","line":689,"updated":"2013-06-27 10:18:03.000000000","message":"Unused function?","commit_id":"a2b293c5fb0ca22c1a0083cfe53176286cf93c5c"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"6cfc2e192d3fac73b63ccfa82798dfb3b0e75e25","unresolved":false,"context_lines":[{"line_number":686,"context_line":"            setattr(image_ref, k, values[k])"},{"line_number":687,"context_line":""},{"line_number":688,"context_line":""},{"line_number":689,"context_line":"def _convert_locations(locations):"},{"line_number":690,"context_line":"    return [{\u0027value\u0027: l, \u0027metadata\u0027: {}} for l in locations]"},{"line_number":691,"context_line":""},{"line_number":692,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FkNE%3D","line":689,"in_reply_to":"AAAAPn%2F%2Flmk%3D","updated":"2013-06-27 17:45:30.000000000","message":"Done","commit_id":"a2b293c5fb0ca22c1a0083cfe53176286cf93c5c"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"d2f7c45eaf05d38312eaecc0267acc608f776224","unresolved":false,"context_lines":[{"line_number":696,"context_line":"    \"\"\""},{"line_number":697,"context_line":""},{"line_number":698,"context_line":"    #NOTE(jbresnah) Values is altered in this function this a copy is needed"},{"line_number":699,"context_line":"    values \u003d values.copy()"},{"line_number":700,"context_line":""},{"line_number":701,"context_line":"    session \u003d _get_session()"},{"line_number":702,"context_line":"    with session.begin():"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2FiCE%3D","line":699,"updated":"2013-06-28 13:08:05.000000000","message":"just copy or deepcopy?","commit_id":"2c50fe32eab949f9969d5279d3063fff8bb77121"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"68efc8945156f2dd663a2c53484f41f83bfa9794","unresolved":false,"context_lines":[{"line_number":696,"context_line":"    \"\"\""},{"line_number":697,"context_line":""},{"line_number":698,"context_line":"    #NOTE(jbresnah) Values is altered in this function this a copy is needed"},{"line_number":699,"context_line":"    values \u003d values.copy()"},{"line_number":700,"context_line":""},{"line_number":701,"context_line":"    session \u003d _get_session()"},{"line_number":702,"context_line":"    with session.begin():"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2Fg5g%3D","line":699,"in_reply_to":"AAAAPn%2F%2FiCE%3D","updated":"2013-06-28 18:47:15.000000000","message":"The function pops out a key but doesn\u0027t mess with it beyond that so copy should be fine.","commit_id":"2c50fe32eab949f9969d5279d3063fff8bb77121"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"d2f7c45eaf05d38312eaecc0267acc608f776224","unresolved":false,"context_lines":[{"line_number":709,"context_line":"        # not a dict."},{"line_number":710,"context_line":"        properties \u003d values.pop(\u0027properties\u0027, {})"},{"line_number":711,"context_line":""},{"line_number":712,"context_line":"        # into one locations list which is attached to the image"},{"line_number":713,"context_line":"        location_data \u003d values.pop(\u0027locations\u0027, None)"},{"line_number":714,"context_line":""},{"line_number":715,"context_line":"        if image_id:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2FiCI%3D","line":712,"updated":"2013-06-28 13:08:05.000000000","message":"NOTE(...)","commit_id":"2c50fe32eab949f9969d5279d3063fff8bb77121"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"68efc8945156f2dd663a2c53484f41f83bfa9794","unresolved":false,"context_lines":[{"line_number":709,"context_line":"        # not a dict."},{"line_number":710,"context_line":"        properties \u003d values.pop(\u0027properties\u0027, {})"},{"line_number":711,"context_line":""},{"line_number":712,"context_line":"        # into one locations list which is attached to the image"},{"line_number":713,"context_line":"        location_data \u003d values.pop(\u0027locations\u0027, None)"},{"line_number":714,"context_line":""},{"line_number":715,"context_line":"        if image_id:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2Fg5c%3D","line":712,"in_reply_to":"AAAAPn%2F%2FiCI%3D","updated":"2013-06-28 18:47:15.000000000","message":"That doc string was cruft.  I will remove it.","commit_id":"2c50fe32eab949f9969d5279d3063fff8bb77121"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"66c0b7170fe6bf184fc647076eb9b237cb92cece","unresolved":false,"context_lines":[{"line_number":706,"context_line":"    :param image_id: If None, create the image, otherwise, find and update it"},{"line_number":707,"context_line":"    \"\"\""},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"    #NOTE(jbresnah) Values is altered in this function this a copy is needed"},{"line_number":710,"context_line":"    values \u003d values.copy()"},{"line_number":711,"context_line":""},{"line_number":712,"context_line":"    session \u003d _get_session()"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FRM4%3D","line":709,"updated":"2013-07-05 16:27:45.000000000","message":"s/this a/so a/","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"f4b4d4fd1d77ce0ae0c185db8c1309e9f9aa1735","unresolved":false,"context_lines":[{"line_number":706,"context_line":"    :param image_id: If None, create the image, otherwise, find and update it"},{"line_number":707,"context_line":"    \"\"\""},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"    #NOTE(jbresnah) Values is altered in this function this a copy is needed"},{"line_number":710,"context_line":"    values \u003d values.copy()"},{"line_number":711,"context_line":""},{"line_number":712,"context_line":"    session \u003d _get_session()"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FQ8k%3D","line":709,"in_reply_to":"AAAAPn%2F%2FRM4%3D","updated":"2013-07-05 17:52:35.000000000","message":"Done","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"66c0b7170fe6bf184fc647076eb9b237cb92cece","unresolved":false,"context_lines":[{"line_number":720,"context_line":"        # not a dict."},{"line_number":721,"context_line":"        properties \u003d values.pop(\u0027properties\u0027, {})"},{"line_number":722,"context_line":""},{"line_number":723,"context_line":"        # into one locations list which is attached to the image"},{"line_number":724,"context_line":"        location_data \u003d values.pop(\u0027locations\u0027, None)"},{"line_number":725,"context_line":""},{"line_number":726,"context_line":"        if image_id:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FRM0%3D","line":723,"updated":"2013-07-05 16:27:45.000000000","message":"I\u0027m not sure I follow this comment.","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"f4b4d4fd1d77ce0ae0c185db8c1309e9f9aa1735","unresolved":false,"context_lines":[{"line_number":720,"context_line":"        # not a dict."},{"line_number":721,"context_line":"        properties \u003d values.pop(\u0027properties\u0027, {})"},{"line_number":722,"context_line":""},{"line_number":723,"context_line":"        # into one locations list which is attached to the image"},{"line_number":724,"context_line":"        location_data \u003d values.pop(\u0027locations\u0027, None)"},{"line_number":725,"context_line":""},{"line_number":726,"context_line":"        if image_id:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FQ78%3D","line":723,"in_reply_to":"AAAAPn%2F%2FRM0%3D","updated":"2013-07-05 17:52:35.000000000","message":"I am not sure I do either...  I think it is cruft from a patch I applied after some repository confusion.","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":1390,"name":"Paul Bourke","email":"pauldbourke@proton.me","username":"pauldbourke"},"change_message_id":"c0124aedaaa3196d3dc73d22429a9d9fe43addc2","unresolved":false,"context_lines":[{"line_number":707,"context_line":"    \"\"\""},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"    #NOTE(jbresnah) Values is altered in this function this a copy is needed"},{"line_number":710,"context_line":"    values \u003d values.copy()"},{"line_number":711,"context_line":""},{"line_number":712,"context_line":"    session \u003d _get_session()"},{"line_number":713,"context_line":"    with session.begin():"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAP3%2F%2F9ic%3D","line":710,"updated":"2013-07-08 15:37:37.000000000","message":"Does a bug currently exist from not doing a copy here?","commit_id":"e5c2136e3f05d0cdea30c73f33706b153551684c"}],"glance/registry/api/v1/images.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"738200d85d2ba1a52e5a2153e251d2934adfd523","unresolved":false,"context_lines":[{"line_number":461,"context_line":"        image[\u0027location\u0027] \u003d locations[0][\u0027url\u0027]"},{"line_number":462,"context_line":"    except IndexError:"},{"line_number":463,"context_line":"        image[\u0027location\u0027] \u003d None"},{"line_number":464,"context_line":"    image[\u0027location_data\u0027] \u003d locations"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":""},{"line_number":467,"context_line":"def make_image_dict(image):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Flbk%3D","line":464,"updated":"2013-06-27 10:18:03.000000000","message":"Why we need move \u0027[{\u0027\u003curl\u003e\u0027: {\u003cmetadata\u003e} } ]\u0027 from \u0027locations\u0027 field to \u0027location_data\u0027 field? (Line#459 pop it out) If we not do this, then glance/api/v1/images.py will also not need delete this field.","commit_id":"a2b293c5fb0ca22c1a0083cfe53176286cf93c5c"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"6cfc2e192d3fac73b63ccfa82798dfb3b0e75e25","unresolved":false,"context_lines":[{"line_number":461,"context_line":"        image[\u0027location\u0027] \u003d locations[0][\u0027url\u0027]"},{"line_number":462,"context_line":"    except IndexError:"},{"line_number":463,"context_line":"        image[\u0027location\u0027] \u003d None"},{"line_number":464,"context_line":"    image[\u0027location_data\u0027] \u003d locations"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":""},{"line_number":467,"context_line":"def make_image_dict(image):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2FkI4%3D","line":464,"in_reply_to":"AAAAPn%2F%2Flbk%3D","updated":"2013-06-27 17:45:30.000000000","message":"api/v1/images will still need to delete it to prevent it from being exposed to the end user (client).  I went with the name location_data to make it a bit more obvious that it was being used for communication between api and registry.  Communication between the client and api uses locations.","commit_id":"a2b293c5fb0ca22c1a0083cfe53176286cf93c5c"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"d2f7c45eaf05d38312eaecc0267acc608f776224","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    location_data \u003d image_data.pop(\u0027location_data\u0027, [])"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    location_data_dict \u003d {}"},{"line_number":60,"context_line":"    for l in locations:"},{"line_number":61,"context_line":"        location_data_dict[l] \u003d {}"},{"line_number":62,"context_line":"    for l in location_data:"},{"line_number":63,"context_line":"        location_data_dict[l[\u0027url\u0027]] \u003d l[\u0027metadata\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2FiBo%3D","line":60,"updated":"2013-06-28 13:08:05.000000000","message":"Does this one exist to preserve backward compatibility? Could you add a note?","commit_id":"2c50fe32eab949f9969d5279d3063fff8bb77121"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"68efc8945156f2dd663a2c53484f41f83bfa9794","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    location_data \u003d image_data.pop(\u0027location_data\u0027, [])"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    location_data_dict \u003d {}"},{"line_number":60,"context_line":"    for l in locations:"},{"line_number":61,"context_line":"        location_data_dict[l] \u003d {}"},{"line_number":62,"context_line":"    for l in location_data:"},{"line_number":63,"context_line":"        location_data_dict[l[\u0027url\u0027]] \u003d l[\u0027metadata\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2Fg5E%3D","line":60,"in_reply_to":"AAAAPn%2F%2FiBo%3D","updated":"2013-06-28 18:47:15.000000000","message":"Done","commit_id":"2c50fe32eab949f9969d5279d3063fff8bb77121"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"d2f7c45eaf05d38312eaecc0267acc608f776224","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    for l in location_data:"},{"line_number":63,"context_line":"        location_data_dict[l[\u0027url\u0027]] \u003d l[\u0027metadata\u0027]"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    # preserve original order.  tests assume original order, should that be"},{"line_number":66,"context_line":"    # defined functionality"},{"line_number":67,"context_line":"    ordered_keys \u003d locations[:]"},{"line_number":68,"context_line":"    for ld in location_data:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2Fh%2FA%3D","line":65,"updated":"2013-06-28 13:08:05.000000000","message":"NOTE()","commit_id":"2c50fe32eab949f9969d5279d3063fff8bb77121"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"68efc8945156f2dd663a2c53484f41f83bfa9794","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    for l in location_data:"},{"line_number":63,"context_line":"        location_data_dict[l[\u0027url\u0027]] \u003d l[\u0027metadata\u0027]"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    # preserve original order.  tests assume original order, should that be"},{"line_number":66,"context_line":"    # defined functionality"},{"line_number":67,"context_line":"    ordered_keys \u003d locations[:]"},{"line_number":68,"context_line":"    for ld in location_data:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPn%2F%2Fg5I%3D","line":65,"in_reply_to":"AAAAPn%2F%2Fh%2FA%3D","updated":"2013-06-28 18:47:15.000000000","message":"Done","commit_id":"2c50fe32eab949f9969d5279d3063fff8bb77121"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"8067e1d0ac46d84744ce55ef511c9b4a231d8358","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    for l in location_data:"},{"line_number":77,"context_line":"        location_data_dict[l[\u0027url\u0027]] \u003d l[\u0027metadata\u0027]"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    # NOT(jbresnah) preserve original order.  tests assume original order,"},{"line_number":80,"context_line":"    # should that be defined functionality"},{"line_number":81,"context_line":"    ordered_keys \u003d locations[:]"},{"line_number":82,"context_line":"    for ld in location_data:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPn%2F%2Ff98%3D","line":79,"updated":"2013-06-29 05:52:02.000000000","message":"NOTE(jbresnah) ...","commit_id":"e6a509a61706bca3ce547ef25e1e0714cd3891ac"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"f81d9891cba5459561c713c1894eb32de3a58b22","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    for l in location_data:"},{"line_number":77,"context_line":"        location_data_dict[l[\u0027url\u0027]] \u003d l[\u0027metadata\u0027]"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    # NOT(jbresnah) preserve original order.  tests assume original order,"},{"line_number":80,"context_line":"    # should that be defined functionality"},{"line_number":81,"context_line":"    ordered_keys \u003d locations[:]"},{"line_number":82,"context_line":"    for ld in location_data:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPn%2F%2Ff5I%3D","line":79,"in_reply_to":"AAAAPn%2F%2Ff98%3D","updated":"2013-06-29 06:18:35.000000000","message":"heh, yes.  It seems I wanted to distance myself from this patch after a painful debugging session.","commit_id":"e6a509a61706bca3ce547ef25e1e0714cd3891ac"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"66c0b7170fe6bf184fc647076eb9b237cb92cece","unresolved":false,"context_lines":[{"line_number":475,"context_line":"        image[\u0027location\u0027] \u003d locations[0][\u0027url\u0027]"},{"line_number":476,"context_line":"    except IndexError:"},{"line_number":477,"context_line":"        image[\u0027location\u0027] \u003d None"},{"line_number":478,"context_line":"    image[\u0027location_data\u0027] \u003d locations"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"def make_image_dict(image):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FRLU%3D","line":478,"updated":"2013-07-05 16:27:45.000000000","message":"Is there any particular reason to return two parallel entries, locations and location_data ? It would seem simpler to just return locations -\u003e a list of dictionaries.","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"f4b4d4fd1d77ce0ae0c185db8c1309e9f9aa1735","unresolved":false,"context_lines":[{"line_number":475,"context_line":"        image[\u0027location\u0027] \u003d locations[0][\u0027url\u0027]"},{"line_number":476,"context_line":"    except IndexError:"},{"line_number":477,"context_line":"        image[\u0027location\u0027] \u003d None"},{"line_number":478,"context_line":"    image[\u0027location_data\u0027] \u003d locations"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"def make_image_dict(image):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FQ9I%3D","line":478,"in_reply_to":"AAAAPn%2F%2FRLU%3D","updated":"2013-07-05 17:52:35.000000000","message":"2 reasons for this.  1) The image dictionary is what end flows over the wire back to glance-api.  For protocol backward compat reasons I want to keep all the original values.   2) what is returned there is \"location_data\" and \"location\" (singular).  \u0027location\u0027 seems to be used as the canonical location.","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":1390,"name":"Paul Bourke","email":"pauldbourke@proton.me","username":"pauldbourke"},"change_message_id":"c0124aedaaa3196d3dc73d22429a9d9fe43addc2","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    into the location_data format only which is then consumable by the"},{"line_number":61,"context_line":"    Image object."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    :param image_data: a dict of values represeting information in the image"},{"line_number":64,"context_line":"    :return: a new image data dict"},{"line_number":65,"context_line":"    \"\"\""},{"line_number":66,"context_line":"    if \u0027locations\u0027 not in image_data and \u0027location_data\u0027 not in image_data:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAP3%2F%2F9rw%3D","line":63,"updated":"2013-07-08 15:37:37.000000000","message":"typo on representing","commit_id":"e5c2136e3f05d0cdea30c73f33706b153551684c"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"587864c8b92bd2e1a8b70898eb8bbbfe3ef488f8","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    into the location_data format only which is then consumable by the"},{"line_number":61,"context_line":"    Image object."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    :param image_data: a dict of values represeting information in the image"},{"line_number":64,"context_line":"    :return: a new image data dict"},{"line_number":65,"context_line":"    \"\"\""},{"line_number":66,"context_line":"    if \u0027locations\u0027 not in image_data and \u0027location_data\u0027 not in image_data:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAP3%2F%2F780%3D","line":63,"in_reply_to":"AAAAP3%2F%2F9rw%3D","updated":"2013-07-08 22:45:33.000000000","message":"Done","commit_id":"e5c2136e3f05d0cdea30c73f33706b153551684c"}],"glance/store/__init__.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"fe51db0af3a2e93ee5fb247fff839ff184bd40d4","unresolved":false,"context_lines":[{"line_number":386,"context_line":"                self.context, CONF.default_store,"},{"line_number":387,"context_line":"                self.image.image_id, utils.CooperativeReader(data), size)"},{"line_number":388,"context_line":"        self.image.locations \u003d [location]"},{"line_number":389,"context_line":"        self.image.location_data \u003d [{\u0027value\u0027: location, \u0027metadata\u0027: loc_meta}]"},{"line_number":390,"context_line":"        self.image.size \u003d size"},{"line_number":391,"context_line":"        self.image.checksum \u003d checksum"},{"line_number":392,"context_line":"        self.image.status \u003d \u0027active\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAPn%2F%2Fon4%3D","line":389,"updated":"2013-06-26 09:37:05.000000000","message":"IMO, image should have two location related fields:\n\u0027image.locations\u0027 and \u0027image.location_metadatas\u0027. that is two list, first on save URLs, the second save URL corresponding metadata. That mean location URL will (and should) not be stored to two places duplicately. client can use one index to fetch one location and its metadata. for example for here:\n\nself.image.locations \u003d [location]\n\nself.image.location_metadatas [loc_meta]\n\n\n\nAccording to multiple-location scenario, the result like that:\n\nimage.locations:                   [loc1, loc2, loc3, loc4]\n\nimage.location_metadatas:    [meta1,None,meta3,None]\n\n\nIn my change https://review.openstack.org/#/c/34501 , glance will check location correctness (and remove image data from store when a location removed from an image), so if we have duplicate location place, we need hook/handle more place for location field change for store, that\u0027s a /really/ bad idea.\n\nThoughts?","commit_id":"d67b9e227cff5876cc28f23b4aa7d80e28ed2f59"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"738200d85d2ba1a52e5a2153e251d2934adfd523","unresolved":false,"context_lines":[{"line_number":373,"context_line":"                self.image.status \u003d \u0027pending_delete\u0027"},{"line_number":374,"context_line":"                for location in self.image.locations:"},{"line_number":375,"context_line":"                    self.store_api.schedule_delayed_delete_from_backend("},{"line_number":376,"context_line":"                            location[\u0027url\u0027], self.image.image_id)"},{"line_number":377,"context_line":"            else:"},{"line_number":378,"context_line":"                for location in self.image.locations:"},{"line_number":379,"context_line":"                    self.store_api.safe_delete_from_backend("}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2Flio%3D","line":376,"updated":"2013-06-27 10:18:03.000000000","message":"btw, currently scrubber not support multiple-locations. so actaully this loop calls will met exception.Duplicate.","commit_id":"a2b293c5fb0ca22c1a0083cfe53176286cf93c5c"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"8f6909834d5ea2d91ba7c77ef5b5d222be211386","unresolved":false,"context_lines":[{"line_number":372,"context_line":"            if CONF.delayed_delete:"},{"line_number":373,"context_line":"                self.image.status \u003d \u0027pending_delete\u0027"},{"line_number":374,"context_line":"                for location in self.image.locations:"},{"line_number":375,"context_line":"                    self.store_api.schedule_delayed_delete_from_backend("},{"line_number":376,"context_line":"                            location[\u0027url\u0027], self.image.image_id)"},{"line_number":377,"context_line":"            else:"},{"line_number":378,"context_line":"                for location in self.image.locations:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FeVU%3D","line":375,"updated":"2013-07-01 07:15:23.000000000","message":"Do we need also pass location\u0027s metadata into store.delete() calls? probably store need it (or hits for handling?).","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"66c0b7170fe6bf184fc647076eb9b237cb92cece","unresolved":false,"context_lines":[{"line_number":372,"context_line":"            if CONF.delayed_delete:"},{"line_number":373,"context_line":"                self.image.status \u003d \u0027pending_delete\u0027"},{"line_number":374,"context_line":"                for location in self.image.locations:"},{"line_number":375,"context_line":"                    self.store_api.schedule_delayed_delete_from_backend("},{"line_number":376,"context_line":"                            location[\u0027url\u0027], self.image.image_id)"},{"line_number":377,"context_line":"            else:"},{"line_number":378,"context_line":"                for location in self.image.locations:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FRMc%3D","line":375,"in_reply_to":"AAAAPn%2F%2Fcw4%3D","updated":"2013-07-05 16:27:45.000000000","message":"I agree, potentially good future change.","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"7eba5fcb6b2cb7ea0521d9fa69c79dd4f478e27f","unresolved":false,"context_lines":[{"line_number":372,"context_line":"            if CONF.delayed_delete:"},{"line_number":373,"context_line":"                self.image.status \u003d \u0027pending_delete\u0027"},{"line_number":374,"context_line":"                for location in self.image.locations:"},{"line_number":375,"context_line":"                    self.store_api.schedule_delayed_delete_from_backend("},{"line_number":376,"context_line":"                            location[\u0027url\u0027], self.image.image_id)"},{"line_number":377,"context_line":"            else:"},{"line_number":378,"context_line":"                for location in self.image.locations:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2Fcw4%3D","line":375,"in_reply_to":"AAAAPn%2F%2FeVU%3D","updated":"2013-07-01 18:34:24.000000000","message":"The current thought is that the store creates the meta data and it is used for telling the client more about the location.  It is not intended to give hints about location back to the storage driver itself.  But perhaps this would be a good future change.  I would prefer to not further complicate this patch an interface change like that but we should note it for the future.","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"8f6909834d5ea2d91ba7c77ef5b5d222be211386","unresolved":false,"context_lines":[{"line_number":393,"context_line":"    def get_data(self):"},{"line_number":394,"context_line":"        if not self.image.locations:"},{"line_number":395,"context_line":"            raise exception.NotFound(_(\"No image data could be found\"))"},{"line_number":396,"context_line":"        data, size \u003d self.store_api.get_from_backend("},{"line_number":397,"context_line":"            self.context, self.image.locations[0][\u0027url\u0027])"},{"line_number":398,"context_line":"        return data"},{"line_number":399,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FeVA%3D","line":396,"updated":"2013-07-01 07:15:23.000000000","message":"Do we need also pass location\u0027s metadata into store.get() calls? probably store need it (or hits for handling?).","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"7eba5fcb6b2cb7ea0521d9fa69c79dd4f478e27f","unresolved":false,"context_lines":[{"line_number":393,"context_line":"    def get_data(self):"},{"line_number":394,"context_line":"        if not self.image.locations:"},{"line_number":395,"context_line":"            raise exception.NotFound(_(\"No image data could be found\"))"},{"line_number":396,"context_line":"        data, size \u003d self.store_api.get_from_backend("},{"line_number":397,"context_line":"            self.context, self.image.locations[0][\u0027url\u0027])"},{"line_number":398,"context_line":"        return data"},{"line_number":399,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2Fcwk%3D","line":396,"in_reply_to":"AAAAPn%2F%2FeVA%3D","updated":"2013-07-01 18:34:24.000000000","message":"A similar comment to the delete.","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"8f6909834d5ea2d91ba7c77ef5b5d222be211386","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        if self.image.locations and not public:"},{"line_number":412,"context_line":"            member_ids \u003d [m.member_id for m in self.repo.list()]"},{"line_number":413,"context_line":"            for location in self.image.locations:"},{"line_number":414,"context_line":"                self.store_api.set_acls(self.context, location[\u0027url\u0027], public,"},{"line_number":415,"context_line":"                                        read_tenants\u003dmember_ids)"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"    def add(self, member):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FeU0%3D","line":414,"updated":"2013-07-01 07:15:23.000000000","message":"Do we need also pass location\u0027s metadata into store.set_acls() calls? probably store need it (or hits for handling?).","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"7eba5fcb6b2cb7ea0521d9fa69c79dd4f478e27f","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        if self.image.locations and not public:"},{"line_number":412,"context_line":"            member_ids \u003d [m.member_id for m in self.repo.list()]"},{"line_number":413,"context_line":"            for location in self.image.locations:"},{"line_number":414,"context_line":"                self.store_api.set_acls(self.context, location[\u0027url\u0027], public,"},{"line_number":415,"context_line":"                                        read_tenants\u003dmember_ids)"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"    def add(self, member):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2Fcwc%3D","line":414,"in_reply_to":"AAAAPn%2F%2FeU0%3D","updated":"2013-07-01 18:34:24.000000000","message":"see deletes comment.","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"67c2ac878eee1990b96df065fa68886f707b1eaa","unresolved":false,"context_lines":[{"line_number":296,"context_line":""},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"def add_to_backend(context, scheme, image_id, data, size):"},{"line_number":299,"context_line":"    store \u003d get_store_from_scheme(context, scheme)"},{"line_number":300,"context_line":"    return store.add(image_id, data, size)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAP3%2F%2F%2FhQ%3D","line":299,"updated":"2013-07-07 04:25:13.000000000","message":"For markwash\u0027s concern, we can add a type checking for the return value of store.add() call, to give a forcefully restrict location metadata to be \"just\" a dictionary type object.","commit_id":"e5c2136e3f05d0cdea30c73f33706b153551684c"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"587864c8b92bd2e1a8b70898eb8bbbfe3ef488f8","unresolved":false,"context_lines":[{"line_number":296,"context_line":""},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"def add_to_backend(context, scheme, image_id, data, size):"},{"line_number":299,"context_line":"    store \u003d get_store_from_scheme(context, scheme)"},{"line_number":300,"context_line":"    return store.add(image_id, data, size)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAP3%2F%2F8DQ%3D","line":299,"in_reply_to":"AAAAP3%2F%2F%2FhQ%3D","updated":"2013-07-08 22:45:33.000000000","message":"Agreed.","commit_id":"e5c2136e3f05d0cdea30c73f33706b153551684c"},{"author":{"_account_id":1390,"name":"Paul Bourke","email":"pauldbourke@proton.me","username":"pauldbourke"},"change_message_id":"3434f4b40dce633379f82d71487039e41d1e4b4a","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                      \"%s storage driver: %s.  %s.\" %"},{"line_number":342,"context_line":"                      (str(store), str(metadata), str(e)))"},{"line_number":343,"context_line":"            LOG.error(e_msg)"},{"line_number":344,"context_line":"            raise e_msg"},{"line_number":345,"context_line":"    return (location, size, checksum, metadata)"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAP3%2F%2F1s0%3D","line":344,"updated":"2013-07-10 16:23:54.000000000","message":"I don\u0027t think this raise is correct (is there a test for this case?)","commit_id":"dd938842aeb2ecc458584eccd08f6b64f8dd71e4"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"d0303cb368645ee679a792b58675d2e0e923d688","unresolved":false,"context_lines":[{"line_number":304,"context_line":"    elif t \u003d\u003d list:"},{"line_number":305,"context_line":"        ndx \u003d 0"},{"line_number":306,"context_line":"        for v in val:"},{"line_number":307,"context_line":"            _check_meta_data(v, key\u003d\u0027key[%d]\u0027 % ndx)"},{"line_number":308,"context_line":"            ndx \u003d ndx + 1"},{"line_number":309,"context_line":"    elif t !\u003d unicode:"},{"line_number":310,"context_line":"        raise BackendException(_(\"The image metadata key %s has an invalid \""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAP3%2F%2Fz7U%3D","line":307,"updated":"2013-07-11 03:21:51.000000000","message":"Be frank, I don\u0027t like this string as the key, for hits client in the below exception. It may confuse client or store developer. IMO.","commit_id":"b1af05d75318e42fe9aa169aeb6ce6af688846fe"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"7de7de786401dd9fd59e541d3be2d9e468935808","unresolved":false,"context_lines":[{"line_number":304,"context_line":"    elif t \u003d\u003d list:"},{"line_number":305,"context_line":"        ndx \u003d 0"},{"line_number":306,"context_line":"        for v in val:"},{"line_number":307,"context_line":"            _check_meta_data(v, key\u003d\u0027key[%d]\u0027 % ndx)"},{"line_number":308,"context_line":"            ndx \u003d ndx + 1"},{"line_number":309,"context_line":"    elif t !\u003d unicode:"},{"line_number":310,"context_line":"        raise BackendException(_(\"The image metadata key %s has an invalid \""}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAP3%2F%2FzpA%3D","line":307,"in_reply_to":"AAAAP3%2F%2Fz7U%3D","updated":"2013-07-11 05:37:30.000000000","message":"I agree completely.  I that was a mistake and should be %s % key.  I will fix.  Thanks so much.","commit_id":"b1af05d75318e42fe9aa169aeb6ce6af688846fe"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"d0303cb368645ee679a792b58675d2e0e923d688","unresolved":false,"context_lines":[{"line_number":312,"context_line":"                                 \"are supported.\" % (key, str(t))))"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"def store_add_to_backend(image_id, data, size, store):"},{"line_number":316,"context_line":"    \"\"\""},{"line_number":317,"context_line":"    A wrapper around a call to each stores add() method.  This gives glance"},{"line_number":318,"context_line":"    a common place to check the output"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAP3%2F%2Fz7Q%3D","line":315,"updated":"2013-07-11 03:21:51.000000000","message":"Do you think it\u0027s better if we name it \u0027add_to_backend_store()\u0027?","commit_id":"b1af05d75318e42fe9aa169aeb6ce6af688846fe"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"7de7de786401dd9fd59e541d3be2d9e468935808","unresolved":false,"context_lines":[{"line_number":312,"context_line":"                                 \"are supported.\" % (key, str(t))))"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"def store_add_to_backend(image_id, data, size, store):"},{"line_number":316,"context_line":"    \"\"\""},{"line_number":317,"context_line":"    A wrapper around a call to each stores add() method.  This gives glance"},{"line_number":318,"context_line":"    a common place to check the output"}],"source_content_type":"text/x-python","patch_set":18,"id":"AAAAP3%2F%2FzoY%3D","line":315,"in_reply_to":"AAAAP3%2F%2Fz7Q%3D","updated":"2013-07-11 05:37:30.000000000","message":"possibly... that comes from my old C programming where we had to manually namespace things.","commit_id":"b1af05d75318e42fe9aa169aeb6ce6af688846fe"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"69ea661ef4c674e1ab79ecddb2067f9d2287abc9","unresolved":false,"context_lines":[{"line_number":458,"context_line":"        if isinstance(other, StoreLocations):"},{"line_number":459,"context_line":"            self.value.extend(other.value)"},{"line_number":460,"context_line":"        else:"},{"line_number":461,"context_line":"            uris \u003d list(other)"},{"line_number":462,"context_line":"            for location in uris:"},{"line_number":463,"context_line":"                _check_location_uri(self.image_proxy.context,"},{"line_number":464,"context_line":"                                    self.image_proxy.store_api,"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAP3%2F%2FvDE%3D","line":461,"updated":"2013-07-12 08:03:11.000000000","message":"Do you think change \u0027uris\u0027 name to \u0027locations\u0027/\u0027locs\u0027 is better? Since under this context, the list is not a uri string list, it\u0027s a location directory list which include \u0027uri\u0027 and \u0027metadata\u0027 dict.","commit_id":"16dd1bd659369a261fadee93ef7b6cdc6489bfa9"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"69ea661ef4c674e1ab79ecddb2067f9d2287abc9","unresolved":false,"context_lines":[{"line_number":482,"context_line":"            raise"},{"line_number":483,"context_line":"        return location"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"    def count(self, uri):"},{"line_number":486,"context_line":"        return self.value.count(uri)"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":"    def index(self, uri, *args):"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAP3%2F%2FvCk%3D","line":485,"updated":"2013-07-12 08:03:11.000000000","message":"ditto","commit_id":"16dd1bd659369a261fadee93ef7b6cdc6489bfa9"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"69ea661ef4c674e1ab79ecddb2067f9d2287abc9","unresolved":false,"context_lines":[{"line_number":485,"context_line":"    def count(self, uri):"},{"line_number":486,"context_line":"        return self.value.count(uri)"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":"    def index(self, uri, *args):"},{"line_number":489,"context_line":"        return self.value.index(uri, *args)"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"    def remove(self, uri):"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAP3%2F%2FvCY%3D","line":488,"updated":"2013-07-12 08:03:11.000000000","message":"ditto","commit_id":"16dd1bd659369a261fadee93ef7b6cdc6489bfa9"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"69ea661ef4c674e1ab79ecddb2067f9d2287abc9","unresolved":false,"context_lines":[{"line_number":488,"context_line":"    def index(self, uri, *args):"},{"line_number":489,"context_line":"        return self.value.index(uri, *args)"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"    def remove(self, uri):"},{"line_number":492,"context_line":"        if self.count(uri):"},{"line_number":493,"context_line":"            self.pop(self.index(uri))"},{"line_number":494,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAP3%2F%2FvCU%3D","line":491,"updated":"2013-07-12 08:03:11.000000000","message":"ditto","commit_id":"16dd1bd659369a261fadee93ef7b6cdc6489bfa9"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"69ea661ef4c674e1ab79ecddb2067f9d2287abc9","unresolved":false,"context_lines":[{"line_number":503,"context_line":"    def __getitem__(self, i):"},{"line_number":504,"context_line":"        return self.value.__getitem__(i)"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"    def __setitem__(self, i, uri):"},{"line_number":507,"context_line":"        _check_location_uri(self.image_proxy.context,"},{"line_number":508,"context_line":"                            self.image_proxy.store_api, uri)"},{"line_number":509,"context_line":"        self.value.__setitem__(i, uri)"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAP3%2F%2FvCM%3D","line":506,"updated":"2013-07-12 08:03:11.000000000","message":"ditto","commit_id":"16dd1bd659369a261fadee93ef7b6cdc6489bfa9"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"69ea661ef4c674e1ab79ecddb2067f9d2287abc9","unresolved":false,"context_lines":[{"line_number":523,"context_line":"    def __delslice__(self, i, j):"},{"line_number":524,"context_line":"        i \u003d max(i, 0)"},{"line_number":525,"context_line":"        j \u003d max(j, 0)"},{"line_number":526,"context_line":"        uris \u003d []"},{"line_number":527,"context_line":"        try:"},{"line_number":528,"context_line":"            uris \u003d self.value.__getslice__(i, j)"},{"line_number":529,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAP3%2F%2Fu%2Bw%3D","line":526,"updated":"2013-07-12 08:03:11.000000000","message":"ditto","commit_id":"16dd1bd659369a261fadee93ef7b6cdc6489bfa9"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"69ea661ef4c674e1ab79ecddb2067f9d2287abc9","unresolved":false,"context_lines":[{"line_number":539,"context_line":"        if isinstance(other, StoreLocations):"},{"line_number":540,"context_line":"            self.value +\u003d other.value"},{"line_number":541,"context_line":"        else:"},{"line_number":542,"context_line":"            uris \u003d list(other)"},{"line_number":543,"context_line":"            for location in uris:"},{"line_number":544,"context_line":"                _check_location_uri(self.image_proxy.context,"},{"line_number":545,"context_line":"                                    self.image_proxy.store_api,"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAP3%2F%2Fu90%3D","line":542,"updated":"2013-07-12 08:03:11.000000000","message":"ditto","commit_id":"16dd1bd659369a261fadee93ef7b6cdc6489bfa9"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"69ea661ef4c674e1ab79ecddb2067f9d2287abc9","unresolved":false,"context_lines":[{"line_number":547,"context_line":"            self.value +\u003d uris"},{"line_number":548,"context_line":"        return self"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"    def __contains__(self, uri):"},{"line_number":551,"context_line":"        return uri in self.value"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"    def __len__(self):"}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAAP3%2F%2Fu9s%3D","line":550,"updated":"2013-07-12 08:03:11.000000000","message":"ditto","commit_id":"16dd1bd659369a261fadee93ef7b6cdc6489bfa9"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ff2834adc743d8de7bb05ff3aa65e33aa473fe9f","unresolved":false,"context_lines":[{"line_number":505,"context_line":""},{"line_number":506,"context_line":"    def __setitem__(self, i, location):"},{"line_number":507,"context_line":"        _check_location_uri(self.image_proxy.context,"},{"line_number":508,"context_line":"                            self.image_proxy.store_api, location)"},{"line_number":509,"context_line":"        self.value.__setitem__(i, location)"},{"line_number":510,"context_line":""},{"line_number":511,"context_line":"    def __delitem__(self, i):"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAP3%2F%2Frw4%3D","line":508,"updated":"2013-07-13 04:32:25.000000000","message":"Bug here, I will fix in #35134.","commit_id":"74e4fe25dc7c2fa9868d0b1f09a13d4cf3e8a57f"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ff2834adc743d8de7bb05ff3aa65e33aa473fe9f","unresolved":false,"context_lines":[{"line_number":587,"context_line":"                raise exception.Invalid(_(\u0027Original locations is not empty: \u0027"},{"line_number":588,"context_line":"                                          \u0027%s\u0027) % ori_value)"},{"line_number":589,"context_line":"            # NOTE(zhiyan): Check locations are all valid."},{"line_number":590,"context_line":"            for uri in value:"},{"line_number":591,"context_line":"                _check_location_uri(self.context, self.store_api, uri)"},{"line_number":592,"context_line":"            return setattr(getattr(self, target), attr, list(value))"},{"line_number":593,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAP3%2F%2Frw0%3D","line":590,"updated":"2013-07-13 04:32:25.000000000","message":"Bug here, I will fix in #35134.","commit_id":"74e4fe25dc7c2fa9868d0b1f09a13d4cf3e8a57f"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ff2834adc743d8de7bb05ff3aa65e33aa473fe9f","unresolved":false,"context_lines":[{"line_number":594,"context_line":"    def del_attr(self):"},{"line_number":595,"context_line":"        value \u003d getattr(getattr(self, target), attr)"},{"line_number":596,"context_line":"        while len(value):"},{"line_number":597,"context_line":"            delete_image_from_backend(self.context, self.store_api,"},{"line_number":598,"context_line":"                                      self.image.image_id, value[0])"},{"line_number":599,"context_line":"            del value[0]"},{"line_number":600,"context_line":"            setattr(getattr(self, target), attr, value)"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAP3%2F%2Frws%3D","line":597,"updated":"2013-07-13 04:32:25.000000000","message":"Bug here, I will fix in #35134.","commit_id":"74e4fe25dc7c2fa9868d0b1f09a13d4cf3e8a57f"}],"glance/store/base.py":[{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"66c0b7170fe6bf184fc647076eb9b237cb92cece","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        :param image_file: The image data to write, as a file-like object"},{"line_number":121,"context_line":"        :param image_size: The size of the image data to write, in bytes"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        :retval tuple of URL in backing store, bytes written, and checksum"},{"line_number":124,"context_line":"               and a dictionary with storage system specific information"},{"line_number":125,"context_line":"        :raises `glance.common.exception.Duplicate` if the image already"},{"line_number":126,"context_line":"                existed"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FRMY%3D","line":123,"updated":"2013-07-05 16:27:45.000000000","message":"s/and checksum/checksum,/","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"f4b4d4fd1d77ce0ae0c185db8c1309e9f9aa1735","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        :param image_file: The image data to write, as a file-like object"},{"line_number":121,"context_line":"        :param image_size: The size of the image data to write, in bytes"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        :retval tuple of URL in backing store, bytes written, and checksum"},{"line_number":124,"context_line":"               and a dictionary with storage system specific information"},{"line_number":125,"context_line":"        :raises `glance.common.exception.Duplicate` if the image already"},{"line_number":126,"context_line":"                existed"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FQ%2Bs%3D","line":123,"in_reply_to":"AAAAPn%2F%2FRMY%3D","updated":"2013-07-05 17:52:35.000000000","message":"Done","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":1390,"name":"Paul Bourke","email":"pauldbourke@proton.me","username":"pauldbourke"},"change_message_id":"c0124aedaaa3196d3dc73d22429a9d9fe43addc2","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        :retval tuple of URL in backing store, bytes written, and checksum"},{"line_number":124,"context_line":"               and a dictionary with storage system specific information"},{"line_number":125,"context_line":"        :raises `glance.common.exception.Duplicate` if the image already"},{"line_number":126,"context_line":"                existed"},{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        raise NotImplementedError"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAP3%2F%2F9ug%3D","line":125,"updated":"2013-07-08 15:37:37.000000000","message":"\"and checksum\" should be replaced with \", checksum\"","commit_id":"e5c2136e3f05d0cdea30c73f33706b153551684c"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"587864c8b92bd2e1a8b70898eb8bbbfe3ef488f8","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        :retval tuple of URL in backing store, bytes written, and checksum"},{"line_number":124,"context_line":"               and a dictionary with storage system specific information"},{"line_number":125,"context_line":"        :raises `glance.common.exception.Duplicate` if the image already"},{"line_number":126,"context_line":"                existed"},{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        raise NotImplementedError"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAP3%2F%2F78k%3D","line":125,"in_reply_to":"AAAAP3%2F%2F9ug%3D","updated":"2013-07-08 22:45:33.000000000","message":"Done","commit_id":"e5c2136e3f05d0cdea30c73f33706b153551684c"}],"glance/store/filesystem.py":[{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"66c0b7170fe6bf184fc647076eb9b237cb92cece","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        :param image_id: The opaque image identifier"},{"line_number":212,"context_line":"        :param image_file: The image data to write, as a file-like object"},{"line_number":213,"context_line":"        :param image_size: The size of the image data to write, in bytes"},{"line_number":214,"context_line":"               and a dictionary with storage system specific information"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        :retval tuple of URL in backing store, bytes written, and checksum"},{"line_number":217,"context_line":"        :raises `glance.common.exception.Duplicate` if the image already"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FRMQ%3D","line":214,"updated":"2013-07-05 16:27:45.000000000","message":"I think this comment is supposed to be down beneath the current line 216.","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"f4b4d4fd1d77ce0ae0c185db8c1309e9f9aa1735","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        :param image_id: The opaque image identifier"},{"line_number":212,"context_line":"        :param image_file: The image data to write, as a file-like object"},{"line_number":213,"context_line":"        :param image_size: The size of the image data to write, in bytes"},{"line_number":214,"context_line":"               and a dictionary with storage system specific information"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        :retval tuple of URL in backing store, bytes written, and checksum"},{"line_number":217,"context_line":"        :raises `glance.common.exception.Duplicate` if the image already"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FQ%2Bg%3D","line":214,"in_reply_to":"AAAAPn%2F%2FRMQ%3D","updated":"2013-07-05 17:52:35.000000000","message":"Done","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"}],"glance/store/gridfs.py":[{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"66c0b7170fe6bf184fc647076eb9b237cb92cece","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        :param image_id: The opaque image identifier"},{"line_number":166,"context_line":"        :param image_file: The image data to write, as a file-like object"},{"line_number":167,"context_line":"        :param image_size: The size of the image data to write, in bytes"},{"line_number":168,"context_line":"               and a dictionary with storage system specific information"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        :retval tuple of URL in backing store, bytes written, and checksum"},{"line_number":171,"context_line":"        :raises `glance.common.exception.Duplicate` if the image already"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FRMA%3D","line":168,"updated":"2013-07-05 16:27:45.000000000","message":"This addition seems meant for retval","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"f4b4d4fd1d77ce0ae0c185db8c1309e9f9aa1735","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        :param image_id: The opaque image identifier"},{"line_number":166,"context_line":"        :param image_file: The image data to write, as a file-like object"},{"line_number":167,"context_line":"        :param image_size: The size of the image data to write, in bytes"},{"line_number":168,"context_line":"               and a dictionary with storage system specific information"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        :retval tuple of URL in backing store, bytes written, and checksum"},{"line_number":171,"context_line":"        :raises `glance.common.exception.Duplicate` if the image already"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FQ%2BU%3D","line":168,"in_reply_to":"AAAAPn%2F%2FRMA%3D","updated":"2013-07-05 17:52:35.000000000","message":"Done","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"}],"glance/store/rbd.py":[{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"66c0b7170fe6bf184fc647076eb9b237cb92cece","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        :param image_file: The image data to write, as a file-like object"},{"line_number":257,"context_line":"        :param image_size: The size of the image data to write, in bytes"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        :param image_size: The size of the image data to write, in bytes"},{"line_number":260,"context_line":"               and a dictionary with storage system specific information"},{"line_number":261,"context_line":"        :raises `glance.common.exception.Duplicate` if the image already"},{"line_number":262,"context_line":"                existed"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FRL0%3D","line":259,"updated":"2013-07-05 16:27:45.000000000","message":"image_size -\u003e retval and substitution fix","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"f4b4d4fd1d77ce0ae0c185db8c1309e9f9aa1735","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        :param image_file: The image data to write, as a file-like object"},{"line_number":257,"context_line":"        :param image_size: The size of the image data to write, in bytes"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        :param image_size: The size of the image data to write, in bytes"},{"line_number":260,"context_line":"               and a dictionary with storage system specific information"},{"line_number":261,"context_line":"        :raises `glance.common.exception.Duplicate` if the image already"},{"line_number":262,"context_line":"                existed"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FQ%2BI%3D","line":259,"in_reply_to":"AAAAPn%2F%2FRL0%3D","updated":"2013-07-05 17:52:35.000000000","message":"Done","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"}],"glance/store/s3.py":[{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"66c0b7170fe6bf184fc647076eb9b237cb92cece","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        :param image_file: The image data to write, as a file-like object"},{"line_number":326,"context_line":"        :param image_size: The size of the image data to write, in bytes"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        :param image_size: The size of the image data to write, in bytes"},{"line_number":329,"context_line":"               and a dictionary with storage system specific information"},{"line_number":330,"context_line":"        :raises `glance.common.exception.Duplicate` if the image already"},{"line_number":331,"context_line":"                existed"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FRLw%3D","line":328,"updated":"2013-07-05 16:27:45.000000000","message":"same comment as the other store files","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"},{"author":{"_account_id":6493,"name":"John Bresnahan","email":"john@bresnahan.me","username":"jbresnah"},"change_message_id":"f4b4d4fd1d77ce0ae0c185db8c1309e9f9aa1735","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        :param image_file: The image data to write, as a file-like object"},{"line_number":326,"context_line":"        :param image_size: The size of the image data to write, in bytes"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        :param image_size: The size of the image data to write, in bytes"},{"line_number":329,"context_line":"               and a dictionary with storage system specific information"},{"line_number":330,"context_line":"        :raises `glance.common.exception.Duplicate` if the image already"},{"line_number":331,"context_line":"                existed"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPn%2F%2FQ98%3D","line":328,"in_reply_to":"AAAAPn%2F%2FRLw%3D","updated":"2013-07-05 17:52:35.000000000","message":"Done","commit_id":"59fdeaeb93bcb3dcb8daf47f5e7398c70c244158"}]}
