Skip to main content

nxpy: Network XML Python Proxy

nxpy maps exported XML configuration (from Juniper network devices) to python classes. It is compatible only with Junipers' xml configuration and is developed to work alongside ncclient.

nxpy allows for retrieving the device configuration in xml format (using either netconf or "show configuration | display xml" via an expect script), transform the configuration to python classes in order to manipulate them (view, edit, delete). After editing, the configuration can be applied back to the device via netconf or cli expect.

Furthermore, it allows for building configuration via python classes, and apply it to the device(s) via netconf or cli expect. For the time, it supports limited configuration changes.

Installing

Requirements:

  • Python 2.6 <= version < 3.0
  • lxml (tested with 2.2.6)

To install:

python setup.py install

Examples

  • Grab the configuration in xml format

Let's say that you have grabbed your Juniper device configuration in xml format (This is STRICT!!!). You can use either "show configuration | display xml" (and copy paste the output to a file), or use an automated cli excpect script or invoke netconf. nxpy is developed as a companion to ncclient.

  • Feed the configuration to nxpy
import nxpy as np
conf = np.Parser(<configuration_file_OR_configuration_text>)
conf = conf.export()

To check if it worked:

conf.interfaces

(...you should get the list of device interfaces)

Changelog

  • v0.4.3:
    • Python packaging changes (README,setup.py)
    • Change license to GPLv3
  • v0.4.2:
    • Preliminary support for L2VPNS
    • Ethernet OAM support
  • v0.4.1:
    • Fix version in setup.py
  • v0.4:
    • Added full support for bgp flowspec (routing-options flow) configuration
  • v0.3:
    • Support for basic interface configuration (name, description, vlan)
    • Support for basic vlan configuration

License

This project is licensed under the GPL License - see the LICENSE file for details.

Metadata

Release files for juniper-nxpy 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for juniper-nxpy 0.4.2
File Size Uploaded Provenance
juniper-nxpy-0.4.2.tar.gz 9.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for juniper-nxpy 0.4.2
File Interpreter ABI Platform
juniper_nxpy-0.4.2-py2-none-any.whl Python 2 none any Details

Total release size: 30.7 kB

Release files / juniper-nxpy-0.4.2.tar.gz

Download URL juniper-nxpy-0.4.2.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
63003fa1456530fd8dce4ce04f8e26d05692604fac53e89a600c33320100ee93
BLAKE2b-256 checksum
How to use checksums
ad82a808ff5708b74aedcfeb3f693c2e736a217db884e516766d8ecd5f2f3d3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3rc1

Release files / juniper_nxpy-0.4.2-py2-none-any.whl

Download URL juniper_nxpy-0.4.2-py2-none-any.whl
Size 21.2 kB
Tags Python 2
SHA-256 checksum
How to use checksums
1e58057ec997d37c54e1e617519dbc2a541ab64c9de0b22f2f50253a00714428
BLAKE2b-256 checksum
How to use checksums
0be7ec827a5313567b2a59d27a4f97f2baa4060256a00af165964bc63ee2d180
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3rc1

Security for juniper-nxpy 0.4.2

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.

Release history Release notifications | RSS feed

This release

0.4.2 This release

2 release files No provenance

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