API Documentation¶
- charmhelpers.core package
- charmhelpers.contrib package
- charmhelpers.contrib.ansible package
- charmhelpers.contrib.charmhelpers package
- charmhelpers.contrib.charmsupport package
- charmhelpers.contrib.hahelpers package
- charmhelpers.contrib.network package
- charmhelpers.contrib.openstack package
- charmhelpers.contrib.peerstorage package
- charmhelpers.contrib.python package
- charmhelpers.contrib.saltstack package
- charmhelpers.contrib.ssl package
- charmhelpers.contrib.storage package
- charmhelpers.contrib.templating package
- charmhelpers.contrib.unison package
- charmhelpers.fetch package
- charmhelpers.payload package
- charmhelpers.cli package
- charmhelpers.coordinator package
-
charmhelpers.
deprecate
(warning, date=None, log=None)¶ Add a deprecation warning the first time the function is used. The date, which is a string in semi-ISO8660 format indicate the year-month that the function is officially going to be removed.
usage:
@deprecate(‘use core/fetch/add_source() instead’, ‘2017-04’) def contributed_add_source_thing(…):
…And it then prints to the log ONCE that the function is deprecated. The reason for passing the logging function (log) is so that hookenv.log can be used for a charm if needed.
Parameters: - warning – String to indicat where it has moved ot.
- date – optional sting, in YYYY-MM format to indicate when the function will definitely (probably) be removed.
- log – The log function to call to log. If not, logs to stdout