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 14:48:13 UTC
[incubator-dlab] branch DLAB-1531 updated: DLAB-1531 fixed creation
in aws
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 9d3e854 DLAB-1531 fixed creation in aws
9d3e854 is described below
commit 9d3e8548ced3d665aa9db6a20c5289c571a8b079
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Thu Feb 20 16:47:42 2020 +0200
DLAB-1531 fixed creation in aws
---
.../src/general/lib/aws/actions_lib.py | 2 +-
.../src/general/scripts/aws/project_prepare.py | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
index af6412c..adb2661 100644
--- a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
+++ b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
@@ -86,7 +86,7 @@ def create_s3_bucket(bucket_name, bucket_tags, region, bucket_name_tag):
tags = list()
tags.append({'Key': os.environ['conf_tag_resource_id'],
'Value': os.environ['conf_service_base_name'] + ':' + bucket_name_tag})
- for tag in bucket_tags.split(';'):
+ for tag in bucket_tags.split(','):
tags.append(
{
'Key': tag.split(':')[0],
diff --git a/infrastructure-provisioning/src/general/scripts/aws/project_prepare.py b/infrastructure-provisioning/src/general/scripts/aws/project_prepare.py
index b8fb85d..009b81e 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/project_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/project_prepare.py
@@ -134,7 +134,7 @@ if __name__ == "__main__":
logging.info(json.dumps(project_conf))
if 'conf_additional_tags' in os.environ:
- project_conf['bucket_additional_tags'] = os.environ['conf_additional_tags'] + ';'
+ project_conf['bucket_additional_tags'] = ';' + os.environ['conf_additional_tags']
os.environ['conf_additional_tags'] = os.environ['conf_additional_tags'] + \
';project_tag:{0};endpoint_tag:{1};'.format(
project_conf['project_tag'], project_conf['endpoint_tag'])
@@ -533,9 +533,9 @@ if __name__ == "__main__":
try:
logging.info('[CREATE BUCKETS]')
print('[CREATE BUCKETS]')
- project_conf['shared_bucket_tags'] = 'endpoint_tag:{};{}:{};{}:{};{}'.format(project_conf['endpoint_tag'],
+ project_conf['shared_bucket_tags'] = 'endpoint_tag:{0};{1}:{2};{3}:{4}{5}'.format(project_conf['endpoint_tag'],
os.environ['conf_billing_tag_key'], os.environ['conf_billing_tag_value'],
- project_conf['tag_name'], project_conf['shared_bucket_name'], project_conf['bucket_additional_tags'])
+ project_conf['tag_name'], project_conf['shared_bucket_name'], project_conf['bucket_additional_tags']).replace(';', ',')
params = "--bucket_name {} --bucket_tags {} --region {} --bucket_name_tag {}". \
format(project_conf['shared_bucket_name'], project_conf['shared_bucket_tags'], project_conf['region'], project_conf['shared_bucket_name_tag'])
try:
@@ -543,12 +543,12 @@ if __name__ == "__main__":
except:
traceback.print_exc()
raise Exception
- project_conf['bucket_tags'] = 'endpoint_tag:{};{}:{};project_tag:{};{}:{};{}'.format(project_conf['endpoint_tag'],
+ project_conf['bucket_tags'] = 'endpoint_tag:{0};{1}:{2};project_tag:{3};{4}:{5}{6}'.format(project_conf['endpoint_tag'],
os.environ['conf_billing_tag_key'], os.environ['conf_billing_tag_value'],
project_conf['project_tag'],
- project_conf['tag_name'], project_conf['bucket_name'], project_conf['bucket_additional_tags'])
+ project_conf['tag_name'], project_conf['bucket_name'], project_conf['bucket_additional_tags']).replace(';', ',')
params = "--bucket_name {} --bucket_tags {} --region {} --bucket_name_tag {}" \
- .format(project_conf['bucket_name'], project_conf['tag_name'], project_conf['region'], project_conf['bucket_name_tag'])
+ .format(project_conf['bucket_name'], project_conf['bucket_tags'], project_conf['region'], project_conf['bucket_name_tag'])
try:
local("~/scripts/{}.py {}".format('common_create_bucket', params))
except:
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org