diff --git a/tripleo_common/constants.py b/tripleo_common/constants.py index 585e7c98f..4286dd7f3 100644 --- a/tripleo_common/constants.py +++ b/tripleo_common/constants.py @@ -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 diff --git a/tripleo_common/tests/image/test_kolla_builder.py b/tripleo_common/tests/image/test_kolla_builder.py index ef55e4794..2fcc91740 100644 --- a/tripleo_common/tests/image/test_kolla_builder.py +++ b/tripleo_common/tests/image/test_kolla_builder.py @@ -21,7 +21,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 @@ -39,7 +38,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 = six.u("""container_images: - imagename: docker.io/tripleomaster/heat-docker-agents-centos:latest @@ -481,7 +481,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'], @@ -508,7 +508,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={ @@ -535,7 +535,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'], @@ -569,7 +569,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', @@ -605,7 +605,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, @@ -631,7 +631,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={ @@ -656,7 +656,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' @@ -689,7 +689,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', @@ -717,7 +717,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", @@ -727,7 +727,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",