Skip to main content

sc-napalm

This repo is for building custom NAPALM "getters" to pull operational data from network devices, as well as override existing NAPALM getters with custom code if needed. The following getters are supported to varying degress and are used either by sc-nornir or by Nautobot boothfairy of fiber validation jobs:

NAPALM getters

  • get_ipv6_neighbors_table
  • get_arp_table
  • get_config (this has been altered to grab text based configs for netconf devices where applicable)
  • get_facts
  • get_lldp_neighbors
  • get_interfaces
  • get_mac_address_table
  • get_optics

Special getters for SC

  • get_inventory - pulls model and serial numbers of device components (optics, linecards, etc)
  • get_sc_backup - runs list of "show commands" routing wants to save per platform before shutdown

What's cool about NAPALM is that if you nest your custom drivers under custom_napalm as is done in this project, you can install your custom drivers in the same virtual environment as the main NAPALM package, and they will override NAPALM's core drivers. This allows us to leverage NAPALM in a pretty seamless way - by that I mean applications that leverage NAPALM (like Nautobot or Nornir) can be easily altered to use this code instead.

Note that this repo is very "minimum viable product" - testing was bare minimum "does it work on SC25 devices". Use it at your own risk!

Overview of the various platforms supported as of Nov 20, 2025

Driver OS/Platform Type Inerited Driver Implemented Getters
aoscx Aruba CX REST N/A all
eos Arista EOS SSH Napalm core all
iosxr Cisco IOS-XR SSH N/A all but get_sc_backup
iosxr_netconf IOS-XR NETCONF Napalm core all but get_sc_backup
junos Juniper JunOS NETCONF Napalm core all
nos DriveNets NETCONF N/A all
nxos Cisco Nexus SSH Napalm Core all but get_sc_backup
psimn Nokia PSI SSH N/A config
rls Ciena RLS SSH N/A config
saos Nokia Ciena SAOS 10 SSH N/A config, optics, inventory
srl Nokia SRLinux NETCONF Community Driver all
sros Nokia SROS NETCONF Community Driver all
waveserver Ciena Waveserver SSH N/A config, optics, inventory

Using sc-napalm

The package comes with a cli script called sc-napalm-get that will run a particular getter against a particular device and output the results to your terminal.

To use the script, you can install the package from pypi, ideally into a virtual environment:

python3 -m venv venv
source venv/bin/activate
pip install sc-napalm

Now that you've done this you can run sc-napalm-get from your venv. Note that you must either provide your credentials directly to the script, or set them as environment variables SC_USERNAME and SC_PASSWORD. Run it with --help to see all the various options.

(venv) aliebowitz@sysauto:~$ export SC_USERNAME=nso
(venv) aliebowitz@sysauto:~$ export SC_PASSWORD=<redacted>
(venv) aliebowitz@sysauto:~$ sc-napalm-get --help
usage: sc-napalm-get [-h] [--ssh-cfg SSH_CFG] [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL} | -L {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [--logfile LOGFILE] [--sc_username SC_USERNAME]
                     [--sc_password SC_PASSWORD]
                     device {iosxr,nxos,junos,sros,srl,eos,nos} {get_config,get_facts,get_optics,get_lldp_neighbors,get_inventory}

Run a specific sc_napalm "getter" against a device.

positional arguments:
  device                device hostname or IP address
  {iosxr,nxos,junos,sros,srl,eos,nos}
                        The platform of this device
  {get_config,get_facts,get_optics,get_lldp_neighbors,get_inventory}
                        The getter command to run against this device

options:
  -h, --help            show this help message and exit
  --ssh-cfg SSH_CFG     Use SSH config file to connect
  -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}
                        Set log level for sc_napalm only
  -L {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --LOG-LEVEL {DEBUG,INFO,WARNING,ERROR,CRITICAL}
                        set global log level
  --logfile LOGFILE     Save logging to a file (specified by name) instead of to stdout
  --sc_username SC_USERNAME
                        Specify credentials
  --sc_password SC_PASSWORD
                        Specify credentials
(venv) aliebowitz@sysauto:~$ sc-napalm-get 2001:468:1f07:ff19::1d eos get_inventory
[{'name': 'Ethernet45',
  'part_number': 'QSFP-100G-LR4',
  'serial_number': 'XYL252206819',
  'subtype': 'QSFP-100G-LR4',
  'type': 'optic'},
 {'name': 'Ethernet46',
  'part_number': 'QSFP-100G-LR4',
  'serial_number': 'XYL252206822',
  'subtype': 'QSFP-100G-LR4',
  'type': 'optic'},
 {'name': 'PSU 1',
  'part_number': 'PWR-511-AC-RED',
  'serial_number': 'EEWT2420216960',
  'subtype': None,
  'type': 'psu'},
  ...

Developing sc-napalm

Currently, the getters that are exposed as options in the get script are defined in the base class of the custom drivers. Note that because most of the custom classes inherit the NAPALM getters, we could easily define all the other NAPALM getters there, but I've only included ones I think are obviously useful to us.

My hope is that instead of just printing out results we can write code that saves data in Nautobot, or some other place. This could be done with Nornir or Nautobot jobs.

To-dos

  • More waveserver getters
  • Infinera SNMP driver
  • Mock classes and test data

Metadata

Release files for sc-napalm 2.9.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 sc-napalm 2.9.0
File Size Uploaded
sc_napalm-2.9.0.tar.gz 175.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sc-napalm 2.9.0
File Interpreter ABI Platform
sc_napalm-2.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 234.9 kB

Release files / sc_napalm-2.9.0.tar.gz

Download URL sc_napalm-2.9.0.tar.gz
Size 175.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1f0f9c0821db3119f408b1c1d6af47b1d877f62cd46e7e9b204cb290868aef16
BLAKE2b-256 checksum
How to use checksums
b65dcea5f7563ff55e151c38d6be7e84ee1c9aab4bfe74d35c8eb944c9cbb54d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / sc_napalm-2.9.0-py3-none-any.whl

Download URL sc_napalm-2.9.0-py3-none-any.whl
Size 59.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e0c025d01ed5166e8642bb6b2790078c558d82768ee103ff28f84f3c54fe14e
BLAKE2b-256 checksum
How to use checksums
4e504df7b5be50572ccf0f74a17c348d4dcdf41a22a9712a4ea327d07a85a6b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

2.9.0 This release

2 release files

2.8.0

2 release files

2.7.3

2 release files

2.7.2

2 release files

2.7.1

2 release files

2.7.0

2 release files

2.6.3

2 release files

2.6.2

2 release files

2.6.1

2 release files

2.6.0

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release 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