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

IX-F export: allow excluding VLANs #881

Closed lucix-mich closed 6 months ago

lucix-mich commented 7 months ago

Currently, IXP Manager exports all VLANs which are not tagged as private VLANs.

IXPs may have a longer list of VLANs on their infrastructure, and for many good reasons (documentation, config generation, ...) would like to be 100% complete in documenting all VLANs in IXP Manager. However, some of these VLANs may be used for very specific other services or use cases, which the IXP may not want to export in the IX-F JSON. Let's call these VLANs non-peering VLANs.

While the obvious workaround would be to tag all these VLANs as private, this is sub-optimal for the following reasons:

While implementing a third category of VLANs could be seen as a long-term solution, I am not sure just one other category would cover most use cases, hence I see this route as useful only if the VLAN types could be user-configured, which is a much bigger change.

Therefore, I propose to implement a more generic workaround which I think can be useful to many users of IXP Manager: add a configuration option to exclude certain VLAN IDs from IX-F export, while building on the existing framework of IX-F exclude options (see https://github.com/inex/IXP-Manager/issues/722)

IXP_API_JSONEXPORTSCHEMA_EXCLUDE_VLAN="id[|id]*"

id is of course the internal VLAN ID of IXP Manager.

Thanks for consideration!

barryo commented 6 months ago

@lucix-mich - @nickhilliard pushed some code to handle this via a toggle switch on the VLAN interface. This has been pushed to master but as it requires a small database migration, won't be in release-v6 for a couple weeks until we have a new release packaged.

lucix-mich commented 6 months ago

@barryo thanks for the information, no issue for us, we have my patch in our code - so simple and unintrusive, we can keep this in place until we migrate to a version that includes the UI change.