Comments (9)
That's fantastic @ktbyers!
I would be curious if NX-OS has something similar we could use. I will have a look soon and check that out!
from napalm-ios.
One more example, an ACL change where the order of the ACL has changed, but all the lines entirely match for ACL entries.
Router config:
ip access-list extended TEST1
permit ip any host 1.1.1.1
permit ip any host 1.1.1.2
permit ip any host 1.1.1.3
permit ip any host 1.1.1.4
permit ip any host 1.1.1.5
permit ip any host 2.2.2.2
New merge file:
logging buffered 12000
no logging console
ip access-list extended TEST1
permit ip any host 2.2.2.2
permit ip any host 1.1.1.1
permit ip any host 1.1.1.2
permit ip any host 1.1.1.3
permit ip any host 1.1.1.4
permit ip any host 1.1.1.5
What Cisco IOS reports:
show archive config incremental-diffs flash:/merge_config.txt
!List of Commands:
!
!The following order-dependent line(s) were re-ordered
!ip access-list extended TEST1
! permit ip any host 1.1.1.1
! permit ip any host 1.1.1.2
! permit ip any host 1.1.1.3
! permit ip any host 1.1.1.4
! permit ip any host 1.1.1.5
end
!No changes were found
What napalm-ios would show:
+!The following order-dependent line(s) were re-ordered
+!ip access-list extended TEST1
+! permit ip any host 1.1.1.1
+! permit ip any host 1.1.1.2
+! permit ip any host 1.1.1.3
+! permit ip any host 1.1.1.4
+! permit ip any host 1.1.1.5
from napalm-ios.
If the 'show archive config incremental-diffs flash:/merge_config.txt', then it will fall back to old method and print some warning about this.
from napalm-ios.
Very cool. Good find @ktbyers with this incremental-diffs command.
@mirceaulinic nothing like this I'm aware of on NX-OS unless we use a system generated checkpoint file (which is how napalm works today for a config replace).
from napalm-ios.
+100000
This is great! Any caveat like OS support or something that we should add to the documentation?
from napalm-ios.
Thanks for info @jedelman8!
from napalm-ios.
@dbarrosop I didn't see any new caveats, but let me dig into it some more. I did add a handler so if the command fails (i.e. '% Invalid' it will fall back to the old way).
from napalm-ios.
Working branch is here:
https://github.com/ktbyers/napalm-ios/tree/devel
Note, I still have some print debugging in the code and some other minor things need cleaned up.
from napalm-ios.
Implemented here: #100
from napalm-ios.
Related Issues (20)
- ios throw 'SSH session not active' when load_merge_candidate is called HOT 27
- Implement `get_bgp_neighbors_detail` HOT 1
- Latency Issue Cause various errors - increased global_delay_factor HOT 2
- remove 'ip scp server enable' after deployment HOT 1
- load_merge_candidate & commit_config slow (takes 40 seconds) HOT 4
- Regex used fto match the name of the network interface HOT 9
- get_environment fails on Cisco 3850 switch HOT 3
- get_environment fails on Cisco 4500 HOT 1
- get_facts returns the whole string from "show version" not just the software version HOT 4
- get_snmp_information() returns ACL names as "N/A" if none exist for a community HOT 2
- Missing end in "merge_config.txt" causes the error "!Error: cfgdiff returned error 5" HOT 1
- ISSUE WITH BASIC NAPALM CODE HOT 5
- "ValueError: Unable to find prompt" on commit_config() operation HOT 11
- get_facts() errors if "show hosts" command returns nothing HOT 2
- napalm-ios ping is not correctly tracking probes_sent HOT 1
- get_interfaces_ip executes a show command for each interface HOT 1
- CSR1000V HOT 1
- Cannot install config if candidate change username HOT 1
- Is AAA (TACACS) Supported? Not able to login nor test. HOT 4
- get_facts()['version'] Unknown on old 2950 HOT 1
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 napalm-ios.