mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #51577 from garethgreenaway/merge-2017.7
[2018.3] Merge forward from 2017.7 to 2018.3
This commit is contained in:
commit
e3d5fbe947
4 changed files with 19 additions and 6 deletions
|
@ -235,3 +235,17 @@ Defined in: State
|
|||
__sdb__
|
||||
-------
|
||||
Defined in: SDB
|
||||
|
||||
|
||||
Additional Globals
|
||||
==================
|
||||
|
||||
Defined for: Runners, Execution Modules, Wheels
|
||||
|
||||
* ``__jid__``: The job ID
|
||||
* ``__user__``: The user
|
||||
* ``__tag__``: The jid tag
|
||||
* ``__jid_event__``: A :py:class:`salt.utils.event.NamespacedEvent`.
|
||||
|
||||
:py:class:`NamespacedEvent <salt.utils.event.NamespacedEvent>` defines a single
|
||||
method :py:meth:`fire_event <salt.utils.event.NamespacedEvent.fire_event>`, that takes data and tag. The :ref:`Runner docs <runners>` has examples.
|
||||
|
|
|
@ -329,7 +329,7 @@ class SyncClientMixin(object):
|
|||
print_func=print_func
|
||||
)
|
||||
|
||||
# TODO: document these, and test that they exist
|
||||
# TODO: test that they exist
|
||||
# TODO: Other things to inject??
|
||||
func_globals = {'__jid__': jid,
|
||||
'__user__': data['user'],
|
||||
|
|
|
@ -10,7 +10,6 @@ import collections
|
|||
# Import third party libs
|
||||
import copy
|
||||
import os
|
||||
import copy
|
||||
import logging
|
||||
from salt.ext import six
|
||||
|
||||
|
@ -157,7 +156,7 @@ def get(key,
|
|||
'skipped.', default, ret, type(ret).__name__
|
||||
)
|
||||
elif isinstance(default, list):
|
||||
ret = salt.utils.data.traverse_dict_and_list(
|
||||
ret = salt.utils.data.traverse_dict_and_list( # pylint: disable=redefined-variable-type
|
||||
pillar_dict,
|
||||
key,
|
||||
[],
|
||||
|
@ -345,7 +344,7 @@ def ls(*args):
|
|||
salt '*' pillar.ls
|
||||
'''
|
||||
|
||||
return list(items(*args).keys())
|
||||
return list(items(*args))
|
||||
|
||||
|
||||
def item(*args, **kwargs):
|
||||
|
@ -544,7 +543,7 @@ def keys(key, delimiter=DEFAULT_TARGET_DELIM):
|
|||
if not isinstance(ret, dict):
|
||||
raise ValueError("Pillar value in key {0} is not a dict".format(key))
|
||||
|
||||
return ret.keys()
|
||||
return list(ret)
|
||||
|
||||
|
||||
def file_exists(path, saltenv=None):
|
||||
|
|
|
@ -110,7 +110,7 @@ class GemModuleTest(ModuleCase):
|
|||
gem.sources_add
|
||||
gem.sources_remove
|
||||
'''
|
||||
source = 'http://gems.github.com'
|
||||
source = 'http://gemcutter.org/'
|
||||
|
||||
self.run_function('gem.sources_add', [source])
|
||||
sources_list = self.run_function('gem.sources_list')
|
||||
|
|
Loading…
Add table
Reference in a new issue