-
Couldn't load subscription status.
- Fork 59
Feature: Display BGP Sessions on Related Objects #277
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
base: develop
Are you sure you want to change the base?
Feature: Display BGP Sessions on Related Objects #277
Conversation
|
hey @Kani999, thanks for this - can you look to resolve the conflicts since the initial PR ? |
- Implement IPAddressBGPSessionsView to display BGP sessions associated with an IP address - Add tab with badge showing session count and permission check
- Update README.md to document the new "tab" value for device_ext_page config, enabling BGP sessions as a tab on device view pages - Implement DeviceBGPSessionsView in template_content.py as an ObjectChildrenView for tab-based display - Conditionally register the view only when device_ext_page is set to "tab", otherwise use PluginTemplateExtension for inline display (left/right/full_width) - Add necessary imports for Device model and settings to support the new functionality
- Implement SiteBGPSessionsView in netbox_bgp/template_content.py as an ObjectChildrenView for displaying BGP sessions associated with a site
- Implement TenantBGPSessionsView in [netbox_bgp/template_content.py]template_content.py ) as an ObjectChildrenView for displaying BGP sessions associated with a tenant
- Implement VirtualMachineBGPSessionsView in [netbox_bgp/template_content.py]template_content.py ) as an ObjectChildrenView for displaying BGP sessions associated with a virtual machine
- Implement ASNBGPSessionsView in [netbox_bgp/template_content.py]template_content.py ) as an ObjectChildrenView for displaying BGP sessions associated with an ASN - Include tab with badge showing count of related BGP sessions (where ASN is local or remote AS) and permission check for viewing
c89c978 to
df97591
Compare
- Add InterfaceBGPSessionsView class with tab registration for displaying BGP sessions associated with interfaces via their IP addresses - Fix GenericForeignKey filtering by using ContentType and assigned_object_type/id fields instead of direct assigned_object lookup - Add necessary imports for Interface and ContentType models
df97591 to
77b88aa
Compare
Hello @cruse1977, |
Description
This feature adds "BGP Sessions" tabs to the detail pages of various NetBox objects that are related to BGP sessions. This allows users to easily view all BGP sessions associated with a specific IP address, site, tenant, device, virtual machine, or ASN directly from their respective pages.
Changes Made
New Views Added
Interface->IP Addresses->Local address+Remote addressConfiguration Updates
device_ext_pageconfig option inPLUGINS_CONFIG['netbox_bgp']:"left","right","full_width": Inline display (existing behavior)."tab": Display BGP sessions as a tab on device pages.Files Modified
Benefits
Testing
Additional Notes
This implementation uses NetBox's
ObjectChildrenViewand@register_model_viewdecorator for consistency with existing NetBox patterns. The device view is conditionally registered to allow users to choose between inline and tab display modes.