lp:~james-page/charm-helpers/configure_source_proposed
- Get this branch:
- bzr branch lp:~james-page/charm-helpers/configure_source_proposed
Branch merges
- Matthew Wedgwood (community): Approve
-
Diff: 188 lines (+75/-12)4 files modifiedcharmhelpers/core/host.py (+16/-6)
charmhelpers/fetch/__init__.py (+9/-1)
tests/core/test_host.py (+39/-5)
tests/fetch/test_fetch.py (+11/-0)
Branch information
Recent revisions
- 40. By James Page
-
Add 'proposed' as a valid option for add source.
This included adding the lsb_release function to the host helpers so the
release on the host can be determined.Also tidied a few bits of lint.
- 38. By Matthew Wedgwood
-
[thedac] Fix volume_map dictionary check. Correct hookenv and host imports in volumes.py
- 36. By Liam Young
-
[jamespage]
Redux of configure_source code in fetch helper1) Fixed up a number of bugs and issues in the original code
2) Implement correct cloud: handling
3) Added tests for everything.
- 35. By James Page
-
[gandelman-a]
This adds some small linux-specific utility helpers useful when working with block devices and storage. They are mostly derived from the Openstack helpers but renamed and tests added.
- 34. By James Page
-
[gandelman-a]
Fixup broken test to ensure that services are only restarted once.
host.core.
restart_ on_change( ): Ensure restarts happen as described in map. - 33. By James Page
-
[stub] Misc fixes around use of Serializable including:
1) Make Serializable pickleable
2) Ensure string results are usable strings
- 32. By Matthew Wedgwood
-
[james-page] Refactoring of service control code in host helper
1) Use 'service' command for all service control
Detecting upstart and init.d configuration files is overkill; this is
exactly what the 'service' command is design todo and it also deals with
saucy onwards where init.d and upstart configuration with the same
name might be installed.'service' will always do the right thing
2) Added restart and reload helpers
reload detects an error (say the service is not running) and will fallback
to restart if so.This is inline with the openstack charm helpers code.
- 31. By Matthew Wedgwood
-
[james-page] Various refactoring + additions to hookenv
1) cached decorator
Allows caching of function + args to avoid repeated calls out the cli
to juju commands.2) Normalizing missing unit/config/
relation data to None relation_
get('missing' ) == None
config('missing') == None
unit_get('missing') == None3) Normalized use of the Serializable object a bit
And added a unit test to cover missing attribute lookups
Question: maybe this should actually return 'None' rather than throwing
an exception inline with 2).4) Tweaks some tests to be closer to juju behaviour with json
5) Tidied misc pep8/pylint warnings.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:charm-helpers