)]}'
{"openstack_dashboard/dashboards/identity/projects/tabs.py":[{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"c184bdcf94afe8ae844962141b87c0412f2ca450","unresolved":false,"context_lines":[{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        try:"},{"line_number":187,"context_line":"            # Get project_groups_roles: {group_id: [role_id_1, role_id_2]}"},{"line_number":188,"context_line":"            project_groups_roles \u003d api.keystone.get_project_groups_roles("},{"line_number":189,"context_line":"                self.request,"},{"line_number":190,"context_line":"                project\u003dproject.id)"},{"line_number":191,"context_line":"            # Get global roles and groups"},{"line_number":192,"context_line":"            roles \u003d api.keystone.role_list(self.request)"},{"line_number":193,"context_line":"            # For keystone.group_list, we do not give the project_id because it"},{"line_number":194,"context_line":"            # is ignored when called with admin creds."},{"line_number":195,"context_line":"            groups \u003d api.keystone.group_list(self.request)"},{"line_number":196,"context_line":"            groups \u003d {group.id: group for group in groups}"},{"line_number":197,"context_line":"        except Exception:"},{"line_number":198,"context_line":"            exceptions.handle(self.request,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_446be51c","line":195,"range":{"start_line":188,"start_character":11,"end_line":195,"end_character":58},"updated":"2018-08-13 19:44:44.000000000","message":"Can we do it with less Keystone API calls? I have some concern about performance","commit_id":"a6345494e1a4176f06e0c1974880d16a477ec92d"},{"author":{"_account_id":27578,"name":"David Gutman","email":"david.gutman@thalesgroup.com","username":"david.gutman"},"change_message_id":"77b54153eebfd111c5ee1d690417374799e9baa1","unresolved":false,"context_lines":[{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        try:"},{"line_number":187,"context_line":"            # Get project_groups_roles: {group_id: [role_id_1, role_id_2]}"},{"line_number":188,"context_line":"            project_groups_roles \u003d api.keystone.get_project_groups_roles("},{"line_number":189,"context_line":"                self.request,"},{"line_number":190,"context_line":"                project\u003dproject.id)"},{"line_number":191,"context_line":"            # Get global roles and groups"},{"line_number":192,"context_line":"            roles \u003d api.keystone.role_list(self.request)"},{"line_number":193,"context_line":"            # For keystone.group_list, we do not give the project_id because it"},{"line_number":194,"context_line":"            # is ignored when called with admin creds."},{"line_number":195,"context_line":"            groups \u003d api.keystone.group_list(self.request)"},{"line_number":196,"context_line":"            groups \u003d {group.id: group for group in groups}"},{"line_number":197,"context_line":"        except Exception:"},{"line_number":198,"context_line":"            exceptions.handle(self.request,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_0f1964d5","line":195,"range":{"start_line":188,"start_character":11,"end_line":195,"end_character":58},"in_reply_to":"3f79a3b5_446be51c","updated":"2018-08-27 09:07:06.000000000","message":"All this requests are needed to be able to display the role names and the group names (not only the id).\n\nThese requests are done only when clicking on the tab, (the tab is not preloaded) so it doesn\u0027t decrease the existing performance on the main project detail page.\n\nThe only way to reduce the amount of data on network is to request group one by one, with the group_id got from project_groups_roles. (same for the role)\nBut this doesn\u0027t reduce the number of keystone API calls and I think it is better to request all roles and groups once assuming the number of roles and groups should be \"small\" (\u003c100 ?) to a classic usage of openstack ?","commit_id":"a6345494e1a4176f06e0c1974880d16a477ec92d"}]}
