Merge lp://qastaging/~gandelman-a/charm-helpers/os_templating_contexts into lp://qastaging/charm-helpers

Proposed by Adam Gandelman
Status: Merged
Merged at revision: 50
Proposed branch: lp://qastaging/~gandelman-a/charm-helpers/os_templating_contexts
Merge into: lp://qastaging/charm-helpers
Diff against target: 1601 lines (+1374/-36)
10 files modified
charmhelpers/contrib/openstack/context.py (+271/-0)
charmhelpers/contrib/openstack/openstack_utils.py (+40/-27)
charmhelpers/contrib/openstack/templates/__init__.py (+2/-0)
charmhelpers/contrib/openstack/templates/ceph.conf (+11/-0)
charmhelpers/contrib/openstack/templates/haproxy.cfg (+37/-0)
charmhelpers/contrib/openstack/templates/openstack_https_frontend (+23/-0)
charmhelpers/contrib/openstack/templating.py (+261/-0)
tests/contrib/openstack/test_openstack_utils.py (+43/-9)
tests/contrib/openstack/test_os_contexts.py (+454/-0)
tests/contrib/openstack/test_os_templating.py (+232/-0)
To merge this branch: bzr merge lp://qastaging/~gandelman-a/charm-helpers/os_templating_contexts
Reviewer Review Type Date Requested Status
Adam Gandelman (community) Needs Resubmitting
James Page Needs Fixing
Review via email: mp+174090@code.qastaging.launchpad.net

Commit message

A common templating system and context generators for OpenStack charms.

To post a comment you must log in.
Revision history for this message
James Page (james-page) wrote :

More feedback:

1) templating.py/get_loader

    tmpl_dirs = (
        ('essex', os.path.join(templates_dir, 'essex')),
        ('folsom', os.path.join(templates_dir, 'folsom')),
        ('grizzly', os.path.join(templates_dir, 'grizzly')),
        ('havana', os.path.join(templates_dir, 'havana')),
        ('icehouse', os.path.join(templates_dir, 'icehouse')),
    )

Can we drive this off a list of supported released please; if this is a for loop of suchlike they adding a new release is just done in openstack_utils.py

2) templating.py/general

level='ERROR'; hookenv has a constant for this - please use.

3) templating.py/OSConfigTemplate & OSConfigRenderer

Please could these classes grow some pydoc - took me a while to figure out how to use them.

review: Needs Fixing
54. By Adam Gandelman

Capitalize openstack constatns, add icehouse.

55. By Adam Gandelman

Convert openstack release constants to ordered dict. Generate template search list from release constants.

56. By Adam Gandelman

Use logging constants in os templating.py

57. By Adam Gandelman

Add some docs to templating.py

Revision history for this message
Adam Gandelman (gandelman-a) wrote :

Hey James-

Fixed up logging, added some docs.

Good call on constructing the template loader from releases listed in openstack_utils. I needed to adjust those constants to be OrderedDicts.

review: Needs Resubmitting

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches