Skip to content

Commit

Permalink
Merge pull request #55722 from Ch3LL/dep_utils
Browse files Browse the repository at this point in the history
Deprecate salt/utils/__init__.py functions
  • Loading branch information
dwoz authored Dec 24, 2019
2 parents 81cccd8 + be48a6c commit d073d60
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 1,933 deletions.
4 changes: 2 additions & 2 deletions doc/topics/proxyminion/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ release code-named *2017.7.0*.
Generate baseline proxy minion grains
'''
from __future__ import absolute_import
import salt.utils
import salt.utils.platform

__proxyenabled__ = ['rest_sample']

Expand Down Expand Up @@ -706,7 +706,7 @@ Example from ``salt/grains/rest_sample.py``:
Generate baseline proxy minion grains
'''
from __future__ import absolute_import
import salt.utils
import salt.utils.platform
__proxyenabled__ = ['rest_sample']
Expand Down
2 changes: 1 addition & 1 deletion salt/cloud/clouds/vagrant.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import tempfile

# Import salt libs
import salt.utils
import salt.utils.cloud
import salt.config as config
import salt.client
from salt._compat import ipaddress
Expand Down
2 changes: 1 addition & 1 deletion salt/grains/mdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:maintainer: Jorge Schrauwen <sjorge@blackdot.be>
:maturity: new
:depends: salt.utils, salt.module.cmdmod
:depends: salt.module.cmdmod
:platform: SmartOS
.. versionadded:: nitrogen
Expand Down
2 changes: 1 addition & 1 deletion salt/grains/smartos.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:maintainer: Jorge Schrauwen <sjorge@blackdot.be>
:maturity: new
:depends: salt.utils, salt.ext.six, salt.module.cmdmod
:depends: salt.ext.six, salt.module.cmdmod
:platform: SmartOS
.. versionadded:: nitrogen
Expand Down
2 changes: 1 addition & 1 deletion salt/grains/zfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:maintainer: Jorge Schrauwen <sjorge@blackdot.be>
:maturity: new
:depends: salt.utils, salt.module.cmdmod
:depends: salt.module.cmdmod
:platform: illumos,freebsd,linux
.. versionadded:: 2018.3.0
Expand Down
2 changes: 1 addition & 1 deletion salt/states/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,7 @@ def hardlink(
if user is None:
user = __opts__['user']

if salt.utils.is_windows():
if salt.utils.platform.is_windows():
if group is not None:
log.warning(
'The group argument for {0} has been ignored as this '
Expand Down
4 changes: 2 additions & 2 deletions salt/states/gem.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'''
from __future__ import absolute_import, unicode_literals, print_function

import salt.utils
import salt.utils.versions

import re
import logging
Expand Down Expand Up @@ -99,7 +99,7 @@ def installed(name, # pylint: disable=C0103
# Clear out comparison from version and whitespace
desired_version = re.sub(cmpr, '', version).strip()

if salt.utils.compare_versions(installed_version,
if salt.utils.versions.compare(installed_version,
cmpr,
desired_version):
ret['result'] = True
Expand Down
Loading

0 comments on commit d073d60

Please sign in to comment.