umnet-napalm
This is a project that augments the NAPALM library in ways that are relevant to our interests. More specifically, new getter functions have been implemented to pull data from routers and parse it into a vender agnostic format.
The following platforms all have their own umnet-napalm drivers. Most of these inherit from other libraries.
ASAdoes not inherit - the NAPALM community ASA driver uses the web API which is currently impractical for us.IOSinheritsnapalm.ios.IOSDriverIOSXRNetconfinheritsnapalm.iosxr_netconf.IOSXRNETCONFDriverIOSXRis an ssh-based driver and does not inheritJunosinheritsnapalm.junos.JunOSDriverNXOSinheritsnapalm.nxos_ssh.NXOSSSHDriverPANOSdoes not inherit - the NAPALM community PANOS driver but it doesn't support connecting via Panorama.
See the umnet_napalm Abstract Base Class definition to see what commands are supported across all platforms. For platforms that inherit from core NAPALM drivers, refer to the getter matrix. For PANOS see napalm-panos repo
Using umnet-napalm
When you install the code it comes with a cli script called umnet-napalm-get. You can use this to run a command against a particular device. Note that umnet-napalm doesn't inherently
know the platform or the credentials to use. You can supply all of these on the cli as arguments, or you can set the credentials as environment variables. Here are the different environment
variables you can set:
export NAPALM_PASSWORD=<redacted>
export NAPALM_USERNAME=automaton
export NAPALM_ENABLE=<redacted>
## only if you want to query ngfw devices
export PANORAMA_API_KEY=<redacted>
Note you currently can't pass a Panorama API key as a cli argument (because that's just messy) - you must set it in your environment. When querying a Panos device via Panorama you must provide
--pan-host [panorama hostname] and --pan-serial [serial number of the firewall]
Here's some quick examples. You can reference umnet_napalm.models for expected output format. Output is in json:
amylieb@wintermute:~/src/agador$ uv run umnet-napalm-get dl-arbl-1 nxos_ssh get_inventory
[{'name': 'Slot 1',
'part_number': 'N9K-C93360YC-FX2',
'serial_number': 'FDO261320CY',
'type': 'linecard'},
{'name': 'Fan 1',
'part_number': 'NXA-FAN-160CFM-PI',
'serial_number': 'N/A',
'type': 'fan'},
....
amylieb@wintermute:~/src/agador$ uv run umnet-napalm-get r-seb junos get_lag_interfaces
{'ae0': {'admin_up': True,
'members': {'et-0/1/0': {'admin_up': False,
'flags': 'AF',
'oper_up': False}},
'mlag_id': 0,
'oper_up': False,
'peer_link': False,
'protocol': 'LACP'},
'ae1': {'admin_up': True,
'members': {'ge-11/1/0': {'admin_up': False,
'flags': 'AF',
'oper_up': False},
'ge-11/3/7': {'admin_up': False,
'flags': 'AF',
'oper_up': False}},
'mlag_id': 0,
'oper_up': False,
'peer_link': False,
'protocol': 'LACP'},**
amylieb@wintermute:~/src/agador$ umnet-napalm-get ngfw-1 panos get_active_routes --pan-host panorama-1 --pan-serial 010701000554
[{'age': 1874469,
'learned_from': '10.250.0.114',
'mpls_label': [],
'nh_interface': None,
'nh_ip': '10.250.0.114',
'nh_table': 'default',
'prefix': '0.0.0.0/0',
'protocol': 'BGP',
'vrf': 'default',
'vxlan_endpoint': None,
'vxlan_vni': None},
{'age': 1874469,
'learned_from': '10.224.191.241',
'mpls_label': [],
'nh_interface': 'ethernet2/14.233',
'nh_ip': '10.224.191.241',
'nh_table': 'default',
'prefix': '10.224.14.32/29',
'protocol': 'OSPF',
'vrf': 'default',
'vxlan_endpoint': None,
'vxlan_vni': None},
....
Metadata
Release files for umnet-napalm 1.7.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| umnet_napalm-1.7.3.tar.gz | 366.3 kB | Without provenance | Details for umnet_napalm-1.7.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| umnet_napalm-1.7.3-py3-none-any.whl | Python 3 | none | any | Details for umnet_napalm-1.7.3-py3-none-any.whl |
Total release size: 446.6 kB
Release files / umnet_napalm-1.7.3.tar.gz
| Download URL | umnet_napalm-1.7.3.tar.gz |
|---|---|
| Size | 366.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
07b6691ea6be8e74d60f2109e294c102b91515a54948bfa5b1ef0f9efea5d1f7
|
|
BLAKE2b-256 checksum How to use checksums |
a624fded426a4e1624305fef3bcb58366764e38cc4e162f37b2a654b4095b722
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Red Hat Enterprise Linux","version":"9.8","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / umnet_napalm-1.7.3-py3-none-any.whl
| Download URL | umnet_napalm-1.7.3-py3-none-any.whl |
|---|---|
| Size | 80.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18533bec1f6fd126c5ff12ec81720a598053f075285cbbfa5753f4d0db6c3ada
|
|
BLAKE2b-256 checksum How to use checksums |
faab73344790530d114c053e6a5e0317b8954b3f3a0f1c7106c10dd8a927368e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Red Hat Enterprise Linux","version":"9.8","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for umnet-napalm 1.7.3
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.