asyncnetfsm-0.1.4
توضیحات
simply its Netdev with textFSM
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | asyncnetfsm-0.1.4 |
| نام | asyncnetfsm |
| نسخه کتابخانه | 0.1.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Omar Al-Ghussein |
| ایمیل نویسنده | z3@live.it |
| آدرس صفحه اصلی | https://github.com/omaralghussein/asyncnetfsm |
| آدرس اینترنتی | https://pypi.org/project/asyncnetfsm/ |
| مجوز | - |
AsyncNetFSM
***********
Asynchronous multi-vendor library for interacting with network devices
Support Telnet
Requires:
---------
* asyncio
* AsyncSSH
* Python >=3.5
* pyYAML
Supports:
---------
* Cisco IOS
* Cisco IOS XE
* Cisco IOS XR
* Cisco ASA
* Cisco NX-OS
* Cisco FTD
* HP Comware (like V1910 too)
* Fujitsu Blade Switches
* Mikrotik RouterOS
* Arista EOS
* Juniper JunOS
* Aruba AOS 6.X
* Aruba AOS 8.X
* Terminal
* Fortinet
Examples:
---------
Example of interacting with Cisco IOS devices:
.. code-block:: python
import asyncio
import asyncnetfsm
async def task(param):
async with asyncnetfsm.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',
'ip': 'ip address',
}
dev2 = { 'username' : 'user',
'password' : 'pass',
'device_type': 'cisco_ios',
'ip': '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())
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl asyncnetfsm-0.1.4:
pip install asyncnetfsm-0.1.4.whl
نصب پکیج tar.gz asyncnetfsm-0.1.4:
pip install asyncnetfsm-0.1.4.tar.gz