From f1fcf8fa2b42421981e3fe13799910d10e9a6f42 Mon Sep 17 00:00:00 2001 From: cody Date: Wed, 13 Nov 2019 21:01:51 +0800 Subject: [PATCH] update --- Readme.md | 3 +-- gen_sa_accounts.py | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index fc89eef..ecef461 100644 --- a/Readme.md +++ b/Readme.md @@ -48,8 +48,7 @@ If you have already N projects and want to create service accounts only in newly * create 600 (6 projects, each with 100) Service Accounts * and download their credentials into a folder named `accounts` -If you want to create some service accounts using existing projects (do not create more projects), run `python3 gen_sa_accounts.py --quick-setup 0`. -Note that this will overwrite the existing service accounts. +If you want to create some service accounts using existing projects (do not create more projects), run `python3 gen_sa_accounts.py --quick-setup -1`.Note that this will overwrite the existing service accounts. After it is finished, there will be many json files in one folder named `accounts`. diff --git a/gen_sa_accounts.py b/gen_sa_accounts.py index 69a7218..5f10b0a 100644 --- a/gen_sa_accounts.py +++ b/gen_sa_accounts.py @@ -195,6 +195,7 @@ def serviceaccountfactory( if list_sas: return _list_sas(iam,list_sas) if create_projects: + print("creat projects: {}".format(create_projects)) if create_projects > 0: current_count = len(_get_projects(cloud)) if current_count + create_projects <= max_projects: @@ -209,6 +210,8 @@ def serviceaccountfactory( else: print('Will overwrite all service accounts in existing projects.\n' 'So make sure you have some projects already.') + input("Press Enter to continue...") + if enable_services: ste = [] ste.append(enable_services)