Merge lp:~james-page/charm-helpers/os-application-version into lp:charm-helpers
Proposed by
James Page
Status: | Merged |
---|---|
Merged at revision: | 627 |
Proposed branch: | lp:~james-page/charm-helpers/os-application-version |
Merge into: | lp:charm-helpers |
Diff against target: |
67 lines (+42/-1) 2 files modified
charmhelpers/contrib/openstack/utils.py (+28/-1) tests/contrib/openstack/test_openstack_utils.py (+14/-0) |
To merge this branch: | bzr merge lp:~james-page/charm-helpers/os-application-version |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Liam Young (community) | Approve | ||
Review via email: mp+305922@code.launchpad.net |
Description of the change
Add basic helper to set OpenStack application version
Juju 2.0 supports setting of the version of the application that is
deployed; add an openstack centric helper which will set version based on:
a) The provided package, if installed - e.g. 13.1.1
b) Using os_release to determing the codename of the install e.g. newton
This is designed to be called after every hook execution, including assess
status so that if the package version changes outside of charm lifecycle
events, this is also detected and the juju application version is updated.
To post a comment you must log in.
Please consider using fetch.apt_cache it has some extra smarts. fwiw its what get_os_ codename_ package etc uses