Meaning of _top dictionary and intended usage. #2496
-
What is the meaning of _top dictionary in *.yml data models ? Ive seen it used to augment foreign data , for example add specific STP data to a node_vlan type. Like here: https://github.com/ipspace/netlab/blob/dev/netsim/modules/stp.yml#L42 Is there anything else to it ? Any gotchas ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
However, we might need that (as you discovered), so we need an option to say "although most of the stuff goes into its expected place, these things really should go to the top of the defaults dictionary", thus the Line 66 in 5281e81 As for gotchas: anyone can change anything anywhere in the defaults settings (and there are subtle things like "you cannot merge scalars or lists, only dicts"), so we have to be a bit careful while merging PRs. |
Beta Was this translation helpful? Give feedback.
-
@ipspace Thanks a lot for this detailed answer! |
Beta Was this translation helpful? Give feedback.
topology-defaults.yml
: https://github.com/ipspace/netlab/blob/dev/netsim/topology-defaults.ymlnetlab/netsim/topology-defaults.yml
Line 19 in 5281e81
netlab/netsim/topology-defaults.yml
Line 29 in 5281e81
stp.yml
file to set anything outside of the defaults.stp dictionaryHowever, we might need that (as you discovered), …