mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Update old utils paths to new paths
This commit is contained in:
parent
dafd2fc61f
commit
ec2a32a106
@ -280,7 +280,7 @@ def list_available(*names, **kwargs):
|
||||
refresh = salt.utils.data.is_true(kwargs.get('refresh', False))
|
||||
_refresh_db_conditional(saltenv, force=refresh)
|
||||
return_dict_always = \
|
||||
salt.utils.is_true(kwargs.get('return_dict_always', False))
|
||||
salt.utils.data.is_true(kwargs.get('return_dict_always', False))
|
||||
if len(names) == 1 and not return_dict_always:
|
||||
pkginfo = _get_package_info(names[0], saltenv=saltenv)
|
||||
if not pkginfo:
|
||||
|
@ -59,7 +59,7 @@ import yaml
|
||||
|
||||
# Import Salt libs
|
||||
import salt.ext.six as six
|
||||
import salt.utils
|
||||
import salt.utils.hashutils
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -189,7 +189,7 @@ def object_present(
|
||||
if not hash_type:
|
||||
hash_type = __opts__['hash_type']
|
||||
try:
|
||||
digest = salt.utils.get_hash(source, form=hash_type)
|
||||
digest = salt.utils.hashutils.get_hash(source, form=hash_type)
|
||||
except IOError as e:
|
||||
ret['result'] = False
|
||||
ret['comment'] = "Could not read local file {0}: {1}".format(
|
||||
|
@ -369,7 +369,7 @@ def upgraded(name,
|
||||
|
||||
if version:
|
||||
# If installed version and new version are the same
|
||||
if salt.utils.compare_versions(
|
||||
if salt.utils.versions.compare(
|
||||
ver1=installed_version,
|
||||
oper="==",
|
||||
ver2=version):
|
||||
@ -383,7 +383,7 @@ def upgraded(name,
|
||||
''.format(name, installed_version)
|
||||
else:
|
||||
# If installed version is older than new version
|
||||
if salt.utils.compare_versions(
|
||||
if salt.utils.versions.compare(
|
||||
ver1=installed_version, oper="<", ver2=version):
|
||||
ret['pchanges'] = {
|
||||
name: 'Version {0} will be upgraded to Version {1} '
|
||||
@ -429,6 +429,6 @@ def upgraded(name,
|
||||
# Get list of installed packages after 'chocolatey.install'
|
||||
post_install = __salt__['chocolatey.list'](local_only=True)
|
||||
|
||||
ret['changes'] = salt.utils.compare_dicts(pre_install, post_install)
|
||||
ret['changes'] = salt.utils.data.compare_dicts(pre_install, post_install)
|
||||
|
||||
return ret
|
||||
|
@ -489,7 +489,7 @@ class LogSettingsParserTests(TestCase):
|
||||
# Check log file logger
|
||||
self.assertEqual(self.log_setup.log_level_logfile, log_level_logfile)
|
||||
|
||||
@skipIf(salt.utils.is_windows(), 'Windows uses a logging listener')
|
||||
@skipIf(salt.utils.platform.is_windows(), 'Windows uses a logging listener')
|
||||
def test_log_created(self):
|
||||
'''
|
||||
Tests that log file is created
|
||||
|
Loading…
Reference in New Issue
Block a user