Nornir connection plugin for the JSON RPC protocol
Project description
Nornir JSON RPC Plugin
Nornir plugin for JSON-RPC.
Installation
pip install nornir-jsonrpc
uv add nornir-jsonrpc
Plugins
Connection
jsonrpc: useshttpxto connect to a device and transport JSON-RPC.
Tasks
jsonrpc_cli: Execute a CLI command.jsonrpc_get: Retrieve data from the device.jsonrpc_set: Set data on the device.jsonrpc_update_config: Update a configuration element.jsonrpc_replace_config: Replace a configuration element.jsonrpc_delete_config: Delete a configuration element.
Usage
from nornir import InitNornir
from nornir_jsonrpc.tasks import jsonrpc_cli
from nornir_utils.plugins.functions import print_result
nr = InitNornir(config_file="config.yaml")
result = nr.run(
task=jsonrpc_cli,
cmds=["show version"],
)
print_result(result)
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nornir_jsonrpc-0.2.13.tar.gz
(46.8 kB
view details)
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 nornir_jsonrpc-0.2.13.tar.gz.
File metadata
- Download URL: nornir_jsonrpc-0.2.13.tar.gz
- Upload date:
- Size: 46.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eacf778967809f057a706b67114cb54ca070858ff42553038a0611a9f3b77cc6
|
|
| MD5 |
bf2f37a90e6d47906ea6874bf33e4206
|
|
| BLAKE2b-256 |
2b53246f6fe782185706d106cc68290f07ab0a9979068f2956b2e73a34190810
|
File details
Details for the file nornir_jsonrpc-0.2.13-py3-none-any.whl.
File metadata
- Download URL: nornir_jsonrpc-0.2.13-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7a199024f8814628428f72d4b3619271b75b20c0e9de30c5f1eb69bb20a9ca7
|
|
| MD5 |
44a2fac5209fa39d3f409e6e4a8e25a0
|
|
| BLAKE2b-256 |
f4d02ad8031dd0cf236b99e8bf414ad63396bca86556521ac8bc33cd66d4da63
|