Handle migrated / moved packages in charm_helpers_sync
Some legacy charms use `charm_helpers_sync.py` to vendor in portions of
the charmhelpers library, rather than installing the full package. The
recent move of `charmshelpers.contrib.python` to
`charmhelpers.fetch.python` was broken with sync, despite the import
aliases put into place to maintain backward compatibility. This should
resolve that by handling migrations automatically when syncing.
Allow None state from charm_func_with_configs (#270)
* Allow None state from charm_func_with_configs
The charm_func_with_configs function is passed to
_ows_check_charm_func in order to allow unique status checks per
charm. It works when the charm sets a state like blocked or
maintenance. However, when you want the custom
charm_func_with_configs to do nothing and allow the rest of the
assess status code to run unimpeded there is no state setting to do
this. If set to None the code currently Tracebacks. "active" will
work but the charm_func_with_configs may not have the full
perspective to confirm this is the case.
Allow the charm_func_with_configs to return None, None when no action
is required.
Example:
def charm_func_with_configs():
# Unique status check
if key != value:
# Unique status result
return "blocked", "This charm requires key to equal value"
# The key does equal value so let the rest of asses status code
# determine the state as normal.
return None, None
9d84ec4...
by
Dmitrii Shcherbakov <email address hidden>
Introduce get_distrib_codename helper (#268)
Adds a simple helper to return a distribution codename.
Add a method that returns a list of OpenStack packages which are
installed and use semantic versioning. This is the first step
in resolving Bug #1741628. charms.openstack can then use this list
to calculate the installed OpenStack version.