mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #44531 from cloudflare/deprecate-napalm-tpl
Add deprecation notes for the NAPALM native templates
This commit is contained in:
commit
8ba2df1ea0
2 changed files with 23 additions and 2 deletions
|
@ -29,6 +29,7 @@ log = logging.getLogger(__name__)
|
|||
from salt.ext import six
|
||||
import salt.utils.templates
|
||||
import salt.utils.napalm
|
||||
import salt.utils.versions
|
||||
from salt.utils.napalm import proxy_napalm_wrap
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -1095,6 +1096,10 @@ def load_template(template_name,
|
|||
|
||||
To replace the config, set ``replace`` to ``True``.
|
||||
|
||||
.. warning::
|
||||
The support for native NAPALM templates will be dropped in Salt Fluorine.
|
||||
Implicitly, the ``template_path`` argument will be removed.
|
||||
|
||||
template_name
|
||||
Identifies path to the template source.
|
||||
The template can be either stored on the local machine, either remotely.
|
||||
|
@ -1131,6 +1136,9 @@ def load_template(template_name,
|
|||
in order to find the template, this argument must be provided:
|
||||
``template_path: /absolute/path/to/``.
|
||||
|
||||
.. note::
|
||||
This argument will be deprecated beginning with release codename ``Fluorine``.
|
||||
|
||||
template_hash: None
|
||||
Hash of the template file. Format: ``{hash_type: 'md5', 'hsum': <md5sum>}``
|
||||
|
||||
|
@ -1297,7 +1305,11 @@ def load_template(template_name,
|
|||
'out': None
|
||||
}
|
||||
loaded_config = None
|
||||
|
||||
if template_path:
|
||||
salt.utils.versions.warn_until(
|
||||
'Fluorine',
|
||||
'Use of `template_path` detected. This argument will be removed in Salt Fluorine.'
|
||||
)
|
||||
# prechecks
|
||||
if template_engine not in salt.utils.templates.TEMPLATE_REGISTRY:
|
||||
_loaded.update({
|
||||
|
|
|
@ -25,6 +25,7 @@ log = logging.getLogger(__name__)
|
|||
|
||||
# import NAPALM utils
|
||||
import salt.utils.napalm
|
||||
import salt.utils.versions
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------------
|
||||
# state properties
|
||||
|
@ -133,6 +134,10 @@ def managed(name,
|
|||
|
||||
To replace the config, set ``replace`` to ``True``. This option is recommended to be used with caution!
|
||||
|
||||
.. warning::
|
||||
The spport for NAPALM native templates will be dropped beginning with Salt Fluorine.
|
||||
Implicitly, the ``template_path`` argument will be depreacted and removed.
|
||||
|
||||
template_name
|
||||
Identifies path to the template source. The template can be either stored on the local machine,
|
||||
either remotely.
|
||||
|
@ -320,7 +325,11 @@ def managed(name,
|
|||
}
|
||||
}
|
||||
'''
|
||||
|
||||
if template_path:
|
||||
salt.utils.versions.warn_until(
|
||||
'Fluorine',
|
||||
'Use of `template_path` detected. This argument will be removed in Salt Fluorine.'
|
||||
)
|
||||
ret = salt.utils.napalm.default_ret(name)
|
||||
|
||||
# the user can override the flags the equivalent CLI args
|
||||
|
|
Loading…
Add table
Reference in a new issue