Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package salt for openSUSE:Factory checked in at 2022-02-11 23:06:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/salt (Old) and /work/SRC/openSUSE:Factory/.salt.new.1956 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "salt" Fri Feb 11 23:06:50 2022 rev:125 rq:952700 version:3004 Changes: -------- --- /work/SRC/openSUSE:Factory/salt/salt.changes 2022-02-04 00:45:50.961317194 +0100 +++ /work/SRC/openSUSE:Factory/.salt.new.1956/salt.changes 2022-02-11 23:07:25.930609617 +0100 @@ -1,0 +2,21 @@ +Tue Feb 8 13:53:36 UTC 2022 - Pablo Su??rez Hern??ndez <pablo.suarezhernan...@suse.com> + +- Update generated documentation to 3004 + +------------------------------------------------------------------- +Tue Feb 8 12:02:04 UTC 2022 - Pablo Su??rez Hern??ndez <pablo.suarezhernan...@suse.com> + +- Expose missing "ansible" module functions in Salt 3004 (bsc#1195625) + +- Added: + * add-missing-ansible-module-functions-to-whitelist-in.patch + +------------------------------------------------------------------- +Mon Feb 7 10:33:28 UTC 2022 - Alexander Graul <alexander.gr...@suse.com> + +- Fix salt-call event.send with pillar or grains + +- Added: + * fix-salt-call-event.send-call-with-grains-and-pillar.patch + +------------------------------------------------------------------- New: ---- add-missing-ansible-module-functions-to-whitelist-in.patch fix-salt-call-event.send-call-with-grains-and-pillar.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ salt.spec ++++++ --- /var/tmp/diff_new_pack.EYpcNs/_old 2022-02-11 23:07:27.342613538 +0100 +++ /var/tmp/diff_new_pack.EYpcNs/_new 2022-02-11 23:07:27.342613538 +0100 @@ -275,6 +275,10 @@ Patch68: fix-inspector-module-export-function-bsc-1097531-481.patch # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/482 Patch69: drop-serial-from-event.unpack-in-cli.batch_async.patch +# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/485 +Patch70: add-missing-ansible-module-functions-to-whitelist-in.patch +# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/61256 +Patch71: fix-salt-call-event.send-call-with-grains-and-pillar.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ _lastrevision ++++++ --- /var/tmp/diff_new_pack.EYpcNs/_old 2022-02-11 23:07:27.426613771 +0100 +++ /var/tmp/diff_new_pack.EYpcNs/_new 2022-02-11 23:07:27.426613771 +0100 @@ -1,3 +1,3 @@ -5f6617c92144fc48a0644695487050121351c5ba +e2c4840e38a6c4ab52bdba40139d9fb461d9b754 (No newline at EOF) ++++++ add-missing-ansible-module-functions-to-whitelist-in.patch ++++++ >From aec7965f19f55d3d33893833fd259606d3a7e641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= <psuarezhernan...@suse.com> Date: Tue, 8 Feb 2022 11:53:47 +0000 Subject: [PATCH] Add missing "ansible" module functions to whitelist in Salt 3004 (bsc#1195625) (#485) * Add missing functions to ansible __load__ * Properly get separated copies from list --- salt/modules/ansiblegate.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/salt/modules/ansiblegate.py b/salt/modules/ansiblegate.py index f33be6a00e..7c3a17861a 100644 --- a/salt/modules/ansiblegate.py +++ b/salt/modules/ansiblegate.py @@ -45,7 +45,16 @@ hosts: """ DEFAULT_TIMEOUT = 1200 # seconds (20 minutes) -__load__ = __non_ansible_functions__ = ["help", "list_", "call", "playbooks"][:] +__non_ansible_functions__ = [] + +__load__ = __non_ansible_functions__[:] = [ + "help", + "list_", + "call", + "playbooks", + "discover_playbooks", + "targets", +] def _set_callables(modules): -- 2.35.1 ++++++ fix-salt-call-event.send-call-with-grains-and-pillar.patch ++++++ >From 245bd5f2aab798f7f647ad2d2307c0dd1381c1c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cbosdon...@suse.com> Date: Thu, 18 Nov 2021 14:46:25 +0100 Subject: [PATCH] Fix salt-call event.send call with grains and pillar --- changelog/61252.fixed | 1 + salt/modules/event.py | 4 ++-- tests/pytests/integration/modules/test_event.py | 12 +++++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 changelog/61252.fixed diff --git a/changelog/61252.fixed b/changelog/61252.fixed new file mode 100644 index 0000000000..2692f9b7b7 --- /dev/null +++ b/changelog/61252.fixed @@ -0,0 +1 @@ +Fix salt-call event.event with pillar or grains diff --git a/salt/modules/event.py b/salt/modules/event.py index 03dad5e614..7fe701708b 100644 --- a/salt/modules/event.py +++ b/salt/modules/event.py @@ -216,13 +216,13 @@ def send( if isinstance(with_grains, list): data_dict["grains"] = _dict_subset(with_grains, __grains__) else: - data_dict["grains"] = __grains__ + data_dict["grains"] = __grains__.value() if with_pillar: if isinstance(with_pillar, list): data_dict["pillar"] = _dict_subset(with_pillar, __pillar__) else: - data_dict["pillar"] = __pillar__ + data_dict["pillar"] = __pillar__.value() if with_env_opts: data_dict["saltenv"] = __opts__.get("saltenv", "base") diff --git a/tests/pytests/integration/modules/test_event.py b/tests/pytests/integration/modules/test_event.py index 54087b1b65..8912c1e807 100644 --- a/tests/pytests/integration/modules/test_event.py +++ b/tests/pytests/integration/modules/test_event.py @@ -68,7 +68,14 @@ def test_send(event_listener, salt_master, salt_minion, salt_call_cli): event_tag = random_string("salt/test/event/") data = {"event.fire": "just test it!!!!"} start_time = time.time() - ret = salt_call_cli.run("event.send", event_tag, data=data) + ret = salt_call_cli.run( + "event.send", + event_tag, + data=data, + with_grains=True, + with_pillar=True, + preload={"foo": "bar"}, + ) assert ret.exitcode == 0 assert ret.json assert ret.json is True @@ -82,3 +89,6 @@ def test_send(event_listener, salt_master, salt_minion, salt_call_cli): assert event.data["id"] == salt_minion.id assert event.data["cmd"] == "_minion_event" assert "event.fire" in event.data["data"] + assert event.data["foo"] == "bar" + assert event.data["data"]["grains"]["test_grain"] == "cheese" + assert event.data["data"]["pillar"]["ext_spam"] == "eggs" -- 2.34.1 ++++++ html.tar.bz2 ++++++ /work/SRC/openSUSE:Factory/salt/html.tar.bz2 /work/SRC/openSUSE:Factory/.salt.new.1956/html.tar.bz2 differ: char 11, line 1