From 9b03cf1d6a7b2ea7a99907b509a2c4b359e4b416 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 30 May 2022 09:16:23 +0900 Subject: [PATCH] Fix unused DEFAULT_CONTAINER_TAG The DEFAULT_CONTAINER_TAG constant is unused but the hard-coded value is used instead of the constants. This change ensures the constant is used to gather all default values in a single place. Also, this replaces the hard-coded name prefix by the constant so that we all define default values for container image detection as constants. Change-Id: I4a3b2c2943680afde67f13daefd7aaf8258132cc --- tripleoclient/constants.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tripleoclient/constants.py b/tripleoclient/constants.py index 03bc59ea1..6ae5d22de 100644 --- a/tripleoclient/constants.py +++ b/tripleoclient/constants.py @@ -41,6 +41,7 @@ ANSIBLE_CWL = "tripleo_dense,tripleo_profile_tasks,tripleo_states" CONTAINER_IMAGE_PREPARE_LOG_FILE = "container_image_prepare.log" DEFAULT_CONTAINER_REGISTRY = "quay.io" DEFAULT_CONTAINER_NAMESPACE = "tripleomastercentos9" +DEFAULT_CONTAINER_NAME_PREFIX = "openstack-" DEFAULT_CONTAINER_TAG = "current-tripleo" DEFAULT_RESOURCE_REGISTRY = 'overcloud-resource-registry-puppet.yaml' @@ -53,8 +54,8 @@ else: DEFAULT_CONTAINER_REGISTRY, DEFAULT_CONTAINER_NAMESPACE ), - 'name_prefix': 'openstack-', - 'tag': 'current-tripleo' + 'name_prefix': DEFAULT_CONTAINER_NAME_PREFIX, + 'tag': DEFAULT_CONTAINER_TAG } DEFAULT_HEAT_CONTAINER = ('{}/{}heat-all:{}'.format( DEFAULT_CONTAINER_IMAGE_PARAMS['namespace'],