)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"91f05cf4cd35081f7b0c24b78531929271e3c2b4","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Looking at the tests for list_projects_in_subtree() I could not find"},{"line_number":10,"context_line":"a test that checks if a large project tree is returned correctly."},{"line_number":11,"context_line":"In this test I ensure the order of the projects are returned correctly."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I569f70f6ec479f8cf140485a049fae0786996bbc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"dae33548_4a3cfec7","line":11,"updated":"2016-02-17 16:52:35.000000000","message":"There\u0027s no guarantee of order described in the docstring for the manager or in the API spec. So why do we need to test for this?","commit_id":"e83d4e26b336495056efcbd168ea3f94c67c85e1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"47663d64e63e35161340b29c181b9ba83ea4cfae","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Looking at the tests for list_projects_in_subtree() I could not find"},{"line_number":10,"context_line":"a test that checks if a large project tree is returned correctly."},{"line_number":11,"context_line":"In this test I ensure the order of the projects are returned correctly."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I569f70f6ec479f8cf140485a049fae0786996bbc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"dae33548_5fe767ab","line":11,"in_reply_to":"dae33548_25a1bbf8","updated":"2016-02-18 14:35:55.000000000","message":"Samuel - The docs for the driver (and manager if it\u0027s overridden there) should be updated to specify the ordering of the returned list (if that\u0027s how we want it to work... I think it\u0027s fine).","commit_id":"e83d4e26b336495056efcbd168ea3f94c67c85e1"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"a22a12810a77b868afcc052e2f361c08222a9643","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Looking at the tests for list_projects_in_subtree() I could not find"},{"line_number":10,"context_line":"a test that checks if a large project tree is returned correctly."},{"line_number":11,"context_line":"In this test I ensure the order of the projects are returned correctly."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I569f70f6ec479f8cf140485a049fae0786996bbc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"dae33548_641e5260","line":11,"in_reply_to":"dae33548_4a3cfec7","updated":"2016-02-17 19:03:16.000000000","message":"Because this is used by delete project cascade (which need to be deleted from the leaf first) there needs to be a order where the parent node is not returned before the leaf node.\n\n\nWhich is why i searched in the tests to see if it was there....\n\n\nDo you think i should loop trough and see if it has a parent, and if it does make sure it is returned prior to its child in the list.","commit_id":"e83d4e26b336495056efcbd168ea3f94c67c85e1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"ec95852975c42073af6ccd17fac5fe3c5660304d","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Looking at the tests for list_projects_in_subtree() I could not find"},{"line_number":10,"context_line":"a test that checks if a large project tree is returned correctly."},{"line_number":11,"context_line":"In this test I ensure the order of the projects are returned correctly."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I569f70f6ec479f8cf140485a049fae0786996bbc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"dae33548_756c3e35","line":11,"in_reply_to":"dae33548_641e5260","updated":"2016-02-17 20:11:24.000000000","message":"If delete project cascade is depending on the order that the projects are returned in then that\u0027s a bug in delete project cascade, because this method doesn\u0027t make any guarantees on the order.","commit_id":"e83d4e26b336495056efcbd168ea3f94c67c85e1"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"3b8531c0b054f03bc8d222528338374debfb71fd","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Looking at the tests for list_projects_in_subtree() I could not find"},{"line_number":10,"context_line":"a test that checks if a large project tree is returned correctly."},{"line_number":11,"context_line":"In this test I ensure the order of the projects are returned correctly."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I569f70f6ec479f8cf140485a049fae0786996bbc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"dae33548_7d6a60b4","line":11,"in_reply_to":"dae33548_756c3e35","updated":"2016-02-17 21:54:59.000000000","message":"Which is the exact reason why i wrote this test. :) \nSince the people working on bp/project-tree-deletion were using it in their code and list_project_in_subtree() does not specify if the projects are in order or not, i wanted to make sure it worked correctly for them.","commit_id":"e83d4e26b336495056efcbd168ea3f94c67c85e1"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"2d9ba34d212a824771b7882dcb56401f73fc54f4","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Looking at the tests for list_projects_in_subtree() I could not find"},{"line_number":10,"context_line":"a test that checks if a large project tree is returned correctly."},{"line_number":11,"context_line":"In this test I ensure the order of the projects are returned correctly."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I569f70f6ec479f8cf140485a049fae0786996bbc"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"dae33548_25a1bbf8","line":11,"in_reply_to":"dae33548_7d6a60b4","updated":"2016-02-18 12:49:33.000000000","message":"@Brant, what about modifying the docs to say it returns the tree ordered?","commit_id":"e83d4e26b336495056efcbd168ea3f94c67c85e1"}],"keystone/tests/unit/resource/test_backends.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"5cf953e0a6f0792baffa5ffc1d634d2804105be9","unresolved":false,"context_lines":[{"line_number":755,"context_line":"        \"\"\"Check project hierarchy is returned correctly in large tree."},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"        With a large hierarchy we need to enforce the projects"},{"line_number":758,"context_line":"        are returned in the correct order (illustrated bellow)."},{"line_number":759,"context_line":""},{"line_number":760,"context_line":"        Tree we will create::"},{"line_number":761,"context_line":"               +------p1------+"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba0121b8_dbaec797","line":758,"range":{"start_line":758,"start_character":55,"end_line":758,"end_character":61},"updated":"2016-04-01 19:23:10.000000000","message":"below","commit_id":"312de89b56d796cb1fc6ac5b3f165eb69d619ba3"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"98c15cb064f636de946b8d0d4a62bb57d7beeee4","unresolved":false,"context_lines":[{"line_number":755,"context_line":"        \"\"\"Check project hierarchy is returned correctly in large tree."},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"        With a large hierarchy we need to enforce the projects"},{"line_number":758,"context_line":"        are returned in the correct order (illustrated bellow)."},{"line_number":759,"context_line":""},{"line_number":760,"context_line":"        Tree we will create::"},{"line_number":761,"context_line":"               +------p1------+"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a061dce_4c44b173","line":758,"range":{"start_line":758,"start_character":55,"end_line":758,"end_character":61},"in_reply_to":"ba0121b8_dbaec797","updated":"2016-04-04 16:04:33.000000000","message":"Done","commit_id":"312de89b56d796cb1fc6ac5b3f165eb69d619ba3"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"5cf953e0a6f0792baffa5ffc1d634d2804105be9","unresolved":false,"context_lines":[{"line_number":757,"context_line":"        With a large hierarchy we need to enforce the projects"},{"line_number":758,"context_line":"        are returned in the correct order (illustrated bellow)."},{"line_number":759,"context_line":""},{"line_number":760,"context_line":"        Tree we will create::"},{"line_number":761,"context_line":"               +------p1------+"},{"line_number":762,"context_line":"               |              |"},{"line_number":763,"context_line":"            +---p3---+      +-p2-+"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba0121b8_fbfc6b74","line":760,"updated":"2016-04-01 19:23:10.000000000","message":"there needs to be a blank space after this otherwise the ascii art doesn\u0027t render correctly.","commit_id":"312de89b56d796cb1fc6ac5b3f165eb69d619ba3"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"98c15cb064f636de946b8d0d4a62bb57d7beeee4","unresolved":false,"context_lines":[{"line_number":757,"context_line":"        With a large hierarchy we need to enforce the projects"},{"line_number":758,"context_line":"        are returned in the correct order (illustrated bellow)."},{"line_number":759,"context_line":""},{"line_number":760,"context_line":"        Tree we will create::"},{"line_number":761,"context_line":"               +------p1------+"},{"line_number":762,"context_line":"               |              |"},{"line_number":763,"context_line":"            +---p3---+      +-p2-+"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a061dce_4c3b11ec","line":760,"in_reply_to":"ba0121b8_fbfc6b74","updated":"2016-04-04 16:04:33.000000000","message":"Yes! With all the reviews of docs i should have seen this!","commit_id":"312de89b56d796cb1fc6ac5b3f165eb69d619ba3"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"5cf953e0a6f0792baffa5ffc1d634d2804105be9","unresolved":false,"context_lines":[{"line_number":769,"context_line":"                 p11"},{"line_number":770,"context_line":"        \"\"\""},{"line_number":771,"context_line":"        # create a hierarchy with 3 levels (p1, p2, p4)"},{"line_number":772,"context_line":"        p1, p2, p4 \u003d self._create_projects_hierarchy(hierarchy_size\u003d3)"},{"line_number":773,"context_line":"        # Add subproject (p5) to p2"},{"line_number":774,"context_line":"        p5 \u003d self._create_projects_hierarchy("},{"line_number":775,"context_line":"            hierarchy_size\u003d1, parent_project_id\u003dp2[\u0027id\u0027])[0]"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba0121b8_bb1033ad","line":772,"updated":"2016-04-01 19:23:10.000000000","message":"why doesn\u0027t _create_projects_hierarchy allow you create the tree that you want more easily?","commit_id":"312de89b56d796cb1fc6ac5b3f165eb69d619ba3"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"98c15cb064f636de946b8d0d4a62bb57d7beeee4","unresolved":false,"context_lines":[{"line_number":769,"context_line":"                 p11"},{"line_number":770,"context_line":"        \"\"\""},{"line_number":771,"context_line":"        # create a hierarchy with 3 levels (p1, p2, p4)"},{"line_number":772,"context_line":"        p1, p2, p4 \u003d self._create_projects_hierarchy(hierarchy_size\u003d3)"},{"line_number":773,"context_line":"        # Add subproject (p5) to p2"},{"line_number":774,"context_line":"        p5 \u003d self._create_projects_hierarchy("},{"line_number":775,"context_line":"            hierarchy_size\u003d1, parent_project_id\u003dp2[\u0027id\u0027])[0]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a061dce_0fdd8b14","line":772,"in_reply_to":"ba0121b8_bb1033ad","updated":"2016-04-04 16:04:33.000000000","message":"I am not sure what would be easier, I guess it would be cool to have it so you can pass in a list of tuples e.g.[(parent_id, size_of_subtree), ..] Then have it return the tree.  The tough part would be returning the tree correctly so the user will understand where they are in the hierarchy. You wouldn\u0027t want to use \"get_projects_in_subtree_as_ids\" because that would make this test invalid.  For now i think this is pretty easy. Do you have any recommendations?","commit_id":"312de89b56d796cb1fc6ac5b3f165eb69d619ba3"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"5cf953e0a6f0792baffa5ffc1d634d2804105be9","unresolved":false,"context_lines":[{"line_number":770,"context_line":"        \"\"\""},{"line_number":771,"context_line":"        # create a hierarchy with 3 levels (p1, p2, p4)"},{"line_number":772,"context_line":"        p1, p2, p4 \u003d self._create_projects_hierarchy(hierarchy_size\u003d3)"},{"line_number":773,"context_line":"        # Add subproject (p5) to p2"},{"line_number":774,"context_line":"        p5 \u003d self._create_projects_hierarchy("},{"line_number":775,"context_line":"            hierarchy_size\u003d1, parent_project_id\u003dp2[\u0027id\u0027])[0]"},{"line_number":776,"context_line":"        # Add subprojects (p3, p6, p8) to p1"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba0121b8_9e027d08","line":773,"updated":"2016-04-01 19:23:10.000000000","message":"comments should tell the reader why the code is there not what the code is going to do since we can already see what the code does.","commit_id":"312de89b56d796cb1fc6ac5b3f165eb69d619ba3"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"98c15cb064f636de946b8d0d4a62bb57d7beeee4","unresolved":false,"context_lines":[{"line_number":770,"context_line":"        \"\"\""},{"line_number":771,"context_line":"        # create a hierarchy with 3 levels (p1, p2, p4)"},{"line_number":772,"context_line":"        p1, p2, p4 \u003d self._create_projects_hierarchy(hierarchy_size\u003d3)"},{"line_number":773,"context_line":"        # Add subproject (p5) to p2"},{"line_number":774,"context_line":"        p5 \u003d self._create_projects_hierarchy("},{"line_number":775,"context_line":"            hierarchy_size\u003d1, parent_project_id\u003dp2[\u0027id\u0027])[0]"},{"line_number":776,"context_line":"        # Add subprojects (p3, p6, p8) to p1"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a061dce_12048b13","line":773,"in_reply_to":"ba0121b8_9e027d08","updated":"2016-04-04 16:04:33.000000000","message":"Done","commit_id":"312de89b56d796cb1fc6ac5b3f165eb69d619ba3"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"5cf953e0a6f0792baffa5ffc1d634d2804105be9","unresolved":false,"context_lines":[{"line_number":783,"context_line":"        p7, p10 \u003d self._create_projects_hierarchy("},{"line_number":784,"context_line":"            hierarchy_size\u003d2, parent_project_id\u003dp3[\u0027id\u0027])"},{"line_number":785,"context_line":""},{"line_number":786,"context_line":"        # The expected values are assumed to be Unicode strings"},{"line_number":787,"context_line":"        (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) \u003d ("},{"line_number":788,"context_line":"            p1[\u0027id\u0027] + u\u0027\u0027, p2[\u0027id\u0027] + u\u0027\u0027, p3[\u0027id\u0027] + u\u0027\u0027, p4[\u0027id\u0027] + u\u0027\u0027,"},{"line_number":789,"context_line":"            p5[\u0027id\u0027] + u\u0027\u0027, p6[\u0027id\u0027] + u\u0027\u0027, p7[\u0027id\u0027] + u\u0027\u0027, p8[\u0027id\u0027] + u\u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba0121b8_de0cf53d","line":786,"updated":"2016-04-01 19:23:10.000000000","message":"why?","commit_id":"312de89b56d796cb1fc6ac5b3f165eb69d619ba3"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"98c15cb064f636de946b8d0d4a62bb57d7beeee4","unresolved":false,"context_lines":[{"line_number":783,"context_line":"        p7, p10 \u003d self._create_projects_hierarchy("},{"line_number":784,"context_line":"            hierarchy_size\u003d2, parent_project_id\u003dp3[\u0027id\u0027])"},{"line_number":785,"context_line":""},{"line_number":786,"context_line":"        # The expected values are assumed to be Unicode strings"},{"line_number":787,"context_line":"        (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) \u003d ("},{"line_number":788,"context_line":"            p1[\u0027id\u0027] + u\u0027\u0027, p2[\u0027id\u0027] + u\u0027\u0027, p3[\u0027id\u0027] + u\u0027\u0027, p4[\u0027id\u0027] + u\u0027\u0027,"},{"line_number":789,"context_line":"            p5[\u0027id\u0027] + u\u0027\u0027, p6[\u0027id\u0027] + u\u0027\u0027, p7[\u0027id\u0027] + u\u0027\u0027, p8[\u0027id\u0027] + u\u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a061dce_af745ffd","line":786,"in_reply_to":"ba0121b8_de0cf53d","updated":"2016-04-04 16:04:33.000000000","message":"you always ask the tough question Brant :p  \n\nI will update the comment.","commit_id":"312de89b56d796cb1fc6ac5b3f165eb69d619ba3"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"5cf953e0a6f0792baffa5ffc1d634d2804105be9","unresolved":false,"context_lines":[{"line_number":802,"context_line":"                            p11: None},"},{"line_number":803,"context_line":"                        p8: None}}}}"},{"line_number":804,"context_line":""},{"line_number":805,"context_line":"        # Append the parent to the subtree"},{"line_number":806,"context_line":"        prjs_hierarchy \u003d {"},{"line_number":807,"context_line":"            p1: self.resource_api.get_projects_in_subtree_as_ids(p1)}"},{"line_number":808,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba0121b8_5e47454b","line":805,"updated":"2016-04-01 19:23:10.000000000","message":"how do you append something to a tree?","commit_id":"312de89b56d796cb1fc6ac5b3f165eb69d619ba3"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"98c15cb064f636de946b8d0d4a62bb57d7beeee4","unresolved":false,"context_lines":[{"line_number":802,"context_line":"                            p11: None},"},{"line_number":803,"context_line":"                        p8: None}}}}"},{"line_number":804,"context_line":""},{"line_number":805,"context_line":"        # Append the parent to the subtree"},{"line_number":806,"context_line":"        prjs_hierarchy \u003d {"},{"line_number":807,"context_line":"            p1: self.resource_api.get_projects_in_subtree_as_ids(p1)}"},{"line_number":808,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a061dce_08bf3cd1","line":805,"in_reply_to":"ba0121b8_5e47454b","updated":"2016-04-04 16:04:33.000000000","message":"I will clarify :p  \n\n\n\n**delete**","commit_id":"312de89b56d796cb1fc6ac5b3f165eb69d619ba3"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"c77955bcfdf2bc03c89db25d72c1324d54c4984b","unresolved":false,"context_lines":[{"line_number":770,"context_line":"                 p11"},{"line_number":771,"context_line":"        \"\"\""},{"line_number":772,"context_line":"        # Create large project hierarchy, of above depiction"},{"line_number":773,"context_line":"        p1, p2, p4 \u003d self._create_projects_hierarchy(hierarchy_size\u003d3)"},{"line_number":774,"context_line":"        p5 \u003d self._create_projects_hierarchy("},{"line_number":775,"context_line":"            hierarchy_size\u003d1, parent_project_id\u003dp2[\u0027id\u0027])[0]"},{"line_number":776,"context_line":"        p3, p6, p8 \u003d self._create_projects_hierarchy("}],"source_content_type":"text/x-python","patch_set":6,"id":"9a061dce_87648d22","line":773,"updated":"2016-04-05 21:01:32.000000000","message":"You should be able to pass in the hierarchy as a dict, just like expected_projects is a dict and get_projects_in_subtree_as_ids returns a dict.","commit_id":"73cac1bedc3a918a26ec3636b8bfda21ed999dd8"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"df46f3ee492bca85ca115e6cf281f525d18d9690","unresolved":false,"context_lines":[{"line_number":770,"context_line":"                 p11"},{"line_number":771,"context_line":"        \"\"\""},{"line_number":772,"context_line":"        # Create large project hierarchy, of above depiction"},{"line_number":773,"context_line":"        p1, p2, p4 \u003d self._create_projects_hierarchy(hierarchy_size\u003d3)"},{"line_number":774,"context_line":"        p5 \u003d self._create_projects_hierarchy("},{"line_number":775,"context_line":"            hierarchy_size\u003d1, parent_project_id\u003dp2[\u0027id\u0027])[0]"},{"line_number":776,"context_line":"        p3, p6, p8 \u003d self._create_projects_hierarchy("}],"source_content_type":"text/x-python","patch_set":6,"id":"5a18252c_378be7c4","line":773,"in_reply_to":"9a061dce_3d4b0ecb","updated":"2016-04-14 16:38:46.000000000","message":"I don\u0027t think i will be able to have time to do this. :( sorry Brant.","commit_id":"73cac1bedc3a918a26ec3636b8bfda21ed999dd8"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"fef110077ae6b39b2e676431e11d5facc53c04f4","unresolved":false,"context_lines":[{"line_number":770,"context_line":"                 p11"},{"line_number":771,"context_line":"        \"\"\""},{"line_number":772,"context_line":"        # Create large project hierarchy, of above depiction"},{"line_number":773,"context_line":"        p1, p2, p4 \u003d self._create_projects_hierarchy(hierarchy_size\u003d3)"},{"line_number":774,"context_line":"        p5 \u003d self._create_projects_hierarchy("},{"line_number":775,"context_line":"            hierarchy_size\u003d1, parent_project_id\u003dp2[\u0027id\u0027])[0]"},{"line_number":776,"context_line":"        p3, p6, p8 \u003d self._create_projects_hierarchy("}],"source_content_type":"text/x-python","patch_set":6,"id":"9a061dce_3d4b0ecb","line":773,"in_reply_to":"9a061dce_87648d22","updated":"2016-04-05 21:17:40.000000000","message":"I will look into it. it will be useful to have, since we are moving towards this new Hierarchical world.","commit_id":"73cac1bedc3a918a26ec3636b8bfda21ed999dd8"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"c77955bcfdf2bc03c89db25d72c1324d54c4984b","unresolved":false,"context_lines":[{"line_number":782,"context_line":""},{"line_number":783,"context_line":"        # `get_projects_in_subtree_as_ids` returns a dictionary with Unicode"},{"line_number":784,"context_line":"        # keys, Which is why we need to convert the IDs to unicode to assert"},{"line_number":785,"context_line":"        # it is returning the correct values"},{"line_number":786,"context_line":"        p2, p3, p4, p5, p6, p7, p8, p9, p10, p11 \u003d ["},{"line_number":787,"context_line":"            x[\u0027id\u0027] + u\u0027\u0027 for x in [p2, p3, p4, p5, p6, p7, p8, p9, p10, p11]]"},{"line_number":788,"context_line":"        expected_projects \u003d {"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a061dce_fa4cfc43","line":785,"updated":"2016-04-05 21:01:32.000000000","message":"I removed \"+ u\u0027\u0027\" and the test still passed, so this is inaccurate. Converting the IDs to unicode doesn\u0027t make any difference. If the tests were required to convert strings to unicode for comparisons we\u0027d have to change almost every test in keystone.","commit_id":"73cac1bedc3a918a26ec3636b8bfda21ed999dd8"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"fef110077ae6b39b2e676431e11d5facc53c04f4","unresolved":false,"context_lines":[{"line_number":782,"context_line":""},{"line_number":783,"context_line":"        # `get_projects_in_subtree_as_ids` returns a dictionary with Unicode"},{"line_number":784,"context_line":"        # keys, Which is why we need to convert the IDs to unicode to assert"},{"line_number":785,"context_line":"        # it is returning the correct values"},{"line_number":786,"context_line":"        p2, p3, p4, p5, p6, p7, p8, p9, p10, p11 \u003d ["},{"line_number":787,"context_line":"            x[\u0027id\u0027] + u\u0027\u0027 for x in [p2, p3, p4, p5, p6, p7, p8, p9, p10, p11]]"},{"line_number":788,"context_line":"        expected_projects \u003d {"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a061dce_fd73567e","line":785,"in_reply_to":"9a061dce_fa4cfc43","updated":"2016-04-05 21:17:40.000000000","message":"Oh wow. Thanks for having my back Brant and being a good reviewer. I will fix it.  Maybe we don\u0027t need it.  If its doing a str compare unicode string is equal to byte str e.g.    \n\nu\u0027hi\u0027 \u003d\u003d \u0027hi\u0027\n\u003d\u003e True\nWe might not need to add the Unicode conversion","commit_id":"73cac1bedc3a918a26ec3636b8bfda21ed999dd8"}],"keystone/tests/unit/test_backend.py":[{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"d4730494d7415bcd6b538973c712582f8ae4d096","unresolved":false,"context_lines":[{"line_number":2688,"context_line":"        \"\"\""},{"line_number":2689,"context_line":"        # create a hierarchy with 3 levels (p1, p2, p4)"},{"line_number":2690,"context_line":"        p1, p2, p4 \u003d self._create_projects_hierarchy(hierarchy_size\u003d3)"},{"line_number":2691,"context_line":"        # Add (p5) branch to p2"},{"line_number":2692,"context_line":"        p5 \u003d self._create_projects_hierarchy("},{"line_number":2693,"context_line":"            hierarchy_size\u003d1, parent_project_id\u003dp2[\u0027id\u0027])[0]"},{"line_number":2694,"context_line":"        # Add (p3, p6, p8) branch to p1"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_7ca90f7b","line":2691,"range":{"start_line":2691,"start_character":19,"end_line":2691,"end_character":25},"updated":"2016-02-09 05:10:35.000000000","message":"we don\u0027t use branch anywhere in the code base, how about \"another subproject\"","commit_id":"4f69bb34cef57693e3f5e92585c0c13fb4d0631b"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"5c77f4c3b4ba44ac5b97a073a2f22ef3b413e36f","unresolved":false,"context_lines":[{"line_number":2688,"context_line":"        \"\"\""},{"line_number":2689,"context_line":"        # create a hierarchy with 3 levels (p1, p2, p4)"},{"line_number":2690,"context_line":"        p1, p2, p4 \u003d self._create_projects_hierarchy(hierarchy_size\u003d3)"},{"line_number":2691,"context_line":"        # Add (p5) branch to p2"},{"line_number":2692,"context_line":"        p5 \u003d self._create_projects_hierarchy("},{"line_number":2693,"context_line":"            hierarchy_size\u003d1, parent_project_id\u003dp2[\u0027id\u0027])[0]"},{"line_number":2694,"context_line":"        # Add (p3, p6, p8) branch to p1"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_75082f92","line":2691,"range":{"start_line":2691,"start_character":19,"end_line":2691,"end_character":25},"in_reply_to":"5a5ae5dd_7ca90f7b","updated":"2016-02-09 14:10:14.000000000","message":"will fix it now","commit_id":"4f69bb34cef57693e3f5e92585c0c13fb4d0631b"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"8541da082e24b3fa9a0c983f4776cf4b10cef30a","unresolved":false,"context_lines":[{"line_number":2784,"context_line":"                  |"},{"line_number":2785,"context_line":"                 p11"},{"line_number":2786,"context_line":"        \"\"\""},{"line_number":2787,"context_line":"        # create a hierarchy with 3 levels (p1, p2, p4)"},{"line_number":2788,"context_line":"        p1, p2, p4 \u003d self._create_projects_hierarchy(hierarchy_size\u003d3)"},{"line_number":2789,"context_line":"        # Add subproject (p5) to p2"},{"line_number":2790,"context_line":"        p5 \u003d self._create_projects_hierarchy("}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_d0c6aa15","line":2787,"range":{"start_line":2787,"start_character":34,"end_line":2787,"end_character":42},"updated":"2016-02-14 07:53:55.000000000","message":"this looks like it has 5 levels","commit_id":"e83d4e26b336495056efcbd168ea3f94c67c85e1"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"9fe6d9f3150e53ec6e0da07aa197f6f2a3d211ea","unresolved":false,"context_lines":[{"line_number":2784,"context_line":"                  |"},{"line_number":2785,"context_line":"                 p11"},{"line_number":2786,"context_line":"        \"\"\""},{"line_number":2787,"context_line":"        # create a hierarchy with 3 levels (p1, p2, p4)"},{"line_number":2788,"context_line":"        p1, p2, p4 \u003d self._create_projects_hierarchy(hierarchy_size\u003d3)"},{"line_number":2789,"context_line":"        # Add subproject (p5) to p2"},{"line_number":2790,"context_line":"        p5 \u003d self._create_projects_hierarchy("}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_86b047df","line":2787,"range":{"start_line":2787,"start_character":34,"end_line":2787,"end_character":42},"in_reply_to":"dae33548_d0c6aa15","updated":"2016-02-15 14:09:16.000000000","message":"With the call that this comment is for, it is only creating 3 levels.  It is creating an initial hierarchy that we will add sub-projects to later. \n\n\n    p1\n    |\n    p2\n    |\n    p4\n\n\nAlso if you think this doesn\u0027t make sense i can add a follow on patch that can sum thing up in the doc string","commit_id":"e83d4e26b336495056efcbd168ea3f94c67c85e1"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"1a6b368bcdc43a57ddfea5a9970b821295d2ce17","unresolved":false,"context_lines":[{"line_number":2801,"context_line":""},{"line_number":2802,"context_line":"        expected_projects \u003d [p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11]"},{"line_number":2803,"context_line":"        # Append the parent to the subtree"},{"line_number":2804,"context_line":"        prjs_hierarchy \u003d ([p1] + self.resource_api.list_projects_in_subtree("},{"line_number":2805,"context_line":"                          p1[\u0027id\u0027]))"},{"line_number":2806,"context_line":"        # Assert tree is returned with the correct number of"},{"line_number":2807,"context_line":"        # projects and in the correct order"},{"line_number":2808,"context_line":"        self.assertThat(prjs_hierarchy, matchers.HasLength(11))"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_0581178f","line":2805,"range":{"start_line":2804,"start_character":51,"end_line":2805,"end_character":35},"updated":"2016-02-18 13:03:21.000000000","message":"depending on the user executing this call, it might not return the full list.","commit_id":"e83d4e26b336495056efcbd168ea3f94c67c85e1"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"366ee94a22b46fb9f705826b8bf4be0378e7938c","unresolved":false,"context_lines":[{"line_number":2801,"context_line":""},{"line_number":2802,"context_line":"        expected_projects \u003d [p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11]"},{"line_number":2803,"context_line":"        # Append the parent to the subtree"},{"line_number":2804,"context_line":"        prjs_hierarchy \u003d ([p1] + self.resource_api.list_projects_in_subtree("},{"line_number":2805,"context_line":"                          p1[\u0027id\u0027]))"},{"line_number":2806,"context_line":"        # Assert tree is returned with the correct number of"},{"line_number":2807,"context_line":"        # projects and in the correct order"},{"line_number":2808,"context_line":"        self.assertThat(prjs_hierarchy, matchers.HasLength(11))"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_eb3161a3","line":2805,"range":{"start_line":2804,"start_character":51,"end_line":2805,"end_character":35},"in_reply_to":"dae33548_0581178f","updated":"2016-02-18 14:25:13.000000000","message":"Can you explain? are you saying this will not return the full hierachy if the user does not have permission on some of the projects??\n\nAccording to the policy file the user has to be admin to list projects or be on that project [0], there is already a check to ensures the response fails if the user does not have access to all the projects. [1]\n\n[0] https://github.com/openstack/keystone/blob/922833c362aba22fd7614414ea68fbbc78cb020d/etc/policy.json#L37\n\n[1]\nhttps://review.openstack.org/#/c/243585/17/keystone/tests/unit/test_v3_resource.py","commit_id":"e83d4e26b336495056efcbd168ea3f94c67c85e1"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"df9581f6ba37738f0b4d6cc42a6a2f15c4af5a60","unresolved":false,"context_lines":[{"line_number":2801,"context_line":""},{"line_number":2802,"context_line":"        expected_projects \u003d [p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11]"},{"line_number":2803,"context_line":"        # Append the parent to the subtree"},{"line_number":2804,"context_line":"        prjs_hierarchy \u003d ([p1] + self.resource_api.list_projects_in_subtree("},{"line_number":2805,"context_line":"                          p1[\u0027id\u0027]))"},{"line_number":2806,"context_line":"        # Assert tree is returned with the correct number of"},{"line_number":2807,"context_line":"        # projects and in the correct order"},{"line_number":2808,"context_line":"        self.assertThat(prjs_hierarchy, matchers.HasLength(11))"}],"source_content_type":"text/x-python","patch_set":4,"id":"7af24918_ca77109e","line":2805,"range":{"start_line":2804,"start_character":51,"end_line":2805,"end_character":35},"in_reply_to":"dae33548_11b2f3e4","updated":"2016-03-04 22:29:17.000000000","message":"sorry for the delay on replying here.\n\nreturn all vs return none is not what the API spec says for the subtree_as_list param: https://github.com/openstack/keystone-specs/blob/master/api/v3/identity-api-v3.rst#get-project\n\nthe list returns all projects that the caller has access, example: X-\u003eA-\u003eB-\u003eC. If a user has get_project() permissions only in projects A and C, only them will be returned calling the subtree_as_list from X (B should not be included). That was the whole reason why we have the \"subtree_as_ids\" and \"parent_as_ids\" calls.","commit_id":"e83d4e26b336495056efcbd168ea3f94c67c85e1"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"fa4e2a91c06661428011a1528dbebe99725b77a0","unresolved":false,"context_lines":[{"line_number":2801,"context_line":""},{"line_number":2802,"context_line":"        expected_projects \u003d [p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11]"},{"line_number":2803,"context_line":"        # Append the parent to the subtree"},{"line_number":2804,"context_line":"        prjs_hierarchy \u003d ([p1] + self.resource_api.list_projects_in_subtree("},{"line_number":2805,"context_line":"                          p1[\u0027id\u0027]))"},{"line_number":2806,"context_line":"        # Assert tree is returned with the correct number of"},{"line_number":2807,"context_line":"        # projects and in the correct order"},{"line_number":2808,"context_line":"        self.assertThat(prjs_hierarchy, matchers.HasLength(11))"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_faa009f6","line":2805,"range":{"start_line":2804,"start_character":51,"end_line":2805,"end_character":35},"in_reply_to":"dae33548_eb3161a3","updated":"2016-02-18 14:41:41.000000000","message":"Here\u0027s the code: http://git.openstack.org/cgit/openstack/keystone/tree/keystone/resource/core.py#n568\n\nThe policy file that you point to is a sample policy file. The deployer can modify it to whatever they want in their deployment. (e.g., they could remove access for everyone if they want).\n\nThis is why we should have component-level driver tests rather than having multi-layer tests that go through the manager.","commit_id":"e83d4e26b336495056efcbd168ea3f94c67c85e1"},{"author":{"_account_id":17123,"name":"Tom Cocozzello (tjcocozz)","email":"tjcocozz@us.ibm.com","username":"tcocozzello"},"change_message_id":"8b02ebc92a4edffc38c6f7bd755c4ba386b2aca3","unresolved":false,"context_lines":[{"line_number":2801,"context_line":""},{"line_number":2802,"context_line":"        expected_projects \u003d [p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11]"},{"line_number":2803,"context_line":"        # Append the parent to the subtree"},{"line_number":2804,"context_line":"        prjs_hierarchy \u003d ([p1] + self.resource_api.list_projects_in_subtree("},{"line_number":2805,"context_line":"                          p1[\u0027id\u0027]))"},{"line_number":2806,"context_line":"        # Assert tree is returned with the correct number of"},{"line_number":2807,"context_line":"        # projects and in the correct order"},{"line_number":2808,"context_line":"        self.assertThat(prjs_hierarchy, matchers.HasLength(11))"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_11b2f3e4","line":2805,"range":{"start_line":2804,"start_character":51,"end_line":2805,"end_character":35},"in_reply_to":"dae33548_faa009f6","updated":"2016-02-18 15:14:42.000000000","message":"oh whoops that second link I posted was the wrong one. \n\nYes exactly but with the link you posted is shows that even if a deployed messes with the policy file there is a check to make sure the user has permission to all the projects before they are returned.","commit_id":"e83d4e26b336495056efcbd168ea3f94c67c85e1"}]}
