29 minutes ago, Stuart Weenig said:
I think someone got carried away building that module and forgot SOLID (particularly SRP):
I long ago despaired of ever doing anything with LMConfig modules since without OOP and library support, each is provided as a 1000+ line blob. I assume in the backend, developers have a portal-like harness to work in that does not involve editing in the UI as we must. If I ever did try to fix anything, the changes would be wiped on the next update (I have and they are). Exchange makes it a bit more palatable, but with that much code, the safe import process could still be pretty painful. I am much more used to the idea of core overridable features in a library with a profile for each device type (e.g., Oxidized) or like our own getconfig script I wrote long ago where I only had to override 3-4 methods for new device types (how to login, what the prompt looks like, how to disable paging, etc.). I would reference even RANCID, but would not like to see that method used in LM :). Still, RANCID pulls much more useful details for devices -- adding more detail here means editing the blob.