Update old utils paths to new utils paths

This commit is contained in:
rallytime 2018-04-05 13:47:22 -04:00
parent 0a297e7319
commit 177c686b52
No known key found for this signature in database
GPG key ID: E8F1A4B90D0DEA19
2 changed files with 3 additions and 3 deletions

View file

@ -43,13 +43,13 @@ class PublisherACL(object):
return False
def user_is_whitelisted(self, user):
return salt.utils.check_whitelist_blacklist(user, whitelist=self.blacklist.get('users', []))
return salt.utils.stringutils.check_whitelist_blacklist(user, whitelist=self.blacklist.get('users', []))
def cmd_is_whitelisted(self, cmd):
# If this is a regular command, it is a single function
if isinstance(cmd, str):
cmd = [cmd]
for fun in cmd:
if salt.utils.check_whitelist_blacklist(fun, whitelist=self.blacklist.get('modules', [])):
if salt.utils.stringutils.check_whitelist_blacklist(fun, whitelist=self.blacklist.get('modules', [])):
return True
return False

View file

@ -857,7 +857,7 @@ def _virtual(osdata):
# Check container type after hypervisors, to avoid variable overwrite on containers running in virtual environment.
if os.path.isfile('/proc/1/cgroup'):
try:
with salt.utils.fopen('/proc/1/cgroup', 'r') as fhr:
with salt.utils.files.fopen('/proc/1/cgroup', 'r') as fhr:
fhr_contents = fhr.read()
if ':/lxc/' in fhr_contents:
grains['virtual_subtype'] = 'LXC'