)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"510459e95de934bed2db146bb03543505478f338","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Nested Quota Driver: Get Project Hierarchy"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We are making calls to keystones in order to know the project hierarchy"},{"line_number":10,"context_line":"and check weather a project is a root project or not."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ic749fd56d7c6b41f720f8e86bf62066c6a63122b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a50d1a3_8fc5495d","line":9,"updated":"2015-07-27 18:58:37.000000000","message":"keystones -\u003e Keystone ?","commit_id":"075f76c940ec0dc7636313f6dbe8adac57dc376e"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"2037416f1d385bc56d0d29b6239ca57778cebe6f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Nested Quota Driver: Get Project Hierarchy"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We are making calls to keystones in order to know the project hierarchy"},{"line_number":10,"context_line":"and check weather a project is a root project or not."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ic749fd56d7c6b41f720f8e86bf62066c6a63122b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a50d1a3_9569d68e","line":9,"in_reply_to":"3a50d1a3_8fc5495d","updated":"2015-07-27 19:43:14.000000000","message":"Done","commit_id":"075f76c940ec0dc7636313f6dbe8adac57dc376e"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"b7f371a43bfc3f7d25b80c4a51806699c968840c","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We are making calls to keystone in order to know the project hierarchy"},{"line_number":10,"context_line":"and check whether a project is a root project or not."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ic749fd56d7c6b41f720f8e86bf62066c6a63122b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a50d1a3_15094684","line":11,"updated":"2015-07-27 19:49:24.000000000","message":"is there some blueprint related?","commit_id":"06eda347ab48332da2dcde7b71376fe243d1299e"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"375488775c28e3ab7fca0a4e465c79c9dd1c0436","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We are making calls to keystone in order to know the project hierarchy"},{"line_number":10,"context_line":"and check whether a project is a root project or not."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ic749fd56d7c6b41f720f8e86bf62066c6a63122b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a50d1a3_9b69078f","line":11,"in_reply_to":"3a50d1a3_15094684","updated":"2015-07-27 20:32:34.000000000","message":"yes, I\u0027ll add it here. Thanks.","commit_id":"06eda347ab48332da2dcde7b71376fe243d1299e"}],"cinder/api/contrib/quotas.py":[{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"510459e95de934bed2db146bb03543505478f338","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        if project.parents:"},{"line_number":176,"context_line":"            # The parent_project_id is the id of its immediate parent project."},{"line_number":177,"context_line":"            parent_project_id \u003d project.parents[0][\u0027project\u0027][\u0027id\u0027]"},{"line_number":178,"context_line":"        return self._format_quota_set(id, QUOTAS.get_defaults(context, "},{"line_number":179,"context_line":"                                                          parent_project_id\u003d"},{"line_number":180,"context_line":"                                                          parent_project_id))"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_4fd4211f","line":178,"updated":"2015-07-27 18:58:37.000000000","message":"Space here that there shouldn\u0027t be. Did you run unit tests and pep8?","commit_id":"075f76c940ec0dc7636313f6dbe8adac57dc376e"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"2037416f1d385bc56d0d29b6239ca57778cebe6f","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        if project.parents:"},{"line_number":176,"context_line":"            # The parent_project_id is the id of its immediate parent project."},{"line_number":177,"context_line":"            parent_project_id \u003d project.parents[0][\u0027project\u0027][\u0027id\u0027]"},{"line_number":178,"context_line":"        return self._format_quota_set(id, QUOTAS.get_defaults(context, "},{"line_number":179,"context_line":"                                                          parent_project_id\u003d"},{"line_number":180,"context_line":"                                                          parent_project_id))"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_150ce6ea","line":178,"in_reply_to":"3a50d1a3_4fd4211f","updated":"2015-07-27 19:43:14.000000000","message":"Done","commit_id":"075f76c940ec0dc7636313f6dbe8adac57dc376e"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"b7f371a43bfc3f7d25b80c4a51806699c968840c","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            return values"},{"line_number":91,"context_line":"        else:"},{"line_number":92,"context_line":"            return {k: v[\u0027limit\u0027] for k, v in values.items()}"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def _get_project(self, context, req, id):"},{"line_number":95,"context_line":"        keystone \u003d client.Client(auth_url\u003dCONF.keymgr.encryption_auth_url,"},{"line_number":96,"context_line":"                                 token\u003dcontext.auth_token,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_951d56c0","line":93,"updated":"2015-07-27 19:49:24.000000000","message":"What do you think in put this keystone calls here: https://github.com/openstack/cinder/blob/master/cinder/context.py? and call it here?\n\nAnd the same comment for the tests.","commit_id":"06eda347ab48332da2dcde7b71376fe243d1299e"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"375488775c28e3ab7fca0a4e465c79c9dd1c0436","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            return values"},{"line_number":91,"context_line":"        else:"},{"line_number":92,"context_line":"            return {k: v[\u0027limit\u0027] for k, v in values.items()}"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def _get_project(self, context, req, id):"},{"line_number":95,"context_line":"        keystone \u003d client.Client(auth_url\u003dCONF.keymgr.encryption_auth_url,"},{"line_number":96,"context_line":"                                 token\u003dcontext.auth_token,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_a073724d","line":93,"in_reply_to":"3a50d1a3_951d56c0","updated":"2015-07-27 20:32:34.000000000","message":"If I\u0027m not missing something... I think, if we add this call to cinder/context.py, we will make calls to keystone in every request made to cinder, even if it is not related to quota. Isn\u0027t it?","commit_id":"06eda347ab48332da2dcde7b71376fe243d1299e"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"8ab488e5b507d15a0e3a774185f53b6a9864fa27","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            return values"},{"line_number":91,"context_line":"        else:"},{"line_number":92,"context_line":"            return {k: v[\u0027limit\u0027] for k, v in values.items()}"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def _get_project(self, context, req, id):"},{"line_number":95,"context_line":"        keystone \u003d client.Client(auth_url\u003dCONF.keymgr.encryption_auth_url,"},{"line_number":96,"context_line":"                                 token\u003dcontext.auth_token,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_1b96573e","line":93,"in_reply_to":"3a50d1a3_a073724d","updated":"2015-07-27 20:36:36.000000000","message":"I mean, create this method \"get_project()\"  and call it here, and not call when you\u0027re creating the context, but this is just a suggestion, I don\u0027t see any problem with either solution.","commit_id":"06eda347ab48332da2dcde7b71376fe243d1299e"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"b7f371a43bfc3f7d25b80c4a51806699c968840c","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":165,"context_line":"        authorize_show(context)"},{"line_number":166,"context_line":"        try:"},{"line_number":167,"context_line":"            # NOTE (ericksonsantos): this call is made because of HMT. So that"},{"line_number":168,"context_line":"            # we figure out if the project in the context is a root project or"},{"line_number":169,"context_line":"            # not, in its hierarchy."},{"line_number":170,"context_line":"            project \u003d self._get_project(context, req, context.project_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_757f6ae0","line":167,"updated":"2015-07-27 19:49:24.000000000","message":"please change HMT for Hierarchical Multitenancy","commit_id":"06eda347ab48332da2dcde7b71376fe243d1299e"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"375488775c28e3ab7fca0a4e465c79c9dd1c0436","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":165,"context_line":"        authorize_show(context)"},{"line_number":166,"context_line":"        try:"},{"line_number":167,"context_line":"            # NOTE (ericksonsantos): this call is made because of HMT. So that"},{"line_number":168,"context_line":"            # we figure out if the project in the context is a root project or"},{"line_number":169,"context_line":"            # not, in its hierarchy."},{"line_number":170,"context_line":"            project \u003d self._get_project(context, req, context.project_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_e0a41aa7","line":167,"in_reply_to":"3a50d1a3_757f6ae0","updated":"2015-07-27 20:32:34.000000000","message":"Sure, I\u0027ll do it.","commit_id":"06eda347ab48332da2dcde7b71376fe243d1299e"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"f0e14621c65dd6c4a3408e9f732fde0ef8222d9a","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        else:"},{"line_number":92,"context_line":"            return {k: v[\u0027limit\u0027] for k, v in values.items()}"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def _get_project(self, context, req, id, parents_as_list\u003dFalse,"},{"line_number":95,"context_line":"                     subtree_as_list\u003dFalse, parents_as_ids\u003dFalse,"},{"line_number":96,"context_line":"                     subtree_as_ids\u003dFalse):"},{"line_number":97,"context_line":"        \"\"\"A Helper method to get the project hierarchy."}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_127231b1","line":94,"updated":"2015-07-30 07:40:40.000000000","message":"you only need parents_as_ids and subtree_as_ids, you can\u0027t even pass both _as_list and _as_ids parameters at the same time","commit_id":"b34e69f76ec849de26cf800dd0c24034c5ae3d8b"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"d8f45de2c06836fc094e4d2c8edf8b118bba6eb0","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        else:"},{"line_number":92,"context_line":"            return {k: v[\u0027limit\u0027] for k, v in values.items()}"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def _get_project(self, context, req, id, parents_as_list\u003dFalse,"},{"line_number":95,"context_line":"                     subtree_as_list\u003dFalse, parents_as_ids\u003dFalse,"},{"line_number":96,"context_line":"                     subtree_as_ids\u003dFalse):"},{"line_number":97,"context_line":"        \"\"\"A Helper method to get the project hierarchy."}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_3815c448","line":94,"in_reply_to":"3a50d1a3_127231b1","updated":"2015-07-30 11:52:02.000000000","message":"We really don\u0027t need it. I\u0027ll remove these parameters. Thanks.","commit_id":"b34e69f76ec849de26cf800dd0c24034c5ae3d8b"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"7623ce6547247448c2482b6e3bd43062e3ee48e8","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                                     project_id\u003dcontext.project_id)"},{"line_number":107,"context_line":"            project \u003d keystone.projects.get(id,"},{"line_number":108,"context_line":"                                            parents_as_list\u003dparents_as_list,"},{"line_number":109,"context_line":"                                            subtree_as_list\u003dsubtree_as_list,"},{"line_number":110,"context_line":"                                            parents_as_ids\u003dparents_as_ids,"},{"line_number":111,"context_line":"                                            subtree_as_ids\u003dsubtree_as_ids)"},{"line_number":112,"context_line":"        except exceptions.NotFound:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_71c85a57","line":109,"updated":"2015-07-30 02:37:01.000000000","message":"why you need to use parents_as_list and subtree_as_list, to update the quota?","commit_id":"b34e69f76ec849de26cf800dd0c24034c5ae3d8b"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"d8f45de2c06836fc094e4d2c8edf8b118bba6eb0","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                                     project_id\u003dcontext.project_id)"},{"line_number":107,"context_line":"            project \u003d keystone.projects.get(id,"},{"line_number":108,"context_line":"                                            parents_as_list\u003dparents_as_list,"},{"line_number":109,"context_line":"                                            subtree_as_list\u003dsubtree_as_list,"},{"line_number":110,"context_line":"                                            parents_as_ids\u003dparents_as_ids,"},{"line_number":111,"context_line":"                                            subtree_as_ids\u003dsubtree_as_ids)"},{"line_number":112,"context_line":"        except exceptions.NotFound:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_f8075c1b","line":109,"in_reply_to":"3a50d1a3_71c85a57","updated":"2015-07-30 11:52:02.000000000","message":"We really don\u0027t need it. I\u0027ll remove these parameters. Thanks.","commit_id":"b34e69f76ec849de26cf800dd0c24034c5ae3d8b"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"f0e14621c65dd6c4a3408e9f732fde0ef8222d9a","unresolved":false,"context_lines":[{"line_number":180,"context_line":"    def defaults(self, req, id):"},{"line_number":181,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":182,"context_line":"        authorize_show(context)"},{"line_number":183,"context_line":"        project \u003d self._get_project(context, req, context.project_id)"},{"line_number":184,"context_line":"        return self._format_quota_set(id, QUOTAS.get_defaults("},{"line_number":185,"context_line":"            context, parent_project_id\u003dproject.parent_id))"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_92ade1ec","line":183,"updated":"2015-07-30 07:40:40.000000000","message":"so I believe here you pass subtree_as_ids\u003dTrue and parents_as_ids\u003dTrue ?","commit_id":"b34e69f76ec849de26cf800dd0c24034c5ae3d8b"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"d8f45de2c06836fc094e4d2c8edf8b118bba6eb0","unresolved":false,"context_lines":[{"line_number":180,"context_line":"    def defaults(self, req, id):"},{"line_number":181,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":182,"context_line":"        authorize_show(context)"},{"line_number":183,"context_line":"        project \u003d self._get_project(context, req, context.project_id)"},{"line_number":184,"context_line":"        return self._format_quota_set(id, QUOTAS.get_defaults("},{"line_number":185,"context_line":"            context, parent_project_id\u003dproject.parent_id))"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_186b28f3","line":183,"in_reply_to":"3a50d1a3_92ade1ec","updated":"2015-07-30 11:52:02.000000000","message":"Here we just need the parent_id info. So, there is no need to pass subtree_as_ids or parents_as_ids.","commit_id":"b34e69f76ec849de26cf800dd0c24034c5ae3d8b"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"829e9b5f93af3c3806a709ef7e8ef4f5bcd02aaa","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                                     project_id\u003dcontext.project_id)"},{"line_number":105,"context_line":"            project \u003d keystone.projects.get(id, subtree_as_ids\u003dsubtree_as_ids)"},{"line_number":106,"context_line":"        except exceptions.NotFound:"},{"line_number":107,"context_line":"            msg \u003d (_(\"Tenant ID: %s does not exist.\") % id)"},{"line_number":108,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":109,"context_line":"        return project"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1a4dcd0f_00a9bf23","line":107,"updated":"2015-08-12 18:43:07.000000000","message":"maybe:\n  \n  Tenant with ID \u0027%s\u0027 doesnot exist.","commit_id":"5017cb45b3e4c7fa88905abbdf88a83a2f553487"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"a0a412df9f273928cc239bf02054d4e4f4cab1b6","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        else:"},{"line_number":72,"context_line":"            return {k: v[\u0027limit\u0027] for k, v in values.items()}"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _get_project(self, context, req, id, subtree_as_ids\u003dFalse):"},{"line_number":75,"context_line":"        \"\"\"A Helper method to get the project hierarchy."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        Along with Hierachical Multitenancy, projects can be hierarchically"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa1b9901_0276d905","line":74,"updated":"2015-08-20 00:24:23.000000000","message":"Should remove req since it isn\u0027t being used anywhere.","commit_id":"3df0b992938f852b2f5bc4b9de3dd519353e772c"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"bb6132128b1e72f97951c0401c073abd4dcf429d","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        else:"},{"line_number":72,"context_line":"            return {k: v[\u0027limit\u0027] for k, v in values.items()}"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _get_project(self, context, req, id, subtree_as_ids\u003dFalse):"},{"line_number":75,"context_line":"        \"\"\"A Helper method to get the project hierarchy."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        Along with Hierachical Multitenancy, projects can be hierarchically"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa1b9901_f56a8180","line":74,"in_reply_to":"fa1b9901_0276d905","updated":"2015-08-20 00:48:13.000000000","message":"Sure, I\u0027ll do it.","commit_id":"3df0b992938f852b2f5bc4b9de3dd519353e772c"}],"cinder/tests/unit/api/contrib/test_quotas.py":[{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"907d7e5ee8fb6bd9d19acfdcbb0f25b469a2dbc5","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        self.req.environ \u003d {\u0027cinder.context\u0027: context.get_admin_context()}"},{"line_number":73,"context_line":"        self.req.environ[\u0027cinder.context\u0027].is_admin \u003d True"},{"line_number":74,"context_line":"        self.req.environ[\u0027cinder.context\u0027].auth_token \u003d uuid.uuid4().hex"},{"line_number":75,"context_line":"        self.req.environ[\u0027cinder.context\u0027].project_id \u003d \u0027root_project_id\u0027"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        self.auth_url \u003d CONF.keymgr.encryption_auth_url"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_b5f6525b","line":75,"updated":"2015-07-27 19:55:47.000000000","message":"Why not use uuid.uuid4().hex here too?","commit_id":"06eda347ab48332da2dcde7b71376fe243d1299e"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"375488775c28e3ab7fca0a4e465c79c9dd1c0436","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        self.req.environ \u003d {\u0027cinder.context\u0027: context.get_admin_context()}"},{"line_number":73,"context_line":"        self.req.environ[\u0027cinder.context\u0027].is_admin \u003d True"},{"line_number":74,"context_line":"        self.req.environ[\u0027cinder.context\u0027].auth_token \u003d uuid.uuid4().hex"},{"line_number":75,"context_line":"        self.req.environ[\u0027cinder.context\u0027].project_id \u003d \u0027root_project_id\u0027"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        self.auth_url \u003d CONF.keymgr.encryption_auth_url"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_a0d8521f","line":75,"in_reply_to":"3a50d1a3_b5f6525b","updated":"2015-07-27 20:32:34.000000000","message":"sure, I\u0027ll do it.","commit_id":"06eda347ab48332da2dcde7b71376fe243d1299e"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"907d7e5ee8fb6bd9d19acfdcbb0f25b469a2dbc5","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _get_project(self, context, req, id):"},{"line_number":80,"context_line":"        fake_project \u003d self.FakeProject()"},{"line_number":81,"context_line":"        if context.project_id \u003d\u003d \u0027root_project_id\u0027:"},{"line_number":82,"context_line":"            return fake_project"},{"line_number":83,"context_line":"        fake_project.parents \u003d [{\u0027project\u0027: {\u0027id\u0027: \u0027parent_project_id\u0027}}]"},{"line_number":84,"context_line":"        return fake_project"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_f587fab2","line":81,"updated":"2015-07-27 19:55:47.000000000","message":"and you can just compare context.project_id\u003d\u003d self.req.environ[\u0027cinder.context\u0027].project_id","commit_id":"06eda347ab48332da2dcde7b71376fe243d1299e"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"375488775c28e3ab7fca0a4e465c79c9dd1c0436","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _get_project(self, context, req, id):"},{"line_number":80,"context_line":"        fake_project \u003d self.FakeProject()"},{"line_number":81,"context_line":"        if context.project_id \u003d\u003d \u0027root_project_id\u0027:"},{"line_number":82,"context_line":"            return fake_project"},{"line_number":83,"context_line":"        fake_project.parents \u003d [{\u0027project\u0027: {\u0027id\u0027: \u0027parent_project_id\u0027}}]"},{"line_number":84,"context_line":"        return fake_project"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_60056a78","line":81,"in_reply_to":"3a50d1a3_f587fab2","updated":"2015-07-27 20:32:34.000000000","message":"makes sense.","commit_id":"06eda347ab48332da2dcde7b71376fe243d1299e"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"907d7e5ee8fb6bd9d19acfdcbb0f25b469a2dbc5","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        fake_project \u003d self.FakeProject()"},{"line_number":81,"context_line":"        if context.project_id \u003d\u003d \u0027root_project_id\u0027:"},{"line_number":82,"context_line":"            return fake_project"},{"line_number":83,"context_line":"        fake_project.parents \u003d [{\u0027project\u0027: {\u0027id\u0027: \u0027parent_project_id\u0027}}]"},{"line_number":84,"context_line":"        return fake_project"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    @mock.patch(\u0027keystoneclient.v3.client.Client\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_b58df2d4","line":83,"updated":"2015-07-27 19:55:47.000000000","message":"same comment here","commit_id":"06eda347ab48332da2dcde7b71376fe243d1299e"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"907d7e5ee8fb6bd9d19acfdcbb0f25b469a2dbc5","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def test_get_project(self, ksclient_class):"},{"line_number":97,"context_line":"        context \u003d self.req.environ[\u0027cinder.context\u0027]"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        keystoneclient \u003d ksclient_class.return_value"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        self.controller._get_project(context, self.req, context.project_id)"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_75376aff","line":99,"updated":"2015-07-27 19:55:47.000000000","message":"I suggest send this keystonclient to the setup() and you can reuse the same instance in every test.\n\nmakes sense?","commit_id":"06eda347ab48332da2dcde7b71376fe243d1299e"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"375488775c28e3ab7fca0a4e465c79c9dd1c0436","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def test_get_project(self, ksclient_class):"},{"line_number":97,"context_line":"        context \u003d self.req.environ[\u0027cinder.context\u0027]"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        keystoneclient \u003d ksclient_class.return_value"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        self.controller._get_project(context, self.req, context.project_id)"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_7b643bb8","line":99,"in_reply_to":"3a50d1a3_75376aff","updated":"2015-07-27 20:32:34.000000000","message":"We will just need keystoneclient for this test, since we are testing the _get_project method. For the other tests, we can mock it, like I did in test_subproject_defaults, as you can see it below.","commit_id":"06eda347ab48332da2dcde7b71376fe243d1299e"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"8ab488e5b507d15a0e3a774185f53b6a9864fa27","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def test_get_project(self, ksclient_class):"},{"line_number":97,"context_line":"        context \u003d self.req.environ[\u0027cinder.context\u0027]"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        keystoneclient \u003d ksclient_class.return_value"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        self.controller._get_project(context, self.req, context.project_id)"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_7bbc3bbb","line":99,"in_reply_to":"3a50d1a3_7b643bb8","updated":"2015-07-27 20:36:36.000000000","message":"ok :)","commit_id":"06eda347ab48332da2dcde7b71376fe243d1299e"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"f0e14621c65dd6c4a3408e9f732fde0ef8222d9a","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    class FakeProject(object):"},{"line_number":65,"context_line":"        parent_id \u003d None"},{"line_number":66,"context_line":"        parents \u003d []"},{"line_number":67,"context_line":"        subtree \u003d []"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def setUp(self):"},{"line_number":70,"context_line":"        super(QuotaSetsControllerTest, self).setUp()"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_f2f545ed","line":67,"updated":"2015-07-30 07:40:40.000000000","message":"they should be None and set to an empty *dict* only if you pass True in parents_as_ids and/or subtree_as_ids in the _get_project() below","commit_id":"b34e69f76ec849de26cf800dd0c24034c5ae3d8b"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"d8f45de2c06836fc094e4d2c8edf8b118bba6eb0","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    class FakeProject(object):"},{"line_number":65,"context_line":"        parent_id \u003d None"},{"line_number":66,"context_line":"        parents \u003d []"},{"line_number":67,"context_line":"        subtree \u003d []"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def setUp(self):"},{"line_number":70,"context_line":"        super(QuotaSetsControllerTest, self).setUp()"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_2bb330eb","line":67,"in_reply_to":"3a50d1a3_084be460","updated":"2015-07-30 11:52:02.000000000","message":"sure, makes sense. I will do it.","commit_id":"b34e69f76ec849de26cf800dd0c24034c5ae3d8b"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"d8f45de2c06836fc094e4d2c8edf8b118bba6eb0","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    class FakeProject(object):"},{"line_number":65,"context_line":"        parent_id \u003d None"},{"line_number":66,"context_line":"        parents \u003d []"},{"line_number":67,"context_line":"        subtree \u003d []"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def setUp(self):"},{"line_number":70,"context_line":"        super(QuotaSetsControllerTest, self).setUp()"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_eb90e850","line":67,"in_reply_to":"3a50d1a3_f2f545ed","updated":"2015-07-30 11:52:02.000000000","message":"Nice catch. Thanks!","commit_id":"b34e69f76ec849de26cf800dd0c24034c5ae3d8b"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"b90c94df6e7914b73f884b547e65dd96a68674e8","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    class FakeProject(object):"},{"line_number":65,"context_line":"        parent_id \u003d None"},{"line_number":66,"context_line":"        parents \u003d []"},{"line_number":67,"context_line":"        subtree \u003d []"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def setUp(self):"},{"line_number":70,"context_line":"        super(QuotaSetsControllerTest, self).setUp()"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_084be460","line":67,"in_reply_to":"3a50d1a3_f2f545ed","updated":"2015-07-30 08:09:30.000000000","message":"you should also create hierarchy fixtures to be used in different testcases, like:\n\n project_subtree: {A: {B: None},\n                   C: {D: {E: None}}\n\nthis represents the subtree of a project X in the following hierarchy:\n    \n    X\n    |\n    A\n  /    \\\nC        B\n|\nD\n|\nE","commit_id":"b34e69f76ec849de26cf800dd0c24034c5ae3d8b"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"f0e14621c65dd6c4a3408e9f732fde0ef8222d9a","unresolved":false,"context_lines":[{"line_number":81,"context_line":"    def _get_project(self, context, req, id, parents_as_list\u003dFalse,"},{"line_number":82,"context_line":"                     subtree_as_list\u003dFalse,"},{"line_number":83,"context_line":"                     parents_as_ids\u003dFalse,"},{"line_number":84,"context_line":"                     subtree_as_ids\u003dFalse):"},{"line_number":85,"context_line":"        fake_project \u003d self.FakeProject()"},{"line_number":86,"context_line":"        if context.project_id \u003d\u003d \u0027subproject_id\u0027:"},{"line_number":87,"context_line":"            fake_project.parent_id \u003d uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_b2f49dcf","line":84,"updated":"2015-07-30 07:40:40.000000000","message":"see comments in the previous file and above","commit_id":"b34e69f76ec849de26cf800dd0c24034c5ae3d8b"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"7623ce6547247448c2482b6e3bd43062e3ee48e8","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    @mock.patch(\u0027keystoneclient.v3.client.Client\u0027)"},{"line_number":101,"context_line":"    def test_get_project(self, ksclient_class):"},{"line_number":102,"context_line":"        context \u003d self.req.environ[\u0027cinder.context\u0027]"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        keystoneclient \u003d ksclient_class.return_value"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        self.controller._get_project(context, self.req, context.project_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_f1da2a1d","line":103,"updated":"2015-07-30 02:37:01.000000000","message":"nit: remove this unnecessary white lines in all this methods.","commit_id":"b34e69f76ec849de26cf800dd0c24034c5ae3d8b"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"f0e14621c65dd6c4a3408e9f732fde0ef8222d9a","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    @mock.patch(\u0027keystoneclient.v3.client.Client\u0027)"},{"line_number":101,"context_line":"    def test_get_project(self, ksclient_class):"},{"line_number":102,"context_line":"        context \u003d self.req.environ[\u0027cinder.context\u0027]"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"        keystoneclient \u003d ksclient_class.return_value"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        self.controller._get_project(context, self.req, context.project_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a50d1a3_32ec0d29","line":103,"in_reply_to":"3a50d1a3_f1da2a1d","updated":"2015-07-30 07:40:40.000000000","message":"blank lines should only be removed when they are being added without a reason in a code being modified, here he is adding new methods","commit_id":"b34e69f76ec849de26cf800dd0c24034c5ae3d8b"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"ed34e4480c57632178ce14bc134f53b14fc70f73","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        super(QuotaSetsControllerTest, self).setUp()"},{"line_number":73,"context_line":"        self.controller \u003d quotas.QuotaSetsController()"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        self.req \u003d mock.MagicMock()"},{"line_number":76,"context_line":"        self.req.environ \u003d {\u0027cinder.context\u0027: context.get_admin_context()}"},{"line_number":77,"context_line":"        self.req.environ[\u0027cinder.context\u0027].is_admin \u003d True"},{"line_number":78,"context_line":"        self.req.environ[\u0027cinder.context\u0027].auth_token \u003d uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_58951786","line":75,"updated":"2015-07-30 20:14:34.000000000","message":"just curious...why you need to change this mock instance?","commit_id":"183f49db1e148e5bf5b825a8727b7d47e759c256"},{"author":{"_account_id":15359,"name":"Erickson Filipe Guedes dos Santos","email":"erickson@lsd.ufcg.edu.br","username":"ericksonfilipe"},"change_message_id":"786d0fe02c482598859360dca6ebc34544e7c975","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        super(QuotaSetsControllerTest, self).setUp()"},{"line_number":73,"context_line":"        self.controller \u003d quotas.QuotaSetsController()"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        self.req \u003d mock.MagicMock()"},{"line_number":76,"context_line":"        self.req.environ \u003d {\u0027cinder.context\u0027: context.get_admin_context()}"},{"line_number":77,"context_line":"        self.req.environ[\u0027cinder.context\u0027].is_admin \u003d True"},{"line_number":78,"context_line":"        self.req.environ[\u0027cinder.context\u0027].auth_token \u003d uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_32f7ff8d","line":75,"in_reply_to":"3a50d1a3_58951786","updated":"2015-07-31 01:48:59.000000000","message":"We really don\u0027t need this change. I have fixed it in the patch set 8.\nThanks!","commit_id":"183f49db1e148e5bf5b825a8727b7d47e759c256"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"829e9b5f93af3c3806a709ef7e8ef4f5bcd02aaa","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        |   B   C   |"},{"line_number":101,"context_line":"        |  /        |"},{"line_number":102,"context_line":"        | D         |"},{"line_number":103,"context_line":"        +-----------+"},{"line_number":104,"context_line":"        \"\"\""},{"line_number":105,"context_line":"        self.A \u003d self.FakeProject(id\u003duuid.uuid4().hex, parent_id\u003dNone)"},{"line_number":106,"context_line":"        self.B \u003d self.FakeProject(id\u003duuid.uuid4().hex, parent_id\u003dself.A.id)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a4dcd0f_00769f05","line":103,"updated":"2015-08-12 18:43:07.000000000","message":"nice :)\n\nhave done the same myself: https://github.com/openstack/keystone/blob/master/keystone/resource/core.py#L289-L293","commit_id":"5017cb45b3e4c7fa88905abbdf88a83a2f553487"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"829e9b5f93af3c3806a709ef7e8ef4f5bcd02aaa","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        | D         |"},{"line_number":103,"context_line":"        +-----------+"},{"line_number":104,"context_line":"        \"\"\""},{"line_number":105,"context_line":"        self.A \u003d self.FakeProject(id\u003duuid.uuid4().hex, parent_id\u003dNone)"},{"line_number":106,"context_line":"        self.B \u003d self.FakeProject(id\u003duuid.uuid4().hex, parent_id\u003dself.A.id)"},{"line_number":107,"context_line":"        self.C \u003d self.FakeProject(id\u003duuid.uuid4().hex, parent_id\u003dself.A.id)"},{"line_number":108,"context_line":"        self.D \u003d self.FakeProject(id\u003duuid.uuid4().hex, parent_id\u003dself.B.id)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a4dcd0f_4057c757","line":105,"updated":"2015-08-12 18:43:07.000000000","message":"shouldn\u0027t them be called projectA, projectB ... ?","commit_id":"5017cb45b3e4c7fa88905abbdf88a83a2f553487"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"829e9b5f93af3c3806a709ef7e8ef4f5bcd02aaa","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        keystoneclient \u003d ksclient_class.return_value"},{"line_number":133,"context_line":"        self.controller._get_project(context, self.req, context.project_id)"},{"line_number":134,"context_line":"        keystoneclient.projects.get.assert_called_once_with("},{"line_number":135,"context_line":"            context.project_id, subtree_as_ids\u003dFalse)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def test_defaults(self):"},{"line_number":138,"context_line":"        self.controller._get_project \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a4dcd0f_e09a9313","line":135,"updated":"2015-08-12 18:43:07.000000000","message":"don\u0027t you need to check the return as well?","commit_id":"5017cb45b3e4c7fa88905abbdf88a83a2f553487"}]}
