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.

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!

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

saltext_napalm-0.1.1.tar.gz (204.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

saltext_napalm-0.1.1-py2.py3-none-any.whl (117.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file saltext_napalm-0.1.1.tar.gz.

File metadata

  • Download URL: saltext_napalm-0.1.1.tar.gz
  • Upload date:
  • Size: 204.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for saltext_napalm-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d95b85531ccaa68ba5b43f548db47a283c8c2df6ef6c70080c0e010bbdf393c5
MD5 a90aa5bd5dfea05ca960a2ee184e6dca
BLAKE2b-256 2b9b73de4dece1e0b1aebe964b4abf237d9ef87eb42ea8b40893b2685148e7e8

See more details on using hashes here.

File details

Details for the file saltext_napalm-0.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for saltext_napalm-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d9643c0d097f8110a7b98e7c29e479998cb31c975fa207038fbd35c021d2fc5a
MD5 4203f8de11a657f3d42dff6d5dea6380
BLAKE2b-256 7032fd1b6f3a6517cb9f32296895236129eebef13c1fcdb21e279b472064cc1f

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

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