From b56d87deb3a30855744c0b80605770eaa5c3246c Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Wed, 21 Mar 2018 09:42:12 +1300 Subject: [PATCH] Represent image prepare defaults in new heat param format The heat parameter ContainerImagePrepare is a list of dicts where each entry is a single prepare call. This represents the defaults in the new format in preparation for a function which consumes this new format. It removes tag_from_label from the substitution dict, because its not a substitution, its an actual argument to prepare. Change-Id: I8952ce7a19a67b89d8db5e90fbe65620425ee945 Blueprint: container-prepare-workflow --- tripleo_common/image/kolla_builder.py | 24 ++++++++++--------- .../tests/image/test_kolla_builder.py | 2 -- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tripleo_common/image/kolla_builder.py b/tripleo_common/image/kolla_builder.py index 685d51826..fa5a03790 100644 --- a/tripleo_common/image/kolla_builder.py +++ b/tripleo_common/image/kolla_builder.py @@ -25,19 +25,21 @@ import yaml from tripleo_common.image import base from tripleo_common.image import image_uploader - -CONTAINER_IMAGES_DEFAULTS = { - 'namespace': 'docker.io/tripleomaster', - 'ceph_namespace': 'docker.io/ceph', - 'ceph_image': 'daemon', - 'ceph_tag': 'tag-stable-3.0-luminous-centos-7', - 'name_prefix': 'centos-binary-', - 'name_suffix': '', +CONTAINER_IMAGE_PREPARE_PARAM = [{ 'tag_from_label': 'rdo_version', - 'tag': 'current-tripleo', - 'neutron_driver': None, -} + 'set': { + 'namespace': 'docker.io/tripleomaster', + 'ceph_namespace': 'docker.io/ceph', + 'ceph_image': 'daemon', + 'ceph_tag': 'tag-stable-3.0-luminous-centos-7', + 'name_prefix': 'centos-binary-', + 'name_suffix': '', + 'tag': 'current-tripleo', + 'neutron_driver': None, + } +}] +CONTAINER_IMAGES_DEFAULTS = CONTAINER_IMAGE_PREPARE_PARAM[0]['set'] DEFAULT_TEMPLATE_FILE = os.path.join(sys.prefix, 'share', 'tripleo-common', 'container-images', diff --git a/tripleo_common/tests/image/test_kolla_builder.py b/tripleo_common/tests/image/test_kolla_builder.py index 218ebd522..fab21cf71 100644 --- a/tripleo_common/tests/image/test_kolla_builder.py +++ b/tripleo_common/tests/image/test_kolla_builder.py @@ -171,7 +171,6 @@ class TestKollaImageBuilderTemplate(base.TestCase): 'name_prefix': 'centos-binary-', 'name_suffix': '', 'tag': 'current-tripleo', - 'tag_from_label': 'rdo_version', 'neutron_driver': None }, builder.container_images_template_inputs() @@ -186,7 +185,6 @@ class TestKollaImageBuilderTemplate(base.TestCase): 'name_prefix': 'prefix-', 'name_suffix': '-suffix', 'tag': 'master', - 'tag_from_label': 'rdo_version', 'neutron_driver': 'ovn' }, builder.container_images_template_inputs(