Comments (3)
I think that the problem is in IOS-XR prompt because it doesn't like "hostname<delimeter>". I never tested netdev on IOS-XR, but it's not difficult for me. I will try to add IOS-XR support this weekend :) I will add information about it here
from netdev.
@dhanakane I have tested IOS XR with IOS class - it works fine (but I mention about send_config_set - it doesn't make commit so you need to make it by hand. I will implement it in new IOS XR Class soon). In your case you made this:
RP/0/0/CPU0:ios#show run interface loopback0 Sat Nov 4 12:22:41.504 YEKAT % No such configuration item(s) RP/0/0/CPU0:ios#exit <--- No more information (and prompt too) in buffer here because of you close session. Connection to 10.1.64.100 closed by remote host. Connection to 10.1.64.100 closed.
As you see you made exit and close connection by hand but you don't need it - netdev make it himself: your session automatically will be closed after exiting async context manager (async with *** as ***). The reason of problem is that nedev doesn't check that session alive or not in reading. It only reads buffer from the connection. But asyncssh allows to reading it without any exception (don't know why I will research it)
And the other thing: if you want to test exactly applying configuration you should use send_config_set instead of send_command (but you can use and send_command too but in this case, you need manually enter and exit to configuration mode). It will be like this:
# Testing sending configuration set
commands = ["line console 0", "exit"]
out = await ios.send_config_set(commands)
RP/0/0/CPU0:ios#show run interface loopback0 Sat Nov 4 12:32:45.852 YEKAT % No such configuration item(s) RP/0/0/CPU0:ios#conf t <------ automatically enter to config mode Sat Nov 4 12:32:55.662 YEKAT RP/0/0/CPU0:ios(config)#line console 0 RP/0/0/CPU0:ios(config-line)#exit RP/0/0/CPU0:ios(config)#end <------- automatically exit from config mode RP/0/0/CPU0:ios#
Command send_config_set automatically enters to configuration mode and after applying command exits from it (but without commiting right now).
from netdev.
I added some support for IOS XR (adding with_commit parameter for IOX XR send_config_set. We can see example for IOS XR in example folder) at 2d413d0. You can use now device_type "cisco_xr" for IOS XR.
from netdev.
Related Issues (20)
- Change license type
- Improve documentation
- Haven't any exceptions/messages about the wrong secret password in IOS
- What is default timeout or retry Number HOT 2
- Refactoring the code
- MikrotikRouterOS raises Attribute error during initialization HOT 1
- Timeout feature not working in MircoticRouterOS HOT 1
- MicrotikRouterOS raises TimeoutError HOT 1
- Small issue with Ubiquity_edge - probably my fault. HOT 1
- Support for paloalto_panos HOT 1
- Unexpected keyword argument 'loop' with asyncssh==2.3.0 HOT 3
- device TimeoutError HOT 1
- Little correction to add in the online documentation
- send_config_from_file support for netdev
- False positives on _base_pattern, can't override. HOT 2
- Issue with asyncio stuck at task
- Prompt pattern matches where it should NOT HOT 1
- Could you upgrade Asyncssh in netdev HOT 1
- Async IO task is getting stuck at send_command method.
- Support for Juniper_screenOs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netdev.