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/06/17 15:28:11 UTC
[incubator-dlab] 01/01: [DLAB-1882]: made names of images lower case
This is an automated email from the ASF dual-hosted git repository.
lfrolov pushed a commit to branch DLAB-1882
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit c4933068a204c5fbe7967c7e753782ffdc387cac
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Wed Jun 17 18:27:43 2020 +0300
[DLAB-1882]: made names of images lower case
---
.../src/general/scripts/gcp/common_create_notebook_image.py | 4 ++--
.../src/general/scripts/gcp/common_prepare_notebook.py | 8 ++++----
.../src/general/scripts/gcp/common_terminate_notebook_image.py | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_create_notebook_image.py b/infrastructure-provisioning/src/general/scripts/gcp/common_create_notebook_image.py
index c7b4b0a..dd0e643 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/common_create_notebook_image.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/common_create_notebook_image.py
@@ -51,10 +51,10 @@ if __name__ == "__main__":
image_conf['image_name'] = os.environ['notebook_image_name'].replace('_', '-').lower()
image_conf['expected_primary_image_name'] = '{}-{}-{}-{}-primary-image-{}'.format(
image_conf['service_base_name'], image_conf['project_name'], image_conf['endpoint_name'],
- os.environ['application'], image_conf['image_name'])
+ os.environ['application'], image_conf['image_name']).lower()
image_conf['expected_secondary_image_name'] = '{}-{}-{}-{}-secondary-image-{}'.format(
image_conf['service_base_name'], image_conf['project_name'], image_conf['endpoint_name'],
- os.environ['application'], image_conf['image_name'])
+ os.environ['application'], image_conf['image_name']).lower()
image_conf['image_labels'] = {"sbn": image_conf['service_base_name'],
"endpoint_tag": image_conf['endpoint_tag'],
"project_tag": image_conf['project_tag'],
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py b/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py
index d616350..5f7931f 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/common_prepare_notebook.py
@@ -104,15 +104,15 @@ if __name__ == "__main__":
if notebook_config['shared_image_enabled'] == 'false':
notebook_config['expected_primary_image_name'] = '{}-{}-{}-{}-primary-image'.format(
notebook_config['service_base_name'], notebook_config['project_name'], notebook_config['endpoint_tag'],
- os.environ['application'])
+ os.environ['application']).lower()
notebook_config['expected_secondary_image_name'] = '{}-{}-{}-{}-secondary-image'.format(
notebook_config['service_base_name'], notebook_config['project_name'], notebook_config['endpoint_tag'],
- os.environ['application'])
+ os.environ['application']).lower()
else:
notebook_config['expected_primary_image_name'] = '{}-{}-{}-primary-image'.format(
- notebook_config['service_base_name'], notebook_config['endpoint_name'], os.environ['application'])
+ notebook_config['service_base_name'], notebook_config['endpoint_name'], os.environ['application']).lower()
notebook_config['expected_secondary_image_name'] = '{}-{}-{}-secondary-image'.format(
- notebook_config['service_base_name'], notebook_config['endpoint_name'], os.environ['application'])
+ notebook_config['service_base_name'], notebook_config['endpoint_name'], os.environ['application']).lower()
notebook_config['notebook_primary_image_name'] = (lambda x: '{0}-{1}-{2}-{3}-primary-image-{4}'.format(
notebook_config['service_base_name'], notebook_config['project_name'], notebook_config['endpoint_name'],
os.environ['application'], os.environ['notebook_image_name'].replace('_', '-').lower()) if (x != 'None' and x != '')
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/common_terminate_notebook_image.py b/infrastructure-provisioning/src/general/scripts/gcp/common_terminate_notebook_image.py
index a869a38..e8dfdf0 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/common_terminate_notebook_image.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/common_terminate_notebook_image.py
@@ -43,10 +43,10 @@ if __name__ == "__main__":
image_conf['project_tag'] = os.environ['project_name']
image_conf['expected_primary_image_name'] = '{}-{}-{}-{}-primary-image-{}'.format(
image_conf['service_base_name'], image_conf['project_name'], image_conf['endpoint_name'],
- os.environ['application'], image_conf['image_name'])
+ os.environ['application'], image_conf['image_name']).lower()
image_conf['expected_secondary_image_name'] = '{}-{}-{}-{}-secondary-image-{}'.format(
image_conf['service_base_name'], image_conf['project_name'], image_conf['endpoint_name'],
- os.environ['application'], image_conf['image_name'])
+ os.environ['application'], image_conf['image_name']).lower()
primary_image_id = GCPMeta.get_image_by_name(image_conf['expected_primary_image_name'])
if primary_image_id != '':
GCPActions.remove_image(notebook_config['expected_primary_image_name'])
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org