mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fixes saltstack/salt#66262 pillar.ls doesn't accept kwargs
This commit is contained in:
parent
176fe04e8d
commit
296f6648f2
3 changed files with 9 additions and 2 deletions
1
changelog/66262.fixed.md
Normal file
1
changelog/66262.fixed.md
Normal file
|
@ -0,0 +1 @@
|
|||
Fixed pillar.ls doesn't accept kwargs
|
|
@ -328,7 +328,7 @@ def obfuscate(*args, **kwargs):
|
|||
|
||||
# naming chosen for consistency with grains.ls, although it breaks the short
|
||||
# identifier rule.
|
||||
def ls(*args):
|
||||
def ls(*args, **kwargs):
|
||||
"""
|
||||
.. versionadded:: 2015.8.0
|
||||
|
||||
|
@ -342,7 +342,7 @@ def ls(*args):
|
|||
salt '*' pillar.ls
|
||||
"""
|
||||
|
||||
return list(items(*args))
|
||||
return list(items(*args, **kwargs))
|
||||
|
||||
|
||||
def item(*args, **kwargs):
|
||||
|
|
|
@ -180,3 +180,9 @@ def test_pillar_keys():
|
|||
test_key = "7:11"
|
||||
res = pillarmod.keys(test_key)
|
||||
assert res == ["12"]
|
||||
|
||||
|
||||
def test_ls_pass_kwargs(pillar_value):
|
||||
with patch("salt.modules.pillar.items", MagicMock(return_value=pillar_value)):
|
||||
ls = sorted(pillarmod.ls(pillarenv="base"))
|
||||
assert ls == ["a", "b"]
|
||||
|
|
Loading…
Add table
Reference in a new issue