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.0.tar.gz (203.7 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.0-py2.py3-none-any.whl (117.4 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: saltext_napalm-0.1.0.tar.gz
  • Upload date:
  • Size: 203.7 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.0.tar.gz
Algorithm Hash digest
SHA256 f848c82ae3f22be14b6ad4ca61cae72e60ee4952a1c9ab9933e022afde77f675
MD5 38678f168386dcc88183d63e35c4f863
BLAKE2b-256 331b85deea7d99c0d829fcb16cf488c3ad72b099080a3ea65276ac40fa73ffaa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for saltext_napalm-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e99bd4d15d85204fd3365230e7fa7ba844cb943cb160ab4ddf5d4611d3892241
MD5 0df41e07c70f564463815233a887f6a4
BLAKE2b-256 cdc70f3eb84f6557a9a569e4bf532f32bb8c634a7d7ffd9304d4cabecd2b5517

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.0

2 files

0.1.1

2 files

This release

0.1.0 This release

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