inex / IXP-Manager

Full stack web application powering peering at over 200 Internet Exchange Points (IXPs) globally.
https://www.ixpmanager.org/
GNU General Public License v2.0
375 stars 160 forks source link

VLANs API contains all VLANs for every device. #822

Open ichilton opened 1 year ago

ichilton commented 1 year ago
ISSUE TYPE

Bug Report

VERSION
define( 'APPLICATION_VERSION', '6.3.0' );
define( 'APPLICATION_VERDATE', '2022110200' );
SUMMARY

The provisioning API for VLANs contains all private vlans and not just that should be on each switch.

STEPS TO REPRODUCE

https:///api/v4/provisioner/vlans/switch-name/{switchname}.yaml ...whichever switch you use, it gives the full list of VLANs.

EXPECTED RESULTS

It should only include VLANs which are either not private or are private and have an interface on that switch.

ACTUAL RESULTS

It shows the same list of all VLANs, for every device.

barryo commented 1 year ago

Hey @ichilton - most IXs using IXP Manager are running layer2 / stp. I.e. every switch needs to know about every VLAN regardless of whether there's an access port there or not.

We'd probably need a new api endpoint or an optional qualifier on this one to limit to access ports.

You could also generate this from other api endpoints such as the list of ports for example.