-
Notifications
You must be signed in to change notification settings - Fork 58
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
Open
Kani999
wants to merge
7
commits into
netbox-community:develop
Choose a base branch
from
Kani999:displaying_bgp_sessions_on_related_objects
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature: Display BGP Sessions on Related Objects #277
Kani999
wants to merge
7
commits into
netbox-community:develop
from
Kani999:displaying_bgp_sessions_on_related_objects
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 address
Configuration Updates
device_ext_page
config 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
ObjectChildrenView
and@register_model_view
decorator for consistency with existing NetBox patterns. The device view is conditionally registered to allow users to choose between inline and tab display modes.