Add Mock to state.sls

This commit is contained in:
Thomas S Hatch 2016-01-01 12:52:45 -07:00 committed by rallytime
parent fb0cbd185e
commit 6f757b8c81

View file

@ -484,6 +484,11 @@ def highstate(test=None,
"roots" of salt directories (with their own minion config, pillars,
file_roots) to run highstate out of.
mock:
The mock option allows for the state run to execute without actually
calling any states. This then returns a mocked return which will show
the requisite ordering as well as fully validate the state run.
CLI Example:
.. code-block:: bash
@ -624,6 +629,11 @@ def sls(mods,
"roots" of salt directories (with their own minion config, pillars,
file_roots) to run highstate out of.
mock:
The mock option allows for the state run to execute without actually
calling any states. This then returns a mocked return which will show
the requisite ordering as well as fully validate the state run.
CLI Example:
.. code-block:: bash
@ -703,9 +713,16 @@ def sls(mods,
)
try:
st_ = salt.state.HighState(opts, pillar, kwargs.get('__pub_jid'), proxy=__proxy__)
st_ = salt.state.HighState(opts,
pillar,
kwargs.get('__pub_jid'),
proxy=__proxy__,
mock=kwargs.get('mock', False))
except NameError:
st_ = salt.state.HighState(opts, pillar, kwargs.get('__pub_jid'))
st_ = salt.state.HighState(opts,
pillar,
kwargs.get('__pub_jid'),
mock=kwargs.get('mock', False))
umask = os.umask(0o77)
if kwargs.get('cache'):