)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"761a76a41873cd1bd95c8748b9a944acec13522c","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Nested Quota Driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Nested Quota Driver patch adds hierarchical support. Quota"},{"line_number":10,"context_line":"API\u0027s now can also handle hierarchical projects."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"For the first pass only a user with admin role in a parent project"},{"line_number":13,"context_line":"will be able to update and delete its children quotas."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"9a8ffd7b_6a862867","line":10,"updated":"2015-11-30 20:43:13.000000000","message":"nit: replace API\u0027s for API","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"15583d638500d39b197839924e182441ad4122a9","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Nested Quota Driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Nested Quota Driver patch adds hierarchical support. Quota"},{"line_number":10,"context_line":"API\u0027s now can also handle hierarchical projects."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"For the first pass only a user with admin role in a parent project"},{"line_number":13,"context_line":"will be able to update and delete its children quotas."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"9a8ffd7b_d3aa3fd2","line":10,"in_reply_to":"9a8ffd7b_6a862867","updated":"2015-12-01 17:01:21.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"}],"nova/api/openstack/compute/quota_sets.py":[{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"761a76a41873cd1bd95c8748b9a944acec13522c","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                current \u003d project_quotas[key][\u0027limit\u0027]"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"            if limit - current \u003e free_quota:"},{"line_number":79,"context_line":"                msg \u003d _(\"Free quota available is %s.\") % free_quota"},{"line_number":80,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":81,"context_line":"        return limit"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_edd9d284","line":79,"updated":"2015-11-30 20:43:13.000000000","message":"wouldn\u0027t it be better if we say something like: \"Requested X, but free quota is... Y\" ?","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"15583d638500d39b197839924e182441ad4122a9","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                current \u003d project_quotas[key][\u0027limit\u0027]"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"            if limit - current \u003e free_quota:"},{"line_number":79,"context_line":"                msg \u003d _(\"Free quota available is %s.\") % free_quota"},{"line_number":80,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":81,"context_line":"        return limit"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_99aff17c","line":79,"in_reply_to":"9a8ffd7b_edd9d284","updated":"2015-12-01 17:01:21.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"761a76a41873cd1bd95c8748b9a944acec13522c","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            return {k: v[\u0027limit\u0027] for k, v in values.items()}"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def _is_descendant(self, target_project_id, subtree):"},{"line_number":122,"context_line":"        if subtree is not None:"},{"line_number":123,"context_line":"            for key, value in subtree.items():"},{"line_number":124,"context_line":"                if key \u003d\u003d target_project_id:"},{"line_number":125,"context_line":"                    return True"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_ed6eb295","line":122,"updated":"2015-11-30 20:43:13.000000000","message":"\"if subtree\" should be enough","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"15583d638500d39b197839924e182441ad4122a9","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            return {k: v[\u0027limit\u0027] for k, v in values.items()}"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def _is_descendant(self, target_project_id, subtree):"},{"line_number":122,"context_line":"        if subtree is not None:"},{"line_number":123,"context_line":"            for key, value in subtree.items():"},{"line_number":124,"context_line":"                if key \u003d\u003d target_project_id:"},{"line_number":125,"context_line":"                    return True"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_39bfe5ab","line":122,"in_reply_to":"9a8ffd7b_ed6eb295","updated":"2015-12-01 17:01:21.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"262025763d2f968684c0a5e12f5c2d26efec889d","unresolved":false,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _authorize_update_or_delete(self, context_project,"},{"line_number":131,"context_line":"                                    target_project_id,"},{"line_number":132,"context_line":"                                    parent_id):"},{"line_number":133,"context_line":"        \"\"\"Checks if update or delete are allowed in the current hierarchy."},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        With hierarchical projects, only the admin of the parent or the root"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_be74e0fd","line":132,"updated":"2015-12-02 14:40:10.000000000","message":"suggestion: rename it to target_parent_id","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"74fd36445f9a395c573d1d9fbb8d47fc9a3d484d","unresolved":false,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _authorize_update_or_delete(self, context_project,"},{"line_number":131,"context_line":"                                    target_project_id,"},{"line_number":132,"context_line":"                                    parent_id):"},{"line_number":133,"context_line":"        \"\"\"Checks if update or delete are allowed in the current hierarchy."},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        With hierarchical projects, only the admin of the parent or the root"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_05f7d459","line":132,"in_reply_to":"9a8ffd7b_be74e0fd","updated":"2015-12-02 16:27:03.000000000","message":"I don\u0027t think, this target project can be a subproject, or any other project.","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"761a76a41873cd1bd95c8748b9a944acec13522c","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        :param context_project: The project in which the user is scoped to."},{"line_number":139,"context_line":"        :param target_project_id: The id of the project in which the"},{"line_number":140,"context_line":"                                  user want to perform an update or"},{"line_number":141,"context_line":"                                  delete operation."},{"line_number":142,"context_line":"        :param parent_id: The parent id of the project in which the user"},{"line_number":143,"context_line":"                          want to perform an update or delete operation."}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_cde64e16","line":140,"updated":"2015-11-30 20:43:13.000000000","message":"wants","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"15583d638500d39b197839924e182441ad4122a9","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        :param context_project: The project in which the user is scoped to."},{"line_number":139,"context_line":"        :param target_project_id: The id of the project in which the"},{"line_number":140,"context_line":"                                  user want to perform an update or"},{"line_number":141,"context_line":"                                  delete operation."},{"line_number":142,"context_line":"        :param parent_id: The parent id of the project in which the user"},{"line_number":143,"context_line":"                          want to perform an update or delete operation."}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_59d189fa","line":140,"in_reply_to":"9a8ffd7b_cde64e16","updated":"2015-12-01 17:01:21.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"761a76a41873cd1bd95c8748b9a944acec13522c","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                                  user want to perform an update or"},{"line_number":141,"context_line":"                                  delete operation."},{"line_number":142,"context_line":"        :param parent_id: The parent id of the project in which the user"},{"line_number":143,"context_line":"                          want to perform an update or delete operation."},{"line_number":144,"context_line":"        \"\"\""},{"line_number":145,"context_line":"        if context_project.parent_id and parent_id !\u003d context_project.id:"},{"line_number":146,"context_line":"            msg \u003d _(\"Update and delete quota operations can only be made \""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_ede31204","line":143,"updated":"2015-11-30 20:43:13.000000000","message":"wants.  And shouldn\u0027t these docstrings mentions the raised exceptions?","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"15583d638500d39b197839924e182441ad4122a9","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                                  user want to perform an update or"},{"line_number":141,"context_line":"                                  delete operation."},{"line_number":142,"context_line":"        :param parent_id: The parent id of the project in which the user"},{"line_number":143,"context_line":"                          want to perform an update or delete operation."},{"line_number":144,"context_line":"        \"\"\""},{"line_number":145,"context_line":"        if context_project.parent_id and parent_id !\u003d context_project.id:"},{"line_number":146,"context_line":"            msg \u003d _(\"Update and delete quota operations can only be made \""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_79cc8d61","line":143,"in_reply_to":"9a8ffd7b_ede31204","updated":"2015-12-01 17:01:21.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"761a76a41873cd1bd95c8748b9a944acec13522c","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        \"\"\""},{"line_number":145,"context_line":"        if context_project.parent_id and parent_id !\u003d context_project.id:"},{"line_number":146,"context_line":"            msg \u003d _(\"Update and delete quota operations can only be made \""},{"line_number":147,"context_line":"                    \"by an admin of immediate parent or by the CLOUD admin.\")"},{"line_number":148,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        if context_project.id !\u003d target_project_id:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_4d8ede28","line":147,"updated":"2015-11-30 20:43:13.000000000","message":"does CLOUD need to be upcase?","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"15583d638500d39b197839924e182441ad4122a9","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        \"\"\""},{"line_number":145,"context_line":"        if context_project.parent_id and parent_id !\u003d context_project.id:"},{"line_number":146,"context_line":"            msg \u003d _(\"Update and delete quota operations can only be made \""},{"line_number":147,"context_line":"                    \"by an admin of immediate parent or by the CLOUD admin.\")"},{"line_number":148,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        if context_project.id !\u003d target_project_id:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_19db011d","line":147,"in_reply_to":"9a8ffd7b_4d8ede28","updated":"2015-12-01 17:01:21.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"761a76a41873cd1bd95c8748b9a944acec13522c","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                    \"by an admin of immediate parent or by the CLOUD admin.\")"},{"line_number":148,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        if context_project.id !\u003d target_project_id:"},{"line_number":151,"context_line":"            if not self._is_descendant(target_project_id,"},{"line_number":152,"context_line":"                                       context_project.subtree):"},{"line_number":153,"context_line":"                msg \u003d _(\"Update and delete quota operations can only be made \""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_cdaf2e2a","line":150,"updated":"2015-11-30 20:43:13.000000000","message":"a question: how to update the quota of the root project with a token scoped to it? The context_project.id and target_project_id will be the same","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"262025763d2f968684c0a5e12f5c2d26efec889d","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                    \"by an admin of immediate parent or by the CLOUD admin.\")"},{"line_number":148,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        if context_project.id !\u003d target_project_id:"},{"line_number":151,"context_line":"            if not self._is_descendant(target_project_id,"},{"line_number":152,"context_line":"                                       context_project.subtree):"},{"line_number":153,"context_line":"                msg \u003d _(\"Update and delete quota operations can only be made \""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_fe14a844","line":150,"in_reply_to":"9a8ffd7b_5f02c93f","updated":"2015-12-02 14:40:10.000000000","message":"yes, ok... but where exactly does this enforce for the root project happen?","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"15583d638500d39b197839924e182441ad4122a9","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                    \"by an admin of immediate parent or by the CLOUD admin.\")"},{"line_number":148,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        if context_project.id !\u003d target_project_id:"},{"line_number":151,"context_line":"            if not self._is_descendant(target_project_id,"},{"line_number":152,"context_line":"                                       context_project.subtree):"},{"line_number":153,"context_line":"                msg \u003d _(\"Update and delete quota operations can only be made \""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_5f02c93f","line":150,"in_reply_to":"9a8ffd7b_cdaf2e2a","updated":"2015-12-01 17:01:21.000000000","message":"you\u0027re right, but this method is only called if the project have a parent_id, since a root project doesn\u0027t have parent project, we don\u0027t do this assert for this case.\n\n(please see line 271)","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"74fd36445f9a395c573d1d9fbb8d47fc9a3d484d","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                    \"by an admin of immediate parent or by the CLOUD admin.\")"},{"line_number":148,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        if context_project.id !\u003d target_project_id:"},{"line_number":151,"context_line":"            if not self._is_descendant(target_project_id,"},{"line_number":152,"context_line":"                                       context_project.subtree):"},{"line_number":153,"context_line":"                msg \u003d _(\"Update and delete quota operations can only be made \""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_a57a88ef","line":150,"in_reply_to":"9a8ffd7b_fe14a844","updated":"2015-12-02 16:27:03.000000000","message":"The root project will have the same behavior as before, so, the enforce happen in the update method (start at line 242), more precisely on the line 318-324","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"761a76a41873cd1bd95c8748b9a944acec13522c","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        \"\"\""},{"line_number":174,"context_line":"        if target_project.parent_id:"},{"line_number":175,"context_line":"            if target_project.id !\u003d context_project.id:"},{"line_number":176,"context_line":"                if not self._is_descendant(target_project.id,"},{"line_number":177,"context_line":"                                           context_project.subtree):"},{"line_number":178,"context_line":"                    msg \u003d _(\"Show operations can only be made to projects in \""},{"line_number":179,"context_line":"                            \"the same hierarchy of the project in which users \""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_c067f5e8","line":176,"updated":"2015-11-30 20:43:13.000000000","message":"suggestion: change _is_descendant for _assert_not_descendant and raise the exception inside this method, if needed","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"15583d638500d39b197839924e182441ad4122a9","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        \"\"\""},{"line_number":174,"context_line":"        if target_project.parent_id:"},{"line_number":175,"context_line":"            if target_project.id !\u003d context_project.id:"},{"line_number":176,"context_line":"                if not self._is_descendant(target_project.id,"},{"line_number":177,"context_line":"                                           context_project.subtree):"},{"line_number":178,"context_line":"                    msg \u003d _(\"Show operations can only be made to projects in \""},{"line_number":179,"context_line":"                            \"the same hierarchy of the project in which users \""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_9fb5917f","line":176,"in_reply_to":"9a8ffd7b_c067f5e8","updated":"2015-12-01 17:01:21.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"262025763d2f968684c0a5e12f5c2d26efec889d","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                if context_project.id !\u003d target_project.parent_id:"},{"line_number":183,"context_line":"                    if context_project.parent_id:"},{"line_number":184,"context_line":"                        msg \u003d _(\"Only users with token scoped to immediate \""},{"line_number":185,"context_line":"                                \"parents or root projects are allowed to see \""},{"line_number":186,"context_line":"                                \"its children quotas.\")"},{"line_number":187,"context_line":"                        raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":188,"context_line":"        elif context_project.parent_id:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_814e616d","line":185,"updated":"2015-12-02 14:40:10.000000000","message":"nope. The current project can see that too.","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"74fd36445f9a395c573d1d9fbb8d47fc9a3d484d","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                if context_project.id !\u003d target_project.parent_id:"},{"line_number":183,"context_line":"                    if context_project.parent_id:"},{"line_number":184,"context_line":"                        msg \u003d _(\"Only users with token scoped to immediate \""},{"line_number":185,"context_line":"                                \"parents or root projects are allowed to see \""},{"line_number":186,"context_line":"                                \"its children quotas.\")"},{"line_number":187,"context_line":"                        raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":188,"context_line":"        elif context_project.parent_id:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_85118406","line":185,"in_reply_to":"9a8ffd7b_814e616d","updated":"2015-12-02 16:27:03.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"761a76a41873cd1bd95c8748b9a944acec13522c","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                                \"its children quotas.\")"},{"line_number":187,"context_line":"                        raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":188,"context_line":"        elif context_project.parent_id:"},{"line_number":189,"context_line":"            msg \u003d _(\"An user with a token scoped to a subproject is not \""},{"line_number":190,"context_line":"                    \"allowed to see the quota of its parents.\")"},{"line_number":191,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":192,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_cd0bae2a","line":189,"updated":"2015-11-30 20:43:13.000000000","message":"A user.","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"15583d638500d39b197839924e182441ad4122a9","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                                \"its children quotas.\")"},{"line_number":187,"context_line":"                        raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":188,"context_line":"        elif context_project.parent_id:"},{"line_number":189,"context_line":"            msg \u003d _(\"An user with a token scoped to a subproject is not \""},{"line_number":190,"context_line":"                    \"allowed to see the quota of its parents.\")"},{"line_number":191,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":192,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_bfb89576","line":189,"in_reply_to":"9a8ffd7b_cd0bae2a","updated":"2015-12-01 17:01:21.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"761a76a41873cd1bd95c8748b9a944acec13522c","unresolved":false,"context_lines":[{"line_number":194,"context_line":"    def show(self, req, id):"},{"line_number":195,"context_line":"        \"\"\"Show quota for a particular tenant"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        This works for hierarchical and non-hierarchical projects. For"},{"line_number":198,"context_line":"        hierarchical projects admin of current project, immediate"},{"line_number":199,"context_line":"        parent of the project or the CLOUD admin are able to perform"},{"line_number":200,"context_line":"        a show."}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_007bbd7c","line":197,"updated":"2015-11-30 20:43:13.000000000","message":"I\u0027d remove this first phrase","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"15583d638500d39b197839924e182441ad4122a9","unresolved":false,"context_lines":[{"line_number":194,"context_line":"    def show(self, req, id):"},{"line_number":195,"context_line":"        \"\"\"Show quota for a particular tenant"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        This works for hierarchical and non-hierarchical projects. For"},{"line_number":198,"context_line":"        hierarchical projects admin of current project, immediate"},{"line_number":199,"context_line":"        parent of the project or the CLOUD admin are able to perform"},{"line_number":200,"context_line":"        a show."}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_3fa58546","line":197,"in_reply_to":"9a8ffd7b_007bbd7c","updated":"2015-12-01 17:01:21.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"761a76a41873cd1bd95c8748b9a944acec13522c","unresolved":false,"context_lines":[{"line_number":200,"context_line":"        a show."},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        :param req: request"},{"line_number":203,"context_line":"        :param id: target project id that needs to be updated"},{"line_number":204,"context_line":"        \"\"\""},{"line_number":205,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":206,"context_line":"        authorize(context, action\u003d\u0027show\u0027, target\u003d{\u0027project_id\u0027: id})"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_60ede924","line":203,"updated":"2015-11-30 20:43:13.000000000","message":"include the return","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"15583d638500d39b197839924e182441ad4122a9","unresolved":false,"context_lines":[{"line_number":200,"context_line":"        a show."},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        :param req: request"},{"line_number":203,"context_line":"        :param id: target project id that needs to be updated"},{"line_number":204,"context_line":"        \"\"\""},{"line_number":205,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":206,"context_line":"        authorize(context, action\u003d\u0027show\u0027, target\u003d{\u0027project_id\u0027: id})"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_df623916","line":203,"in_reply_to":"9a8ffd7b_60ede924","updated":"2015-12-01 17:01:21.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"262025763d2f968684c0a5e12f5c2d26efec889d","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        target_project_id \u003d id"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        try:"},{"line_number":212,"context_line":"            # With hierarchical projects, only the admin of the current project"},{"line_number":213,"context_line":"            # or the root project has privilege to perform quota show"},{"line_number":214,"context_line":"            # operations."},{"line_number":215,"context_line":"            context_project \u003d KEYSTONE.get_project(context, context.project_id,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_419cf90d","line":212,"updated":"2015-12-02 14:40:10.000000000","message":"remove all of these \"With hierarchical projects\"","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"74fd36445f9a395c573d1d9fbb8d47fc9a3d484d","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        target_project_id \u003d id"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        try:"},{"line_number":212,"context_line":"            # With hierarchical projects, only the admin of the current project"},{"line_number":213,"context_line":"            # or the root project has privilege to perform quota show"},{"line_number":214,"context_line":"            # operations."},{"line_number":215,"context_line":"            context_project \u003d KEYSTONE.get_project(context, context.project_id,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_254d383e","line":212,"in_reply_to":"9a8ffd7b_419cf90d","updated":"2015-12-02 16:27:03.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"761a76a41873cd1bd95c8748b9a944acec13522c","unresolved":false,"context_lines":[{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        try:"},{"line_number":212,"context_line":"            # With hierarchical projects, only the admin of the current project"},{"line_number":213,"context_line":"            # or the root project has privilege to perform quota show"},{"line_number":214,"context_line":"            # operations."},{"line_number":215,"context_line":"            context_project \u003d KEYSTONE.get_project(context, context.project_id,"},{"line_number":216,"context_line":"                                                   subtree\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_4036a5b5","line":213,"updated":"2015-11-30 20:43:13.000000000","message":"you say in L198  that the immediate parent is also allowed to. I\u0027d remove this whole comment here. Too much repetition","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"15583d638500d39b197839924e182441ad4122a9","unresolved":false,"context_lines":[{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        try:"},{"line_number":212,"context_line":"            # With hierarchical projects, only the admin of the current project"},{"line_number":213,"context_line":"            # or the root project has privilege to perform quota show"},{"line_number":214,"context_line":"            # operations."},{"line_number":215,"context_line":"            context_project \u003d KEYSTONE.get_project(context, context.project_id,"},{"line_number":216,"context_line":"                                                   subtree\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_5f7729d4","line":213,"in_reply_to":"9a8ffd7b_4036a5b5","updated":"2015-12-01 17:01:21.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"761a76a41873cd1bd95c8748b9a944acec13522c","unresolved":false,"context_lines":[{"line_number":242,"context_line":"    def update(self, req, id, body):"},{"line_number":243,"context_line":"        \"\"\"Update Quota for a particular tenant"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        This works for hierarchical and non-hierarchical projects. For"},{"line_number":246,"context_line":"        hierarchical projects only immediate parent admin or the"},{"line_number":247,"context_line":"        CLOUD admin are able to perform an update."},{"line_number":248,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_40d22536","line":245,"updated":"2015-11-30 20:43:13.000000000","message":"remove the first phrase","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"15583d638500d39b197839924e182441ad4122a9","unresolved":false,"context_lines":[{"line_number":242,"context_line":"    def update(self, req, id, body):"},{"line_number":243,"context_line":"        \"\"\"Update Quota for a particular tenant"},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        This works for hierarchical and non-hierarchical projects. For"},{"line_number":246,"context_line":"        hierarchical projects only immediate parent admin or the"},{"line_number":247,"context_line":"        CLOUD admin are able to perform an update."},{"line_number":248,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_3f7ca5b4","line":245,"in_reply_to":"9a8ffd7b_40d22536","updated":"2015-12-01 17:01:21.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"262025763d2f968684c0a5e12f5c2d26efec889d","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        target_project \u003d KEYSTONE.get_project(context, target_project_id)"},{"line_number":268,"context_line":"        parent_project_id \u003d target_project.parent_id"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        if parent_project_id:"},{"line_number":271,"context_line":"            # Get the children of the project which the token is scoped to in"},{"line_number":272,"context_line":"            # order to know if the target_project is in its hierarchy."},{"line_number":273,"context_line":"            context_project \u003d KEYSTONE.get_project(context,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_abefc41c","line":270,"updated":"2015-12-02 14:40:10.000000000","message":"this whole block (from 270 to 281) is repeated on the delete. This can all be put into the _authorize_update_or_delete method, passing only: context, target_project_id and parent_project_id","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"74fd36445f9a395c573d1d9fbb8d47fc9a3d484d","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        target_project \u003d KEYSTONE.get_project(context, target_project_id)"},{"line_number":268,"context_line":"        parent_project_id \u003d target_project.parent_id"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        if parent_project_id:"},{"line_number":271,"context_line":"            # Get the children of the project which the token is scoped to in"},{"line_number":272,"context_line":"            # order to know if the target_project is in its hierarchy."},{"line_number":273,"context_line":"            context_project \u003d KEYSTONE.get_project(context,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_0567d4b7","line":270,"in_reply_to":"9a8ffd7b_abefc41c","updated":"2015-12-02 16:27:03.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"761a76a41873cd1bd95c8748b9a944acec13522c","unresolved":false,"context_lines":[{"line_number":322,"context_line":"            except exception.QuotaExists:"},{"line_number":323,"context_line":"                objects.Quotas.update_limit(context, target_project_id,"},{"line_number":324,"context_line":"                                            key, value, user_id\u003duser_id)"},{"line_number":325,"context_line":"        # If hierarchical projects, update child\u0027s quota first"},{"line_number":326,"context_line":"        # and then parents quota. In future this needs to be an"},{"line_number":327,"context_line":"        # atomic operation."},{"line_number":328,"context_line":"        if parent_project_id:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_e078f92d","line":325,"updated":"2015-11-30 20:43:13.000000000","message":"put a TODO(someone) here, to explicitly say that it needs to be atomic someday","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"15583d638500d39b197839924e182441ad4122a9","unresolved":false,"context_lines":[{"line_number":322,"context_line":"            except exception.QuotaExists:"},{"line_number":323,"context_line":"                objects.Quotas.update_limit(context, target_project_id,"},{"line_number":324,"context_line":"                                            key, value, user_id\u003duser_id)"},{"line_number":325,"context_line":"        # If hierarchical projects, update child\u0027s quota first"},{"line_number":326,"context_line":"        # and then parents quota. In future this needs to be an"},{"line_number":327,"context_line":"        # atomic operation."},{"line_number":328,"context_line":"        if parent_project_id:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_ff337d11","line":325,"in_reply_to":"9a8ffd7b_e078f92d","updated":"2015-12-01 17:01:21.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"761a76a41873cd1bd95c8748b9a944acec13522c","unresolved":false,"context_lines":[{"line_number":366,"context_line":"    def delete(self, req, id):"},{"line_number":367,"context_line":"        \"\"\"Delete Quota for a particular tenant."},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"        This works for hierarchical and non-hierarchical projects. For"},{"line_number":370,"context_line":"        hierarchical projects only immediate parent admin or the"},{"line_number":371,"context_line":"        CLOUD admin are able to perform a delete."},{"line_number":372,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_209da159","line":369,"updated":"2015-11-30 20:43:13.000000000","message":"remove first phrase","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"15583d638500d39b197839924e182441ad4122a9","unresolved":false,"context_lines":[{"line_number":366,"context_line":"    def delete(self, req, id):"},{"line_number":367,"context_line":"        \"\"\"Delete Quota for a particular tenant."},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"        This works for hierarchical and non-hierarchical projects. For"},{"line_number":370,"context_line":"        hierarchical projects only immediate parent admin or the"},{"line_number":371,"context_line":"        CLOUD admin are able to perform a delete."},{"line_number":372,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_bf3df5de","line":369,"in_reply_to":"9a8ffd7b_209da159","updated":"2015-12-01 17:01:21.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"262025763d2f968684c0a5e12f5c2d26efec889d","unresolved":false,"context_lines":[{"line_number":393,"context_line":"        for key, value in project_quotas.items():"},{"line_number":394,"context_line":"                if \u0027allocated\u0027 in project_quotas[key].keys():"},{"line_number":395,"context_line":"                    if project_quotas[key][\u0027allocated\u0027] !\u003d 0:"},{"line_number":396,"context_line":"                        msg \u003d _(\"About to delete child projects having \""},{"line_number":397,"context_line":"                                \"non-zero quota. This should not be performed\")"},{"line_number":398,"context_line":"                        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":399,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_4bb3b89a","line":396,"updated":"2015-12-02 14:40:10.000000000","message":"Change the message to something like: \"Cannot delete a project quota that have quota allocated to supbrojects. Delete the subprojects quota first.\"","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"74fd36445f9a395c573d1d9fbb8d47fc9a3d484d","unresolved":false,"context_lines":[{"line_number":393,"context_line":"        for key, value in project_quotas.items():"},{"line_number":394,"context_line":"                if \u0027allocated\u0027 in project_quotas[key].keys():"},{"line_number":395,"context_line":"                    if project_quotas[key][\u0027allocated\u0027] !\u003d 0:"},{"line_number":396,"context_line":"                        msg \u003d _(\"About to delete child projects having \""},{"line_number":397,"context_line":"                                \"non-zero quota. This should not be performed\")"},{"line_number":398,"context_line":"                        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":399,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_855ae4f0","line":396,"in_reply_to":"9a8ffd7b_4bb3b89a","updated":"2015-12-02 16:27:03.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"779e30ae5e123989b0ea4fef13f14e91cdfc69cd","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            for key, value in subtree.items():"},{"line_number":124,"context_line":"                if key \u003d\u003d target_project_id:"},{"line_number":125,"context_line":"                    return"},{"line_number":126,"context_line":"                self._assert_not_descendant(target_project_id, value)"},{"line_number":127,"context_line":"            msg \u003d _(\"Show operations can only be made to projects \""},{"line_number":128,"context_line":"                    \"in the same hierarchy of the project in \""},{"line_number":129,"context_line":"                    \"which users are scoped to.\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_b193965a","line":126,"updated":"2015-12-11 22:47:07.000000000","message":"I\u0027m not sure how big subtree\u0027s will get but afaik this will be restricted by the python stack limit. I assume that\u0027s ok? Probably not to had to turn this into an iterative check imho if it becomes a problem, just noting that recursion here will be limited.","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"1edaca51793d40cd0b64ae930210ccd9ed823ba5","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            for key, value in subtree.items():"},{"line_number":124,"context_line":"                if key \u003d\u003d target_project_id:"},{"line_number":125,"context_line":"                    return"},{"line_number":126,"context_line":"                self._assert_not_descendant(target_project_id, value)"},{"line_number":127,"context_line":"            msg \u003d _(\"Show operations can only be made to projects \""},{"line_number":128,"context_line":"                    \"in the same hierarchy of the project in \""},{"line_number":129,"context_line":"                    \"which users are scoped to.\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a710552_67ce6e85","line":126,"in_reply_to":"5a710552_7cce055c","updated":"2015-12-14 19:15:13.000000000","message":"Okie dokie, let\u0027s see what that value really gets set to, anything above 512 is likely going to start getting weird.","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"311fa10a496fd811a407fa7188fea4f13f0026da","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            for key, value in subtree.items():"},{"line_number":124,"context_line":"                if key \u003d\u003d target_project_id:"},{"line_number":125,"context_line":"                    return"},{"line_number":126,"context_line":"                self._assert_not_descendant(target_project_id, value)"},{"line_number":127,"context_line":"            msg \u003d _(\"Show operations can only be made to projects \""},{"line_number":128,"context_line":"                    \"in the same hierarchy of the project in \""},{"line_number":129,"context_line":"                    \"which users are scoped to.\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a710552_0763eab2","line":126,"in_reply_to":"7a740942_35ae7981","updated":"2015-12-14 19:13:43.000000000","message":"Nah, if u say it won\u0027t be then let\u0027s believe that, its not to hard in the future to change this if needed anyway. But it might deserve a NOTE or TODO or something just incase (so people don\u0027t forget).","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"bb54300240f6df393bcd051b91285fa3d5ec9d1c","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            for key, value in subtree.items():"},{"line_number":124,"context_line":"                if key \u003d\u003d target_project_id:"},{"line_number":125,"context_line":"                    return"},{"line_number":126,"context_line":"                self._assert_not_descendant(target_project_id, value)"},{"line_number":127,"context_line":"            msg \u003d _(\"Show operations can only be made to projects \""},{"line_number":128,"context_line":"                    \"in the same hierarchy of the project in \""},{"line_number":129,"context_line":"                    \"which users are scoped to.\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a710552_7cce055c","line":126,"in_reply_to":"7a740942_35ae7981","updated":"2015-12-14 19:14:24.000000000","message":"Yes agree the maximum depth of the tree will be limited to 5.","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"8848e84397d46af57673ff5952a1dd1a08113130","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            for key, value in subtree.items():"},{"line_number":124,"context_line":"                if key \u003d\u003d target_project_id:"},{"line_number":125,"context_line":"                    return"},{"line_number":126,"context_line":"                self._assert_not_descendant(target_project_id, value)"},{"line_number":127,"context_line":"            msg \u003d _(\"Show operations can only be made to projects \""},{"line_number":128,"context_line":"                    \"in the same hierarchy of the project in \""},{"line_number":129,"context_line":"                    \"which users are scoped to.\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_b78706b4","line":126,"in_reply_to":"7a740942_b193965a","updated":"2015-12-11 23:28:04.000000000","message":"*Probably not to hard","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"42790f7941a8cd7ae365e7d400263b8d7d39b783","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            for key, value in subtree.items():"},{"line_number":124,"context_line":"                if key \u003d\u003d target_project_id:"},{"line_number":125,"context_line":"                    return"},{"line_number":126,"context_line":"                self._assert_not_descendant(target_project_id, value)"},{"line_number":127,"context_line":"            msg \u003d _(\"Show operations can only be made to projects \""},{"line_number":128,"context_line":"                    \"in the same hierarchy of the project in \""},{"line_number":129,"context_line":"                    \"which users are scoped to.\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_35ae7981","line":126,"in_reply_to":"7a740942_b193965a","updated":"2015-12-14 14:00:35.000000000","message":"By default, the subtree will not be so big, please see: https://github.com/openstack/keystone/blob/master/etc/keystone.conf.sample#L32.\nBut if you think that this can be a problem, I\u0027ll be happy in change  it.","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"bde1d9ee2754b8c1a59c08f33acfb7aa80ba093b","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                minimum \u003d settable_quotas[key][\u0027minimum\u0027]"},{"line_number":296,"context_line":"                maximum \u003d settable_quotas[key][\u0027maximum\u0027]"},{"line_number":297,"context_line":"                self._validate_quota_limit(key, value, minimum, maximum)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"            if parent_project_id:"},{"line_number":300,"context_line":"                value \u003d self._validate_quota_hierarchy(body[\u0027quota_set\u0027], key,"},{"line_number":301,"context_line":"                                               quota_values,"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_7cec25bb","line":298,"updated":"2015-12-11 22:55:01.000000000","message":"Very much not atomic across processes unless there is some kind of lock on the read/validate/update that ensures that this validation will not be concurrently being done at the same time another process is doing the same or nearly the same thing on the same user and project in the same hierarchy...","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"7aaa55a47f344e9f48b04544eaa09dbb4f4145a5","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                minimum \u003d settable_quotas[key][\u0027minimum\u0027]"},{"line_number":296,"context_line":"                maximum \u003d settable_quotas[key][\u0027maximum\u0027]"},{"line_number":297,"context_line":"                self._validate_quota_limit(key, value, minimum, maximum)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"            if parent_project_id:"},{"line_number":300,"context_line":"                value \u003d self._validate_quota_hierarchy(body[\u0027quota_set\u0027], key,"},{"line_number":301,"context_line":"                                               quota_values,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a710552_67966e96","line":298,"in_reply_to":"5a710552_73acf8ed","updated":"2015-12-14 19:12:14.000000000","message":"+200","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"bb54300240f6df393bcd051b91285fa3d5ec9d1c","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                minimum \u003d settable_quotas[key][\u0027minimum\u0027]"},{"line_number":296,"context_line":"                maximum \u003d settable_quotas[key][\u0027maximum\u0027]"},{"line_number":297,"context_line":"                self._validate_quota_limit(key, value, minimum, maximum)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"            if parent_project_id:"},{"line_number":300,"context_line":"                value \u003d self._validate_quota_hierarchy(body[\u0027quota_set\u0027], key,"},{"line_number":301,"context_line":"                                               quota_values,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a710552_bc3f8dd5","line":298,"in_reply_to":"5a710552_73acf8ed","updated":"2015-12-14 19:14:24.000000000","message":"Agree that we need to make sure that the operation is atomic and for that I think making changes at the quota API at the db layer makes more sense where we design the queries in the \"compare and set/swap\" way so that if same project/resource has been updated the second request in flight would be rejected. I think there was a proposal in Nova to do so for most of the queries which I don;t think is done for quota_update[1]\n\n[1] https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L3199","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"ddc8ed6d3a2b7c6ecd9c4f418065d92ec28abcf5","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                minimum \u003d settable_quotas[key][\u0027minimum\u0027]"},{"line_number":296,"context_line":"                maximum \u003d settable_quotas[key][\u0027maximum\u0027]"},{"line_number":297,"context_line":"                self._validate_quota_limit(key, value, minimum, maximum)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"            if parent_project_id:"},{"line_number":300,"context_line":"                value \u003d self._validate_quota_hierarchy(body[\u0027quota_set\u0027], key,"},{"line_number":301,"context_line":"                                               quota_values,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a710552_73acf8ed","line":298,"in_reply_to":"5a710552_90a4fa08","updated":"2015-12-14 17:53:05.000000000","message":"What do you think in add a FIXME or a TODO here with this comment, so we will not forgot about it? :)","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"42790f7941a8cd7ae365e7d400263b8d7d39b783","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                minimum \u003d settable_quotas[key][\u0027minimum\u0027]"},{"line_number":296,"context_line":"                maximum \u003d settable_quotas[key][\u0027maximum\u0027]"},{"line_number":297,"context_line":"                self._validate_quota_limit(key, value, minimum, maximum)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"            if parent_project_id:"},{"line_number":300,"context_line":"                value \u003d self._validate_quota_hierarchy(body[\u0027quota_set\u0027], key,"},{"line_number":301,"context_line":"                                               quota_values,"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_f541d1a9","line":298,"in_reply_to":"7a740942_7cec25bb","updated":"2015-12-14 14:00:35.000000000","message":"hum... I\u0027m not sure that we have any lock on this operations here. \n\nAre you suggesting add a lock in the whole method?","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"25826092e6fbb805209dc1867ed9331669d7650f","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                minimum \u003d settable_quotas[key][\u0027minimum\u0027]"},{"line_number":296,"context_line":"                maximum \u003d settable_quotas[key][\u0027maximum\u0027]"},{"line_number":297,"context_line":"                self._validate_quota_limit(key, value, minimum, maximum)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"            if parent_project_id:"},{"line_number":300,"context_line":"                value \u003d self._validate_quota_hierarchy(body[\u0027quota_set\u0027], key,"},{"line_number":301,"context_line":"                                               quota_values,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a710552_90a4fa08","line":298,"in_reply_to":"7a740942_f541d1a9","updated":"2015-12-14 17:38:51.000000000","message":"Negative, let\u0027s not add a lock yet, but it needs something in the future...","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"779e30ae5e123989b0ea4fef13f14e91cdfc69cd","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        # NOTE(dims): Pass #2 - At this point we know that all the"},{"line_number":309,"context_line":"        # values are correct and we can iterate and update them all in one"},{"line_number":310,"context_line":"        # shot without having to worry about rolling back etc as we have done"},{"line_number":311,"context_line":"        # the validation up front in the loop above."},{"line_number":312,"context_line":"        for key, value in valid_quotas.items():"},{"line_number":313,"context_line":"            try:"},{"line_number":314,"context_line":"                objects.Quotas.create_limit(context, target_project_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_7ce18529","line":311,"updated":"2015-12-11 22:47:07.000000000","message":"This note worries me, cause either I\u0027m missing something or this is busted.\n\nImagine the following:\n\n    1. Request X for Y user to update quota by Z\n    2. Request X validates that update is possible (ya!)\n    3. The process running request X sleeps for 1 second (maybe the machine is busy, who knows).\n    4. Request A for Y user comes in to update quota by C\n    5. Request A for Y user validates that update (ya!) is possible and performs it.\n    6. Request X awakens, what gets written/updated?\n\nOr even better:\n\n    1. Request X for Y user to update quota by Z\n    2. Request X validates that update is possible (ya!)\n    3. Request X starts to run through valid_quotas.items() loop below, but sleeps during second iteration for 1 second (maybe the machine is busy, who knows).\n    4. Request A for Y user comes in to update quota by C\n    5. Request A for Y user validates (ya!) that update is possible and performs it (it does not sleep during valid_quotes.items() iteration because well its on a non-busy machine).\n    6. Request X awakens, what gets written/updated?","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"bb54300240f6df393bcd051b91285fa3d5ec9d1c","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        # NOTE(dims): Pass #2 - At this point we know that all the"},{"line_number":309,"context_line":"        # values are correct and we can iterate and update them all in one"},{"line_number":310,"context_line":"        # shot without having to worry about rolling back etc as we have done"},{"line_number":311,"context_line":"        # the validation up front in the loop above."},{"line_number":312,"context_line":"        for key, value in valid_quotas.items():"},{"line_number":313,"context_line":"            try:"},{"line_number":314,"context_line":"                objects.Quotas.create_limit(context, target_project_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a710552_c7a962e1","line":311,"in_reply_to":"5a710552_10b9ea2e","updated":"2015-12-14 19:14:24.000000000","message":"Yes as Raildo mentioned will track it as part of quota re-design effort. There are similar bugs opened here \n\nhttp://bit.ly/1Pbr8YL","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"bde1d9ee2754b8c1a59c08f33acfb7aa80ba093b","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        # NOTE(dims): Pass #2 - At this point we know that all the"},{"line_number":309,"context_line":"        # values are correct and we can iterate and update them all in one"},{"line_number":310,"context_line":"        # shot without having to worry about rolling back etc as we have done"},{"line_number":311,"context_line":"        # the validation up front in the loop above."},{"line_number":312,"context_line":"        for key, value in valid_quotas.items():"},{"line_number":313,"context_line":"            try:"},{"line_number":314,"context_line":"                objects.Quotas.create_limit(context, target_project_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_dc56795d","line":311,"in_reply_to":"7a740942_7ce18529","updated":"2015-12-11 22:55:01.000000000","message":"One can create many many more of those same scenarios (add a time.sleep at certain parts and ask yourself what happens if another process is now running in this same function with the same user/project...)","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"25826092e6fbb805209dc1867ed9331669d7650f","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        # NOTE(dims): Pass #2 - At this point we know that all the"},{"line_number":309,"context_line":"        # values are correct and we can iterate and update them all in one"},{"line_number":310,"context_line":"        # shot without having to worry about rolling back etc as we have done"},{"line_number":311,"context_line":"        # the validation up front in the loop above."},{"line_number":312,"context_line":"        for key, value in valid_quotas.items():"},{"line_number":313,"context_line":"            try:"},{"line_number":314,"context_line":"                objects.Quotas.create_limit(context, target_project_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a710552_10b9ea2e","line":311,"in_reply_to":"7a740942_95c16de6","updated":"2015-12-14 17:38:51.000000000","message":"Cool.","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"42790f7941a8cd7ae365e7d400263b8d7d39b783","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        # NOTE(dims): Pass #2 - At this point we know that all the"},{"line_number":309,"context_line":"        # values are correct and we can iterate and update them all in one"},{"line_number":310,"context_line":"        # shot without having to worry about rolling back etc as we have done"},{"line_number":311,"context_line":"        # the validation up front in the loop above."},{"line_number":312,"context_line":"        for key, value in valid_quotas.items():"},{"line_number":313,"context_line":"            try:"},{"line_number":314,"context_line":"                objects.Quotas.create_limit(context, target_project_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_95c16de6","line":311,"in_reply_to":"7a740942_dc56795d","updated":"2015-12-14 14:00:35.000000000","message":"I think that this comment is scoped for this bug: https://bugs.launchpad.net/nova/+bug/1301532\nI\u0027m totally agree with you and I intend to fix that problem on the quota redesign.","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"779e30ae5e123989b0ea4fef13f14e91cdfc69cd","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                                            key, value, user_id\u003duser_id)"},{"line_number":316,"context_line":"            except exception.QuotaExists:"},{"line_number":317,"context_line":"                objects.Quotas.update_limit(context, target_project_id,"},{"line_number":318,"context_line":"                                            key, value, user_id\u003duser_id)"},{"line_number":319,"context_line":"        # TODO(raildo): For now we update child\u0027s quota first and then parents"},{"line_number":320,"context_line":"        # quota. In future this needs to be an atomic operation."},{"line_number":321,"context_line":"        if parent_project_id:"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_9178dac5","line":318,"updated":"2015-12-11 22:47:07.000000000","message":"This doesn\u0027t seem atomic either actually, if 2 requests end up here (for the same project and same user) which one actually gets to do the update?","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"42790f7941a8cd7ae365e7d400263b8d7d39b783","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                                            key, value, user_id\u003duser_id)"},{"line_number":316,"context_line":"            except exception.QuotaExists:"},{"line_number":317,"context_line":"                objects.Quotas.update_limit(context, target_project_id,"},{"line_number":318,"context_line":"                                            key, value, user_id\u003duser_id)"},{"line_number":319,"context_line":"        # TODO(raildo): For now we update child\u0027s quota first and then parents"},{"line_number":320,"context_line":"        # quota. In future this needs to be an atomic operation."},{"line_number":321,"context_line":"        if parent_project_id:"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_b504a917","line":318,"in_reply_to":"7a740942_9178dac5","updated":"2015-12-14 14:00:35.000000000","message":"In this first phase for hierarchical quota, we will have this issue. Like a have added this TODO. If you know a simple solution for this problem, I\u0027ll be glad to fix it asap :D","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"bb54300240f6df393bcd051b91285fa3d5ec9d1c","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                                            key, value, user_id\u003duser_id)"},{"line_number":316,"context_line":"            except exception.QuotaExists:"},{"line_number":317,"context_line":"                objects.Quotas.update_limit(context, target_project_id,"},{"line_number":318,"context_line":"                                            key, value, user_id\u003duser_id)"},{"line_number":319,"context_line":"        # TODO(raildo): For now we update child\u0027s quota first and then parents"},{"line_number":320,"context_line":"        # quota. In future this needs to be an atomic operation."},{"line_number":321,"context_line":"        if parent_project_id:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a710552_07d52a42","line":318,"in_reply_to":"7a740942_b504a917","updated":"2015-12-14 19:14:24.000000000","message":"Raildo +1 for first phase we can have the hierarchical model in place\n\nphase 2 : we can add concurrency support and also fix the concurrent issues in underlying quota-api;s (quota-update etc) as part of the quota-redesign effort.","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"779e30ae5e123989b0ea4fef13f14e91cdfc69cd","unresolved":false,"context_lines":[{"line_number":317,"context_line":"                objects.Quotas.update_limit(context, target_project_id,"},{"line_number":318,"context_line":"                                            key, value, user_id\u003duser_id)"},{"line_number":319,"context_line":"        # TODO(raildo): For now we update child\u0027s quota first and then parents"},{"line_number":320,"context_line":"        # quota. In future this needs to be an atomic operation."},{"line_number":321,"context_line":"        if parent_project_id:"},{"line_number":322,"context_line":"            if key in allocated_quotas.keys():"},{"line_number":323,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_b18716b4","line":320,"updated":"2015-12-11 22:47:07.000000000","message":"+1 is there plan to do this atomically somewhere. In fact the whole validation, create/update of children and parents imho should be one atomic thing that either happens or fails happening; otherwise this is just opening itself up for issues.","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"bb54300240f6df393bcd051b91285fa3d5ec9d1c","unresolved":false,"context_lines":[{"line_number":317,"context_line":"                objects.Quotas.update_limit(context, target_project_id,"},{"line_number":318,"context_line":"                                            key, value, user_id\u003duser_id)"},{"line_number":319,"context_line":"        # TODO(raildo): For now we update child\u0027s quota first and then parents"},{"line_number":320,"context_line":"        # quota. In future this needs to be an atomic operation."},{"line_number":321,"context_line":"        if parent_project_id:"},{"line_number":322,"context_line":"            if key in allocated_quotas.keys():"},{"line_number":323,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a710552_475252df","line":320,"in_reply_to":"7a740942_b18716b4","updated":"2015-12-14 19:14:24.000000000","message":"Sure agree to it. We plan to fix it as part of phase 2 as mentioned above.","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"779e30ae5e123989b0ea4fef13f14e91cdfc69cd","unresolved":false,"context_lines":[{"line_number":325,"context_line":"                        context, parent_project_id, key, allocated_quotas[key])"},{"line_number":326,"context_line":"                except exception.ProjectQuotaNotFound:"},{"line_number":327,"context_line":"                    parent_limit \u003d parent_project_quotas[key][\u0027limit\u0027]"},{"line_number":328,"context_line":"                    sqlalchemy_api.quota_create("},{"line_number":329,"context_line":"                        context, parent_project_id, key, parent_limit,"},{"line_number":330,"context_line":"                        allocated\u003dallocated_quotas[key])"},{"line_number":331,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_f1b7de82","line":328,"updated":"2015-12-11 22:47:07.000000000","message":"This also doesn\u0027t seem atomic, can 2 requests end up here and both make new quota?","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"bb54300240f6df393bcd051b91285fa3d5ec9d1c","unresolved":false,"context_lines":[{"line_number":325,"context_line":"                        context, parent_project_id, key, allocated_quotas[key])"},{"line_number":326,"context_line":"                except exception.ProjectQuotaNotFound:"},{"line_number":327,"context_line":"                    parent_limit \u003d parent_project_quotas[key][\u0027limit\u0027]"},{"line_number":328,"context_line":"                    sqlalchemy_api.quota_create("},{"line_number":329,"context_line":"                        context, parent_project_id, key, parent_limit,"},{"line_number":330,"context_line":"                        allocated\u003dallocated_quotas[key])"},{"line_number":331,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5a710552_e7049ec7","line":328,"in_reply_to":"7a740942_f1b7de82","updated":"2015-12-14 19:14:24.000000000","message":"Again using compare and set/swap at the db query level will help IMHO","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"891ffbc8af98b9dc635c6c5329a8e126814bd785","unresolved":false,"context_lines":[{"line_number":357,"context_line":"    @extensions.expected_errors(403)"},{"line_number":358,"context_line":"    @wsgi.response(202)"},{"line_number":359,"context_line":"    def delete(self, req, id):"},{"line_number":360,"context_line":"        \"\"\"Delete Quota for a particular tenant."},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        For hierarchical projects only immediate parent admin or the"},{"line_number":363,"context_line":"        cloud admin are able to perform a delete."}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_fc9a5561","line":360,"updated":"2015-12-11 22:50:20.000000000","message":"This also worries me, if someone is iterating and updating at the same time this is called, what happens... Two write operations probably shouldn\u0027t happen at the same time, badness usually results if they do...","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":10263,"name":"Vilobh Meshram","email":"vilobhmm@yahoo-inc.com","username":"vilobhmm"},"change_message_id":"bb54300240f6df393bcd051b91285fa3d5ec9d1c","unresolved":false,"context_lines":[{"line_number":357,"context_line":"    @extensions.expected_errors(403)"},{"line_number":358,"context_line":"    @wsgi.response(202)"},{"line_number":359,"context_line":"    def delete(self, req, id):"},{"line_number":360,"context_line":"        \"\"\"Delete Quota for a particular tenant."},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        For hierarchical projects only immediate parent admin or the"},{"line_number":363,"context_line":"        cloud admin are able to perform a delete."}],"source_content_type":"text/x-python","patch_set":8,"id":"5a710552_87f6fad5","line":360,"in_reply_to":"7a740942_506f93c3","updated":"2015-12-14 19:14:24.000000000","message":"+1","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"25826092e6fbb805209dc1867ed9331669d7650f","unresolved":false,"context_lines":[{"line_number":357,"context_line":"    @extensions.expected_errors(403)"},{"line_number":358,"context_line":"    @wsgi.response(202)"},{"line_number":359,"context_line":"    def delete(self, req, id):"},{"line_number":360,"context_line":"        \"\"\"Delete Quota for a particular tenant."},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        For hierarchical projects only immediate parent admin or the"},{"line_number":363,"context_line":"        cloud admin are able to perform a delete."}],"source_content_type":"text/x-python","patch_set":8,"id":"5a710552_f0621ead","line":360,"in_reply_to":"7a740942_506f93c3","updated":"2015-12-14 17:38:51.000000000","message":"100% agree.","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"42790f7941a8cd7ae365e7d400263b8d7d39b783","unresolved":false,"context_lines":[{"line_number":357,"context_line":"    @extensions.expected_errors(403)"},{"line_number":358,"context_line":"    @wsgi.response(202)"},{"line_number":359,"context_line":"    def delete(self, req, id):"},{"line_number":360,"context_line":"        \"\"\"Delete Quota for a particular tenant."},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        For hierarchical projects only immediate parent admin or the"},{"line_number":363,"context_line":"        cloud admin are able to perform a delete."}],"source_content_type":"text/x-python","patch_set":8,"id":"7a740942_506f93c3","line":360,"in_reply_to":"7a740942_fc9a5561","updated":"2015-12-14 14:00:35.000000000","message":"As I said before, this is a architectural problem on the actual design that was reported a long time ago on this bug: https://bugs.launchpad.net/nova/+bug/1301532\n\nI think that we need to redesign the quota feature to fix this (and other problems).","commit_id":"3fc1c77973df5584a0c6297454639e8d4ccd42d5"}],"nova/db/api.py":[{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"761a76a41873cd1bd95c8748b9a944acec13522c","unresolved":false,"context_lines":[{"line_number":1024,"context_line":""},{"line_number":1025,"context_line":""},{"line_number":1026,"context_line":"def quota_create(context, project_id, resource, limit, user_id\u003dNone,"},{"line_number":1027,"context_line":"                 allocated\u003d0):"},{"line_number":1028,"context_line":"    \"\"\"Create a quota for the given project and resource.\"\"\""},{"line_number":1029,"context_line":"    return IMPL.quota_create(context, project_id, resource, limit,"},{"line_number":1030,"context_line":"                             user_id\u003duser_id, allocated\u003dallocated)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_00e65de8","line":1027,"updated":"2015-11-30 20:43:13.000000000","message":"shouldn\u0027t this (and other related) be part of the patch that set defaults to 0?","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"15583d638500d39b197839924e182441ad4122a9","unresolved":false,"context_lines":[{"line_number":1024,"context_line":""},{"line_number":1025,"context_line":""},{"line_number":1026,"context_line":"def quota_create(context, project_id, resource, limit, user_id\u003dNone,"},{"line_number":1027,"context_line":"                 allocated\u003d0):"},{"line_number":1028,"context_line":"    \"\"\"Create a quota for the given project and resource.\"\"\""},{"line_number":1029,"context_line":"    return IMPL.quota_create(context, project_id, resource, limit,"},{"line_number":1030,"context_line":"                             user_id\u003duser_id, allocated\u003dallocated)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_7f078d1d","line":1027,"in_reply_to":"9a8ffd7b_00e65de8","updated":"2015-12-01 17:01:21.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"761a76a41873cd1bd95c8748b9a944acec13522c","unresolved":false,"context_lines":[{"line_number":3177,"context_line":""},{"line_number":3178,"context_line":""},{"line_number":3179,"context_line":"@require_context"},{"line_number":3180,"context_line":"def quota_allocated_get_all_by_project(context, project_id):"},{"line_number":3181,"context_line":"    rows \u003d model_query(context, models.Quota, read_deleted\u003d\u0027no\u0027).filter_by("},{"line_number":3182,"context_line":"        project_id\u003dproject_id).all()"},{"line_number":3183,"context_line":"    result \u003d {\u0027project_id\u0027: project_id}"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_402a25e9","line":3180,"updated":"2015-11-30 20:43:13.000000000","message":"maybe rename it to \"get_all_quota_allocated_by_project\"","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"15583d638500d39b197839924e182441ad4122a9","unresolved":false,"context_lines":[{"line_number":3177,"context_line":""},{"line_number":3178,"context_line":""},{"line_number":3179,"context_line":"@require_context"},{"line_number":3180,"context_line":"def quota_allocated_get_all_by_project(context, project_id):"},{"line_number":3181,"context_line":"    rows \u003d model_query(context, models.Quota, read_deleted\u003d\u0027no\u0027).filter_by("},{"line_number":3182,"context_line":"        project_id\u003dproject_id).all()"},{"line_number":3183,"context_line":"    result \u003d {\u0027project_id\u0027: project_id}"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_c22262a3","line":3180,"in_reply_to":"9a8ffd7b_402a25e9","updated":"2015-12-01 17:01:21.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"}],"nova/tests/unit/api/openstack/compute/test_quotas.py":[{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"761a76a41873cd1bd95c8748b9a944acec13522c","unresolved":false,"context_lines":[{"line_number":77,"context_line":"            # method instead of status_int in a response object."},{"line_number":78,"context_line":"            return self.controller.delete.wsgi_code"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _create_project_hierarchy(self):"},{"line_number":81,"context_line":"        \"\"\"Sets an environment used for nested quotas tests."},{"line_number":82,"context_line":"        Create a project hierarchy such as follows:"},{"line_number":83,"context_line":"        +-----------+"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_a01c31c2","line":80,"updated":"2015-11-30 20:43:13.000000000","message":"guess we\u0027re redefining this method a lot. Can\u0027t this be reused somehow?","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"262025763d2f968684c0a5e12f5c2d26efec889d","unresolved":false,"context_lines":[{"line_number":731,"context_line":""},{"line_number":732,"context_line":"        self.assertEqual(res_dict, expected)"},{"line_number":733,"context_line":""},{"line_number":734,"context_line":"    def test_quotas_subproject_show(self):"},{"line_number":735,"context_line":"        context.KEYSTONE.get_project \u003d mock.Mock()"},{"line_number":736,"context_line":"        context.KEYSTONE.get_project.side_effect \u003d self.get_project"},{"line_number":737,"context_line":"        req \u003d self._get_http_request()"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_010ef13a","line":734,"updated":"2015-12-02 14:40:10.000000000","message":"test_show_quotas_subproject","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"74fd36445f9a395c573d1d9fbb8d47fc9a3d484d","unresolved":false,"context_lines":[{"line_number":731,"context_line":""},{"line_number":732,"context_line":"        self.assertEqual(res_dict, expected)"},{"line_number":733,"context_line":""},{"line_number":734,"context_line":"    def test_quotas_subproject_show(self):"},{"line_number":735,"context_line":"        context.KEYSTONE.get_project \u003d mock.Mock()"},{"line_number":736,"context_line":"        context.KEYSTONE.get_project.side_effect \u003d self.get_project"},{"line_number":737,"context_line":"        req \u003d self._get_http_request()"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_45763cd8","line":734,"in_reply_to":"9a8ffd7b_010ef13a","updated":"2015-12-02 16:27:03.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"262025763d2f968684c0a5e12f5c2d26efec889d","unresolved":false,"context_lines":[{"line_number":738,"context_line":"        req.environ[\u0027nova.context\u0027].project_id \u003d self.A.id"},{"line_number":739,"context_line":"        res_dict \u003d self.controller.show(req, self.B.id)"},{"line_number":740,"context_line":""},{"line_number":741,"context_line":"        self.default_subproject_quotas.update({\u0027id\u0027: self.B.id})"},{"line_number":742,"context_line":"        expected \u003d {\u0027quota_set\u0027: self.default_subproject_quotas}"},{"line_number":743,"context_line":"        self.assertEqual(res_dict, expected)"},{"line_number":744,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_1cd0941e","line":741,"updated":"2015-12-02 14:40:10.000000000","message":"don\u0027t need to update it here","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"74fd36445f9a395c573d1d9fbb8d47fc9a3d484d","unresolved":false,"context_lines":[{"line_number":738,"context_line":"        req.environ[\u0027nova.context\u0027].project_id \u003d self.A.id"},{"line_number":739,"context_line":"        res_dict \u003d self.controller.show(req, self.B.id)"},{"line_number":740,"context_line":""},{"line_number":741,"context_line":"        self.default_subproject_quotas.update({\u0027id\u0027: self.B.id})"},{"line_number":742,"context_line":"        expected \u003d {\u0027quota_set\u0027: self.default_subproject_quotas}"},{"line_number":743,"context_line":"        self.assertEqual(res_dict, expected)"},{"line_number":744,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_057cb4b3","line":741,"in_reply_to":"9a8ffd7b_1cd0941e","updated":"2015-12-02 16:27:03.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"262025763d2f968684c0a5e12f5c2d26efec889d","unresolved":false,"context_lines":[{"line_number":742,"context_line":"        expected \u003d {\u0027quota_set\u0027: self.default_subproject_quotas}"},{"line_number":743,"context_line":"        self.assertEqual(res_dict, expected)"},{"line_number":744,"context_line":""},{"line_number":745,"context_line":"    def test_quotas_subproject_show_error(self):"},{"line_number":746,"context_line":"        context.KEYSTONE.get_project \u003d mock.Mock()"},{"line_number":747,"context_line":"        context.KEYSTONE.get_project.side_effect \u003d self.get_project"},{"line_number":748,"context_line":"        req \u003d self._get_http_request()"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_1c15f43e","line":745,"updated":"2015-12-02 14:40:10.000000000","message":"rename it to test_show_quotas_scoped_to_child_project_error or, if you want to change the pattern: test_child_project_cannot_show_parent_quota","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"74fd36445f9a395c573d1d9fbb8d47fc9a3d484d","unresolved":false,"context_lines":[{"line_number":742,"context_line":"        expected \u003d {\u0027quota_set\u0027: self.default_subproject_quotas}"},{"line_number":743,"context_line":"        self.assertEqual(res_dict, expected)"},{"line_number":744,"context_line":""},{"line_number":745,"context_line":"    def test_quotas_subproject_show_error(self):"},{"line_number":746,"context_line":"        context.KEYSTONE.get_project \u003d mock.Mock()"},{"line_number":747,"context_line":"        context.KEYSTONE.get_project.side_effect \u003d self.get_project"},{"line_number":748,"context_line":"        req \u003d self._get_http_request()"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_2560d800","line":745,"in_reply_to":"9a8ffd7b_1c15f43e","updated":"2015-12-02 16:27:03.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"262025763d2f968684c0a5e12f5c2d26efec889d","unresolved":false,"context_lines":[{"line_number":747,"context_line":"        context.KEYSTONE.get_project.side_effect \u003d self.get_project"},{"line_number":748,"context_line":"        req \u003d self._get_http_request()"},{"line_number":749,"context_line":"        req.environ[\u0027nova.context\u0027].project_id \u003d self.B.id"},{"line_number":750,"context_line":"        self.assertRaises(webob.exc.HTTPForbidden,"},{"line_number":751,"context_line":"                          self.controller.show,"},{"line_number":752,"context_line":"                          req, self.A.id)"},{"line_number":753,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_9c832456","line":750,"updated":"2015-12-02 14:40:10.000000000","message":"I\u0027d also add other tests: (i) not the immediate child trying to show (C trying to show A), (ii) not being the root project (C trying to show B), (iii) root project seeing a project two leves below it and (iv) immediate parent (not being root) showing child\u0027s quota","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"74fd36445f9a395c573d1d9fbb8d47fc9a3d484d","unresolved":false,"context_lines":[{"line_number":747,"context_line":"        context.KEYSTONE.get_project.side_effect \u003d self.get_project"},{"line_number":748,"context_line":"        req \u003d self._get_http_request()"},{"line_number":749,"context_line":"        req.environ[\u0027nova.context\u0027].project_id \u003d self.B.id"},{"line_number":750,"context_line":"        self.assertRaises(webob.exc.HTTPForbidden,"},{"line_number":751,"context_line":"                          self.controller.show,"},{"line_number":752,"context_line":"                          req, self.A.id)"},{"line_number":753,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_c51eac6f","line":750,"in_reply_to":"9a8ffd7b_9c832456","updated":"2015-12-02 16:27:03.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"262025763d2f968684c0a5e12f5c2d26efec889d","unresolved":false,"context_lines":[{"line_number":751,"context_line":"                          self.controller.show,"},{"line_number":752,"context_line":"                          req, self.A.id)"},{"line_number":753,"context_line":""},{"line_number":754,"context_line":"    def test_show_quota_other_hierarchy_error(self):"},{"line_number":755,"context_line":"        context.KEYSTONE.get_project \u003d mock.Mock()"},{"line_number":756,"context_line":"        context.KEYSTONE.get_project.side_effect \u003d self.get_project"},{"line_number":757,"context_line":"        # creating a new hierarchy"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_dc520cde","line":754,"updated":"2015-12-02 14:40:10.000000000","message":"I\u0027d rather follow the pattern like \"test_cannot_show_quota_other_hierarchy\", but that\u0027s just coding style.","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"74fd36445f9a395c573d1d9fbb8d47fc9a3d484d","unresolved":false,"context_lines":[{"line_number":751,"context_line":"                          self.controller.show,"},{"line_number":752,"context_line":"                          req, self.A.id)"},{"line_number":753,"context_line":""},{"line_number":754,"context_line":"    def test_show_quota_other_hierarchy_error(self):"},{"line_number":755,"context_line":"        context.KEYSTONE.get_project \u003d mock.Mock()"},{"line_number":756,"context_line":"        context.KEYSTONE.get_project.side_effect \u003d self.get_project"},{"line_number":757,"context_line":"        # creating a new hierarchy"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_250e983b","line":754,"in_reply_to":"9a8ffd7b_dc520cde","updated":"2015-12-02 16:27:03.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"262025763d2f968684c0a5e12f5c2d26efec889d","unresolved":false,"context_lines":[{"line_number":780,"context_line":"        res_dict \u003d self.controller.update(req, self.B.id, body\u003dbody)"},{"line_number":781,"context_line":"        self.assertEqual(body, res_dict)"},{"line_number":782,"context_line":""},{"line_number":783,"context_line":"    def test_update_quota_in_other_hierarchy_error(self):"},{"line_number":784,"context_line":"        context.KEYSTONE.get_project \u003d mock.Mock()"},{"line_number":785,"context_line":"        context.KEYSTONE.get_project.side_effect \u003d self.get_project"},{"line_number":786,"context_line":"        req \u003d self._get_http_request()"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_7cea0076","line":783,"updated":"2015-12-02 14:40:10.000000000","message":"I guess almost the same set of suggestions to show apply to update and delete. we need additional tests","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"74fd36445f9a395c573d1d9fbb8d47fc9a3d484d","unresolved":false,"context_lines":[{"line_number":780,"context_line":"        res_dict \u003d self.controller.update(req, self.B.id, body\u003dbody)"},{"line_number":781,"context_line":"        self.assertEqual(body, res_dict)"},{"line_number":782,"context_line":""},{"line_number":783,"context_line":"    def test_update_quota_in_other_hierarchy_error(self):"},{"line_number":784,"context_line":"        context.KEYSTONE.get_project \u003d mock.Mock()"},{"line_number":785,"context_line":"        context.KEYSTONE.get_project.side_effect \u003d self.get_project"},{"line_number":786,"context_line":"        req \u003d self._get_http_request()"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_e01abe6e","line":783,"in_reply_to":"9a8ffd7b_7cea0076","updated":"2015-12-02 16:27:03.000000000","message":"Done","commit_id":"ae466e52995cb2519d032cf0e94b7dd129f9f28f"}]}
