)]}'
{"openstack_dashboard/dashboards/admin/routers/views.py":[{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"1dbffe04fed5abc37d2cc12174608f806242458c","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                ten_filter_ids \u003d [t.id for t in tenants"},{"line_number":42,"context_line":"                                  if t.name \u003d\u003d filter[\u0027project\u0027]]"},{"line_number":43,"context_line":"                del filter[\u0027project\u0027]"},{"line_number":44,"context_line":"                if len(ten_filter_ids) \u003e 0:"},{"line_number":45,"context_line":"                    filter[\u0027tenant_id\u0027] \u003d ten_filter_ids[0]"},{"line_number":46,"context_line":"                else:"},{"line_number":47,"context_line":"                    return []"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_55dab778","line":44,"updated":"2016-07-01 06:27:05.000000000","message":"\"if ten_filter_ids:\" is sufficient as a test here.","commit_id":"b1a1c795b1a75191032771c2dd6d3916155f7678"},{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"1dbffe04fed5abc37d2cc12174608f806242458c","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                    filter[\u0027tenant_id\u0027] \u003d ten_filter_ids[0]"},{"line_number":46,"context_line":"                else:"},{"line_number":47,"context_line":"                    return []"},{"line_number":48,"context_line":"            if filter \u003d\u003d {}:"},{"line_number":49,"context_line":"                routers \u003d api.neutron.router_list(self.request,"},{"line_number":50,"context_line":"                                                  search_opts\u003dsearch_opts)"},{"line_number":51,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_d5ed0726","line":48,"updated":"2016-07-01 06:27:05.000000000","message":"The more Pythonic way of writing this would be \"if filter: ... use it... else: ... use search_opts\"","commit_id":"b1a1c795b1a75191032771c2dd6d3916155f7678"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"d605e460de2683fea88a9c0882b94c53fb73b785","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def _get_routers(self, search_opts\u003dNone):"},{"line_number":36,"context_line":"        try:"},{"line_number":37,"context_line":"            filter \u003d self.get_filters()"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"            if \u0027project\u0027 in filter:"},{"line_number":40,"context_line":"                tenants \u003d api.keystone.tenant_list(self.request)[0]"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_7b1c8b77","line":37,"updated":"2016-07-05 13:44:47.000000000","message":"\"filter\" is a name of a build-in in Python, please choose a different name for this variable","commit_id":"38895e6a3f80ab8e0fdf7b0cd573f84a97c4901c"},{"author":{"_account_id":13325,"name":"Paul Karikh","email":"pkarikh@gmail.com","username":"paul.karikh"},"change_message_id":"66616695e7675a55be4f60c657e1ac75d2cd0bdc","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def _get_routers(self, search_opts\u003dNone):"},{"line_number":36,"context_line":"        try:"},{"line_number":37,"context_line":"            filter \u003d self.get_filters()"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"            if \u0027project\u0027 in filter:"},{"line_number":40,"context_line":"                tenants \u003d api.keystone.tenant_list(self.request)[0]"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_e4abb7d4","line":37,"in_reply_to":"1aa78d24_7b1c8b77","updated":"2016-07-05 15:44:10.000000000","message":"Agree with Radomir here.","commit_id":"38895e6a3f80ab8e0fdf7b0cd573f84a97c4901c"},{"author":{"_account_id":20506,"name":"Juan Pablo lopez Gutierrez","email":"juan.pablo.lopez.gutierrez@intel.com","username":"jlopezgu"},"change_message_id":"3614862fe3d36109827bab61cb5055c7ee035c15","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def _get_routers(self, search_opts\u003dNone):"},{"line_number":36,"context_line":"        try:"},{"line_number":37,"context_line":"            filter \u003d self.get_filters()"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"            if \u0027project\u0027 in filter:"},{"line_number":40,"context_line":"                tenants \u003d api.keystone.tenant_list(self.request)[0]"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_702453c4","line":37,"in_reply_to":"1aa78d24_e4abb7d4","updated":"2016-07-06 21:59:12.000000000","message":"Done","commit_id":"38895e6a3f80ab8e0fdf7b0cd573f84a97c4901c"},{"author":{"_account_id":13325,"name":"Paul Karikh","email":"pkarikh@gmail.com","username":"paul.karikh"},"change_message_id":"66616695e7675a55be4f60c657e1ac75d2cd0bdc","unresolved":false,"context_lines":[{"line_number":37,"context_line":"            filter \u003d self.get_filters()"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"            if \u0027project\u0027 in filter:"},{"line_number":40,"context_line":"                tenants \u003d api.keystone.tenant_list(self.request)[0]"},{"line_number":41,"context_line":"                ten_filter_ids \u003d [t.id for t in tenants"},{"line_number":42,"context_line":"                                  if t.name \u003d\u003d filter[\u0027project\u0027]]"},{"line_number":43,"context_line":"                del filter[\u0027project\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_e43617e6","line":40,"updated":"2016-07-05 15:44:10.000000000","message":"Could you please explain why do we take here only 0 element from this list?","commit_id":"38895e6a3f80ab8e0fdf7b0cd573f84a97c4901c"},{"author":{"_account_id":20506,"name":"Juan Pablo lopez Gutierrez","email":"juan.pablo.lopez.gutierrez@intel.com","username":"jlopezgu"},"change_message_id":"3614862fe3d36109827bab61cb5055c7ee035c15","unresolved":false,"context_lines":[{"line_number":37,"context_line":"            filter \u003d self.get_filters()"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"            if \u0027project\u0027 in filter:"},{"line_number":40,"context_line":"                tenants \u003d api.keystone.tenant_list(self.request)[0]"},{"line_number":41,"context_line":"                ten_filter_ids \u003d [t.id for t in tenants"},{"line_number":42,"context_line":"                                  if t.name \u003d\u003d filter[\u0027project\u0027]]"},{"line_number":43,"context_line":"                del filter[\u0027project\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_3015ab48","line":40,"in_reply_to":"1aa78d24_e43617e6","updated":"2016-07-06 21:59:12.000000000","message":"Because the api call returns: (tenants, has_more_data) and in this view the pagination is not implemented so the second value is not used.","commit_id":"38895e6a3f80ab8e0fdf7b0cd573f84a97c4901c"},{"author":{"_account_id":13325,"name":"Paul Karikh","email":"pkarikh@gmail.com","username":"paul.karikh"},"change_message_id":"66616695e7675a55be4f60c657e1ac75d2cd0bdc","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"            if \u0027project\u0027 in filter:"},{"line_number":40,"context_line":"                tenants \u003d api.keystone.tenant_list(self.request)[0]"},{"line_number":41,"context_line":"                ten_filter_ids \u003d [t.id for t in tenants"},{"line_number":42,"context_line":"                                  if t.name \u003d\u003d filter[\u0027project\u0027]]"},{"line_number":43,"context_line":"                del filter[\u0027project\u0027]"},{"line_number":44,"context_line":"                if ten_filter_ids:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_245f7f0f","line":41,"updated":"2016-07-05 15:44:10.000000000","message":"I believe it would be better to rename it from \"ten\" to something more clear. Tried to found out why do we use here only 10 ids and where we are rejecting other ids. :)","commit_id":"38895e6a3f80ab8e0fdf7b0cd573f84a97c4901c"},{"author":{"_account_id":20506,"name":"Juan Pablo lopez Gutierrez","email":"juan.pablo.lopez.gutierrez@intel.com","username":"jlopezgu"},"change_message_id":"3614862fe3d36109827bab61cb5055c7ee035c15","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"            if \u0027project\u0027 in filter:"},{"line_number":40,"context_line":"                tenants \u003d api.keystone.tenant_list(self.request)[0]"},{"line_number":41,"context_line":"                ten_filter_ids \u003d [t.id for t in tenants"},{"line_number":42,"context_line":"                                  if t.name \u003d\u003d filter[\u0027project\u0027]]"},{"line_number":43,"context_line":"                del filter[\u0027project\u0027]"},{"line_number":44,"context_line":"                if ten_filter_ids:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_700bb32a","line":41,"in_reply_to":"1aa78d24_245f7f0f","updated":"2016-07-06 21:59:12.000000000","message":"Done","commit_id":"38895e6a3f80ab8e0fdf7b0cd573f84a97c4901c"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"d605e460de2683fea88a9c0882b94c53fb73b785","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                                  if t.name \u003d\u003d filter[\u0027project\u0027]]"},{"line_number":43,"context_line":"                del filter[\u0027project\u0027]"},{"line_number":44,"context_line":"                if ten_filter_ids:"},{"line_number":45,"context_line":"                    filter[\u0027tenant_id\u0027] \u003d ten_filter_ids[0]"},{"line_number":46,"context_line":"                else:"},{"line_number":47,"context_line":"                    return []"},{"line_number":48,"context_line":"            if filter:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_3b55e31c","line":45,"updated":"2016-07-05 13:44:47.000000000","message":"Shouldn\u0027t you return routers from all matching tenant ids, not just the first one?","commit_id":"38895e6a3f80ab8e0fdf7b0cd573f84a97c4901c"},{"author":{"_account_id":13325,"name":"Paul Karikh","email":"pkarikh@gmail.com","username":"paul.karikh"},"change_message_id":"66616695e7675a55be4f60c657e1ac75d2cd0bdc","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                                  if t.name \u003d\u003d filter[\u0027project\u0027]]"},{"line_number":43,"context_line":"                del filter[\u0027project\u0027]"},{"line_number":44,"context_line":"                if ten_filter_ids:"},{"line_number":45,"context_line":"                    filter[\u0027tenant_id\u0027] \u003d ten_filter_ids[0]"},{"line_number":46,"context_line":"                else:"},{"line_number":47,"context_line":"                    return []"},{"line_number":48,"context_line":"            if filter:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_e41c5715","line":45,"in_reply_to":"1aa78d24_3b55e31c","updated":"2016-07-05 15:44:10.000000000","message":"Here too.","commit_id":"38895e6a3f80ab8e0fdf7b0cd573f84a97c4901c"},{"author":{"_account_id":20506,"name":"Juan Pablo lopez Gutierrez","email":"juan.pablo.lopez.gutierrez@intel.com","username":"jlopezgu"},"change_message_id":"3614862fe3d36109827bab61cb5055c7ee035c15","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                                  if t.name \u003d\u003d filter[\u0027project\u0027]]"},{"line_number":43,"context_line":"                del filter[\u0027project\u0027]"},{"line_number":44,"context_line":"                if ten_filter_ids:"},{"line_number":45,"context_line":"                    filter[\u0027tenant_id\u0027] \u003d ten_filter_ids[0]"},{"line_number":46,"context_line":"                else:"},{"line_number":47,"context_line":"                    return []"},{"line_number":48,"context_line":"            if filter:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_5ff7a08a","line":45,"in_reply_to":"1aa78d24_3b55e31c","updated":"2016-07-06 21:59:12.000000000","message":"I\u0027m using the first id of the tenant found, in the case of having more projects with the same name, a loop would be necessary and this could impact in the performance of environments with many resources.","commit_id":"38895e6a3f80ab8e0fdf7b0cd573f84a97c4901c"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"2ed84f2362f7a275f21647bcce86fc888af955b4","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                                  if t.name \u003d\u003d filter[\u0027project\u0027]]"},{"line_number":43,"context_line":"                del filter[\u0027project\u0027]"},{"line_number":44,"context_line":"                if ten_filter_ids:"},{"line_number":45,"context_line":"                    filter[\u0027tenant_id\u0027] \u003d ten_filter_ids[0]"},{"line_number":46,"context_line":"                else:"},{"line_number":47,"context_line":"                    return []"},{"line_number":48,"context_line":"            if filter:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_c523b454","line":45,"in_reply_to":"1aa78d24_5ff7a08a","updated":"2016-07-07 07:33:40.000000000","message":"Why don\u0027t you just return an empty list each time, that would be even faster! ;)\n\nMore seriously, I think it is preferred to give the right answer, even if it takes more time, rather than the wrong and misleading answer fast.","commit_id":"38895e6a3f80ab8e0fdf7b0cd573f84a97c4901c"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"88da29b17a148e2d1b6f9e6c37618a795ac2b311","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                                  if t.name \u003d\u003d filter[\u0027project\u0027]]"},{"line_number":43,"context_line":"                del filter[\u0027project\u0027]"},{"line_number":44,"context_line":"                if ten_filter_ids:"},{"line_number":45,"context_line":"                    filter[\u0027tenant_id\u0027] \u003d ten_filter_ids[0]"},{"line_number":46,"context_line":"                else:"},{"line_number":47,"context_line":"                    return []"},{"line_number":48,"context_line":"            if filter:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_e7d626c2","line":45,"in_reply_to":"1aa78d24_679384fb","updated":"2016-07-11 08:00:08.000000000","message":"Thank you for your work!","commit_id":"38895e6a3f80ab8e0fdf7b0cd573f84a97c4901c"},{"author":{"_account_id":20506,"name":"Juan Pablo lopez Gutierrez","email":"juan.pablo.lopez.gutierrez@intel.com","username":"jlopezgu"},"change_message_id":"6611b2d91d30eab07fbfd3e63c678c532cf073fe","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                                  if t.name \u003d\u003d filter[\u0027project\u0027]]"},{"line_number":43,"context_line":"                del filter[\u0027project\u0027]"},{"line_number":44,"context_line":"                if ten_filter_ids:"},{"line_number":45,"context_line":"                    filter[\u0027tenant_id\u0027] \u003d ten_filter_ids[0]"},{"line_number":46,"context_line":"                else:"},{"line_number":47,"context_line":"                    return []"},{"line_number":48,"context_line":"            if filter:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_679384fb","line":45,"in_reply_to":"1aa78d24_c523b454","updated":"2016-07-08 17:01:44.000000000","message":"I thought that was made because of that, but yeah you where right my answer was wrong it looks that the other place where I took the code it was coded 2 years ago when multi-domain was not implemented and in that time the reason to use the [0] is that every time that you look for the id of the project using as filter the name only return one value because there cannot be two projects with the same name, that was right at that time but now its not anymore, its required to iterate in each id found because there can be two projects with the same name in different domains. Does this make sense? In other words I still need to work in this patch.","commit_id":"38895e6a3f80ab8e0fdf7b0cd573f84a97c4901c"},{"author":{"_account_id":20506,"name":"Juan Pablo lopez Gutierrez","email":"juan.pablo.lopez.gutierrez@intel.com","username":"jlopezgu"},"change_message_id":"3614862fe3d36109827bab61cb5055c7ee035c15","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                                  if t.name \u003d\u003d filter[\u0027project\u0027]]"},{"line_number":43,"context_line":"                del filter[\u0027project\u0027]"},{"line_number":44,"context_line":"                if ten_filter_ids:"},{"line_number":45,"context_line":"                    filter[\u0027tenant_id\u0027] \u003d ten_filter_ids[0]"},{"line_number":46,"context_line":"                else:"},{"line_number":47,"context_line":"                    return []"},{"line_number":48,"context_line":"            if filter:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_3355b0c5","line":45,"in_reply_to":"1aa78d24_e41c5715","updated":"2016-07-06 21:59:12.000000000","message":"I\u0027m using the first id of the tenant found, in the case of having more projects with the same name, a loop would be necessary and this could impact in the performance of environments with many resources.","commit_id":"38895e6a3f80ab8e0fdf7b0cd573f84a97c4901c"},{"author":{"_account_id":13325,"name":"Paul Karikh","email":"pkarikh@gmail.com","username":"paul.karikh"},"change_message_id":"66616695e7675a55be4f60c657e1ac75d2cd0bdc","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                else:"},{"line_number":47,"context_line":"                    return []"},{"line_number":48,"context_line":"            if filter:"},{"line_number":49,"context_line":"                routers \u003d api.neutron.router_list(self.request, **filter)"},{"line_number":50,"context_line":"            else:"},{"line_number":51,"context_line":"                routers \u003d api.neutron.router_list(self.request,"},{"line_number":52,"context_line":"                                                  search_opts\u003dsearch_opts)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_ffa4dea6","line":49,"updated":"2016-07-05 15:44:10.000000000","message":"Does router_list support empty filter? If so, we could use one call and get rid of if/else.","commit_id":"38895e6a3f80ab8e0fdf7b0cd573f84a97c4901c"},{"author":{"_account_id":20506,"name":"Juan Pablo lopez Gutierrez","email":"juan.pablo.lopez.gutierrez@intel.com","username":"jlopezgu"},"change_message_id":"3614862fe3d36109827bab61cb5055c7ee035c15","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                else:"},{"line_number":47,"context_line":"                    return []"},{"line_number":48,"context_line":"            if filter:"},{"line_number":49,"context_line":"                routers \u003d api.neutron.router_list(self.request, **filter)"},{"line_number":50,"context_line":"            else:"},{"line_number":51,"context_line":"                routers \u003d api.neutron.router_list(self.request,"},{"line_number":52,"context_line":"                                                  search_opts\u003dsearch_opts)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_bff04492","line":49,"in_reply_to":"1aa78d24_ffa4dea6","updated":"2016-07-06 21:59:12.000000000","message":"router_list supports it, but there are some parts of the code that expect the search_opts\u003dsearch_opts behavior.","commit_id":"38895e6a3f80ab8e0fdf7b0cd573f84a97c4901c"}],"openstack_dashboard/dashboards/project/routers/views.py":[{"author":{"_account_id":12071,"name":"Richard Jones","email":"r1chardj0n3s@gmail.com","username":"richard"},"change_message_id":"1dbffe04fed5abc37d2cc12174608f806242458c","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        try:"},{"line_number":50,"context_line":"            filter \u003d self.get_filters()"},{"line_number":51,"context_line":"            tenant_id \u003d self.request.user.tenant_id"},{"line_number":52,"context_line":"            if filter \u003d\u003d {}:"},{"line_number":53,"context_line":"                routers \u003d api.neutron.router_list(self.request,"},{"line_number":54,"context_line":"                                                  tenant_id\u003dtenant_id,"},{"line_number":55,"context_line":"                                                  search_opts\u003dsearch_opts)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_d5d4e747","line":52,"updated":"2016-07-01 06:27:05.000000000","message":"Similar to my other comment \"if filter: .. use it..\" etc.","commit_id":"b1a1c795b1a75191032771c2dd6d3916155f7678"},{"author":{"_account_id":13325,"name":"Paul Karikh","email":"pkarikh@gmail.com","username":"paul.karikh"},"change_message_id":"66616695e7675a55be4f60c657e1ac75d2cd0bdc","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                routers \u003d api.neutron.router_list(self.request,"},{"line_number":54,"context_line":"                                                  tenant_id\u003dtenant_id,"},{"line_number":55,"context_line":"                                                  **filter)"},{"line_number":56,"context_line":"            else:"},{"line_number":57,"context_line":"                routers \u003d api.neutron.router_list(self.request,"},{"line_number":58,"context_line":"                                                  tenant_id\u003dtenant_id,"},{"line_number":59,"context_line":"                                                  search_opts\u003dsearch_opts)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_1fd8ca1c","line":56,"updated":"2016-07-05 15:44:10.000000000","message":"Same comment about empty filters and if/else.","commit_id":"38895e6a3f80ab8e0fdf7b0cd573f84a97c4901c"},{"author":{"_account_id":20506,"name":"Juan Pablo lopez Gutierrez","email":"juan.pablo.lopez.gutierrez@intel.com","username":"jlopezgu"},"change_message_id":"3614862fe3d36109827bab61cb5055c7ee035c15","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                routers \u003d api.neutron.router_list(self.request,"},{"line_number":54,"context_line":"                                                  tenant_id\u003dtenant_id,"},{"line_number":55,"context_line":"                                                  **filter)"},{"line_number":56,"context_line":"            else:"},{"line_number":57,"context_line":"                routers \u003d api.neutron.router_list(self.request,"},{"line_number":58,"context_line":"                                                  tenant_id\u003dtenant_id,"},{"line_number":59,"context_line":"                                                  search_opts\u003dsearch_opts)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_73d61829","line":56,"in_reply_to":"1aa78d24_1fd8ca1c","updated":"2016-07-06 21:59:12.000000000","message":"Done","commit_id":"38895e6a3f80ab8e0fdf7b0cd573f84a97c4901c"}]}
