Comments (11)
send_config_set(<commands, commit=True) is working, but without commit is not wokring!
from netmiko.
I want to look at this behavior on Juniper too.
from netmiko.
This change was merged in...need to decide if this is best way to handle this.
diff cisco_xr_ssh.py ~/netmiko_old/netmiko/netmiko/cisco/cisco_xr_ssh.py
30,48d29
< def exit_config_mode(self, exit_config='end'):
< '''
< First check whether in configuration mode.
<
< If so, exit config mode
< '''
< DEBUG = False
< output = ''
<
< if self.check_config_mode():
< output = self.send_command(exit_config, strip_prompt=False, strip_command=False)
< if "Uncommitted changes found" in output:
< output += self.send_command('yes\n', strip_prompt=False, strip_command=False)
< if DEBUG:
< print output
< if self.check_config_mode():
< raise ValueError("Failed to exit configuration mode")
<
< return output
from netmiko.
Wouldn't this commit the changes and then exit? It seems that the Principle of Least Surprise would suggest abandoning the change. If I wanted to commit the change, I would have a line that says "commit" in it, right?
from netmiko.
Yes, I agree this is a mistake. It should do "no" and probably print a warning.
I will just change the action for now to 'no'.
from netmiko.
Okay, I have changed this action to no.
from netmiko.
I'm not sure if you have access to Juniper devices, but the opposite behavior is necessary with Juniper, which should be easy to handle. Only mentioning this because you noted you wanted to look into the Juniper side as well.
root@bananas> edit
Entering configuration mode
The configuration has been changed but not committed
[edit]
root@bananas# set system host-name apple
[edit]
root@bananas# quit
The configuration has been changed but not committed
Exit with uncommitted changes? [yes,no] (yes) yes
Exiting configuration mode
root@bananas>
from netmiko.
Okay, there is a Juniper specific method so we can change the behavior in
this class.
I want to address the commit/confirm/rollback in a more systematic way for
Juniper and IOS-XR. Hopefully, this week.
Kirk
On Sat, Mar 7, 2015 at 9:18 AM, Tyler Christiansen <[email protected]
wrote:
I'm not sure if you have access to Juniper devices, but the opposite
behavior is necessary with Juniper, which should be easy to handle.root@bananas> edit
Entering configuration mode
The configuration has been changed but not committed[edit]
root@bananas# set system host-name apple[edit]
root@bananas# quit
The configuration has been changed but not committed
Exit with uncommitted changes? yes,no yesExiting configuration mode
root@bananas>
—
Reply to this email directly or view it on GitHub
#34 (comment).
Kirk Byers
CCIE #6243 emeritus
[email protected]
http://pynet.twb-tech.com http://pynet.twb-tech.com/blog
(415) 264-6270
Simplify your network management through automation
from netmiko.
Referencing from master issue #60 (design spec). Leaving this open separately as the current behavior is a bug.
from netmiko.
The Juniper issue was resolved by recent commits.
from netmiko.
Duplicate with issue #88 also see master issue #89 for IOS-XR commit
from netmiko.
Related Issues (20)
- netmiko.exceptions.NetmikoTimeoutException: Paramiko: 'No existing session' error: try increasing 'conn_timeout' to 15 seconds or larger. HOT 1
- paloalto_panos and dedicated panorama log collector appliances HOT 3
- Cannot get whole running config from maipu switch using netmiko script HOT 3
- ConnectHandler don't work for fortimanager HOT 3
- ruckus_fastiron - getting this error for most basic command - TypeError: can only concatenate str (not "NoneType") to str HOT 4
- Linux Ubuntu 22.04.4 LTS, "Pattern not detected: '[\\$\\#]' in output." in version 4.3.0 and above HOT 1
- Does NEtmiko support Moxa 518E series HOT 3
- Save config on Maipu switch HOT 5
- loop_delay Indicates that the return packet is incomplete HOT 6
- Unable to capture full output of a lengthy output HOT 3
- cisco_wlc_ssh unable to connect to WLC "Pattern not detected: '(?:User:|login as|ssword|(?m:[>#]\\s*$))'" error HOT 3
- Improvement for Huawei SmartAX HOT 2
- TPLink Jestream issue with newest version of cryptography
- Mikrotik version > 6.48 = 'export' command incomplete HOT 3
- auth_timeout on SERIAL ConnectHandler - login authentication appears to happen but NetMikoAuthenticationException is thrown at random HOT 2
- problem with send_command_timing() HOT 2
- Unable to parse data using a textfsm template with send_multiline() HOT 2
- Implement/document an alternate solution for Netmiko and SNMP
- Please consider changing hardcoded poetry version HOT 1
- issue on gpon isam fx4 model olt nokia
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 netmiko.