Skip to main content

Salt Extension for Napalm

Salt Extension for multi-vendor network device management via NAPALM

Security

If you discover a security vulnerability, please refer to Salt's security guide.

User Documentation

For setup and usage instructions, please refer to the User Documentation.

Deployment models

This extension requires Salt 3008 or newer for every deployment model. The built-in NAPALM support was removed from Salt core in 3008; this extension restores it (and adds the Resources model). On Salt 3006/3007 the NAPALM modules are still part of core, so the extension is neither needed nor installable there (pip enforces salt>=3008).

saltext-napalm can manage devices three ways:

Model How devices are managed
Proxy minion One salt-proxy process per device (proxytype: napalm).
Deltaproxy Many devices as sub-proxies under a single control proxy minion (control proxytype: deltaproxy, each sub-proxy proxytype: napalm).
Resources Devices managed from a regular minion as first-class Salt resources, addressed with salt -C 'T@napalm:<id>'.

All three models expose the NAPALM surface: the net.* execution module, the napalm_* modules, and the netconfig, netntp, netsnmp, netusers and netacl states. Proxy minion and deltaproxy run identical proxy code (deltaproxy just runs many instances in one process). The Resources model reaches the same net.*/napalm_* execution surface through the resource's shared, cached device connection, so salt -C 'T@napalm:<id>' net.cli ..., net.arp, napalm.call and the rest work as they do on a proxy.

Limitations:

  • Scope is NAPALM only (multi-vendor via NAPALM drivers: junos, eos, ios, iosxr, nxos, and so on). Vendor-specific standalone modules such as junos or nxos_api are out of scope and not shipped here.
  • Deltaproxy needs metaproxy: deltaproxy set on the control proxy. Its per-sub-proxy schedule/beacon isolation also depends on a Salt-core fix (Salt issue #65088); sub-proxies still connect and run without it, but keepalives can collide.
  • All three models load NAPALM through Salt's module loader and are therefore subject to the ncclient requirement below.
  • The netacl execution module and state require saltext-aerleon. ACL generation used to be provided by Salt core's capirca module, which was removed in Salt 3008; netacl now delegates to the aerleon.* functions that saltext-aerleon provides. Install it alongside this extension (pip install saltext-aerleon) to use netacl; the other modules and states do not need it.

Salt loader compatibility (ncclient)

NAPALM depends on junos-eznc, which pins ncclient==0.7.0. Under Salt's module loader that build of ncclient triggers a sys.path shadow (Salt issue #69139): NAPALM's import fails, so the napalm.* functions never load and a proxy reports Proxymodule napalm is missing an init().

The root-cause fix is Salt-side (Salt PR #69787). Until it ships in a Salt release, install a newer ncclient after the extension:

pip install saltext-napalm
pip install "ncclient>=0.7.1"          # onedir: salt-pip install "ncclient>=0.7.1"

pip warns that this conflicts with junos-eznc's pin; the warning is expected, and junos-eznc works correctly with ncclient 0.7.1. See the installation guide for details.

Contributing

The saltext-napalm project welcomes contributions from anyone!

The Salt Extensions guide provides comprehensive instructions on all aspects of Salt extension development, including writing tests, running tests, writing documentation and rendering the docs.

Quickstart

To get started contributing, first clone this repository (or your fork):

# Clone the repo
git clone --origin upstream https://gitlab.com/ggiesen/saltext-napalm.git

# Change to the repo dir
cd saltext-napalm

Automatic

If you have installed direnv, copying the included .envrc.example to .envrc and allowing it to run ensures a proper development environment is present and the virtual environment is active.

Without direnv, you can still run the automation explicitly:

make dev  # or python3 tools/initialize.py
source .venv/bin/activate

Manual

Please follow the first steps, skipping the repository initialization and first commit.

Ways to contribute

Contributions come in many forms, and they’re all valuable! Here are some ways you can help without writing code:

  • Documentation: Especially examples showing how to use this project to solve specific problems.
  • Triaging issues: Help manage issues.

You can also contribute by:

  • Writing blog posts
  • Sharing your experiences using Salt + Napalm on social media
  • Giving talks at conferences
  • Publishing videos
  • Engaging in IRC, Discord or email groups

Any of these things are super valuable to our community, and we sincerely appreciate every contribution!

Metadata

Release files for saltext.napalm 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for saltext.napalm 0.2.0
File Size Uploaded Provenance Actions
saltext_napalm-0.2.0.tar.gz 204.8 kB Without provenance Details for saltext_napalm-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for saltext.napalm 0.2.0
File Interpreter ABI Platform Actions
saltext_napalm-0.2.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for saltext_napalm-0.2.0-py2.py3-none-any.whl

Total release size: 322.3 kB

Release files / saltext_napalm-0.2.0.tar.gz

Download URL saltext_napalm-0.2.0.tar.gz
Size 204.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5604c0a2f1fe6323f2d941bfc5e5c12a2549ce26f5340965706667c1d548be5e
BLAKE2b-256 checksum
How to use checksums
da5a752ec6db8900e4908d4364ce74d2cc8022dce4f58d51d15e0b17fce65a3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / saltext_napalm-0.2.0-py2.py3-none-any.whl

Download URL saltext_napalm-0.2.0-py2.py3-none-any.whl
Size 117.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
730104928addeb1bb2be2f1a41c4006f76663ab60095f7b30c6e70a958358ec2
BLAKE2b-256 checksum
How to use checksums
2a34635d509a4d037cb07613128d388b32ff4ecf195ef40dcd45a32aa913a946
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.13

Security for saltext.napalm 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page