mpenning / ciscoconfparse

Parse, Audit, Query, Build, and Modify Arista / Cisco / Juniper / Palo Alto / F5 configurations.
http://www.pennington.net/py/ciscoconfparse/
GNU General Public License v3.0
793 stars 220 forks source link

Junos vs IOS codebase compatibility #38

Closed mahtin closed 9 years ago

mahtin commented 9 years ago

The codebase for Junos and IOS don't quite stay in sync (this is 100% understandable). A quick diff shows the missing parts.

sed -e 's/junos/cisco/g' -e 's/Junos/IOS/g' < ciscoconfparse/models_junos.py | diff ciscoconfparse/models_cisco.py - | more

Maybe some NotImplementedError additions could help point this out and mark the points where code needs to be written in order to support both platforms.

One other thing noted includes the self._address_family = "ipv6" variable being different in the two files.

mpenning commented 9 years ago

Thank you for raising a question.

You are comparing APIs in models_junos.py to models_cisco.py. However, I don't think models_cisco.py and models_junos.py should ever have API parity because models_cisco.py implements some features that are cisco-specific. For instance, it doesn't make sense to add cdp, rapid-pvst, or hsrp features into a Junos parser. Those exist in models_junos today more as a reflection of how much work I have to do than an indication that I intend to support those methods.

If you have specific features you'd like implemented, please list them in this GH issue... also please provide a scrubbed Junos config which implements the features since I don't have ready access to Junos configs these days.