Add deprecation message to trafficserver.set_var function

The set_var function has a deprecation notice in the documentation
only for the trafficserver.set_var function, but no warning at the
CLI/logs. This PR adds a "warn_util" message.

Since there haven't been any warnings to the user about the removal
of this function, the version is being bumped from Oxygen to Fluorine
so users have time to adapt as needed.
This commit is contained in:
rallytime 2017-04-19 12:54:47 -06:00
parent 99048b1792
commit 1af4d20cf0

View File

@ -6,6 +6,9 @@ Control Apache Traffic Server
.. versionadded:: 2015.8.0 .. versionadded:: 2015.8.0
''' '''
# Import Salt libs
import salt.utils
def __virtual__(): def __virtual__():
''' '''
@ -237,7 +240,7 @@ def set_var(name, value):
''' '''
Set Traffic Server configuration variable values. Set Traffic Server configuration variable values.
.. deprecated:: Oxygen .. deprecated:: Fluorine
Use ``trafficserver.config`` instead. Use ``trafficserver.config`` instead.
.. code-block:: yaml .. code-block:: yaml
@ -254,6 +257,11 @@ def set_var(name, value):
- value: cdn.site.domain.tld - value: cdn.site.domain.tld
''' '''
salt.utils.warn_until(
'Fluorine',
'The \'set_var\' function has been deprecated and will be removed in Salt '
'{version}. Please use \'trafficserver.config\' instead.'
)
return config(name, value) return config(name, value)