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, command,
cwd=cwd, cwd=cwd,
stdin=stdin, stdin=stdin,
output_loglevel=kwargs.get('output_loglevel', 'info'),
quiet=kwargs.get('quiet', False), quiet=kwargs.get('quiet', False),
runas=runas, runas=runas,
shell=shell, shell=shell,

View File

@ -56,7 +56,7 @@ def _dscl(cmd, ctype='create'):
source, noderoot = 'localhost', '/Local/Default' source, noderoot = 'localhost', '/Local/Default'
return __salt__['cmd.run_all']( return __salt__['cmd.run_all'](
'dscl {0} -{1} {2}{3}'.format(source, ctype, noderoot, cmd), '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, root,
sh_, sh_,
cmd) cmd)
res = __salt__['cmd.run_all'](cmd, quiet=True) res = __salt__['cmd.run_all'](cmd, output_loglevel='quiet')
# Kill processes running in the chroot # Kill processes running in the chroot
for i in range(6): for i in range(6):

View File

@ -410,6 +410,7 @@ def run(name,
env=(), env=(),
stateful=False, stateful=False,
umask=None, umask=None,
output_loglevel='info',
quiet=False, quiet=False,
timeout=None, timeout=None,
**kwargs): **kwargs):
@ -453,9 +454,16 @@ def run(name,
umask umask
The umask (in octal) to use when running the command. 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 quiet
The command will be executed quietly, meaning no log entries of the 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 timeout
If the command has not terminated after timeout seconds, send the If the command has not terminated after timeout seconds, send the
@ -525,6 +533,7 @@ def run(name,
'shell': shell or __grains__['shell'], 'shell': shell or __grains__['shell'],
'env': env, 'env': env,
'umask': umask, 'umask': umask,
'output_loglevel': output_loglevel,
'quiet': quiet} 'quiet': quiet}
try: try:
@ -536,7 +545,9 @@ def run(name,
# Wow, we passed the test, run this sucker! # Wow, we passed the test, run this sucker!
if not __opts__['test']: if not __opts__['test']:
try: 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: except CommandExecutionError as err:
ret['comment'] = str(err) ret['comment'] = str(err)
return ret return ret