sonic-utilities
sonic-utilities copied to clipboard
It is possible to delete a vlan without it warning that a vxlan is mapped to it
Description
There is currently no check to see if a vlan is mapped to a vxlan when its being deleted via config cli
There are checks to see if is a member of an interface or has an ip assigned to it. https://github.com/sonic-net/sonic-utilities/blob/master/config/vlan.py#L39
Steps to reproduce the issue
- add a vlan
- add a vxlan map to the vlan
- delete vlan
Describe the results you received
vlan was deleted
Describe the results you expected
It should not be possible to delete a vlan that has a vxlan mapping configured
Additional information you deem important (e.g. issue happens only occasionally)
An additional check to see if the vlan is mentioned in VXLAN_TUNNEL_MAP table would be wise
Output of show version
(paste your output here)