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!

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.2.0.tar.gz (204.8 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.2.0-py2.py3-none-any.whl (117.6 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: saltext_napalm-0.2.0.tar.gz
  • Upload date:
  • Size: 204.8 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.2.0.tar.gz
Algorithm Hash digest
SHA256 5604c0a2f1fe6323f2d941bfc5e5c12a2549ce26f5340965706667c1d548be5e
MD5 cf47258ef6cb9cde281d3c5e9b0ea683
BLAKE2b-256 da5a752ec6db8900e4908d4364ce74d2cc8022dce4f58d51d15e0b17fce65a3e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for saltext_napalm-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 730104928addeb1bb2be2f1a41c4006f76663ab60095f7b30c6e70a958358ec2
MD5 898f9af50243114a70405b75ea9fa228
BLAKE2b-256 2a34635d509a4d037cb07613128d388b32ff4ecf195ef40dcd45a32aa913a946

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.1

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