Merge "Remove unused constants for Mistral workflows/actions"

This commit is contained in:
Zuul 2021-10-13 16:52:44 +00:00 committed by Gerrit Code Review
commit 369b24bcf0
2 changed files with 12 additions and 72 deletions

View File

@ -14,24 +14,6 @@
# under the License.
#: The names of the root template in a standard tripleo-heat-template layout.
OVERCLOUD_YAML_NAME = "overcloud.yaml"
#: The name of the overcloud root template in jinja2 format.
OVERCLOUD_J2_NAME = "overcloud.j2.yaml"
#: The name of custom roles data file used when rendering the jinja template.
OVERCLOUD_J2_ROLES_NAME = "roles_data.yaml"
#: The name of custom roles network data file used when rendering j2 templates.
OVERCLOUD_J2_NETWORKS_NAME = "network_data.yaml"
#: The name of custom roles excl file used when rendering the jinja template.
OVERCLOUD_J2_EXCLUDES = "j2_excludes.yaml"
#: The name of the type for resource groups.
RESOURCE_GROUP_TYPE = 'OS::Heat::ResourceGroup'
#: The resource name used for package updates
UPDATE_RESOURCE_NAME = 'UpdateDeployment'
@ -44,32 +26,9 @@ DEFAULT_CONTAINER_NAME = 'overcloud'
#: The default name to use for the config files of the container
CONFIG_CONTAINER_NAME = 'overcloud-config'
#: The default name to use for the container for validations
VALIDATIONS_CONTAINER_NAME = 'tripleo-validations'
#: The name of the plan subdirectory that holds custom validations
CUSTOM_VALIDATIONS_FOLDER = 'custom-validations'
#: The default key to use for updating parameters in plan environment.
DEFAULT_PLAN_ENV_KEY = 'parameter_defaults'
#: The path to the tripleo heat templates installed on the undercloud
DEFAULT_TEMPLATES_PATH = '/usr/share/openstack-tripleo-heat-templates/'
#: The path to the base directory of tripleo-validations
DEFAULT_VALIDATIONS_BASEDIR = "/usr/share/ansible"
# The path to the tripleo validations installed on the undercloud
DEFAULT_VALIDATIONS_PATH = "{}/validation-playbooks/".format(
DEFAULT_VALIDATIONS_BASEDIR)
# The path to the local CA certificate installed on the undercloud
LOCAL_CACERT_PATH = '/etc/pki/ca-trust/source/anchors/cm-local-ca.pem'
# TRIPLEO_META_USAGE_KEY is inserted into metadata for containers created in
# Swift via SwiftPlanStorageBackend to identify them from other containers
TRIPLEO_META_USAGE_KEY = 'x-container-meta-usage-tripleo'
# 60 minutes maximum to build the child layers at the same time.
BUILD_TIMEOUT = 3600
@ -147,8 +106,6 @@ DO_NOT_ROTATE_LIST = (
'HeatAuthEncryptionKey',
)
PLAN_NAME_PATTERN = '^[a-zA-Z0-9-]+$'
# The default version of the Identity API to set in overcloudrc.
DEFAULT_IDENTITY_API_VERSION = '3'
@ -161,23 +118,6 @@ DEFAULT_IMAGE_API_VERSION = '2'
# The default version of the Volume API to set in overcloudrc.
DEFAULT_VOLUME_API_VERSION = '3'
# The name of the file which holds the Mistral environment contents for plan
# import/export
PLAN_ENVIRONMENT = 'plan-environment.yaml'
# Name of the environment with merged parameters from CLI
USER_ENVIRONMENT = 'user-environment.yaml'
# The name of the file which holds container image default parameters
CONTAINER_DEFAULTS_ENVIRONMENT = ('environments/'
'containers-default-parameters.yaml')
# The name for the swift container to host the cache for tripleo
TRIPLEO_CACHE_CONTAINER = "__cache__"
API_NETWORK = 'InternalApi'
LEGACY_API_NETWORK = 'Internal'
# Default nested depth when recursing Heat stacks
NESTED_DEPTH = 7

View File

