)]}'
{"glance/api/v2/image_data.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"b1322603ef0b544471124e9cb015f020cb28bb43","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dunicode(e))"},{"line_number":129,"context_line":"        except exception.Forbidden as e:"},{"line_number":130,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dunicode(e))"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        if not image.locations:"},{"line_number":133,"context_line":"            reason \u003d _(\"No image data could be found\")"},{"line_number":134,"context_line":"            raise webob.exc.HTTPNotFound(reason)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2Fcgw%3D","line":131,"updated":"2013-09-26 15:14:57.000000000","message":"Here? Move this stuff into above try block?","commit_id":"1c8ca0b81c0b98ef7eb4b67ae2f2b04844dfe929"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ef37da28f03920c817f744b64d2559ff6ee0dfa0","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dunicode(e))"},{"line_number":129,"context_line":"        except exception.Forbidden as e:"},{"line_number":130,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dunicode(e))"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        if not image.locations:"},{"line_number":133,"context_line":"            reason \u003d _(\"No image data could be found\")"},{"line_number":134,"context_line":"            raise webob.exc.HTTPNotFound(reason)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FcBE%3D","line":131,"in_reply_to":"AAAAS3%2F%2FcZk%3D","updated":"2013-09-26 17:02:49.000000000","message":"Yup, move below 4 lines to above try-catch block.\n\nYou should want to say \u0027download_image\u0027 perm? It make sense to me to add it.\n\nAnd please add a UT for this change point.","commit_id":"1c8ca0b81c0b98ef7eb4b67ae2f2b04844dfe929"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"2496a30a90488f5b749afc7c2271e08fea7728bf","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dunicode(e))"},{"line_number":129,"context_line":"        except exception.Forbidden as e:"},{"line_number":130,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dunicode(e))"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        if not image.locations:"},{"line_number":133,"context_line":"            reason \u003d _(\"No image data could be found\")"},{"line_number":134,"context_line":"            raise webob.exc.HTTPNotFound(reason)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FcZk%3D","line":131,"in_reply_to":"AAAAS3%2F%2Fcgw%3D","updated":"2013-09-26 15:33:46.000000000","message":"Did you mean move below code piece into above try/except? I think it\u0027s a good point which can avoid the \u0027get_image_location\u0027 forbidden issue, I will update it in next PS. But I think we still need the code change I did in ResponseSerializer since we also have to make sure user has the \u0027get_data\u0027 permission.","commit_id":"1c8ca0b81c0b98ef7eb4b67ae2f2b04844dfe929"}],"glance/api/v2/images.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"3d4ba5e04cbbdb0454204e57e17af14b2ff296e1","unresolved":false,"context_lines":[{"line_number":578,"context_line":"        response.location \u003d self._get_image_href(image)"},{"line_number":579,"context_line":""},{"line_number":580,"context_line":"    def show(self, response, image):"},{"line_number":581,"context_line":"        image_view \u003d self._format_image(image)"},{"line_number":582,"context_line":"        body \u003d json.dumps(image_view, ensure_ascii\u003dFalse)"},{"line_number":583,"context_line":"        response.unicode_body \u003d unicode(body)"},{"line_number":584,"context_line":"        response.content_type \u003d \u0027application/json\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAS3%2F%2Fd7g%3D","line":581,"updated":"2013-09-26 08:32:23.000000000","message":"I think we should handle this also, to return 403 instead of 500.","commit_id":"84de2058574c07b575c86c43b919277c3870dbf8"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"9c493139142be8bf6931be4f6cdebcadfb101dd7","unresolved":false,"context_lines":[{"line_number":578,"context_line":"        response.location \u003d self._get_image_href(image)"},{"line_number":579,"context_line":""},{"line_number":580,"context_line":"    def show(self, response, image):"},{"line_number":581,"context_line":"        image_view \u003d self._format_image(image)"},{"line_number":582,"context_line":"        body \u003d json.dumps(image_view, ensure_ascii\u003dFalse)"},{"line_number":583,"context_line":"        response.unicode_body \u003d unicode(body)"},{"line_number":584,"context_line":"        response.content_type \u003d \u0027application/json\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAS3%2F%2Fc%2Bg%3D","line":581,"in_reply_to":"AAAAS3%2F%2Fd7g%3D","updated":"2013-09-26 13:48:29.000000000","message":"Yep, thanks for the reviewing, Zhi Yan.\n\nDone.","commit_id":"84de2058574c07b575c86c43b919277c3870dbf8"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"41a995d5142ad1fb8fd07f3d4a9214118c15966b","unresolved":false,"context_lines":[{"line_number":560,"context_line":"        image_view[\u0027created_at\u0027] \u003d timeutils.isotime(image.created_at)"},{"line_number":561,"context_line":"        image_view[\u0027updated_at\u0027] \u003d timeutils.isotime(image.updated_at)"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        if CONF.show_multiple_locations and image.locations:"},{"line_number":564,"context_line":"            image_view[\u0027locations\u0027] \u003d list(image.locations)"},{"line_number":565,"context_line":"        if CONF.show_image_direct_url and image.locations:"},{"line_number":566,"context_line":"            image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2Fc2g%3D","line":563,"updated":"2013-09-26 14:20:05.000000000","message":"I think we should still show \"locations\": [] if image.locations is None","commit_id":"1c8ca0b81c0b98ef7eb4b67ae2f2b04844dfe929"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"b1322603ef0b544471124e9cb015f020cb28bb43","unresolved":false,"context_lines":[{"line_number":560,"context_line":"        image_view[\u0027created_at\u0027] \u003d timeutils.isotime(image.created_at)"},{"line_number":561,"context_line":"        image_view[\u0027updated_at\u0027] \u003d timeutils.isotime(image.updated_at)"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        if CONF.show_multiple_locations and image.locations:"},{"line_number":564,"context_line":"            image_view[\u0027locations\u0027] \u003d list(image.locations)"},{"line_number":565,"context_line":"        if CONF.show_image_direct_url and image.locations:"},{"line_number":566,"context_line":"            image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FchE%3D","line":563,"in_reply_to":"AAAAS3%2F%2Fc2g%3D","updated":"2013-09-26 15:14:57.000000000","message":"+1","commit_id":"1c8ca0b81c0b98ef7eb4b67ae2f2b04844dfe929"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"89a276fd4d40858d6bdaaa60d5fbdd3af5864826","unresolved":false,"context_lines":[{"line_number":560,"context_line":"        image_view[\u0027created_at\u0027] \u003d timeutils.isotime(image.created_at)"},{"line_number":561,"context_line":"        image_view[\u0027updated_at\u0027] \u003d timeutils.isotime(image.updated_at)"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        if CONF.show_multiple_locations and image.locations:"},{"line_number":564,"context_line":"            image_view[\u0027locations\u0027] \u003d list(image.locations)"},{"line_number":565,"context_line":"        if CONF.show_image_direct_url and image.locations:"},{"line_number":566,"context_line":"            image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2Fckc%3D","line":563,"in_reply_to":"AAAAS3%2F%2Fc2g%3D","updated":"2013-09-26 15:12:41.000000000","message":"It makes sense, but seems it\u0027s not related to the fix, right? :)","commit_id":"1c8ca0b81c0b98ef7eb4b67ae2f2b04844dfe929"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"5be1c1801691699e703876d5a64681394653daca","unresolved":false,"context_lines":[{"line_number":560,"context_line":"        image_view[\u0027created_at\u0027] \u003d timeutils.isotime(image.created_at)"},{"line_number":561,"context_line":"        image_view[\u0027updated_at\u0027] \u003d timeutils.isotime(image.updated_at)"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        if CONF.show_multiple_locations and image.locations:"},{"line_number":564,"context_line":"            image_view[\u0027locations\u0027] \u003d list(image.locations)"},{"line_number":565,"context_line":"        if CONF.show_image_direct_url and image.locations:"},{"line_number":566,"context_line":"            image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FcEQ%3D","line":563,"in_reply_to":"AAAAS3%2F%2FcGQ%3D","updated":"2013-09-26 16:46:15.000000000","message":"Ok, I will fix it in next PS.","commit_id":"1c8ca0b81c0b98ef7eb4b67ae2f2b04844dfe929"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"cc9e77d4121c7187a322c524aac844cd8267c00f","unresolved":false,"context_lines":[{"line_number":560,"context_line":"        image_view[\u0027created_at\u0027] \u003d timeutils.isotime(image.created_at)"},{"line_number":561,"context_line":"        image_view[\u0027updated_at\u0027] \u003d timeutils.isotime(image.updated_at)"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        if CONF.show_multiple_locations and image.locations:"},{"line_number":564,"context_line":"            image_view[\u0027locations\u0027] \u003d list(image.locations)"},{"line_number":565,"context_line":"        if CONF.show_image_direct_url and image.locations:"},{"line_number":566,"context_line":"            image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FcV8%3D","line":563,"in_reply_to":"AAAAS3%2F%2FccA%3D","updated":"2013-09-26 16:30:05.000000000","message":"Yeah I agree with mark on showing []\nbecause it indicates we re allowed to show locations but its just that none exists","commit_id":"1c8ca0b81c0b98ef7eb4b67ae2f2b04844dfe929"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"1bb31f2549453675fb16aab6dab0275f10a4a2c8","unresolved":false,"context_lines":[{"line_number":560,"context_line":"        image_view[\u0027created_at\u0027] \u003d timeutils.isotime(image.created_at)"},{"line_number":561,"context_line":"        image_view[\u0027updated_at\u0027] \u003d timeutils.isotime(image.updated_at)"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        if CONF.show_multiple_locations and image.locations:"},{"line_number":564,"context_line":"            image_view[\u0027locations\u0027] \u003d list(image.locations)"},{"line_number":565,"context_line":"        if CONF.show_image_direct_url and image.locations:"},{"line_number":566,"context_line":"            image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FcGQ%3D","line":563,"in_reply_to":"AAAAS3%2F%2FccA%3D","updated":"2013-09-26 16:37:57.000000000","message":"i agree with markwash :)","commit_id":"1c8ca0b81c0b98ef7eb4b67ae2f2b04844dfe929"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"2496a30a90488f5b749afc7c2271e08fea7728bf","unresolved":false,"context_lines":[{"line_number":560,"context_line":"        image_view[\u0027created_at\u0027] \u003d timeutils.isotime(image.created_at)"},{"line_number":561,"context_line":"        image_view[\u0027updated_at\u0027] \u003d timeutils.isotime(image.updated_at)"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"        if CONF.show_multiple_locations and image.locations:"},{"line_number":564,"context_line":"            image_view[\u0027locations\u0027] \u003d list(image.locations)"},{"line_number":565,"context_line":"        if CONF.show_image_direct_url and image.locations:"},{"line_number":566,"context_line":"            image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FccA%3D","line":563,"in_reply_to":"AAAAS3%2F%2FchE%3D","updated":"2013-09-26 15:33:46.000000000","message":"+1 for me or Mark? :-)","commit_id":"1c8ca0b81c0b98ef7eb4b67ae2f2b04844dfe929"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"cc9e77d4121c7187a322c524aac844cd8267c00f","unresolved":false,"context_lines":[{"line_number":563,"context_line":"        if CONF.show_multiple_locations and image.locations:"},{"line_number":564,"context_line":"            image_view[\u0027locations\u0027] \u003d list(image.locations)"},{"line_number":565,"context_line":"        if CONF.show_image_direct_url and image.locations:"},{"line_number":566,"context_line":"            image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        image_view[\u0027tags\u0027] \u003d list(image.tags)"},{"line_number":569,"context_line":"        image_view[\u0027self\u0027] \u003d self._get_image_href(image)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FcVk%3D","line":566,"updated":"2013-09-26 16:30:05.000000000","message":"do we want to do a similar thing for this as above?","commit_id":"1c8ca0b81c0b98ef7eb4b67ae2f2b04844dfe929"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"5be1c1801691699e703876d5a64681394653daca","unresolved":false,"context_lines":[{"line_number":563,"context_line":"        if CONF.show_multiple_locations and image.locations:"},{"line_number":564,"context_line":"            image_view[\u0027locations\u0027] \u003d list(image.locations)"},{"line_number":565,"context_line":"        if CONF.show_image_direct_url and image.locations:"},{"line_number":566,"context_line":"            image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        image_view[\u0027tags\u0027] \u003d list(image.tags)"},{"line_number":569,"context_line":"        image_view[\u0027self\u0027] \u003d self._get_image_href(image)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FcEI%3D","line":566,"in_reply_to":"AAAAS3%2F%2FcVk%3D","updated":"2013-09-26 16:46:15.000000000","message":"I think so, otherwise, we will run into the 403 forbidden issue since it\u0027s thrown from image.locations.","commit_id":"1c8ca0b81c0b98ef7eb4b67ae2f2b04844dfe929"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"41a995d5142ad1fb8fd07f3d4a9214118c15966b","unresolved":false,"context_lines":[{"line_number":580,"context_line":"    def show(self, response, image):"},{"line_number":581,"context_line":"        try:"},{"line_number":582,"context_line":"            image_view \u003d self._format_image(image)"},{"line_number":583,"context_line":"        except exception.Forbidden as e:"},{"line_number":584,"context_line":"            response.status_int \u003d 403"},{"line_number":585,"context_line":"            response.unicode_body \u003d unicode(e)"},{"line_number":586,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2Fc2Q%3D","line":583,"updated":"2013-09-26 14:20:05.000000000","message":"This is a very different way of handling exceptions and translating them to error responses. I\u0027d love it if we could somehow (even artificially) trigger and catch these scenarios in the controller methods.","commit_id":"1c8ca0b81c0b98ef7eb4b67ae2f2b04844dfe929"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"89a276fd4d40858d6bdaaa60d5fbdd3af5864826","unresolved":false,"context_lines":[{"line_number":580,"context_line":"    def show(self, response, image):"},{"line_number":581,"context_line":"        try:"},{"line_number":582,"context_line":"            image_view \u003d self._format_image(image)"},{"line_number":583,"context_line":"        except exception.Forbidden as e:"},{"line_number":584,"context_line":"            response.status_int \u003d 403"},{"line_number":585,"context_line":"            response.unicode_body \u003d unicode(e)"},{"line_number":586,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FciA%3D","line":583,"in_reply_to":"AAAAS3%2F%2Fc2Q%3D","updated":"2013-09-26 15:12:41.000000000","message":"I know it\u0027s a little bit weird to handling exceptions in response serializer. But as you know, we didn\u0027t touch the locations in controller, so the issue won\u0027t be happened in controller.\n\nAnyway, if we need to avoid handling Forbidden exception here, we may try to trigger/verify/check the policy in controller firstly.\n\nThanks for the reviewing, Mark.","commit_id":"1c8ca0b81c0b98ef7eb4b67ae2f2b04844dfe929"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"b1322603ef0b544471124e9cb015f020cb28bb43","unresolved":false,"context_lines":[{"line_number":588,"context_line":"        response.unicode_body \u003d unicode(body)"},{"line_number":589,"context_line":"        response.content_type \u003d \u0027application/json\u0027"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"    def update(self, response, image):"},{"line_number":592,"context_line":"        try:"},{"line_number":593,"context_line":"            image_view \u003d self._format_image(image)"},{"line_number":594,"context_line":"        except exception.Forbidden as e:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FchU%3D","line":591,"updated":"2013-09-26 15:14:57.000000000","message":"I think we don\u0027t need change \u0027update()\u0027, since in above controller the 403 will be returned if glance meet this policy violation issue IMO.","commit_id":"1c8ca0b81c0b98ef7eb4b67ae2f2b04844dfe929"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"2496a30a90488f5b749afc7c2271e08fea7728bf","unresolved":false,"context_lines":[{"line_number":588,"context_line":"        response.unicode_body \u003d unicode(body)"},{"line_number":589,"context_line":"        response.content_type \u003d \u0027application/json\u0027"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"    def update(self, response, image):"},{"line_number":592,"context_line":"        try:"},{"line_number":593,"context_line":"            image_view \u003d self._format_image(image)"},{"line_number":594,"context_line":"        except exception.Forbidden as e:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FcbY%3D","line":591,"in_reply_to":"AAAAS3%2F%2FchU%3D","updated":"2013-09-26 15:33:46.000000000","message":"I would say no? If the end user doesn\u0027t have the get_image_location permission, I think he will still run into the 403 error. Please correct me if I missed anything.","commit_id":"1c8ca0b81c0b98ef7eb4b67ae2f2b04844dfe929"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"46ace7ff813227e18954ec31755b0367facbb8cf","unresolved":false,"context_lines":[{"line_number":571,"context_line":""},{"line_number":572,"context_line":"        if CONF.show_image_direct_url and image.locations:"},{"line_number":573,"context_line":"            image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]"},{"line_number":574,"context_line":""},{"line_number":575,"context_line":"        image_view[\u0027tags\u0027] \u003d list(image.tags)"},{"line_number":576,"context_line":"        image_view[\u0027self\u0027] \u003d self._get_image_href(image)"},{"line_number":577,"context_line":"        image_view[\u0027file\u0027] \u003d self._get_image_href(image, \u0027file\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2FauE%3D","line":574,"updated":"2013-09-27 06:13:37.000000000","message":"Not sure whether we need keep \u0027direct_url\u0027 stay there just like \u0027locations\u0027. IMO it will be better if we keep consistent with \u0027locations\u0027 since client side image metadata parser probably assume \u0027direct_url\u0027 will be there when \u0027show_image_direct_url\u0027 enabled (even it\u0027s an empty string).","commit_id":"8385fee2d62846cafbf6cc1a867dd9f9a58c9ffc"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"b6a1dc9a80df17f645eb0b5641654926a93f585a","unresolved":false,"context_lines":[{"line_number":571,"context_line":""},{"line_number":572,"context_line":"        if CONF.show_image_direct_url and image.locations:"},{"line_number":573,"context_line":"            image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]"},{"line_number":574,"context_line":""},{"line_number":575,"context_line":"        image_view[\u0027tags\u0027] \u003d list(image.tags)"},{"line_number":576,"context_line":"        image_view[\u0027self\u0027] \u003d self._get_image_href(image)"},{"line_number":577,"context_line":"        image_view[\u0027file\u0027] \u003d self._get_image_href(image, \u0027file\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2FZv0%3D","line":574,"in_reply_to":"AAAAS3%2F%2FauE%3D","updated":"2013-09-27 13:14:07.000000000","message":"Hmm.. I don\u0027t think it\u0027s necessary to show an empty url given there is no location associated with the image.","commit_id":"8385fee2d62846cafbf6cc1a867dd9f9a58c9ffc"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"8f308e6956fd8a736784186e6d5c8c326d5b126d","unresolved":false,"context_lines":[{"line_number":600,"context_line":"        params \u003d dict(response.request.params)"},{"line_number":601,"context_line":"        params.pop(\u0027marker\u0027, None)"},{"line_number":602,"context_line":"        query \u003d urllib.urlencode(params)"},{"line_number":603,"context_line":"        raise exception.Forbidden()"},{"line_number":604,"context_line":"        body \u003d {"},{"line_number":605,"context_line":"            \u0027images\u0027: [self._format_image(i) for i in result[\u0027images\u0027]],"},{"line_number":606,"context_line":"            \u0027first\u0027: \u0027/v2/images\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAS3%2F%2FW60%3D","line":603,"updated":"2013-09-28 14:29:31.000000000","message":"!","commit_id":"b51efeccbd7c938a47f241879b18602c146f0d6e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"1953033d95c6f801f2359c0dd090a7ec5ac4a510","unresolved":false,"context_lines":[{"line_number":600,"context_line":"        params \u003d dict(response.request.params)"},{"line_number":601,"context_line":"        params.pop(\u0027marker\u0027, None)"},{"line_number":602,"context_line":"        query \u003d urllib.urlencode(params)"},{"line_number":603,"context_line":"        raise exception.Forbidden()"},{"line_number":604,"context_line":"        body \u003d {"},{"line_number":605,"context_line":"            \u0027images\u0027: [self._format_image(i) for i in result[\u0027images\u0027]],"},{"line_number":606,"context_line":"            \u0027first\u0027: \u0027/v2/images\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAS3%2F%2FW3A%3D","line":603,"in_reply_to":"AAAAS3%2F%2FW60%3D","updated":"2013-09-28 15:13:13.000000000","message":"Opps","commit_id":"b51efeccbd7c938a47f241879b18602c146f0d6e"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"110a9a3cc89e3f3538b99b6a128da62af3ee1865","unresolved":false,"context_lines":[{"line_number":570,"context_line":"                image_view[\u0027locations\u0027] \u003d []"},{"line_number":571,"context_line":""},{"line_number":572,"context_line":"        if CONF.show_image_direct_url and image.locations:"},{"line_number":573,"context_line":"            image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]"},{"line_number":574,"context_line":""},{"line_number":575,"context_line":"        image_view[\u0027tags\u0027] \u003d list(image.tags)"},{"line_number":576,"context_line":"        image_view[\u0027self\u0027] \u003d self._get_image_href(image)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAS3%2F%2FTzc%3D","line":573,"updated":"2013-09-30 14:22:18.000000000","message":"do we want to have empty string if image location does not exist?","commit_id":"e707bf486dd28e299006ae53fda37ab1701a5788"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"f38adfb6f288ec9500683e767f0739a3d02942ff","unresolved":false,"context_lines":[{"line_number":570,"context_line":"                image_view[\u0027locations\u0027] \u003d []"},{"line_number":571,"context_line":""},{"line_number":572,"context_line":"        if CONF.show_image_direct_url and image.locations:"},{"line_number":573,"context_line":"            image_view[\u0027direct_url\u0027] \u003d image.locations[0][\u0027url\u0027]"},{"line_number":574,"context_line":""},{"line_number":575,"context_line":"        image_view[\u0027tags\u0027] \u003d list(image.tags)"},{"line_number":576,"context_line":"        image_view[\u0027self\u0027] \u003d self._get_image_href(image)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAS3%2F%2FTvs%3D","line":573,"in_reply_to":"AAAAS3%2F%2FTzc%3D","updated":"2013-09-30 14:32:30.000000000","message":"humm, I prefer go this way just like I mentioned in https://review.openstack.org/#/c/48401/4/glance/api/v2/images.py.","commit_id":"e707bf486dd28e299006ae53fda37ab1701a5788"}],"glance/common/wsgi.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"016e3db87effb7e22d758408a6e9454380d832ce","unresolved":false,"context_lines":[{"line_number":611,"context_line":""},{"line_number":612,"context_line":"        # return unserializable result (typically a webob exc)"},{"line_number":613,"context_line":"        except Exception as e:"},{"line_number":614,"context_line":"            if isinstance(e, exception.Forbidden):"},{"line_number":615,"context_line":"                return webob.exc.HTTPForbidden(unicode(e))"},{"line_number":616,"context_line":"            return action_result"},{"line_number":617,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAS3%2F%2FW4c%3D","line":614,"updated":"2013-09-28 14:56:40.000000000","message":"I prefer use \u0027except\u0027 sentence instead use explicit \u0027isinstance\u0027 checking, it is a OOP way correctly.","commit_id":"b51efeccbd7c938a47f241879b18602c146f0d6e"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"1953033d95c6f801f2359c0dd090a7ec5ac4a510","unresolved":false,"context_lines":[{"line_number":611,"context_line":""},{"line_number":612,"context_line":"        # return unserializable result (typically a webob exc)"},{"line_number":613,"context_line":"        except Exception as e:"},{"line_number":614,"context_line":"            if isinstance(e, exception.Forbidden):"},{"line_number":615,"context_line":"                return webob.exc.HTTPForbidden(unicode(e))"},{"line_number":616,"context_line":"            return action_result"},{"line_number":617,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAS3%2F%2FW28%3D","line":614,"in_reply_to":"AAAAS3%2F%2FW4c%3D","updated":"2013-09-28 15:13:13.000000000","message":"It makes sense. Thanks, zhiyan.","commit_id":"b51efeccbd7c938a47f241879b18602c146f0d6e"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"110a9a3cc89e3f3538b99b6a128da62af3ee1865","unresolved":false,"context_lines":[{"line_number":609,"context_line":"            self.dispatch(self.serializer, action, response, action_result)"},{"line_number":610,"context_line":"            return response"},{"line_number":611,"context_line":""},{"line_number":612,"context_line":"        except exception.Forbidden as e:"},{"line_number":613,"context_line":"            return webob.exc.HTTPForbidden(unicode(e))"},{"line_number":614,"context_line":"        # return unserializable result (typically a webob exc)"},{"line_number":615,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAS3%2F%2FTyQ%3D","line":612,"updated":"2013-09-30 14:22:18.000000000","message":"Just a question, any way we could make it more generic than just for forbidden?","commit_id":"e707bf486dd28e299006ae53fda37ab1701a5788"}],"glance/tests/unit/v2/test_image_data_resource.py":[{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"cc9e77d4121c7187a322c524aac844cd8267c00f","unresolved":false,"context_lines":[{"line_number":364,"context_line":"                         response.headers[\u0027Content-Type\u0027])"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    def test_download_forbidden(self):"},{"line_number":367,"context_line":"        \"\"\"Make sure the serializer can return 403 forbidden erro instea of"},{"line_number":368,"context_line":"        500 internal server error."},{"line_number":369,"context_line":"        \"\"\""},{"line_number":370,"context_line":"        def get_data():"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FcJw%3D","line":367,"updated":"2013-09-26 16:30:05.000000000","message":"missed an \u0027r\u0027 in \"erro\" :) and similarly \u0027d\u0027 in \"instea\"","commit_id":"1c8ca0b81c0b98ef7eb4b67ae2f2b04844dfe929"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"5be1c1801691699e703876d5a64681394653daca","unresolved":false,"context_lines":[{"line_number":364,"context_line":"                         response.headers[\u0027Content-Type\u0027])"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    def test_download_forbidden(self):"},{"line_number":367,"context_line":"        \"\"\"Make sure the serializer can return 403 forbidden erro instea of"},{"line_number":368,"context_line":"        500 internal server error."},{"line_number":369,"context_line":"        \"\"\""},{"line_number":370,"context_line":"        def get_data():"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FcG4%3D","line":367,"in_reply_to":"AAAAS3%2F%2FcJw%3D","updated":"2013-09-26 16:46:15.000000000","message":"What an eye!","commit_id":"1c8ca0b81c0b98ef7eb4b67ae2f2b04844dfe929"}],"glance/tests/unit/v2/test_images_resource.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"3ed6565f25c7137b57aa1128d6abe9c1d77bf8c0","unresolved":false,"context_lines":[{"line_number":1972,"context_line":""},{"line_number":1973,"context_line":"    def test_index_forbidden(self):"},{"line_number":1974,"context_line":"        \"\"\"Make sure the serializer can return 403 forbidden error instead of"},{"line_number":1975,"context_line":"        500 internal server error."},{"line_number":1976,"context_line":"        \"\"\""},{"line_number":1977,"context_line":"        def fake_image_format(self, image):"},{"line_number":1978,"context_line":"            raise exception.Forbidden()"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2FWTw%3D","line":1975,"updated":"2013-09-29 03:06:05.000000000","message":"So after we choice go wsgi fixing way do you think we still  need this and below 2 test cases? Actually at here we will not check response status code since wsgi test case covered that. If you like keep them stay here you\u0027d better change the function doc at a lest IMO.","commit_id":"5a63728735c97da0c2944858b24b8eea4927a8e0"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"651c67677983733e5eb93ba6d97c700f095acbd1","unresolved":false,"context_lines":[{"line_number":2130,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":2131,"context_line":""},{"line_number":2132,"context_line":"    def test_index_forbidden(self):"},{"line_number":2133,"context_line":"        \"\"\"Make sure the serializer can return 403 forbidden error instead of"},{"line_number":2134,"context_line":"        500 internal server error."},{"line_number":2135,"context_line":"        \"\"\""},{"line_number":2136,"context_line":"        def fake_image_format(self, image):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2FKWw%3D","line":2133,"updated":"2013-10-03 06:30:19.000000000","message":"Two comments here:\n\n1. As I mentioned in PS8: so after we choice go wsgi fixing way do you think we still need this and below 2 test cases? Actually at here we will not check response status code since wsgi test case covered that. If you like keep them stay here you\u0027d better change the function doc at a lest IMO.\n\n2. Why we put those 3 test case in TestImagesSerializerWithUnicode? I prefer wrote them to above TestImagesSerializer class if you like keep them stay here.","commit_id":"50c93a584dc677b55aa7ec46e8e9f342b4913b9b"}]}
