Replies: 1 comment 2 replies
-
Not exactly. The data is attached to interfaces (because that's where it's usually generated), how you use them is a different story. As you know, we support several devices that have drastically different configuration approaches (for example, Junos).
Yes. Where's the problem in that? Time spent generating device configurations is trivial compared to everything else we have to go through to have a lab started (even when using fast containers like FRR)
Correct. Having duplicate data is usually a bad idea, and there are only a few exceptions where we do that (VRF interfaces inside the routing protocol VRF instances -- honestly, can't remember why exactly I went with that approach). However, we use per-VLAN bridges in FRRouting, and apart from a few loops across the interfaces the result is not too shabby.
Only when the resulting Jinja2 template would otherwise become too convoluted (and a few extra loops is not nearly convoluted enough ;). For example, we eventually added OSPF areas to OSPF data structure for devices that have process/area/interface configuration hierarchy because it was too cumbersome to build area list in Jinja2, but did not copy OSPF interface data to OSPF areas because it's trivial to just loop over the interfaces and check their area ID. Effectively, we added an equivalent to the already-existing vlans dictionary to OSPF. Similarly, we added few attributes to BGP neighbors because every single Jinja2 template used the same convoluted logic to figure out (for example) whether the neighbor is a BGP RR client. Every time we create duplicate data we risk that we'll break something that changes the original data structure after we create the duplicate (not to mention all the other related technical debt), so there has to be a really good reason to add more data to the data model. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
It would seem that netlab data model is designed around Cisco IOS mental picture that everything is configured on interfaces.
As result every other device has to loop in templates again and again over full interface list to build a configuration.
Specifically I am looking at VLAN configuration and it seems there is no independent
bridgesobject or anything like this, onlyvlanswhich doesn't seem to have any member list.Would you be willing to consider augmenting data provided to templates to accommodate platforms driving configuration from centralized objects?
Beta Was this translation helpful? Give feedback.
All reactions