@ -20,7 +20,6 @@ from unittest import mock
import yaml
from tripleo_common import constants
from tripleo_common.image import image_uploader
from tripleo_common.image import kolla_builder as kb
from tripleo_common.tests import base
@ -38,7 +37,8 @@ kb.init_prepare_defaults(DEFAULTS_PATH)
KB_DEFAULT_TAG = kb.CONTAINER_IMAGES_DEFAULTS['tag']
KB_DEFAULT_PREFIX = kb.CONTAINER_IMAGES_DEFAULTS['name_prefix']
KB_DEFAULT_NAMESPACE = kb.CONTAINER_IMAGES_DEFAULTS['namespace']
CONTAINER_DEFAULTS_ENVIRONMENT = ('environments/'
'containers-default-parameters.yaml')
filedata = str("""container_images:
- imagename: docker.io/tripleomaster/heat-docker-agents-centos:latest
@ -480,7 +480,7 @@ class TestPrepare(base.TestCase):
}},
kb.container_images_prepare(
template_file=TEMPLATE_PATH,
output_env_file=constants.CONTAINER_DEFAULTS_ENVIRONMENT,
output_env_file=CONTAINER_DEFAULTS_ENVIRONMENT,
output_images_file='container_images.yaml',
service_filter=['OS::TripleO::Services::NovaLibvirt'],
excludes=['libvirt'],
@ -507,7 +507,7 @@ class TestPrepare(base.TestCase):
}},
kb.container_images_prepare(
template_file=TEMPLATE_PATH,
output_env_file=constants.CONTAINER_DEFAULTS_ENVIRONMENT,
output_env_file=CONTAINER_DEFAULTS_ENVIRONMENT,
output_images_file='container_images.yaml',
includes=['libvirt'],
mapping_args={
@ -534,7 +534,7 @@ class TestPrepare(base.TestCase):
}},
kb.container_images_prepare(
template_file=TEMPLATE_PATH,
output_env_file=constants.CONTAINER_DEFAULTS_ENVIRONMENT,
output_env_file=CONTAINER_DEFAULTS_ENVIRONMENT,
output_images_file='container_images.yaml',
includes=['libvirt'],
excludes=['libvirt'],
@ -568,7 +568,7 @@ class TestPrepare(base.TestCase):
}},
kb.container_images_prepare(
template_file=TEMPLATE_PATH,
output_env_file=constants.CONTAINER_DEFAULTS_ENVIRONMENT,
output_env_file=CONTAINER_DEFAULTS_ENVIRONMENT,
output_images_file='container_images.yaml',
service_filter=['OS::TripleO::Services::NovaApi'],
push_destination='192.0.2.0:8787',
@ -604,7 +604,7 @@ class TestPrepare(base.TestCase):
}},
kb.container_images_prepare(
template_file=TEMPLATE_PATH,
output_env_file=constants.CONTAINER_DEFAULTS_ENVIRONMENT,
output_env_file=CONTAINER_DEFAULTS_ENVIRONMENT,
output_images_file='container_images.yaml',
service_filter=['OS::TripleO::Services::NovaApi'],
push_destination=True,
@ -630,7 +630,7 @@ class TestPrepare(base.TestCase):
}},
kb.container_images_prepare(
template_file=TEMPLATE_PATH,
output_env_file=constants.CONTAINER_DEFAULTS_ENVIRONMENT,
output_env_file=CONTAINER_DEFAULTS_ENVIRONMENT,
output_images_file='container_images.yaml',
service_filter=['OS::TripleO::Services::CephMon'],
mapping_args={
@ -655,7 +655,7 @@ class TestPrepare(base.TestCase):
}},
kb.container_images_prepare(
template_file=TEMPLATE_PATH,
output_env_file=constants.CONTAINER_DEFAULTS_ENVIRONMENT,
output_env_file=CONTAINER_DEFAULTS_ENVIRONMENT,
output_images_file='container_images.yaml',
service_filter=[
'OS::TripleO::Services::NeutronServer'
@ -688,7 +688,7 @@ class TestPrepare(base.TestCase):
}},
kb.container_images_prepare(
template_file=TEMPLATE_PATH,
output_env_file=constants.CONTAINER_DEFAULTS_ENVIRONMENT,
output_env_file=CONTAINER_DEFAULTS_ENVIRONMENT,
output_images_file='container_images.yaml',
service_filter=[
'OS::TripleO::Services::NeutronServer',
@ -716,7 +716,7 @@ class TestPrepare(base.TestCase):
kb.container_images_prepare(
template_file=TEMPLATE_PATH,
output_env_file=constants.CONTAINER_DEFAULTS_ENVIRONMENT,
output_env_file=CONTAINER_DEFAULTS_ENVIRONMENT,
output_images_file='container_images.yaml',
mapping_args={},
tag_from_label="n-v",
@ -726,7 +726,7 @@ class TestPrepare(base.TestCase):
kb.container_images_prepare(
template_file=TEMPLATE_PATH,
output_env_file=constants.CONTAINER_DEFAULTS_ENVIRONMENT,
output_env_file=CONTAINER_DEFAULTS_ENVIRONMENT,
output_images_file='container_images.yaml',
mapping_args={"tag": "master"},
tag_from_label="n-v",