Need help with netdev?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

selfuryon
181 Stars 36 Forks Apache License 2.0 259 Commits 22 Opened issues

Description

Asynchronous multi-vendor library for interacting with network devices

Services available

!
?

Need anything else?

Contributors list

# 263,106
Python
python-...
cisco
juniper
169 commits
# 611,812
Python
python-...
cisco
juniper
4 commits
# 611,813
Python
python-...
cisco
juniper
4 commits
# 635,444
Python
python-...
cisco
juniper
3 commits
# 662,605
Python
python-...
cisco
juniper
2 commits
# 669,621
Python
python-...
cisco
juniper
2 commits
# 688,098
Python
python-...
cisco
juniper
1 commit

THIS PROJECT IS UNMAINTAINED


I'm not interested in this project anymore, sorry. I don't work as an network engineer anymore so I haven't any special goals to improve and maintain it.

Netdev


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 IOS XR
  • Cisco ASA
  • Cisco NX-OS
  • Cisco SG3XX
  • HP Comware (like V1910 too)
  • Fujitsu Blade Switches
  • Mikrotik RouterOS
  • Arista EOS
  • Juniper JunOS
  • Aruba AOS 6.X
  • Aruba AOS 8.X
  • Terminal
  • Alcatel AOS

Examples:

Example of interacting with Cisco IOS devices:

.. code-block:: python

import asyncio
import netdev

async def task(param): async with netdev.create(**param) as ios: # Testing sending simple command out = await ios.send_command("show ver") print(out) # Testing sending configuration set commands = ["line console 0", "exit"] out = await ios.send_config_set(commands) print(out) # Testing sending simple command with long output out = await ios.send_command("show run") print(out) # Testing interactive dialog out = await ios.send_command("conf", pattern=r'[terminal]?', strip_command=False) out += await ios.send_command("term", strip_command=False) out += await ios.send_command("exit", strip_command=False, strip_prompt=False) 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] tasks = [task(dev) for dev in devices] await asyncio.wait(tasks)

loop = asyncio.get_event_loop() loop.run_until_complete(run())

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.