From 5d7c23aad8ae9cf4dbfb68cb242333ab0ec2e0e2 Mon Sep 17 00:00:00 2001 From: Tianqi Date: Thu, 22 Feb 2024 20:25:42 +0000 Subject: [PATCH] Increase name complexity for charm-created domain Since we are running clean-ups in the domain created by identity-ops relation in multiple-stages of the charm's life-cycle, it would be safer to use a more complex name for this domain. Otherwise, if a user creates a domain also named "tempest" to do their own tests, the charm would falsely clean-up resources there. Also updated user and project name for better readability. Change-Id: Ief799048f1f261d052a02f3129b03626ba20c443 --- charms/tempest-k8s/src/utils/constants.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/charms/tempest-k8s/src/utils/constants.py b/charms/tempest-k8s/src/utils/constants.py index ab2f1fd2..e16f8eff 100644 --- a/charms/tempest-k8s/src/utils/constants.py +++ b/charms/tempest-k8s/src/utils/constants.py @@ -54,13 +54,19 @@ TEMPEST_ADHOC_OUTPUT = f"{TEMPEST_WORKSPACE_PATH}/tempest-validation.log" # It will be saved in a file in $HOME/.tempest/ TEMPEST_WORKSPACE = "tempest" -OPENSTACK_USER = "tempest" -OPENSTACK_DOMAIN = "tempest" -# not use tempest as prefix to exclude this project from utils/cleanup.py scope -OPENSTACK_PROJECT = "CloudValidation-tempest" -OPENSTACK_ROLE = "admin" - # keys for application data TEMPEST_READY_KEY = "tempest-ready" CONTAINER = "tempest" + +# ============================================================================== +# Do not change the following values as we need to keep using the same names to +# do clean-ups on previously created domain, user, and project via identity-ops +# relation. +# ============================================================================== +# hash suffix is added to avoid possible collision with user created domains +OPENSTACK_DOMAIN = "CloudValidation-b82746a08d" +# not use tempest as prefix to exclude this project from utils/cleanup.py scope +OPENSTACK_PROJECT = "CloudValidation-test-project" +OPENSTACK_USER = "CloudValidation-test-user" +OPENSTACK_ROLE = "admin"