-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement a VLAN members view #1945
Comments
Representing this data was something I struggled with when implementing #150. Ultimately I decided to defer the UI to get the feature out the door. Showing the associations from the device/interface context is tricky because of the number of vlans that could potentially be assigned. I had not considered the view from the opposite perspective (from the VLAN). I will play around with this; like you said it would not be that difficult. |
Just so I understand, this request is to implement a view showing all of the interfaces (and their parent devices/VMs) assigned to a particular VLAN? Seems like we could add a "members" tab to the VLAN view to do this pretty easily. |
@jeremystretch yep, that's pretty much exactly what I had in mind for this. |
@jeremystretch: Thank you for the implementation. Works great. |
Issue type
[ x ] Feature request
[ ] Bug report
[ ] Documentation
Environment
Description
Hello,
the webgui currently does not provide a view to check on which interfaces of devices a vlan is associated. At least I haven't found one yet.
Getting a summary list of access and trunk ports by selecting ipam/vlans/ipam_vlan.id/ would be a great enhancement from administrative perspective. This could be accomplished without any change to the database schema as far as i can tell.
A db query for devices / ports which have a vlan tagged associated
SELECT dcim_device.name, dcim_interface.name, dcim_interface.mode FROM dcim_interface_tagged_vlans INNER JOIN ipam_vlan ON dcim_interface_tagged_vlans.vlan_id = ipam_vlan.id INNER JOIN dcim_interface ON dcim_interface_tagged_vlans.interface_id = dcim_interface.id INNER JOIN dcim_device ON dcim_device.id = dcim_interface.device_id WHERE ipam_vlan.id =1;
and a query for devices and interfaces which have a vlan nativce associated:
SELECT dcim_device.name, dcim_interface.name, dcim_interface.mode FROM dcim_interface INNER JOIN ipam_vlan ON dcim_interface.untagged_vlan_id = ipam_vlan.id INNER JOIN dcim_device ON dcim_device.id = dcim_interface.device_id WHERE ipam_vlan.id =1;
I do know jack about SQL (and even less about python), so there is a good chance to do this in a better way.
Anyway at this point I like to thank the developers for this great piece of software.
best regards
The text was updated successfully, but these errors were encountered: