mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Remove the compact outputter
This outputter was originally introduced in the 2014.7 branch, but quickly regressed and never worked in a released version of Salt. Since then, its existence has caused much confusion. In addition, this outputter actually was supposed to accomplish the same thing as setting "state_verbose" to False. Therefore, it doesn't make sense to maintain two outputters (this one and the highstate outputter). Fixes #18614
This commit is contained in:
parent
fb061a1619
commit
eed0a9d23d
@ -12,7 +12,6 @@ Follow one of the below links for further information and examples
|
||||
:toctree:
|
||||
:template: autosummary.rst.tmpl
|
||||
|
||||
compact
|
||||
highstate
|
||||
json_out
|
||||
key
|
||||
|
@ -1,6 +0,0 @@
|
||||
===================
|
||||
salt.output.compact
|
||||
===================
|
||||
|
||||
.. automodule:: salt.output.compact
|
||||
:members:
|
@ -390,6 +390,12 @@ Execution Module Deprecations
|
||||
instead.
|
||||
|
||||
|
||||
Outputter Module Deprecations
|
||||
-----------------------------
|
||||
|
||||
- The ``compact`` outputter has been removed. Set ``state_verbose`` to ``False`` instead.
|
||||
|
||||
|
||||
Runner Module Deprecations
|
||||
--------------------------
|
||||
|
||||
|
@ -1,33 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
'''
|
||||
Display compact output data structure
|
||||
=====================================
|
||||
|
||||
Example output::
|
||||
'saltdev': {'test_|-always-passes_|-foo_|-succeed_without_changes': {'comment': 'Success!', 'name': 'foo', 'start_time': '05:16:26.111814', 'result': True, 'duration': 1, '__run_num__': 0, 'changes': {}}, 'test_|-my-custom-combo_|-foo_|-configurable_test_state': {'comment': 'bar.baz', 'name': 'foo', 'start_time': '05:16:26.117177', 'result': False, 'duration': 1, '__run_num__': 4, 'changes': {'testing': {'new': 'Something pretended to change', 'old': 'Unchanged'}}}, 'test_|-always-fails_|-foo_|-fail_without_changes': {'comment': 'Failure!', 'name': 'foo', 'start_time': '05:16:26.113124', 'result': False, 'duration': 1, '__run_num__': 1, 'changes': {}}, 'test_|-always-changes-and-succeeds_|-foo_|-succeed_with_changes': {'comment': 'Success!', 'name': 'foo', 'start_time': '05:16:26.114570', 'result': True, 'duration': 0, '__run_num__': 2, 'changes': {'testing': {'new': 'Something pretended to change', 'old': 'Unchanged'}}}, 'test_|-always-changes-and-fails_|-foo_|-fail_with_changes': {'comment': 'Failure!', 'name': 'foo', 'start_time': '05:16:26.115561', 'result': False, 'duration': 1, '__run_num__': 3, 'changes': {'testing': {'new': 'Something pretended to change', 'old': 'Unchanged'}}}}}{'myminion': {'foo': {'list': ['Hello', 'World'], 'bar': 'baz', 'dictionary': {'abc': 123, 'def': 456}}}}
|
||||
'''
|
||||
from __future__ import absolute_import
|
||||
|
||||
# Import salt libs
|
||||
import salt.output.highstate
|
||||
|
||||
|
||||
def output(data):
|
||||
'''
|
||||
Rather basic....
|
||||
'''
|
||||
tmp = {}
|
||||
for min_ in data:
|
||||
for process in data[min_]:
|
||||
add = False
|
||||
if data[min_][process]['result'] is False:
|
||||
add = True
|
||||
elif data[min_][process]['changes']:
|
||||
add = True
|
||||
if add is True:
|
||||
if min_ not in tmp:
|
||||
tmp[min_] = {process: data[min_][process]}
|
||||
else:
|
||||
tmp[min_][process] = {process: data[min_][process]}
|
||||
|
||||
return salt.output.highstate.output(tmp)
|
Loading…
Reference in New Issue
Block a user