Repository navigation
Sodium deprecations - #57370
Merged
Merged
Sodium deprecations#57370
Conversation
s0undt3ch
previously approved these changes
May 19, 2020
Contributor
There was a problem hiding this comment.
We could take the time and stop using six.string_types in favor or str on places where code is updated.
DmitryKuzmenko
previously approved these changes
May 19, 2020
Contributor
|
The tests failures are related BTW. |
waynew
force-pushed
the
sodium-deprecations
branch
from
May 20, 2020 17:44
cf5adbd to
bee3442
Compare
Contributor
There was a problem hiding this comment.
As I can see the keystone module was deprecated and have to be removed but I don't see removal of the module in this PR.
Contributor
Author
There was a problem hiding this comment.
That's been punted to the next release - the state was not deprecated, and hasn't been re-written to take advantage of the keystoneng module. Looks like I need to put the docs back, though 😝
Closes saltstack#57362 These arguments are no longer useful, since we no longer support using NAPALM native templates.
It was deprecated and slated for removal in Sodium. Closes saltstack#57363
Closes saltstack#57366 Parameter has been renamed to `refresh`
Closes saltstack#57367 sdecode and sdecode_if_string functionalities have both been moved to decode.
Closes saltstack#57368 - removed obsolete .destroy methods from zeromq channels - removed winexe support from salt.utils.cloud - removed obsolete override_name from salt.utils.context.NamespacedDictWrapper - removed obsolete `show_ipv4` parameter from salt.utils.minions - removed impacket support from salt.utils.smb - removed obsolete salt.transport.Channel, and fixed test.
waynew
force-pushed
the
sodium-deprecations
branch
from
May 21, 2020 15:40
837302f to
90eee56
Compare
Contributor
Author
|
re-run full all |
Contributor
|
re-run ubuntu |
1 task done
Contributor
|
The old |
This was referenced Jul 12, 2026
dwoz
pushed a commit
that referenced
this pull request
Jul 13, 2026
Two failures made `netusers.managed` / `users.set_users` unusable on NAPALM
(proxy) minions:
- `netusers.managed` passes its optional `defaults` to `_expand_users` as
`common_users`, then does `copy.deepcopy(common_users).update(...)`. With no
`defaults` (the common case) that is `copy.deepcopy(None).update(...)`, which
raises `AttributeError: 'NoneType' object has no attribute 'update'`.
- `users.set_users` / `users.delete_users` call `net.load_template("set_users",
...)` with a bare template name. `net.load_template` used to route bare names
into NAPALM's own renderer, but that path was removed in the Sodium release
(#57370) -- whose own deprecation warning explicitly told `netusers`/`netntp`/
`netsnmp` users they could ignore it. The bare name now falls through to the
fileserver as `Local file source set_users does not exist`.
`_expand_users` now treats a missing `defaults` as `{}`. `set_users` /
`delete_users` resolve the NAPALM-shipped per-driver template (`set_users.j2` /
`delete_users.j2`, which NAPALM still ships, searched along the driver class
MRO) to an absolute path and render it through the Salt pipeline, and return a
clear message when a driver ships no such template.
Because the crash previously masked it, `managed` now refuses to proceed when
the expanded user set is empty rather than removing (and committing) every
account on the device -- an admin-lockout foot-gun, e.g. an empty pillar lookup.
Validated end-to-end against a live Juniper EX3400 (Junos 23.4R2) over NETCONF:
users are rendered, committed, confirmed on-device, and removed again.
dwoz
pushed a commit
that referenced
this pull request
Aug 14, 2026
napalm_ntp (set_peers/set_servers/delete_peers/delete_servers), napalm_snmp (update_config/remove_config) and napalm_probes (set_probes/delete_probes/ schedule_probes) all call net.load_template with a bare template name (e.g. "set_ntp_peers"). net.load_template used to route bare names into NAPALM's own renderer, but that path was removed in the Sodium release (#57370) -- whose own deprecation warning explicitly told netntp/netsnmp/netusers users to ignore it. The bare name now falls through to the fileserver as "Local file source set_ntp_peers does not exist", so every one of these functions fails. Lift the resolver introduced for users in #62170 into a shared salt.utils.napalm.template_path (walks the driver class MRO + inspect.getfile, catching TypeError/OSError, returns None when the driver ships no such template) plus salt.utils.napalm.template_not_available (standard failure payload). The three modules resolve the driver's NAPALM-shipped template to an absolute path and render it through the Salt pipeline, or return the clear failure message. template_not_available also closes the per-call connection a non-always-alive proxy/minion opened, since it short-circuits net.load_template (which would otherwise close it). napalm_users is intentionally left to #62170; a follow-up dedups its local resolver onto the shared one. Validated on a live Juniper EX3400 (Junos 23.4R2): ntp.set_servers renders, commits, is confirmed in the device config, and is removed again. (NAPALM's junos snmp/probes templates still use py2 dict.iteritems() and need modernizing upstream in NAPALM; the NTP templates are py3-clean.) New tests/pytests/unit/utils/test_napalm.py covers the resolver (MRO concrete-over-base precedence, base fall-through, OSError/TypeError skip, missing -> None) and the close behaviour; test_ntp/test_snmp are rewritten and test_probes added with routing tests asserting the correct template name, the resolved path, forwarded flags, and inherit_napalm_device identity.
dwoz
pushed a commit
that referenced
this pull request
Oct 27, 2026
napalm_ntp (set_peers/set_servers/delete_peers/delete_servers), napalm_snmp (update_config/remove_config) and napalm_probes (set_probes/delete_probes/ schedule_probes) all call net.load_template with a bare template name (e.g. "set_ntp_peers"). net.load_template used to route bare names into NAPALM's own renderer, but that path was removed in the Sodium release (#57370) -- whose own deprecation warning explicitly told netntp/netsnmp/netusers users to ignore it. The bare name now falls through to the fileserver as "Local file source set_ntp_peers does not exist", so every one of these functions fails. Lift the resolver introduced for users in #62170 into a shared salt.utils.napalm.template_path (walks the driver class MRO + inspect.getfile, catching TypeError/OSError, returns None when the driver ships no such template) plus salt.utils.napalm.template_not_available (standard failure payload). The three modules resolve the driver's NAPALM-shipped template to an absolute path and render it through the Salt pipeline, or return the clear failure message. template_not_available also closes the per-call connection a non-always-alive proxy/minion opened, since it short-circuits net.load_template (which would otherwise close it). napalm_users is intentionally left to #62170; a follow-up dedups its local resolver onto the shared one. Validated on a live Juniper EX3400 (Junos 23.4R2): ntp.set_servers renders, commits, is confirmed in the device config, and is removed again. (NAPALM's junos snmp/probes templates still use py2 dict.iteritems() and need modernizing upstream in NAPALM; the NTP templates are py3-clean.) New tests/pytests/unit/utils/test_napalm.py covers the resolver (MRO concrete-over-base precedence, base fall-through, OSError/TypeError skip, missing -> None) and the close behaviour; test_ntp/test_snmp are rewritten and test_probes added with routing tests asserting the correct template name, the resolved path, forwarded flags, and inherit_napalm_device identity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Removes all the places that were marked with 'warn_until` and Sodium
What issues does this PR fix or reference?
Several - all referenced in the commit messages
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes