OLD | NEW |
1 # Copyright 2014 The Swarming Authors. All rights reserved. | 1 # Copyright 2014 The LUCI Authors. All rights reserved. |
2 # Use of this source code is governed by the Apache v2.0 license that can be | 2 # Use of this source code is governed by the Apache v2.0 license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Imports groups from some external tar.gz bundle or plain text list. | 5 """Imports groups from some external tar.gz bundle or plain text list. |
6 | 6 |
7 External URL should serve *.tar.gz file with the following file structure: | 7 External URL should serve *.tar.gz file with the following file structure: |
8 <external group system name>/<group name>: | 8 <external group system name>/<group name>: |
9 userid | 9 userid |
10 userid | 10 userid |
11 ... | 11 ... |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 | 499 |
500 # Create new groups. | 500 # Create new groups. |
501 for group_name in (set(imported_groups) - set(system_groups)): | 501 for group_name in (set(imported_groups) - set(system_groups)): |
502 create_group(group_name) | 502 create_group(group_name) |
503 | 503 |
504 # Update existing groups. | 504 # Update existing groups. |
505 for group_name in (set(imported_groups) & set(system_groups)): | 505 for group_name in (set(imported_groups) & set(system_groups)): |
506 update_group(group_name) | 506 update_group(group_name) |
507 | 507 |
508 return to_put, to_delete | 508 return to_put, to_delete |
OLD | NEW |