Skip to content

Commit

Permalink
Merge pull request saltstack#47731 from rallytime/lxc-state-warning
Browse files Browse the repository at this point in the history
Remove deprecation warning until saltstack#35523 is resolved
  • Loading branch information
Nicole Thomas authored May 21, 2018
2 parents 44e9e53 + 3d0f71b commit 4da4560
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions salt/states/lxc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
__docformat__ = 'restructuredtext en'

# Import salt libs
import salt.utils.versions
from salt.exceptions import CommandExecutionError, SaltInvocationError


Expand Down Expand Up @@ -681,8 +680,10 @@ def edited_conf(name, lxc_conf=None, lxc_conf_unset=None):
This state is unsuitable for setting parameters that appear more than
once in an LXC config file, or parameters which must appear in a
certain order (such as when configuring more than one network
interface). It is slated to be replaced, and as of version 2015.5.0 it
is deprecated.
interface).
`Issue #35523`_ was opened to track the addition of a suitable replacement
or fix.
Edit LXC configuration options
Expand All @@ -704,18 +705,10 @@ def edited_conf(name, lxc_conf=None, lxc_conf_unset=None):
- network.ipv4.ip: 10.0.3.6
- lxc_conf_unset:
- lxc.utsname
.. _`Issue #35523`: https://github.com/saltstack/salt/issues/35523
'''
# Until a reasonable alternative for this state function is created, we need
# to keep this function around and cannot officially remove it. Progress of
# the new function will be tracked in https://github.com/saltstack/salt/issues/35523
salt.utils.versions.warn_until(
'Fluorine',
'This state is unsuitable for setting parameters that appear more '
'than once in an LXC config file, or parameters which must appear in '
'a certain order (such as when configuring more than one network '
'interface). It is slated to be replaced, and as of version 2015.5.0 '
'it is deprecated.'
)
if __opts__['test']:
return {'name': name,
'comment': '{0} lxc.conf will be edited'.format(name),
Expand Down

0 comments on commit 4da4560

Please sign in to comment.