Fix refs to cmd.run* with quiet=True

This changes these references to use output_loglevel='quiet'
This commit is contained in:
Erik Johnson 2013-12-11 18:28:32 -06:00
parent 1cfc0ecc6c
commit dff0fdbc87
4 changed files with 16 additions and 4 deletions

View File

@ -2022,6 +2022,7 @@ def _script(status,
command,
cwd=cwd,
stdin=stdin,
output_loglevel=kwargs.get('output_loglevel', 'info'),
quiet=kwargs.get('quiet', False),
runas=runas,
shell=shell,

View File

@ -56,7 +56,7 @@ def _dscl(cmd, ctype='create'):
source, noderoot = 'localhost', '/Local/Default'
return __salt__['cmd.run_all'](
'dscl {0} -{1} {2}{3}'.format(source, ctype, noderoot, cmd),
quiet=True if ctype == 'passwd' else False
output_loglevel='quiet' if ctype == 'passwd' else False
)

View File

@ -211,7 +211,7 @@ def _chroot_exec(root, cmd):
root,
sh_,
cmd)
res = __salt__['cmd.run_all'](cmd, quiet=True)
res = __salt__['cmd.run_all'](cmd, output_loglevel='quiet')
# Kill processes running in the chroot
for i in range(6):

View File

@ -410,6 +410,7 @@ def run(name,
env=(),
stateful=False,
umask=None,
output_loglevel='info',
quiet=False,
timeout=None,
**kwargs):
@ -453,9 +454,16 @@ def run(name,
umask
The umask (in octal) to use when running the command.
output_loglevel
Control the loglevel at which the output from the command is logged.
Note that the command being run will still be logged at loglevel INFO
regardless, unless ``quiet`` is used for this value.
quiet
The command will be executed quietly, meaning no log entries of the
actual command or its return data
actual command or its return data. This is deprecated as of the
**Hydrogen** release, and is being replaced with
``output_loglevel: quiet``.
timeout
If the command has not terminated after timeout seconds, send the
@ -525,6 +533,7 @@ def run(name,
'shell': shell or __grains__['shell'],
'env': env,
'umask': umask,
'output_loglevel': output_loglevel,
'quiet': quiet}
try:
@ -536,7 +545,9 @@ def run(name,
# Wow, we passed the test, run this sucker!
if not __opts__['test']:
try:
cmd_all = __salt__['cmd.run_all'](name, timeout=timeout, **cmd_kwargs)
cmd_all = __salt__['cmd.run_all'](
name, timeout=timeout, **cmd_kwargs
)
except CommandExecutionError as err:
ret['comment'] = str(err)
return ret