You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.
logging.basicConfig(level=logging.INFO)
netdev.logger.setLevel(logging.DEBUG)
async def task(param):
async with netdev.create(**param) as ios:
# Testing sending simple command
out = await ios.send_command("show ip int br")
print(out)
async def run():
dev1 = { 'username' : 'calvin',
'password' : 'password',
'device_type': 'cisco_ios',
'host': '192.168.129.132',
}
devices = [dev1]
tasks = [task(dev) for dev in devices]
await asyncio.wait(tasks)
loop = asyncio.get_event_loop()
loop.run_until_complete(run())
I seem to getting an error where it is not executing, I have enabled logging and I am receiving the following error:
INFO:netdev:Host 192.168.129.132: Trying to connect to the device
INFO:netdev:Host 192.168.129.132: Establishing connection to port 22
INFO:asyncssh:Opening SSH connection to 192.168.129.132, port 22
INFO:asyncssh:[conn=0] Connection to 192.168.129.132, port 22 succeeded
INFO:asyncssh:[conn=0] Local address: 192.168.129.1, port 52907
INFO:asyncssh:[conn=0] Beginning auth for user calvin
INFO:asyncssh:[conn=0] Auth for user calvin succeeded
INFO:asyncssh:[conn=0, chan=0] Requesting new SSH session
INFO:asyncssh:[conn=0, chan=0] Interactive shell requested
INFO:netdev:Host 192.168.129.132: Connection is established
INFO:netdev:Host 192.168.129.132: Reading until pattern
DEBUG:netdev:Host 192.168.129.132: Reading pattern: >|\#
ERROR:asyncio:Task exception was never retrieved
future: <Task finished name='Task-2' coro=<task() done, defined
Can I please receive help?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
I am trying netdev with the following code:
import asyncio
import netdev
import logging
import netdev
I seem to getting an error where it is not executing, I have enabled logging and I am receiving the following error:
Can I please receive help?
The text was updated successfully, but these errors were encountered: