-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Full IOS-XR Diff() support #10
Comments
The diffs are managed by |
Please test my changes in version Contents of
Contents of
The diff (py311_test) mpenning@mudslide:~/$ python
Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ciscoconfparse2 import Diff
>>> diff = Diff('before.txt', 'after.txt', syntax='iosxr')
>>> diff.get_diff()
['prefix-set PEERINGS', ' 1.1.1.1/32,', ' 172.16.0.0/12,', ' 192.168.3.0/26', ' end-set']
>>> |
I will have to test this a bit further, which might not happen until next week. I saw a big list of changes between running the diff with version 0.7.33 (and syntax=ios) versus in the newer version 0.7.49 (and syntax=iosxr). There is indeed this cosmetic bug, but that won't be a problem. I did just notice something else though. When I ran the diff function for a known config with a small change for a new peering, two things immediately stood out to me. example:
That Also with the prefix-set it seems to show up twice:
The order of the results was also not okay and some items were ommitted, but I need to check if that's coming from my own script or ciscoconfparse2. To be continued... Re testing devices, this is a bit hard of course. The best solution i could think of is the always-on sandbox in cisco Devnet or alternatively spinning up a control plane IOSXR container. I'm not sure about the licensing on that second option though. |
Regarding your newest findings in version 0.7.49... let's see if that gets fixed with netdevops/hier_config#130 Regarding other points...
Except I don't think you can configure anything in the always-on sandbox
Sadly licensing is a problem for me |
Dear Mike,
Thanks for building this awesome tool. I've been using it for some time now and it has helped tremendously with my projects. I've previously opened a bug report on the previous version of ciscoconfparse relating to route-policies in IOS-XR and the fact that regex wasn't properly escaped. However, now I'd like to open a feature request, because I'm noticing other issues with IOS-XR as well.
In short, I would like better support for XR specific syntax in this tool. There are several components that do not behave the same way as IOS-XE or the other components in XR. These components are:
potentially more..
Below are some config examples and I'm sure you will immediately recognise why I have some problems, especially with the diffs.
route-policy:
community-set
prefix-set:
Problems that currently occur:
end-set
orend-policy
are not a child of the preceeding config. In the diff, this does not show up because the diff doesn't handle it properly. If I want to add more configuration to another set (or extract), then I need to "hack" those statements in there as it won't be part of any object that ciscoconfparse finds.There are three problems with that:
end-set
statementThere are likely more issues, but these are the ones i'm currently running into.
I wouldn't mind helping out, but I would first have to get comfortable with the codebase here. Also, the question is if IOS-XR would require it's own code, be a derivative of XE or only modify the default IOS codeset to support both.
Kr.
The text was updated successfully, but these errors were encountered: