You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by lf...@apache.org on 2020/02/20 11:36:48 UTC
[incubator-dlab] branch DLAB-1531 updated: DLAB-1531
add_bucket_labels is now called from common_create_bucket.py
This is an automated email from the ASF dual-hosted git repository.
lfrolov pushed a commit to branch DLAB-1531
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/DLAB-1531 by this push:
new 87b2781 DLAB-1531 add_bucket_labels is now called from common_create_bucket.py
87b2781 is described below
commit 87b27814ac61b1527348e3d99777fcaa6aa9847d
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Thu Feb 20 13:36:15 2020 +0200
DLAB-1531 add_bucket_labels is now called from common_create_bucket.py
---
.../src/general/scripts/gcp/common_create_bucket.py | 2 ++
.../src/general/scripts/gcp/project_prepare.py | 6 ++----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_create_bucket.py b/infrastructure-provisioning/src/general/scripts/gcp/common_create_bucket.py
index 643f6ca..5291d9a 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/common_create_bucket.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/common_create_bucket.py
@@ -30,6 +30,7 @@ import sys
parser = argparse.ArgumentParser()
parser.add_argument('--bucket_name', type=str, default='')
+parser.add_argument('--tags', type=str, default='')
args = parser.parse_args()
@@ -40,6 +41,7 @@ if __name__ == "__main__":
else:
print("Creating Bucket {}".format(args.bucket_name))
GCPActions().create_bucket(args.bucket_name)
+ GCPActions().add_bucket_labels(args.bucket_name, args.tags)
else:
parser.print_help()
sys.exit(2)
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/project_prepare.py b/infrastructure-provisioning/src/general/scripts/gcp/project_prepare.py
index 130839b..b25975d 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/project_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/project_prepare.py
@@ -371,25 +371,23 @@ if __name__ == "__main__":
"endpoint_tag": project_conf['endpoint_tag'],
os.environ['conf_billing_tag_key']: os.environ['conf_billing_tag_value'],
"sbn": project_conf['service_base_name']}
- params = "--bucket_name {}".format(project_conf['shared_bucket_name'])
+ params = "--bucket_name {} --tags {}".format(project_conf['shared_bucket_name'], project_conf['shared_bucket_tags'])
try:
local("~/scripts/{}.py {}".format('common_create_bucket', params))
- GCPActions().add_bucket_labels(project_conf['shared_bucket_name'], project_conf['shared_bucket_tags'])
except:
traceback.print_exc()
raise Exception
- params = "--bucket_name {}".format(project_conf['bucket_name'])
project_conf['bucket_tags'] = {
"name": project_conf['bucket_name'],
"endpoint_tag": project_conf['endpoint_tag'],
os.environ['conf_billing_tag_key']: os.environ['conf_billing_tag_value'],
"sbn": project_conf['service_base_name'],
"project_tag": project_conf['project_tag']}
+ params = "--bucket_name {} --tags {}".format(project_conf['bucket_name'], project_conf['bucket_tags'])
try:
local("~/scripts/{}.py {}".format('common_create_bucket', params))
- GCPActions().add_bucket_labels(project_conf['bucket_name'], project_conf['bucket_tags'])
except:
traceback.print_exc()
raise Exception
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org