A Python API Client for Nvidia Cumulus
Project description
py-nvidia-cumulus
Python API client for Nvidia Cumulus Linux.
Installation
To install the package, run the following command:
pip install py-nvidia-cumulus
Quick Start
To start using the client, instantiate the Cumulus object with the host and authentication details
from cumulus.api import Cumulus
api = Cumulus(
url="https://127.0.0.1:8765",
auth=("cumulus", "something")
)
# api.http_session = requests.Session() # set your own session if necessary
api.http_session.verify = False # disable SSL verification if necessary
The client aims to provide a thin wrapper over the Cumulus OpenAPI specification.
Therefore, it abstracts endpoints in pythonic fashion.
For example, here is how you can get an interface and update its configuration relative to the OpenAPI endpoint:
# Instantiate the Cumulus class first
api.revision.create()
loopback = api.interface.get("lo")
api.interface.patch(rev=api.revision.rev,
data={"10.255.255.2/32": {}},
target_path="lo/ip/address")
api.revision.apply()
api.revision.is_applied()
Tests
To execute a set of unit tests, run the following command in the root of the project
make test
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_nvidia_cumulus-0.0.2.tar.gz.
File metadata
- Download URL: py_nvidia_cumulus-0.0.2.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ad8f7cb314d0035212610185dde981e9e6005ed4028c8223ff1f37ecc0350c3
|
|
| MD5 |
9b312d2a1017646d64bf2951f6bbb2d2
|
|
| BLAKE2b-256 |
86c3ddb7ceaea28716ed0dc27c4c82d5c60dd8eb72443c661d7e031b23e1d70f
|
File details
Details for the file py_nvidia_cumulus-0.0.2-py3-none-any.whl.
File metadata
- Download URL: py_nvidia_cumulus-0.0.2-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9169ce12be0409bce5458598e03b5a02b02a4b47135d4ea152eb3091677b0723
|
|
| MD5 |
f0350c88a262bed2391e366b96049960
|
|
| BLAKE2b-256 |
c756293eb67d84499a08a450a606ea62f9720ad2ecbb14509905fb47ff1b3d39
|