Closed joubbi closed 5 years ago
Hi, I published a version of a running-config parser I did at work, it's not totally finished but it cover my need so far.
You can find it here: https://github.com/kvernNC/cisco_config_parser
I wrote some others and will publish them as well if there's a place for that.
Great! I was thinking about parsing running-config at first, but decided not to do it. Doing a "show running-config" can be heavy on the CPU of a busy router and the syntax might be different across versions. I'm interested in matching interfaces with VRF's. I have done a parser for "show ip interface" since you get a bunch of interesting facts from there. My next step is to do a parser for "show ip vrf" since the output from that command is the same regardless of how the VRF was defined in the configuration. Unfortunately the interfaces are not named the same way by the show VRF commands as are by the show interface commands, so I need to rename them (vl100 to vlan 100).
Can't we agree on one common place to add all our parsers to, and a common structure? I'm not experienced enough to know how best to share. I know however that having the different contributions spread across GitHub without a common starting point is not smart.
I agree with you, show running-config can be stressful, specially for catalyst stacks. We use oxidized for backuping our configuration. I retrieve running-config from oxidized api, not directly from the device and sync oxidized when I make change to the device.
Le sam. 27 avr. 2019 à 23:43, joubbi notifications@github.com a écrit :
Great! I was thinking about parsing running-config at first, but decided not to do it. Doing a "show running-config" can be heavy on the CPU of a busy router and the syntax might be different across versions. I'm interested in matching interfaces with VRF's. I have done a parser for "show ip interface" since you get a bunch of interesting facts from there. My next step is to do a parser for "show ip vrf" since the output from that command is the same regardless of how the VRF was defined in the configuration. Unfortunately the interfaces are not named the same way by the show VRF commands as are by the show interface commands, so I need to rename them (vl100 to vlan 100).
Can't we agree on one common place to add all our parsers to, and a common structure? I'm not experienced enough to know how best to share. I know however that having the different contributions spread across GitHub without a common starting point is not smart.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ansible-network/network-engine/issues/236#issuecomment-487283112, or mute the thread https://github.com/notifications/unsubscribe-auth/ALKPEMRMNK2SPKKXGZJCN4LPSRC5PANCNFSM4HI3XZFQ .
I wrote a few templates. Here they are: https://github.com/network-automation/cisco_ios_command_parsers
Please add yours if you have created any.
We don't currently really have/maintain our own parser templates. You'll still find some examples here https://github.com/ansible-network/cisco_ios/tree/devel/parser_templates. Ah I see that you have created one in network-automation org :). Closing this ticket as this is not a repo to maintain templates.
Hi, I have written some parser templates for Cisco IOS. I tried to find if someone had already written such templates before I wrote mine, but couldn't find any. I would like to publish my templates so that others in the same situation don't have to start from zero. I would also be happy to get improvements to my templates from others.
What is the best way to publish templates so that others will find them? What is the "best" folder structure for the templates? I think that there should be a standard way of doing things.
Thanks for all the work with network-engine!