Skip to main content

A Python client library for interacting with the Cisco NSO RESTCONF API

Project description

cisco-nso-restconf

Overview

This Python library provides an interface for interacting with the Cisco Network Services Orchestrator (NSO) RESTCONF API.

Features

  • RESTCONF API Access: Use the NSORestconfClient class to make raw GET, POST, & DELETE requests to any RESTCONF /data resource.
  • Utility Classes: Use pre-built helper classes, such as the Devices class, to simplify common operations, like fetching all device NED ID's.

Requirements

  • NSO RESTCONF Configuration
    • To use this library, RESTCONF must be enabled in NSO. Please refer to the documentation specific to the NSO version being used to determine how to enable RESTCONF in NSO.

Installation

You can install the library using pip:

pip install cisco-nso-restconf

Client Class

Use the NSORestconfClient class to interact with the NSO RESTCONF API /data resource

Methods Supported

  • GET, POST, DELETE

Utility Classes

To make the process easier, the library also provides utility classes for specific tasks. For example, the Devices class simplifies interaction with tailf-ncs:devices RESTCONF resources.

Available Utility Classes

Class Description
Devices Interact with the NSO tailf-ncs:devices resource

Closing Sessions

When using the NSORestconfClient, it’s important to close the session when you’re done to free up resources. You can do this using the close() method, as shown in the examples above.

Examples

There are a number of examples provided for utilizing the Client classes and various Helper classes, such as the Devices class. The examples are intended to showcase basic use cases/workflows for acheiving a specific function in NSO, such as retreiving NED ID's, device groups, life cycle of a VLAN resource, life cycle of a service, and so on.

Contributing

We welcome contributions! Feel free to open issues or submit pull requests. For development, we recommend using Poetry to manage dependencies and packaging.

poetry install

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cisco_nso_restconf-1.0.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

cisco_nso_restconf-1.0.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file cisco_nso_restconf-1.0.1.tar.gz.

File metadata

  • Download URL: cisco_nso_restconf-1.0.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.0 Darwin/23.6.0

File hashes

Hashes for cisco_nso_restconf-1.0.1.tar.gz
Algorithm Hash digest
SHA256 dd8195b9c324a568562ea6a14d6b9c5ef043c4a8443f0357af89c163353ef11c
MD5 b74eb39933ba852a9f0945a1da44fdb2
BLAKE2b-256 ba5263cc4bf17828221c1cb2a300acfc6e183376452632395b9c2faa3f9756c1

See more details on using hashes here.

File details

Details for the file cisco_nso_restconf-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for cisco_nso_restconf-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 731c4d665b1547a5701cebbc74bec2cea7605de0f3efb1fe18f84ab8c48505b0
MD5 5008bc6d02660e2eec4d604be558dac5
BLAKE2b-256 1106e47fb157453d9f31c3752ba5868004f4923311ed2f750ec92b4fa780229e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page