Пример #1
0
def merge_templates(overcloud_roles):
    """Merge the Overcloud Roles with overcloud.yaml using merge from
    tripleo_heat_merge

    See tripleo-heat-templates for further details.
    """

    # TODO(dmatthews): Add exception handling to catch merge errors

    scale_params = generate_scaling_params(overcloud_roles)
    overcloud_source = _join_template_path("overcloud-source.yaml")
    block_storage = _join_template_path("block-storage.yaml")
    swift_source = _join_template_path("swift-source.yaml")
    swift_storage_source = _join_template_path("swift-storage-source.yaml")
    ssl_src_path = _join_template_path("ssl-source.yaml")
    swift_deploy = _join_template_path("swift-deploy.yaml")
    nova_compute_config = _join_template_path("nova-compute-config.yaml")

    # Adding all templates like in tripleo-heat-templates Makefile.
    # They will be used by merge.py according to scale_params. So the
    # decision what template to pick will not be here.
    merged_paths = [overcloud_source, block_storage, swift_source,
                    swift_storage_source, ssl_src_path, swift_deploy,
                    nova_compute_config]

    template = merge.merge(merged_paths, None, None,
                           included_template_dir=cfg.CONF.tht_local_dir,
                           scaling=scale_params)

    return template
Пример #2
0
def merge_templates(overcloud_roles):
    """Merge the Overcloud Roles with overcloud.yaml using merge from
    tripleo_heat_merge

    See tripleo-heat-templates for further details.
    """

    # TODO(dmatthews): Add exception handling to catch merge errors

    scale_params = generate_scaling_params(overcloud_roles)
    overcloud_src_path = _join_template_path("overcloud-source.yaml")
    ssl_src_path = _join_template_path("ssl-source.yaml")
    swift_src_path = _join_template_path("swift-source.yaml")

    template = merge.merge(
        [overcloud_src_path, ssl_src_path, swift_src_path],
        None,
        None,
        included_template_dir=cfg.CONF.tht_local_dir,
        scaling=scale_params,
    )

    return template