GithubHelp home page GithubHelp logo

Comments (9)

mirceaulinic avatar mirceaulinic commented on June 2, 2024 1

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.

ktbyers avatar ktbyers commented on June 2, 2024

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.

ktbyers avatar ktbyers commented on June 2, 2024

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.

jedelman8 avatar jedelman8 commented on June 2, 2024

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.

dbarrosop avatar dbarrosop commented on June 2, 2024

+100000

This is great! Any caveat like OS support or something that we should add to the documentation?

from napalm-ios.

mirceaulinic avatar mirceaulinic commented on June 2, 2024

Thanks for info @jedelman8!

from napalm-ios.

ktbyers avatar ktbyers commented on June 2, 2024

@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.

ktbyers avatar ktbyers commented on June 2, 2024

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.

ktbyers avatar ktbyers commented on June 2, 2024

Implemented here: #100

from napalm-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.