)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"0606243a73a794a7dff526d4be3cd87cb9aa12e3","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Rodrigo Duarte Sousa \u003crodrigods@lsd.ufcg.edu.br\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-02-24 12:07:56 -0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fixes some HMT internal calls"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Adds the possibility to list root projects by allowing the use"},{"line_number":10,"context_line":"of None values in _get_children(). Also, it is done a cleanup"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba7be1f8_5f6c8c35","line":7,"updated":"2015-02-24 15:12:10.000000000","message":"Please, use active voice here: s/Fixes/Fix/.\nIt applies to the whole commit message.","commit_id":"4d0ea43e015fe471982f01f11546e5ec11a68345"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"0606243a73a794a7dff526d4be3cd87cb9aa12e3","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fixes some HMT internal calls"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Adds the possibility to list root projects by allowing the use"},{"line_number":10,"context_line":"of None values in _get_children(). Also, it is done a cleanup"},{"line_number":11,"context_line":"in the list_projects_in_subtree() and list_project_parents()"},{"line_number":12,"context_line":"methods to avoid passing invalid project_ids."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba7be1f8_3f4198a9","line":10,"updated":"2015-02-24 15:12:10.000000000","message":"I think \"Also, a cleanup is done in the ...\" will sound better.","commit_id":"4d0ea43e015fe471982f01f11546e5ec11a68345"}],"keystone/resource/backends/sql.py":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"bec46f6d15349d8e3692da2778086fb1937c3a2f","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def list_projects_in_subtree(self, project_id):"},{"line_number":93,"context_line":"        with sql.transaction() as session:"},{"line_number":94,"context_line":"            children \u003d self._get_children(session, [project_id])"},{"line_number":95,"context_line":"            subtree \u003d []"},{"line_number":96,"context_line":"            examined \u003d set(project_id)"},{"line_number":97,"context_line":"            while children:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9b358b_1e242a0b","line":94,"updated":"2015-03-30 23:14:29.000000000","message":"Are these changes related or just a way to speed things up?","commit_id":"a6de2205665ffd26c0f4a78a2e232ccc606fae1b"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"34e4f4c71303b53899b9259aee9439c9eb29995a","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def list_projects_in_subtree(self, project_id):"},{"line_number":93,"context_line":"        with sql.transaction() as session:"},{"line_number":94,"context_line":"            children \u003d self._get_children(session, [project_id])"},{"line_number":95,"context_line":"            subtree \u003d []"},{"line_number":96,"context_line":"            examined \u003d set(project_id)"},{"line_number":97,"context_line":"            while children:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9b358b_909fef4f","line":94,"in_reply_to":"da9b358b_1e242a0b","updated":"2015-03-31 14:07:36.000000000","message":"Its just a way do improve the code.","commit_id":"a6de2205665ffd26c0f4a78a2e232ccc606fae1b"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"5761da716bd4112bea913e201bfe5df19bc47876","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def list_projects_in_subtree(self, project_id):"},{"line_number":93,"context_line":"        with sql.transaction() as session:"},{"line_number":94,"context_line":"            children \u003d self._get_children(session, [project_id])"},{"line_number":95,"context_line":"            subtree \u003d []"},{"line_number":96,"context_line":"            examined \u003d set(project_id)"},{"line_number":97,"context_line":"            while children:"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa041b7_98573402","line":94,"in_reply_to":"da9b358b_351c8dc0","updated":"2015-04-02 17:47:53.000000000","message":"actually, just noticed this changes are related... Since we check if the project exist in the Manager layer, we do not need to retrieve the project ref again here.","commit_id":"a6de2205665ffd26c0f4a78a2e232ccc606fae1b"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"ef04487ee383a23701b51e2e0876c389829bb81b","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def list_projects_in_subtree(self, project_id):"},{"line_number":93,"context_line":"        with sql.transaction() as session:"},{"line_number":94,"context_line":"            children \u003d self._get_children(session, [project_id])"},{"line_number":95,"context_line":"            subtree \u003d []"},{"line_number":96,"context_line":"            examined \u003d set(project_id)"},{"line_number":97,"context_line":"            while children:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9b358b_b55bfdf5","line":94,"in_reply_to":"da9b358b_909fef4f","updated":"2015-03-31 15:59:18.000000000","message":"Any reason that this can\u0027t be in a separate patch then?","commit_id":"a6de2205665ffd26c0f4a78a2e232ccc606fae1b"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"b2c50d52a10f63573585b71b03eca7c024af31a3","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def list_projects_in_subtree(self, project_id):"},{"line_number":93,"context_line":"        with sql.transaction() as session:"},{"line_number":94,"context_line":"            children \u003d self._get_children(session, [project_id])"},{"line_number":95,"context_line":"            subtree \u003d []"},{"line_number":96,"context_line":"            examined \u003d set(project_id)"},{"line_number":97,"context_line":"            while children:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9b358b_351c8dc0","line":94,"in_reply_to":"da9b358b_b55bfdf5","updated":"2015-03-31 16:08:45.000000000","message":"I don\u0027t think so... I\u0027ll send in a different patch.","commit_id":"a6de2205665ffd26c0f4a78a2e232ccc606fae1b"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"b9aca0f1cf195fb8598aeabb7dfa8d2d1a18cefe","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def list_projects_in_subtree(self, project_id):"},{"line_number":93,"context_line":"        with sql.transaction() as session:"},{"line_number":94,"context_line":"            project \u003d self._get_project(session, project_id).to_dict()"},{"line_number":95,"context_line":"            children \u003d self._get_children(session, [project[\u0027id\u0027]])"},{"line_number":96,"context_line":"            subtree \u003d []"},{"line_number":97,"context_line":"            examined \u003d set(project[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aa53dc9_df1e8562","side":"PARENT","line":94,"updated":"2015-04-08 18:58:28.000000000","message":"thanks for the cleanup","commit_id":"7a9833fe2dc8298c996856ade8058817cce75ccd"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"73f6d91be8e15b7565bef78987d717433df576ef","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        with sql.transaction() as session:"},{"line_number":94,"context_line":"            children \u003d self._get_children(session, [project_id])"},{"line_number":95,"context_line":"            subtree \u003d []"},{"line_number":96,"context_line":"            examined \u003d set(project_id)"},{"line_number":97,"context_line":"            while children:"},{"line_number":98,"context_line":"                children_ids \u003d set()"},{"line_number":99,"context_line":"                for ref in children:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7ad32947_00940735","line":96,"updated":"2015-04-27 16:33:28.000000000","message":"this is going to break the validation of circular dependency again.\n\nproject_id \u003d \u0027123\u0027\nset(project_id) will translate to set([\u00271\u0027,\u00272\u0027,\u00273\u0027])","commit_id":"984ca8c0feaf980240fce526edced6ee8784698c"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"bf1cb32c75da3621dc0e9a5c08d0ea96ebd9d494","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        with sql.transaction() as session:"},{"line_number":94,"context_line":"            children \u003d self._get_children(session, [project_id])"},{"line_number":95,"context_line":"            subtree \u003d []"},{"line_number":96,"context_line":"            examined \u003d set(project_id)"},{"line_number":97,"context_line":"            while children:"},{"line_number":98,"context_line":"                children_ids \u003d set()"},{"line_number":99,"context_line":"                for ref in children:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7ad32947_71038fb9","line":96,"in_reply_to":"7ad32947_00940735","updated":"2015-04-27 17:35:21.000000000","message":"++\n\nneed to use set([project_id])","commit_id":"984ca8c0feaf980240fce526edced6ee8784698c"}],"keystone/resource/controllers.py":[{"author":{"_account_id":9101,"name":"wanghong","email":"reviewwanghong@126.com","username":"wanghong"},"change_message_id":"8b70bc6e9c86546fad638645a02484b4e3527459","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            ref \u003d self.resource_api.create_project(ref[\u0027id\u0027], ref,"},{"line_number":207,"context_line":"                                                   initiator\u003dinitiator)"},{"line_number":208,"context_line":"        except exception.ProjectNotFound as e:"},{"line_number":209,"context_line":"            raise exception.ValidationError(e)"},{"line_number":210,"context_line":"        return ProjectV3.wrap_member(context, ref)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    @controller.filterprotected(\u0027domain_id\u0027, \u0027enabled\u0027, \u0027name\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"5aa745d1_74b6e03e","line":209,"updated":"2015-04-16 08:25:38.000000000","message":"I think this should be in manager layer.","commit_id":"b6113ef118b06f9a235ad3eaba3e53fbac7757eb"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"f8a977b7e2793a0140c38ae18c8b9f233dcd1195","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            ref \u003d self.resource_api.create_project(ref[\u0027id\u0027], ref,"},{"line_number":207,"context_line":"                                                   initiator\u003dinitiator)"},{"line_number":208,"context_line":"        except exception.ProjectNotFound as e:"},{"line_number":209,"context_line":"            raise exception.ValidationError(e)"},{"line_number":210,"context_line":"        return ProjectV3.wrap_member(context, ref)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    @controller.filterprotected(\u0027domain_id\u0027, \u0027enabled\u0027, \u0027name\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3ab451fb_8c26e8b8","line":209,"in_reply_to":"5aa745d1_74b6e03e","updated":"2015-04-17 20:30:39.000000000","message":"I don\u0027t think a ValidationError should ever be raise from the manager. A better design would be to have it raise ParentProjectNotFound (assuming that\u0027s why this is raised) and then raise the ValidationError from here.","commit_id":"b6113ef118b06f9a235ad3eaba3e53fbac7757eb"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"c654f8598dd1c850c4171d23ed3216a9aebb2b57","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            ref \u003d self.resource_api.create_project(ref[\u0027id\u0027], ref,"},{"line_number":207,"context_line":"                                                   initiator\u003dinitiator)"},{"line_number":208,"context_line":"        except exception.ProjectNotFound as e:"},{"line_number":209,"context_line":"            raise exception.ValidationError(e)"},{"line_number":210,"context_line":"        return ProjectV3.wrap_member(context, ref)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    @controller.filterprotected(\u0027domain_id\u0027, \u0027enabled\u0027, \u0027name\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"5aa745d1_6d260abc","line":209,"in_reply_to":"5aa745d1_74b6e03e","updated":"2015-04-18 09:47:03.000000000","message":"My argument for it being here is that we are only transposing the error because we feel ValidationError is a better HTTP response.  Manager layers shouldn\u0027t care about the vagaries of HTTP protocols.....that is the job of the controller.","commit_id":"b6113ef118b06f9a235ad3eaba3e53fbac7757eb"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"6bbed07d9bcf8d9ed5f874eb0000ac5b658799e3","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            ref \u003d self.resource_api.create_project(ref[\u0027id\u0027], ref,"},{"line_number":207,"context_line":"                                                   initiator\u003dinitiator)"},{"line_number":208,"context_line":"        except exception.ProjectNotFound as e:"},{"line_number":209,"context_line":"            raise exception.ValidationError(e)"},{"line_number":210,"context_line":"        return ProjectV3.wrap_member(context, ref)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    @controller.filterprotected(\u0027domain_id\u0027, \u0027enabled\u0027, \u0027name\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"5aa745d1_a1053ac3","line":209,"in_reply_to":"5aa745d1_74b6e03e","updated":"2015-04-21 14:39:45.000000000","message":"We have a problem to create a test in the controller level, because this class use \"@controller.protected()\", so inside this method, there is a a get_project request https://github.com/openstack/keystone/blob/master/keystone/resource/controllers.py#L197 and this request will return a 404, even we returning a 400 in the controller level.\n\nSo, I suggest handle with this problem in the manager level, to don\u0027t accept None in the get_project and we can discuss other solution to deal with the problem in the controller level (as a general problem) in other bug. What do you think?","commit_id":"b6113ef118b06f9a235ad3eaba3e53fbac7757eb"}],"keystone/resource/core.py":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"bec46f6d15349d8e3692da2778086fb1937c3a2f","unresolved":false,"context_lines":[{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def list_project_parents(self, project_id, user_id\u003dNone):"},{"line_number":251,"context_line":"        if project_id is None:"},{"line_number":252,"context_line":"            raise exception.ForbiddenAction("},{"line_number":253,"context_line":"                action\u003d_(\u0027Cannot list project parents from invalid \u0027"},{"line_number":254,"context_line":"                         \u0027project_id: %s. Please use a valid \u0027"},{"line_number":255,"context_line":"                         \u0027project_id.\u0027) % project_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9b358b_7e5a1685","line":252,"updated":"2015-03-30 23:14:29.000000000","message":"I don\u0027t think this is the correct error here. I would think that this is more of a validation error.","commit_id":"a6de2205665ffd26c0f4a78a2e232ccc606fae1b"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"ef04487ee383a23701b51e2e0876c389829bb81b","unresolved":false,"context_lines":[{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def list_project_parents(self, project_id, user_id\u003dNone):"},{"line_number":251,"context_line":"        if project_id is None:"},{"line_number":252,"context_line":"            raise exception.ForbiddenAction("},{"line_number":253,"context_line":"                action\u003d_(\u0027Cannot list project parents from invalid \u0027"},{"line_number":254,"context_line":"                         \u0027project_id: %s. Please use a valid \u0027"},{"line_number":255,"context_line":"                         \u0027project_id.\u0027) % project_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9b358b_d558c1fc","line":252,"in_reply_to":"da9b358b_5072874a","updated":"2015-03-31 15:59:18.000000000","message":"I think that would be great.","commit_id":"a6de2205665ffd26c0f4a78a2e232ccc606fae1b"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"33d5a99ba1b7ea64d4e6b356272e2b62a583ebaa","unresolved":false,"context_lines":[{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def list_project_parents(self, project_id, user_id\u003dNone):"},{"line_number":251,"context_line":"        if project_id is None:"},{"line_number":252,"context_line":"            raise exception.ForbiddenAction("},{"line_number":253,"context_line":"                action\u003d_(\u0027Cannot list project parents from invalid \u0027"},{"line_number":254,"context_line":"                         \u0027project_id: %s. Please use a valid \u0027"},{"line_number":255,"context_line":"                         \u0027project_id.\u0027) % project_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9b358b_82b57332","line":252,"in_reply_to":"da9b358b_7e5a1685","updated":"2015-03-31 06:41:15.000000000","message":"++ Forbidden kind of implies that in the scenario you have attempted, it is Forbidden...but there is a different way you could  call this and get it to work....if project_id is None, then there is nothing you can do to get that to work","commit_id":"a6de2205665ffd26c0f4a78a2e232ccc606fae1b"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"34e4f4c71303b53899b9259aee9439c9eb29995a","unresolved":false,"context_lines":[{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def list_project_parents(self, project_id, user_id\u003dNone):"},{"line_number":251,"context_line":"        if project_id is None:"},{"line_number":252,"context_line":"            raise exception.ForbiddenAction("},{"line_number":253,"context_line":"                action\u003d_(\u0027Cannot list project parents from invalid \u0027"},{"line_number":254,"context_line":"                         \u0027project_id: %s. Please use a valid \u0027"},{"line_number":255,"context_line":"                         \u0027project_id.\u0027) % project_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9b358b_5072874a","line":252,"in_reply_to":"da9b358b_82b57332","updated":"2015-03-31 14:07:36.000000000","message":"I will change for the ValidationError exception, ok? https://github.com/openstack/keystone/blob/master/keystone/exception.py#L78","commit_id":"a6de2205665ffd26c0f4a78a2e232ccc606fae1b"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"bec46f6d15349d8e3692da2778086fb1937c3a2f","unresolved":false,"context_lines":[{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def list_projects_in_subtree(self, project_id, user_id\u003dNone):"},{"line_number":309,"context_line":"        if project_id is None:"},{"line_number":310,"context_line":"            raise exception.ForbiddenAction("},{"line_number":311,"context_line":"                action\u003d_(\u0027Cannot list projects in subtree from invalid \u0027"},{"line_number":312,"context_line":"                         \u0027project_id: %s. Please use a valid \u0027"},{"line_number":313,"context_line":"                         \u0027project_id.\u0027) % project_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9b358b_3e55ae4f","line":310,"updated":"2015-03-30 23:14:29.000000000","message":"Same here","commit_id":"a6de2205665ffd26c0f4a78a2e232ccc606fae1b"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"6f4b57c009ffab20cf443bea8a8057c8fe744da2","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        if project_id is None:"},{"line_number":249,"context_line":"            msg \u003d _(\u0027Cannot list project parents from invalid \u0027"},{"line_number":250,"context_line":"                    \u0027project_id: %s. Please use a valid \u0027"},{"line_number":251,"context_line":"                    \u0027project_id.\u0027) % project_id"},{"line_number":252,"context_line":"            raise exception.ValidationError(message\u003dmsg)"},{"line_number":253,"context_line":"        # Check if project_id exists"},{"line_number":254,"context_line":"        self.get_project(project_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa041b7_656e20cb","line":251,"updated":"2015-04-02 08:54:19.000000000","message":"don\u0027t we know the project_id is None at this point?","commit_id":"0d4551b5dfa4229414ef02c8af750a0131f62f8d"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"612c4862df2949bf9b679e572b95a5c081b88168","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        if project_id is None:"},{"line_number":249,"context_line":"            msg \u003d _(\u0027Cannot list project parents from invalid \u0027"},{"line_number":250,"context_line":"                    \u0027project_id: %s. Please use a valid \u0027"},{"line_number":251,"context_line":"                    \u0027project_id.\u0027) % project_id"},{"line_number":252,"context_line":"            raise exception.ValidationError(message\u003dmsg)"},{"line_number":253,"context_line":"        # Check if project_id exists"},{"line_number":254,"context_line":"        self.get_project(project_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa041b7_95b01ddf","line":251,"in_reply_to":"baa041b7_656e20cb","updated":"2015-04-02 17:43:01.000000000","message":"Done","commit_id":"0d4551b5dfa4229414ef02c8af750a0131f62f8d"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"6f4b57c009ffab20cf443bea8a8057c8fe744da2","unresolved":false,"context_lines":[{"line_number":306,"context_line":"        if project_id is None:"},{"line_number":307,"context_line":"            msg \u003d _(\u0027Cannot list projects in subtree from invalid \u0027"},{"line_number":308,"context_line":"                    \u0027project_id: %s. Please use a valid \u0027"},{"line_number":309,"context_line":"                    \u0027project_id.\u0027) % project_id"},{"line_number":310,"context_line":"            raise exception.ValidationError(message\u003dmsg)"},{"line_number":311,"context_line":"        # Check if project_id exists"},{"line_number":312,"context_line":"        self.get_project(project_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa041b7_85792496","line":309,"updated":"2015-04-02 08:54:19.000000000","message":"ditto","commit_id":"0d4551b5dfa4229414ef02c8af750a0131f62f8d"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"612c4862df2949bf9b679e572b95a5c081b88168","unresolved":false,"context_lines":[{"line_number":306,"context_line":"        if project_id is None:"},{"line_number":307,"context_line":"            msg \u003d _(\u0027Cannot list projects in subtree from invalid \u0027"},{"line_number":308,"context_line":"                    \u0027project_id: %s. Please use a valid \u0027"},{"line_number":309,"context_line":"                    \u0027project_id.\u0027) % project_id"},{"line_number":310,"context_line":"            raise exception.ValidationError(message\u003dmsg)"},{"line_number":311,"context_line":"        # Check if project_id exists"},{"line_number":312,"context_line":"        self.get_project(project_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa041b7_d5b6a5db","line":309,"in_reply_to":"baa041b7_85792496","updated":"2015-04-02 17:43:01.000000000","message":"Done","commit_id":"0d4551b5dfa4229414ef02c8af750a0131f62f8d"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"b9aca0f1cf195fb8598aeabb7dfa8d2d1a18cefe","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                             \u0027disabled parents\u0027) % project_id)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def _assert_whole_subtree_is_disabled(self, project_id):"},{"line_number":180,"context_line":"        subtree_list \u003d self.driver.list_projects_in_subtree(project_id)"},{"line_number":181,"context_line":"        for ref in subtree_list:"},{"line_number":182,"context_line":"            if ref.get(\u0027enabled\u0027, True):"},{"line_number":183,"context_line":"                raise exception.ForbiddenAction("}],"source_content_type":"text/x-python","patch_set":9,"id":"9aa53dc9_3448f886","side":"PARENT","line":180,"updated":"2015-04-08 18:58:28.000000000","message":"nice cleanup!","commit_id":"7a9833fe2dc8298c996856ade8058817cce75ccd"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"5ecaf78ac8d9e4f1630738e949758f6518adcff8","unresolved":false,"context_lines":[{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    def _assert_valid_project_id(self, project_id):"},{"line_number":248,"context_line":"        if project_id is None:"},{"line_number":249,"context_line":"            msg \u003d _(\u0027project_id cannot be None.\u0027)"},{"line_number":250,"context_line":"            raise exception.ValidationError(message\u003dmsg)"},{"line_number":251,"context_line":"        # Check if project_id exists"},{"line_number":252,"context_line":"        self.get_project(project_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aa53dc9_d9f3459d","line":249,"updated":"2015-04-08 18:30:22.000000000","message":"nit: For consistency with other error msg,  use \"Project field is required and cannot be empty.\"","commit_id":"5f2ca178ae6166d8de63c74a5b3eef4b992d26f1"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"88a53a5ea03a7cf83669a3166f730fe97c6836e0","unresolved":false,"context_lines":[{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    def _assert_valid_project_id(self, project_id):"},{"line_number":248,"context_line":"        if project_id is None:"},{"line_number":249,"context_line":"            msg \u003d _(\u0027project_id cannot be None.\u0027)"},{"line_number":250,"context_line":"            raise exception.ValidationError(message\u003dmsg)"},{"line_number":251,"context_line":"        # Check if project_id exists"},{"line_number":252,"context_line":"        self.get_project(project_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aa53dc9_9aea4b0e","line":249,"in_reply_to":"9aa53dc9_d9f3459d","updated":"2015-04-08 19:36:30.000000000","message":"I\u0027ll update this.","commit_id":"5f2ca178ae6166d8de63c74a5b3eef4b992d26f1"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"7f211e82c8c694987e51b172c5e06675152a5b6d","unresolved":false,"context_lines":[{"line_number":247,"context_line":"    def _assert_valid_project_id(self, project_id):"},{"line_number":248,"context_line":"        if project_id is None:"},{"line_number":249,"context_line":"            msg \u003d _(\u0027project_id cannot be None.\u0027)"},{"line_number":250,"context_line":"            raise exception.ValidationError(message\u003dmsg)"},{"line_number":251,"context_line":"        # Check if project_id exists"},{"line_number":252,"context_line":"        self.get_project(project_id)"},{"line_number":253,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"baa041b7_3567ff26","line":250,"updated":"2015-04-03 07:17:29.000000000","message":"We\u0027ll want to see what the outcome of the discussion on https://review.openstack.org/#/c/159944/ is, to decide what error to raise here.","commit_id":"5f2ca178ae6166d8de63c74a5b3eef4b992d26f1"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"d2856a2181397f828a681a357af032e5dea31bc7","unresolved":false,"context_lines":[{"line_number":247,"context_line":"    def _assert_valid_project_id(self, project_id):"},{"line_number":248,"context_line":"        if project_id is None:"},{"line_number":249,"context_line":"            msg \u003d _(\u0027project_id cannot be None.\u0027)"},{"line_number":250,"context_line":"            raise exception.ValidationError(message\u003dmsg)"},{"line_number":251,"context_line":"        # Check if project_id exists"},{"line_number":252,"context_line":"        self.get_project(project_id)"},{"line_number":253,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"baa041b7_6a022471","line":250,"in_reply_to":"baa041b7_3567ff26","updated":"2015-04-04 18:57:26.000000000","message":"So catch the ProjectNotFound exception and raise a ValidationError?","commit_id":"5f2ca178ae6166d8de63c74a5b3eef4b992d26f1"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"f1223eda87856ff1be903ea2309d3b4d833cf12a","unresolved":false,"context_lines":[{"line_number":247,"context_line":"    def _assert_valid_project_id(self, project_id):"},{"line_number":248,"context_line":"        if project_id is None:"},{"line_number":249,"context_line":"            msg \u003d _(\u0027project_id cannot be None.\u0027)"},{"line_number":250,"context_line":"            raise exception.ValidationError(message\u003dmsg)"},{"line_number":251,"context_line":"        # Check if project_id exists"},{"line_number":252,"context_line":"        self.get_project(project_id)"},{"line_number":253,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9aa53dc9_0b3ce5e0","line":250,"in_reply_to":"baa041b7_6a022471","updated":"2015-04-07 19:28:01.000000000","message":"The outcome of the other discussion is that we have to keep doing a ValidationError, so this is the expected behavior.","commit_id":"5f2ca178ae6166d8de63c74a5b3eef4b992d26f1"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"5ecaf78ac8d9e4f1630738e949758f6518adcff8","unresolved":false,"context_lines":[{"line_number":249,"context_line":"            msg \u003d _(\u0027project_id cannot be None.\u0027)"},{"line_number":250,"context_line":"            raise exception.ValidationError(message\u003dmsg)"},{"line_number":251,"context_line":"        # Check if project_id exists"},{"line_number":252,"context_line":"        self.get_project(project_id)"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def list_project_parents(self, project_id, user_id\u003dNone):"},{"line_number":255,"context_line":"        self._assert_valid_project_id(project_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aa53dc9_6bffc367","line":252,"updated":"2015-04-08 18:30:22.000000000","message":"Rodrigo: Yeah, to make it consistent, have to catch the ProjectNotFound here too and re-raise as ValidationError.\n\nFor reference, see discussion here: https://review.openstack.org/#/c/159944/24/keystone/resource/controllers.py \n\nHenry and Brant seems okay with it as well.","commit_id":"5f2ca178ae6166d8de63c74a5b3eef4b992d26f1"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"88a53a5ea03a7cf83669a3166f730fe97c6836e0","unresolved":false,"context_lines":[{"line_number":249,"context_line":"            msg \u003d _(\u0027project_id cannot be None.\u0027)"},{"line_number":250,"context_line":"            raise exception.ValidationError(message\u003dmsg)"},{"line_number":251,"context_line":"        # Check if project_id exists"},{"line_number":252,"context_line":"        self.get_project(project_id)"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def list_project_parents(self, project_id, user_id\u003dNone):"},{"line_number":255,"context_line":"        self._assert_valid_project_id(project_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9aa53dc9_fa3dd7bb","line":252,"in_reply_to":"9aa53dc9_6bffc367","updated":"2015-04-08 19:36:30.000000000","message":"Ok, I\u0027ll update this patch","commit_id":"5f2ca178ae6166d8de63c74a5b3eef4b992d26f1"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"fc3d93c3a947a327e0f4177cc668086af4b0cec1","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            # Check if project_id exists"},{"line_number":253,"context_line":"            self.get_project(project_id)"},{"line_number":254,"context_line":"        except exception.ProjectNotFound as e:"},{"line_number":255,"context_line":"            raise exception.ValidationError(e)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def list_project_parents(self, project_id, user_id\u003dNone):"},{"line_number":258,"context_line":"        self._assert_valid_project_id(project_id)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa53dc9_4783cb04","line":255,"updated":"2015-04-08 21:46:46.000000000","message":"sorry...I still don\u0027t understand this....if we apply this logic we should return ValidationError for a large number of things.....have we really decided to do this?  I get that if it is Null, then this makes sense, but not sure otherwise.","commit_id":"c4612d4cb4a81c0994b070610a286c230a2f0b0a"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"35746ba225a7259571ebca0b225f949dbceaab04","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            # Check if project_id exists"},{"line_number":253,"context_line":"            self.get_project(project_id)"},{"line_number":254,"context_line":"        except exception.ProjectNotFound as e:"},{"line_number":255,"context_line":"            raise exception.ValidationError(e)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def list_project_parents(self, project_id, user_id\u003dNone):"},{"line_number":258,"context_line":"        self._assert_valid_project_id(project_id)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa53dc9_e5574e58","line":255,"in_reply_to":"9aa53dc9_4544bab5","updated":"2015-04-09 20:09:41.000000000","message":"To keep the consistency with the other patch, I\u0027ll push this code for controller level.","commit_id":"c4612d4cb4a81c0994b070610a286c230a2f0b0a"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"cecdc78329cc27613d73b7c903cf2e8ba7e24cba","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            # Check if project_id exists"},{"line_number":253,"context_line":"            self.get_project(project_id)"},{"line_number":254,"context_line":"        except exception.ProjectNotFound as e:"},{"line_number":255,"context_line":"            raise exception.ValidationError(e)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def list_project_parents(self, project_id, user_id\u003dNone):"},{"line_number":258,"context_line":"        self._assert_valid_project_id(project_id)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa53dc9_af74a935","line":255,"in_reply_to":"9aa53dc9_4783cb04","updated":"2015-04-09 01:11:11.000000000","message":"sorry, I was thought that we have to change the behavior for every case. I\u0027ll fix this.","commit_id":"c4612d4cb4a81c0994b070610a286c230a2f0b0a"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"4b59a348472a1757f3ca279ef5a4b714b278edb9","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            # Check if project_id exists"},{"line_number":253,"context_line":"            self.get_project(project_id)"},{"line_number":254,"context_line":"        except exception.ProjectNotFound as e:"},{"line_number":255,"context_line":"            raise exception.ValidationError(e)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def list_project_parents(self, project_id, user_id\u003dNone):"},{"line_number":258,"context_line":"        self._assert_valid_project_id(project_id)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa53dc9_4544bab5","line":255,"in_reply_to":"9aa53dc9_72be8666","updated":"2015-04-09 20:07:12.000000000","message":"After talk in IRC channel, we decided that the correct behavior here is send a HTTP 400 not a 404, so even broke the backward compatibility, we have to return ValidationError here.","commit_id":"c4612d4cb4a81c0994b070610a286c230a2f0b0a"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"d179299ad8c0bd640c3e863b3c049be8f6b3c594","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            # Check if project_id exists"},{"line_number":253,"context_line":"            self.get_project(project_id)"},{"line_number":254,"context_line":"        except exception.ProjectNotFound as e:"},{"line_number":255,"context_line":"            raise exception.ValidationError(e)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def list_project_parents(self, project_id, user_id\u003dNone):"},{"line_number":258,"context_line":"        self._assert_valid_project_id(project_id)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa53dc9_d2c9d25a","line":255,"in_reply_to":"9aa53dc9_af74a935","updated":"2015-04-09 02:14:12.000000000","message":"Raildo: sorry for going back and forth, let\u0027s chat about this in IRC and get consensus before you make a change again. :)","commit_id":"c4612d4cb4a81c0994b070610a286c230a2f0b0a"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"4c8ff6e094f2d22dccdace397adf1281d8a9e24c","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            # Check if project_id exists"},{"line_number":253,"context_line":"            self.get_project(project_id)"},{"line_number":254,"context_line":"        except exception.ProjectNotFound as e:"},{"line_number":255,"context_line":"            raise exception.ValidationError(e)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def list_project_parents(self, project_id, user_id\u003dNone):"},{"line_number":258,"context_line":"        self._assert_valid_project_id(project_id)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa53dc9_72be8666","line":255,"in_reply_to":"9aa53dc9_d2c9d25a","updated":"2015-04-09 02:33:48.000000000","message":"Ok, we discuss this tomorrow :)","commit_id":"c4612d4cb4a81c0994b070610a286c230a2f0b0a"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"e2636abe9044a9a9ebdff7f08804df23b14e26bc","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                             \u0027disabled parents\u0027) % project_id)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def _assert_whole_subtree_is_disabled(self, project_id):"},{"line_number":180,"context_line":"        subtree_list \u003d self.list_projects_in_subtree(project_id)"},{"line_number":181,"context_line":"        for ref in subtree_list:"},{"line_number":182,"context_line":"            if ref.get(\u0027enabled\u0027, True):"},{"line_number":183,"context_line":"                raise exception.ForbiddenAction("}],"source_content_type":"text/x-python","patch_set":15,"id":"7ad32947_f30b1c7c","line":180,"updated":"2015-04-27 22:48:57.000000000","message":"nice cleanup","commit_id":"fd2a81afcc178baab478a138b870fa0ed7e94475"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"ae4cbe658c672e33dbfc47a914f399395e252966","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                             \u0027disabled parents\u0027) % project_id)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    def _assert_whole_subtree_is_disabled(self, project_id):"},{"line_number":180,"context_line":"        subtree_list \u003d self.list_projects_in_subtree(project_id)"},{"line_number":181,"context_line":"        for ref in subtree_list:"},{"line_number":182,"context_line":"            if ref.get(\u0027enabled\u0027, True):"},{"line_number":183,"context_line":"                raise exception.ForbiddenAction("}],"source_content_type":"text/x-python","patch_set":15,"id":"7ad32947_e448df2f","line":180,"in_reply_to":"7ad32947_f30b1c7c","updated":"2015-04-28 12:29:51.000000000","message":"thanks. :)","commit_id":"fd2a81afcc178baab478a138b870fa0ed7e94475"}],"keystone/tests/unit/test_backend.py":[{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"ff92d4cf3c92d7eed8030f4451315a2f2e2ddfa4","unresolved":false,"context_lines":[{"line_number":2215,"context_line":""},{"line_number":2216,"context_line":"        self.assertRaises(exception.ProjectNotFound,"},{"line_number":2217,"context_line":"                          self.resource_api.list_projects_in_subtree,"},{"line_number":2218,"context_line":"                          \u0027fake\u0027)"},{"line_number":2219,"context_line":""},{"line_number":2220,"context_line":"    def test_list_project_parents(self):"},{"line_number":2221,"context_line":"        projects_hierarchy \u003d self._create_projects_hierarchy(hierarchy_size\u003d3)"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa041b7_b8879860","line":2218,"updated":"2015-04-02 17:49:44.000000000","message":"(nit): better to just generate a uuid here, rather than use a explicit string","commit_id":"cad4a8b198cd923ca9484b1f0f55b556764d1b0d"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"ff92d4cf3c92d7eed8030f4451315a2f2e2ddfa4","unresolved":false,"context_lines":[{"line_number":2248,"context_line":""},{"line_number":2249,"context_line":"        self.assertRaises(exception.ProjectNotFound,"},{"line_number":2250,"context_line":"                          self.resource_api.list_project_parents,"},{"line_number":2251,"context_line":"                          \u0027fake\u0027)"},{"line_number":2252,"context_line":""},{"line_number":2253,"context_line":"    def test_delete_project_with_role_assignments(self):"},{"line_number":2254,"context_line":"        tenant \u003d {\u0027id\u0027: uuid.uuid4().hex, \u0027name\u0027: uuid.uuid4().hex,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baa041b7_987cd473","line":2251,"updated":"2015-04-02 17:49:44.000000000","message":"(nit): better to just generate a uuid here, rather than use a explicit string","commit_id":"cad4a8b198cd923ca9484b1f0f55b556764d1b0d"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"5ecaf78ac8d9e4f1630738e949758f6518adcff8","unresolved":false,"context_lines":[{"line_number":2213,"context_line":"                          self.resource_api.list_projects_in_subtree,"},{"line_number":2214,"context_line":"                          None)"},{"line_number":2215,"context_line":""},{"line_number":2216,"context_line":"        self.assertRaises(exception.ProjectNotFound,"},{"line_number":2217,"context_line":"                          self.resource_api.list_projects_in_subtree,"},{"line_number":2218,"context_line":"                          \u0027fake\u0027)"},{"line_number":2219,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9aa53dc9_f93ba936","line":2216,"updated":"2015-04-08 18:30:22.000000000","message":"need to change to ValidationError","commit_id":"5f2ca178ae6166d8de63c74a5b3eef4b992d26f1"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"88a53a5ea03a7cf83669a3166f730fe97c6836e0","unresolved":false,"context_lines":[{"line_number":2213,"context_line":"                          self.resource_api.list_projects_in_subtree,"},{"line_number":2214,"context_line":"                          None)"},{"line_number":2215,"context_line":""},{"line_number":2216,"context_line":"        self.assertRaises(exception.ProjectNotFound,"},{"line_number":2217,"context_line":"                          self.resource_api.list_projects_in_subtree,"},{"line_number":2218,"context_line":"                          \u0027fake\u0027)"},{"line_number":2219,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9aa53dc9_dae8d312","line":2216,"in_reply_to":"9aa53dc9_f93ba936","updated":"2015-04-08 19:36:30.000000000","message":"Done","commit_id":"5f2ca178ae6166d8de63c74a5b3eef4b992d26f1"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"e2636abe9044a9a9ebdff7f08804df23b14e26bc","unresolved":false,"context_lines":[{"line_number":2257,"context_line":""},{"line_number":2258,"context_line":"        self.assertRaises(exception.ProjectNotFound,"},{"line_number":2259,"context_line":"                          self.resource_api.list_projects_in_subtree,"},{"line_number":2260,"context_line":"                          \u0027fake\u0027)"},{"line_number":2261,"context_line":""},{"line_number":2262,"context_line":"    def test_list_project_parents(self):"},{"line_number":2263,"context_line":"        projects_hierarchy \u003d self._create_projects_hierarchy(hierarchy_size\u003d3)"}],"source_content_type":"text/x-python","patch_set":15,"id":"7ad32947_936aa819","line":2260,"updated":"2015-04-27 22:48:57.000000000","message":"should probably just use uuid.uuid4().hex here, we don\u0027t need to pass \u0027fake\u0027","commit_id":"fd2a81afcc178baab478a138b870fa0ed7e94475"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"ae4cbe658c672e33dbfc47a914f399395e252966","unresolved":false,"context_lines":[{"line_number":2257,"context_line":""},{"line_number":2258,"context_line":"        self.assertRaises(exception.ProjectNotFound,"},{"line_number":2259,"context_line":"                          self.resource_api.list_projects_in_subtree,"},{"line_number":2260,"context_line":"                          \u0027fake\u0027)"},{"line_number":2261,"context_line":""},{"line_number":2262,"context_line":"    def test_list_project_parents(self):"},{"line_number":2263,"context_line":"        projects_hierarchy \u003d self._create_projects_hierarchy(hierarchy_size\u003d3)"}],"source_content_type":"text/x-python","patch_set":15,"id":"7ad32947_84d00b55","line":2260,"in_reply_to":"7ad32947_936aa819","updated":"2015-04-28 12:29:51.000000000","message":"Done","commit_id":"fd2a81afcc178baab478a138b870fa0ed7e94475"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"e2636abe9044a9a9ebdff7f08804df23b14e26bc","unresolved":false,"context_lines":[{"line_number":2290,"context_line":""},{"line_number":2291,"context_line":"        self.assertRaises(exception.ProjectNotFound,"},{"line_number":2292,"context_line":"                          self.resource_api.list_project_parents,"},{"line_number":2293,"context_line":"                          \u0027fake\u0027)"},{"line_number":2294,"context_line":""},{"line_number":2295,"context_line":"    def test_delete_project_with_role_assignments(self):"},{"line_number":2296,"context_line":"        tenant \u003d {\u0027id\u0027: uuid.uuid4().hex, \u0027name\u0027: uuid.uuid4().hex,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7ad32947_537410fc","line":2293,"updated":"2015-04-27 22:48:57.000000000","message":"same here","commit_id":"fd2a81afcc178baab478a138b870fa0ed7e94475"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"ae4cbe658c672e33dbfc47a914f399395e252966","unresolved":false,"context_lines":[{"line_number":2290,"context_line":""},{"line_number":2291,"context_line":"        self.assertRaises(exception.ProjectNotFound,"},{"line_number":2292,"context_line":"                          self.resource_api.list_project_parents,"},{"line_number":2293,"context_line":"                          \u0027fake\u0027)"},{"line_number":2294,"context_line":""},{"line_number":2295,"context_line":"    def test_delete_project_with_role_assignments(self):"},{"line_number":2296,"context_line":"        tenant \u003d {\u0027id\u0027: uuid.uuid4().hex, \u0027name\u0027: uuid.uuid4().hex,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7ad32947_24cff7b1","line":2293,"in_reply_to":"7ad32947_537410fc","updated":"2015-04-28 12:29:51.000000000","message":"Done","commit_id":"fd2a81afcc178baab478a138b870fa0ed7e94475"}],"keystone/tests/unit/test_v3_assignment.py":[{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"9c64c2b21b53424d734b2feb7418b6ea87cbbf67","unresolved":false,"context_lines":[{"line_number":769,"context_line":"                               |     |"},{"line_number":770,"context_line":"                               D     E"},{"line_number":771,"context_line":""},{"line_number":772,"context_line":"        \"\"\""},{"line_number":773,"context_line":"        projects \u003d self._create_projects_hierarchy(hierarchy_size\u003d2)"},{"line_number":774,"context_line":""},{"line_number":775,"context_line":"        # Add another child to projects[0] - it will be projects[3]"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa041b7_edffae32","line":772,"updated":"2015-04-02 14:04:12.000000000","message":"unrelated change?","commit_id":"0d4551b5dfa4229414ef02c8af750a0131f62f8d"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"612c4862df2949bf9b679e572b95a5c081b88168","unresolved":false,"context_lines":[{"line_number":769,"context_line":"                               |     |"},{"line_number":770,"context_line":"                               D     E"},{"line_number":771,"context_line":""},{"line_number":772,"context_line":"        \"\"\""},{"line_number":773,"context_line":"        projects \u003d self._create_projects_hierarchy(hierarchy_size\u003d2)"},{"line_number":774,"context_line":""},{"line_number":775,"context_line":"        # Add another child to projects[0] - it will be projects[3]"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa041b7_d5dd8515","line":772,"in_reply_to":"baa041b7_edffae32","updated":"2015-04-02 17:43:01.000000000","message":"Done","commit_id":"0d4551b5dfa4229414ef02c8af750a0131f62f8d"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"e2636abe9044a9a9ebdff7f08804df23b14e26bc","unresolved":false,"context_lines":[{"line_number":702,"context_line":"        self.assertValidProjectResponse(r, self.project)"},{"line_number":703,"context_line":""},{"line_number":704,"context_line":"    def test_get_project_with_parents_as_list_with_invalid_id(self):"},{"line_number":705,"context_line":"        \"\"\"Call ``GET /projects/{project_id}``.\"\"\""},{"line_number":706,"context_line":"        self.get(\u0027/projects/%(project_id)s?parents_as_list\u0027 % {"},{"line_number":707,"context_line":"                 \u0027project_id\u0027: None}, expected_status\u003d404)"},{"line_number":708,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"7ad32947_d35ee075","line":705,"updated":"2015-04-27 22:48:57.000000000","message":"append \u0027?parents_as_ids\u0027","commit_id":"fd2a81afcc178baab478a138b870fa0ed7e94475"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"ae4cbe658c672e33dbfc47a914f399395e252966","unresolved":false,"context_lines":[{"line_number":702,"context_line":"        self.assertValidProjectResponse(r, self.project)"},{"line_number":703,"context_line":""},{"line_number":704,"context_line":"    def test_get_project_with_parents_as_list_with_invalid_id(self):"},{"line_number":705,"context_line":"        \"\"\"Call ``GET /projects/{project_id}``.\"\"\""},{"line_number":706,"context_line":"        self.get(\u0027/projects/%(project_id)s?parents_as_list\u0027 % {"},{"line_number":707,"context_line":"                 \u0027project_id\u0027: None}, expected_status\u003d404)"},{"line_number":708,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"7ad32947_4458b3fa","line":705,"in_reply_to":"7ad32947_d35ee075","updated":"2015-04-28 12:29:51.000000000","message":"Done","commit_id":"fd2a81afcc178baab478a138b870fa0ed7e94475"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"e2636abe9044a9a9ebdff7f08804df23b14e26bc","unresolved":false,"context_lines":[{"line_number":707,"context_line":"                 \u0027project_id\u0027: None}, expected_status\u003d404)"},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"    def test_get_project_with_subtree_as_list_with_invalid_id(self):"},{"line_number":710,"context_line":"        \"\"\"Call ``GET /projects/{project_id}``.\"\"\""},{"line_number":711,"context_line":"        self.get(\u0027/projects/%(project_id)s?subtree_as_list\u0027 % {"},{"line_number":712,"context_line":"                 \u0027project_id\u0027: None}, expected_status\u003d404)"},{"line_number":713,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"7ad32947_734eecc2","line":710,"updated":"2015-04-27 22:48:57.000000000","message":"append \u0027?subtree_as_list\u0027","commit_id":"fd2a81afcc178baab478a138b870fa0ed7e94475"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"ae4cbe658c672e33dbfc47a914f399395e252966","unresolved":false,"context_lines":[{"line_number":707,"context_line":"                 \u0027project_id\u0027: None}, expected_status\u003d404)"},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"    def test_get_project_with_subtree_as_list_with_invalid_id(self):"},{"line_number":710,"context_line":"        \"\"\"Call ``GET /projects/{project_id}``.\"\"\""},{"line_number":711,"context_line":"        self.get(\u0027/projects/%(project_id)s?subtree_as_list\u0027 % {"},{"line_number":712,"context_line":"                 \u0027project_id\u0027: None}, expected_status\u003d404)"},{"line_number":713,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"7ad32947_0473db81","line":710,"in_reply_to":"7ad32947_734eecc2","updated":"2015-04-28 12:29:51.000000000","message":"Done","commit_id":"fd2a81afcc178baab478a138b870fa0ed7e94475"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"e2636abe9044a9a9ebdff7f08804df23b14e26bc","unresolved":false,"context_lines":[{"line_number":709,"context_line":"    def test_get_project_with_subtree_as_list_with_invalid_id(self):"},{"line_number":710,"context_line":"        \"\"\"Call ``GET /projects/{project_id}``.\"\"\""},{"line_number":711,"context_line":"        self.get(\u0027/projects/%(project_id)s?subtree_as_list\u0027 % {"},{"line_number":712,"context_line":"                 \u0027project_id\u0027: None}, expected_status\u003d404)"},{"line_number":713,"context_line":""},{"line_number":714,"context_line":"    def test_get_project_with_parents_as_ids(self):"},{"line_number":715,"context_line":"        \"\"\"Call ``GET /projects/{project_id}?parents_as_ids``.\"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"7ad32947_534bf0b0","line":712,"updated":"2015-04-27 22:48:57.000000000","message":"how about test for non-existing project_id?","commit_id":"fd2a81afcc178baab478a138b870fa0ed7e94475"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"ae4cbe658c672e33dbfc47a914f399395e252966","unresolved":false,"context_lines":[{"line_number":709,"context_line":"    def test_get_project_with_subtree_as_list_with_invalid_id(self):"},{"line_number":710,"context_line":"        \"\"\"Call ``GET /projects/{project_id}``.\"\"\""},{"line_number":711,"context_line":"        self.get(\u0027/projects/%(project_id)s?subtree_as_list\u0027 % {"},{"line_number":712,"context_line":"                 \u0027project_id\u0027: None}, expected_status\u003d404)"},{"line_number":713,"context_line":""},{"line_number":714,"context_line":"    def test_get_project_with_parents_as_ids(self):"},{"line_number":715,"context_line":"        \"\"\"Call ``GET /projects/{project_id}?parents_as_ids``.\"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"7ad32947_04fabbbd","line":712,"in_reply_to":"7ad32947_534bf0b0","updated":"2015-04-28 12:29:51.000000000","message":"sure, I\u0027ll add some more tests.","commit_id":"fd2a81afcc178baab478a138b870fa0ed7e94475"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"d58cd4b98bf22fe3481eab4c1adbc1591cea1085","unresolved":false,"context_lines":[{"line_number":704,"context_line":"    def test_get_project_with_parents_as_list_with_invalid_id(self):"},{"line_number":705,"context_line":"        \"\"\"Call ``GET /projects/{project_id}?parents_as_list``.\"\"\""},{"line_number":706,"context_line":"        self.get(\u0027/projects/%(project_id)s?parents_as_list\u0027 % {"},{"line_number":707,"context_line":"                 \u0027project_id\u0027: None}, expected_status\u003d404)"},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"        self.get(\u0027/projects/%(project_id)s?parents_as_list\u0027 % {"},{"line_number":710,"context_line":"                 \u0027project_id\u0027: uuid.uuid4().hex}, expected_status\u003d404)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3acd31a7_a66fa891","line":707,"updated":"2015-04-29 19:49:54.000000000","message":"should this be returning Validation 400 error?","commit_id":"e2bddefa9a4be10ae2ac9fb682789a223cf0b2a4"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"c5a05fb40804a2e411fa9e910e4b8d5509944011","unresolved":false,"context_lines":[{"line_number":704,"context_line":"    def test_get_project_with_parents_as_list_with_invalid_id(self):"},{"line_number":705,"context_line":"        \"\"\"Call ``GET /projects/{project_id}?parents_as_list``.\"\"\""},{"line_number":706,"context_line":"        self.get(\u0027/projects/%(project_id)s?parents_as_list\u0027 % {"},{"line_number":707,"context_line":"                 \u0027project_id\u0027: None}, expected_status\u003d404)"},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"        self.get(\u0027/projects/%(project_id)s?parents_as_list\u0027 % {"},{"line_number":710,"context_line":"                 \u0027project_id\u0027: uuid.uuid4().hex}, expected_status\u003d404)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3acd31a7_2ddc7711","line":707,"in_reply_to":"3acd31a7_46dd7413","updated":"2015-04-30 14:57:18.000000000","message":"I agree. In this case a 404 is the right thing because the /projects/{project_id} resource doesn\u0027t exist.","commit_id":"e2bddefa9a4be10ae2ac9fb682789a223cf0b2a4"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"e566ee4ac3b04b406876ff6cbc8129f5c944daed","unresolved":false,"context_lines":[{"line_number":704,"context_line":"    def test_get_project_with_parents_as_list_with_invalid_id(self):"},{"line_number":705,"context_line":"        \"\"\"Call ``GET /projects/{project_id}?parents_as_list``.\"\"\""},{"line_number":706,"context_line":"        self.get(\u0027/projects/%(project_id)s?parents_as_list\u0027 % {"},{"line_number":707,"context_line":"                 \u0027project_id\u0027: None}, expected_status\u003d404)"},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"        self.get(\u0027/projects/%(project_id)s?parents_as_list\u0027 % {"},{"line_number":710,"context_line":"                 \u0027project_id\u0027: uuid.uuid4().hex}, expected_status\u003d404)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3acd31a7_a9dadb76","line":707,"in_reply_to":"3acd31a7_46dd7413","updated":"2015-04-29 22:09:07.000000000","message":"I see. It is a limitation of the design of our security framework, we can live with this for now. thanks for the explanation","commit_id":"e2bddefa9a4be10ae2ac9fb682789a223cf0b2a4"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"0de4118ecf02a1f4d4505a32dd33bfd0a4b72624","unresolved":false,"context_lines":[{"line_number":704,"context_line":"    def test_get_project_with_parents_as_list_with_invalid_id(self):"},{"line_number":705,"context_line":"        \"\"\"Call ``GET /projects/{project_id}?parents_as_list``.\"\"\""},{"line_number":706,"context_line":"        self.get(\u0027/projects/%(project_id)s?parents_as_list\u0027 % {"},{"line_number":707,"context_line":"                 \u0027project_id\u0027: None}, expected_status\u003d404)"},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"        self.get(\u0027/projects/%(project_id)s?parents_as_list\u0027 % {"},{"line_number":710,"context_line":"                 \u0027project_id\u0027: uuid.uuid4().hex}, expected_status\u003d404)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3acd31a7_46dd7413","line":707,"in_reply_to":"3acd31a7_a66fa891","updated":"2015-04-29 19:55:17.000000000","message":"Ericson Santos put a comment in a previous patch, explain why we can\u0027t return a 400 error here: \n\n\"We\u0027ve created the tests in the controller level expecting 404, because get_project in ProjectV3 controller is wrapped by \"@controller.protected()\", so inside this method, there is another get_project request https://github.com/openstack/keystone/blob/master/keystone/resource/controllers.py#L197 and this request will return a 404, even if we return a 400 in the controller level.\nBut I think, in this case, raise a ProjectNotFound is more appropriate than a ValidationError. What do you think?\"","commit_id":"e2bddefa9a4be10ae2ac9fb682789a223cf0b2a4"}]}
