* Adding new function for enabling service
* add a service_enable function in charmhelpers/core/host.py
* add a unit test for service_enable function in tests/core/test_host.py
Some charms, such as charm-glance (concerning bug/1960636), requires calling
an additional function during installation to enable services. This new function
can be used to address such a problem.
The current code:
self.profile_name = op.get('crush-profile', profile_name)
will only default to profile_name if the 'crush-profile' key
doesn't exist in the op dictionary. If the 'crush-profile' key
exists and is set to None, the default profile_name is not used.
This change will use the default profile_name in both cases.
Utilities for configuring deferred restarts NRPE checks (#669)
* Utilities for configuring NRPE checks for deferred service restarts
* Added new NRPE plugin 'check_deferred_restarts.py'. Charms can use
copy_nrpe_checks() to move it to the nagios plugin directory.
* Added {add,remove}_deferred_restarts_check utilities for adding and
removing the NRPE checks.
* Improve docstrings and error handling
* nrpe.py
* Add docstrings to the new functions.
* check_deferred_restarts.py
* Add copyright header.
* Improve error handling for known error conditions.
* Improve docstrings to add raised exceptions.