diff options
author | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-05 15:57:31 +0200 |
---|---|---|
committer | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-05 17:25:32 +0200 |
commit | 023b6b772ee6d6853e1c0e585b7f7d207e9926ce (patch) | |
tree | b0e0fdf60fb1bda24d7f9a46b0cbe7b410e92cb5 /python/vyos/validate.py | |
parent | 7a1c1fef7677e68d5a92c8538eda74a45b47a3c9 (diff) | |
download | vyos-1x-023b6b772ee6d6853e1c0e585b7f7d207e9926ce.tar.gz vyos-1x-023b6b772ee6d6853e1c0e585b7f7d207e9926ce.zip |
vlan: T2427: convert vlan config variables from lists to dicts
Previously all vlan configs, which are dicts, were appended to a simple
list, with the distinguishing 'id' stored inside the dicts themselves.
This worked, but wasn't ideal.
This commit converts them to dicts, where the key is the VLAN ID and
value the config dict of that VLAN. This makes it posible to access
single VLANs by their ID (key) and we can for-loop and get both the ID
and config with: 'for vif_id, vif in conf["vif"].items():'
Diffstat (limited to 'python/vyos/validate.py')
0 files changed, 0 insertions, 0 deletions