Comments (11)
Other references issues, issue #57 (commit confirm).
See issue #34 for reference to messages for uncommited changed.
See issue #8 (IOS-XR rollback)
See issue #7 Commit on IOS-XR
from netmiko.
There is also an IOS XR and Junos configure exclusive
to lock the candidate config from other users.
from netmiko.
commit() is currently a separate method both for Juniper and IOS-XR.
For Juniper it has a delay_factor attribute which defaults to 10 (give sufficient time for commit to complete.
It is also used by send_config_set(). Note, send_config_set() has no way to modify the delay_factor.
IOS-XR currently has no delay_factor.
from netmiko.
commit() method parameters should have:
JUNIPER
delay_factor (integer)
confirm (boolean)
confirm_delay (how many minutes to wait for confirm, defaults to 10) -- need to verify what default is for IOX-XR
check (boolean), defaults to False, has precedence over confirm (i.e. if check = True) then confirm is N/A.
comment Message to commit log
Do we need 'commit at ?' -- I would say probably not as a person could always manually do something via send_command(), if needed (open to discussion on this)
Should send_config_set() explicitly support commit() calling or should these be separate actions (send_config_set() and then commit() ). If send_config_set() calls commit() then commit arguments must be able to be passed into send_config_set.
from netmiko.
I think send_config_set()
should not call commit()
. "Do one thing and do it well." IMHO (and feel free to disagree since you're the creator/maintainer :)), this should be a framework around which solutions are built. Trying to do too much magic overcomplicates said framework and potentially reduces its flexibility for building tools.
from netmiko.
Also, one issue to be aware of is what happens if someone calls it like this:
commit(delay_factor=10, confirm_delay=5)
confirm
will need to be set to True
any time confirm_delay
is used but check
is not. Which means confirm_delay
cannot have a default value (it must be None
), or it will automatically set confirm = True
. There are a few possibilities. One is to remove confirm
, default confirm_delay
to None
, and use if confirm_delay is not None:
to flip the bit on confirm
. The other option is to continue to use confirm
and confirm_delay
in the method parameters, and raise an exception whenever confirm_delay != 10
and confirm = False
.
from netmiko.
I agree on the send_config_set(), commit should not be a part of this. Besides your "do one thing well statement" which I agree with. It also will really complicate the passing of arguments for commit.
from netmiko.
commit(delay_factor=10, confirm_delay=5) --> should generate an exception
So confirm_delay will need to default to None (good point on this). We can then use the platform's default confirm_delay (i.e. only pass in a confirm_delay if the end-user specified an argument). This is a better way to do it.
commit(confirm=True, delay_factor=10) --> send to juniper 'commit confirmed'
commit(confirm=True, confirm_delay=5, delay_factor=10) --> send to Juniper 'commit confirmed 5'
Let me know if you see issues with this.
from netmiko.
Looks good to me.
from netmiko.
Juniper is done. Still need to do IOS-XR.
from netmiko.
Closing this issue. See issue #89 for IOS-XR.
from netmiko.
Related Issues (20)
- 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
- handling of "command not found" error in send methods HOT 1
- Inconsistent execution of script error:paramiko.buffered_pipe.PipeTimeout
- mikrotik free version adds extra message into the SSH login process HOT 14
- Sending yes or no prompt for Cisco nexus device using send_command HOT 2
- MOTD prevents successful login attempts with CISCO
- err :output = net_connect.send_command_timing('show running-config') HOT 1
- Issue with Ciphers [email protected], [email protected] HOT 1
- Add A10 SSHDetect : Pattern not detected: 'A10DEVICE\\-Active\\-affinity\\-def\\-vMaster\\[1/1\\]' in output. HOT 6
- Hope to connect to network device locally through jumphost without username and password HOT 4
- Nornir netmiko.exceptions.ReadTimeout CISCO IOS
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.