Update copy_nrpe_checks() for optional c-h directory (#247) (#251)
The function assumed that the charmhelpers directory would always be in
the hooks directory. However, with PY3 it can be very tricky to try to
keep a symlink in the hooks directory. Therefore, for some PY3
non-reactive charms, charmhelpers was moved to the CHARMDIR. However,
this caused this function to fail.
The change here is to search for the charmhelpers directory in both
CHARMDIR and CHARMDIR/hooks and then use that.
Add "proposed" to get_os_codename_install_source function (#242)
In fetch.ubuntu.add_source() the "proposed" and "distro-proposed"
strings are synonyms for each other. However, in the
contrib.openstack.utils.get_os_codename_install_source() function the
"proposed" string is not handled. This patch just adds "proposed" to
the get_os_codename_install_source function.
Change the primitive python dict to an OrderedDict to ensure
consistent rendering of the haproxy.conf file. The frontends
variable referenced in the haproxy.conf template uses simple
dict traversal which is not guaranteed to provide consistent
ordreing across hook invocations.
Make the harden and pausable_restart_on_change lazy (#234)
* Make the harden and pausable_restart_on_change lazy
Due to py3 work in some charms, these decorators now take callables
in their parameter list as an option, so that load time decorator usage
doesn't have to force a long function call; it makes the parameters lazy
and only evaluated when the decorated function is called.
Also fix a load of linting errors that had been building up.
* Add W504 to travis CI run -- linebreak after binary is typical in charm-helpers