)]}'
{"glance/api/authorization.py":[{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"a8a6581e74843970d0f4497cd626bb1a1451b740","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    def new_image_member(self, image, member_id):"},{"line_number":79,"context_line":"        owner \u003d image.owner"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        if not self.context.is_admin:"},{"line_number":82,"context_line":"            if owner is None or owner !\u003d self.context.owner:"},{"line_number":83,"context_line":"                message \u003d _(\"You are not permitted to create image members \""},{"line_number":84,"context_line":"                            \"for the image.\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FAq8%3D","line":81,"updated":"2013-02-11 18:55:01.000000000","message":"Should there be a visibility \u003d\u003d \u0027public\u0027 check here as well? I\u0027m just curious as to your thoughts.","commit_id":"d227b07e4e209bf83e31dd4039df198e02fc1e40"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"e58cff917b3596b3606a2b48dedbf4a89997cce6","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    def new_image_member(self, image, member_id):"},{"line_number":79,"context_line":"        owner \u003d image.owner"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        if not self.context.is_admin:"},{"line_number":82,"context_line":"            if owner is None or owner !\u003d self.context.owner:"},{"line_number":83,"context_line":"                message \u003d _(\"You are not permitted to create image members \""},{"line_number":84,"context_line":"                            \"for the image.\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FAns%3D","line":81,"in_reply_to":"AAAAM3%2F%2FAq8%3D","updated":"2013-02-11 18:58:36.000000000","message":"Yeah makes sense to have it here as well. Will add it in.","commit_id":"d227b07e4e209bf83e31dd4039df198e02fc1e40"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"a8a6581e74843970d0f4497cd626bb1a1451b740","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        super(ImageProxy, self).__init__(image)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def get_member_repo(self, **kwargs):"},{"line_number":177,"context_line":"        if self.image.visibility \u003d\u003d \u0027public\u0027:"},{"line_number":178,"context_line":"            message \u003d _(\"Public images do not have members.\")"},{"line_number":179,"context_line":"            raise exception.Forbidden(message)"},{"line_number":180,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FAps%3D","line":177,"updated":"2013-02-11 18:55:01.000000000","message":"Good!","commit_id":"d227b07e4e209bf83e31dd4039df198e02fc1e40"}],"glance/api/v2/image_members.py":[{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"a8a6581e74843970d0f4497cd626bb1a1451b740","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        except exception.Forbidden as e:"},{"line_number":75,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dunicode(e))"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def _format_image_member(self, image_member):"},{"line_number":78,"context_line":"        image_member_view \u003d {}"},{"line_number":79,"context_line":"        attributes \u003d [\u0027member_id\u0027, \u0027image_id\u0027, \u0027created_at\u0027, \u0027updated_at\u0027]"},{"line_number":80,"context_line":"        for key in attributes:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FApg%3D","line":77,"updated":"2013-02-11 18:55:01.000000000","message":"It would be better if this function were part of a Serializer class, following the model of the other v2 controllers.","commit_id":"d227b07e4e209bf83e31dd4039df198e02fc1e40"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"e58cff917b3596b3606a2b48dedbf4a89997cce6","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        except exception.Forbidden as e:"},{"line_number":75,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dunicode(e))"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def _format_image_member(self, image_member):"},{"line_number":78,"context_line":"        image_member_view \u003d {}"},{"line_number":79,"context_line":"        attributes \u003d [\u0027member_id\u0027, \u0027image_id\u0027, \u0027created_at\u0027, \u0027updated_at\u0027]"},{"line_number":80,"context_line":"        for key in attributes:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FAn0%3D","line":77,"in_reply_to":"AAAAM3%2F%2FApg%3D","updated":"2013-02-11 18:58:36.000000000","message":"That sounds like a great idea","commit_id":"d227b07e4e209bf83e31dd4039df198e02fc1e40"},{"author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"change_message_id":"a8a6581e74843970d0f4497cd626bb1a1451b740","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        except exception.Forbidden as e:"},{"line_number":132,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dunicode(e))"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def index_shared_images(self, req, member_id):"},{"line_number":135,"context_line":"        \"\"\""},{"line_number":136,"context_line":"        Retrieves list of image memberships for the given member."},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FAoo%3D","line":134,"updated":"2013-02-11 18:55:01.000000000","message":"I thought in our discussions we found this part of the api was not strictly needed. Did something change or am I misremembering?","commit_id":"d227b07e4e209bf83e31dd4039df198e02fc1e40"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"e58cff917b3596b3606a2b48dedbf4a89997cce6","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        except exception.Forbidden as e:"},{"line_number":132,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dunicode(e))"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def index_shared_images(self, req, member_id):"},{"line_number":135,"context_line":"        \"\"\""},{"line_number":136,"context_line":"        Retrieves list of image memberships for the given member."},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAM3%2F%2FAn4%3D","line":134,"in_reply_to":"AAAAM3%2F%2FAoo%3D","updated":"2013-02-11 18:58:36.000000000","message":"Yes I removed it by mistake in one of the future patches instead of this patch, will do that","commit_id":"d227b07e4e209bf83e31dd4039df198e02fc1e40"},{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"8954deccaed7461e7c4edd454891d8b4f8da1d3c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2013 OpenStack, LLC"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2B9v4%3D","line":1,"updated":"2013-02-13 01:30:22.000000000","message":"I think we are doing OpenStack Foundation now but this is a minor point.","commit_id":"02659ac1d2f4e2a0d96e8556cb74807c393efb34"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"355918ce7cfbd4829645d6207ae0c88b9acdbc5f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2013 OpenStack, LLC"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2B9ro%3D","line":1,"in_reply_to":"AAAAM3%2F%2B9v4%3D","updated":"2013-02-13 02:17:53.000000000","message":"Thanks for the reminder","commit_id":"02659ac1d2f4e2a0d96e8556cb74807c393efb34"},{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"8954deccaed7461e7c4edd454891d8b4f8da1d3c","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import json"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from webob import Response"},{"line_number":19,"context_line":"import webob.exc"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from glance.api import policy"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2B9xc%3D","line":18,"updated":"2013-02-13 01:30:22.000000000","message":"You should import webob here and do webob.Response on the calls since we avoid importing classes and this is more explicit.","commit_id":"02659ac1d2f4e2a0d96e8556cb74807c393efb34"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"355918ce7cfbd4829645d6207ae0c88b9acdbc5f","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import json"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from webob import Response"},{"line_number":19,"context_line":"import webob.exc"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from glance.api import policy"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2B9rc%3D","line":18,"in_reply_to":"AAAAM3%2F%2B9xc%3D","updated":"2013-02-13 02:17:53.000000000","message":"cool, I did not know that. Can you send me the reference so I can read up more on it.","commit_id":"02659ac1d2f4e2a0d96e8556cb74807c393efb34"},{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"8954deccaed7461e7c4edd454891d8b4f8da1d3c","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def _check_can_access_image_members(self, context):"},{"line_number":45,"context_line":"        if context.owner is None and not context.is_admin:"},{"line_number":46,"context_line":"            raise webob.exc.HTTPUnauthorized(_(\"No authenticated user\"))"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    @utils.mutating"},{"line_number":49,"context_line":"    def create(self, req, image_id, member_id):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2B9xI%3D","line":46,"updated":"2013-02-13 01:30:22.000000000","message":"I\u0027m not sure this message is particularly helpful. It could probably be a little more descriptive.\n\nAlso, could a check like this be done using policies or in the Image member proxy?","commit_id":"02659ac1d2f4e2a0d96e8556cb74807c393efb34"},{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"8954deccaed7461e7c4edd454891d8b4f8da1d3c","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        except exception.Forbidden as e:"},{"line_number":78,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dunicode(e))"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    @utils.mutating"},{"line_number":81,"context_line":"    def index(self, req, image_id):"},{"line_number":82,"context_line":"        \"\"\""},{"line_number":83,"context_line":"        Return a list of dictionaries indicating the members of the"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2B9wc%3D","line":80,"updated":"2013-02-13 01:30:22.000000000","message":"This probably doesn\u0027t need to be here.","commit_id":"02659ac1d2f4e2a0d96e8556cb74807c393efb34"},{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"8954deccaed7461e7c4edd454891d8b4f8da1d3c","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                                      read_tenants\u003dread_tenants,"},{"line_number":144,"context_line":"                                      write_tenants\u003dwrite_tenants)"},{"line_number":145,"context_line":"            except exception.UnknownScheme:"},{"line_number":146,"context_line":"                msg \u003d _(\"Store for image_id not found: %s\") % image_id"},{"line_number":147,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg,"},{"line_number":148,"context_line":"                                               request\u003dreq,"},{"line_number":149,"context_line":"                                               content_type\u003d\u0027text/plain\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2B9wA%3D","line":146,"updated":"2013-02-13 01:30:22.000000000","message":"We should not say \u0027image_id\u0027 to the user, maybe tweak this a bit?","commit_id":"02659ac1d2f4e2a0d96e8556cb74807c393efb34"}],"glance/api/v2/router.py":[{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"8954deccaed7461e7c4edd454891d8b4f8da1d3c","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        mapper.connect(\u0027/images/{image_id}/members/{member_id}\u0027,"},{"line_number":91,"context_line":"                       controller\u003dimage_members_resource,"},{"line_number":92,"context_line":"                       action\u003d\u0027create\u0027,"},{"line_number":93,"context_line":"                       conditions\u003d{\u0027method\u0027: [\u0027PUT\u0027]})"},{"line_number":94,"context_line":"        mapper.connect(\u0027/images/{image_id}/members/{member_id}\u0027,"},{"line_number":95,"context_line":"                       controller\u003dimage_members_resource,"},{"line_number":96,"context_line":"                       action\u003d\u0027delete\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2B9vM%3D","line":93,"updated":"2013-02-13 01:30:22.000000000","message":"Should this be a PUT or a POST? I can see how the line is blurred since you arent really \"creating\" a member but sortof adding one. I think I lean towards POST","commit_id":"02659ac1d2f4e2a0d96e8556cb74807c393efb34"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"355918ce7cfbd4829645d6207ae0c88b9acdbc5f","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        mapper.connect(\u0027/images/{image_id}/members/{member_id}\u0027,"},{"line_number":91,"context_line":"                       controller\u003dimage_members_resource,"},{"line_number":92,"context_line":"                       action\u003d\u0027create\u0027,"},{"line_number":93,"context_line":"                       conditions\u003d{\u0027method\u0027: [\u0027PUT\u0027]})"},{"line_number":94,"context_line":"        mapper.connect(\u0027/images/{image_id}/members/{member_id}\u0027,"},{"line_number":95,"context_line":"                       controller\u003dimage_members_resource,"},{"line_number":96,"context_line":"                       action\u003d\u0027delete\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2B9rs%3D","line":93,"in_reply_to":"AAAAM3%2F%2B9vM%3D","updated":"2013-02-13 02:17:53.000000000","message":"The POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line\n\nIn other words, POST is used to create.\n\nThe PUT method requests that the enclosed entity be stored under the supplied Request-URI. If the Request-URI refers to an already existing resource, the enclosed entity SHOULD be considered as a modified version of the one residing on the origin server. If the Request-URI does not point to an existing resource, and that URI is capable of being defined as a new resource by the requesting user agent, the origin server can create the resource with that URI.\"\n\nThat is, PUT is used to create or update.\n\nIf you look at future patches this method is used to update and create members. Hence PUT.","commit_id":"02659ac1d2f4e2a0d96e8556cb74807c393efb34"}],"glance/domain.py":[{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"8954deccaed7461e7c4edd454891d8b4f8da1d3c","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":"class ImageMemberFactory(object):"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def new_image_member(self, image, member_id):"},{"line_number":192,"context_line":"        created_at \u003d timeutils.utcnow()"},{"line_number":193,"context_line":"        updated_at \u003d created_at"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2B9u8%3D","line":191,"updated":"2013-02-13 01:30:22.000000000","message":"why this change?","commit_id":"02659ac1d2f4e2a0d96e8556cb74807c393efb34"},{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"5fe2fb55212e63bb1ccfa3a5cf2360a463eaeac7","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":"class ImageMemberFactory(object):"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def new_image_member(self, image, member_id):"},{"line_number":192,"context_line":"        created_at \u003d timeutils.utcnow()"},{"line_number":193,"context_line":"        updated_at \u003d created_at"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B8sA%3D","line":191,"updated":"2013-02-13 16:26:55.000000000","message":"Could you explain why this change is needed? It seems inconsistent and I can\u0027t see the reasoning.","commit_id":"5d80022748ec52241793780263be65d3c481cd66"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"4e9567fc109ca8d0ce5d0ca9a985cc777ca7cdb5","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":"class ImageMemberFactory(object):"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def new_image_member(self, image, member_id):"},{"line_number":192,"context_line":"        created_at \u003d timeutils.utcnow()"},{"line_number":193,"context_line":"        updated_at \u003d created_at"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B8po%3D","line":191,"in_reply_to":"AAAAM3%2F%2B8sA%3D","updated":"2013-02-13 16:35:29.000000000","message":"If you look at glance/api/authorization.py It helps check if the member can be added for that particular image or not. Because we cannto add members for public images.","commit_id":"5d80022748ec52241793780263be65d3c481cd66"}],"glance/tests/functional/v2/test_images.py":[{"author":{"_account_id":177,"name":"Alex Meade","email":"mr.alex.meade@gmail.com","username":"alex-meade"},"change_message_id":"8954deccaed7461e7c4edd454891d8b4f8da1d3c","unresolved":false,"context_lines":[{"line_number":843,"context_line":"        body \u003d json.loads(response.text)"},{"line_number":844,"context_line":"        self.assertEqual(1, len(body[\u0027members\u0027]))"},{"line_number":845,"context_line":""},{"line_number":846,"context_line":"        # Admin can any members"},{"line_number":847,"context_line":"        path \u003d self._url(\u0027/v2/images/%s/members\u0027 % image_fixture[1][\u0027id\u0027])"},{"line_number":848,"context_line":"        response \u003d requests.get(path, headers\u003dget_header(\u0027tenant1\u0027, \u0027admin\u0027))"},{"line_number":849,"context_line":"        self.assertEqual(200, response.status_code)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2B9tQ%3D","line":846,"updated":"2013-02-13 01:30:22.000000000","message":"Admin can get any members","commit_id":"02659ac1d2f4e2a0d96e8556cb74807c393efb34"}]}
