Generalize the Network-as-Graph Data Model
Remember the avoid duplicate data in network automation data models challenge and the restructuring we did to represent a network as a graph.
Well, I was not happy with the end result - I hated the complexity of supporting Jinja2 templates that had to check left- and right nodes of a link, so I generalized the data structure a bit, and all of a sudden I could model stub interfaces, P2P links and multi-access networks.
Also your iflist is really an ifdict, isn't it?
"Or do you elect a pseudonode in such a case and change the data model?" << Absolutely not, OSPF needs pseudonode because in a regular graph cannot have more than two nodes attached to an edge.
"Also your iflist is really an ifdict, isn't it?" << fair point ;)