Asynchronous multi-vendor library for interacting with network devices
Project description
Asynchronous multi-vendor library for interacting with network devices
Inspired by netmiko
Requires:
asyncio
AsyncSSH
Python 3.5
pyYAML
Supports:
Cisco IOS
Cisco IOS-XE
Cisco ASA
Cisco NX-OS
HP Comware (like V1910 too)
Fujitsu Blade Switches
Mikrotik RouterOS
Examples:
Example of interacting with cisco IOS devices:
import asyncio
import netdev
async def task(param):
async with netdev.create(**param) as ios:
out = await ios.send_command("show ssh")
print(out)
commands = ["line console 0", "exit"]
out = await ios.send_config_set(commands)
print(out)
out = await ios.send_command("show run")
print(out)
async def run():
dev1 = { 'username' : 'user,
'password' : 'pass',
'device_type': 'cisco_ios',
'host': 'ip address',
}
dev2 = { 'username' : 'user,
'password' : 'pass',
'device_type': 'cisco_ios',
'host': 'ip address',
}
devices = [dev1, dev2]
for dev in devices:
tasks.append(task(dev))
await asyncio.wait(tasks)
loop = asyncio.get_event_loop()
loop.run_until_complete(run())
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
netdev-0.6.0.tar.gz
(11.9 kB
view details)
Built Distribution
netdev-0.6.0-py3-none-any.whl
(22.0 kB
view details)
File details
Details for the file netdev-0.6.0.tar.gz
.
File metadata
- Download URL: netdev-0.6.0.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1210c1e3a2439f4ff94a58426c344619bc0d1777ee158cb7abbcd9a3ffb08cca |
|
MD5 | 5dac3741e445c671b08f0c44372ab89f |
|
BLAKE2b-256 | 437c5e7361d8511d029e86ef0ac9374536604f18ad54378196d10d3e7f9c9e51 |
File details
Details for the file netdev-0.6.0-py3-none-any.whl
.
File metadata
- Download URL: netdev-0.6.0-py3-none-any.whl
- Upload date:
- Size: 22.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ff96da08a6dd99181701a6e2b30ed19234ab0c0003b2df8e9eff2f39f122268 |
|
MD5 | 5a0a163959d51f7a12d22b45023565b7 |
|
BLAKE2b-256 | 777914ae9207576a466ed405fafa72e04f1464472e0d8f61db0141495892bd72 |