more generalisation? #21
Replies: 1 comment 6 replies
-
I've added a draft of my ideas here: https://github.com/steffenschumacher/netbox-initializers/tree/heavy_base One could argue the current implementation is more straight forward, however I'd guess my approach is more maintainable in the long run.. I've gone with overriding properties mostly to make it easy to figure out how to subclass, but simply setting variables directly on the derived classes as initially done with Am I way off track? |
Beta Was this translation helpful? Give feedback.
-
Seems to me, that there are room for generalisation and more code reuse looking at this code.
I have some ideas for this, so its less work for new/updated objects in netbox.
Specifically I would move more logic into the BaseInitializer class, so the load_data method is generic and then initialisers overload/implement other methods to specialise as needed.
Once I have a draft, I will post it here for review?
Beta Was this translation helpful? Give feedback.
All reactions