Closed jbemmel closed 4 months ago
The trunk dictionary is not guaranteed to exist in the final data model. See https://netlab.tools/dev/config/vlan/#interface-vlan-parameters for details.
It looks like it's still there if one of the VLANs is native. I could remove it, but why bother?
SR OS template logic currently depends on it, to configure 'hybrid' port types: https://github.com/ipspace/netlab/blob/dev/netsim/ansible/templates/initial/sros.j2#L112
Both the 'trunk' and 'trunk_id' attribute are removed, there is 'subif_index' which for this case represents the count of members; when I put back the native vlan, the count is one less
From a templating perspective, it's hard to understand the intent - information is lost
Describe the bug
e.g. in https://github.com/ipspace/netlab/blob/dev/tests/integration/vlan/41-vlan-bridge-native.yml#L40 if I comment out the
line there is no more 'trunk' attribute generated in the topology
To Reproduce
Comment out that line, then 'netlab create -d frr'
Expected behavior
In host_vars/s1/topology.yml I'd expect to see
Output
Missing 'trunk' dict
Version
Latest HEAD under dev tree