charms.openstack does not provide a way for charm author to provide multiple templates with same basename

Bug #1872689 reported by Frode Nordahl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
charms.openstack
Fix Released
High
Frode Nordahl

Bug Description

The ``render`` method of the ``charmhelpers.contrib.openstack.OSConfigRenderer`` class provides a way for charm authors to provide templates with equal basenames but different absolute paths. This is also useful for templates that have an ambiguous basename.

The way this works is that if a template is not found while rendering the render loop will retry with a source path built from the absolute path of the target configuration file with path separators replaced by underscores.

We should implement this for ``charms.openstack``.

Frode Nordahl (fnordahl)
Changed in charms.openstack:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Frode Nordahl (fnordahl)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charms.openstack (master)

Fix proposed to branch: master
Review: https://review.opendev.org/719920

Changed in charms.openstack:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charms.openstack (master)

Reviewed: https://review.opendev.org/719920
Committed: https://git.openstack.org/cgit/openstack/charms.openstack/commit/?id=f9bd43ff5ddec906365dbc8a898443b91a19d554
Submitter: Zuul
Branch: master

commit f9bd43ff5ddec906365dbc8a898443b91a19d554
Author: Frode Nordahl <email address hidden>
Date: Tue Apr 14 13:16:27 2020 +0200

    Support charms providing templates with same basename

    Replicate functionaltiy of ``charmhelpers.contrib.openstack``
    where template files named after the absolute path of target
    with path separators repalced by underscores can be used.

    This convention is useful when charm author need to provide
    templates with ambiguous basename.

    Change-Id: I534fe52f38df7d1e409246115836223e90f080bc
    Closes-Bug: #1872689

Changed in charms.openstack:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.