[PR #1150] Add peer groups support for network routes #3019

Open
opened 2025-11-20 08:04:42 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/1150

State: closed
Merged: Yes


Describe your changes

This pull request enhances the functionality of the network routes endpoint by introducing a new parameter called peers_group. This addition allows users to associate network routes with specific peer groups, simplifying the management and distribution of routes within a network.

Key Changes:

  • New Parameter: The peer_groups parameter is now available when creating or updating network routes. Users can specify either a single peer or a peer_groups, streamlining the route configuration process.

  • Enhanced Response: When retrieving information about a network route, the response will now include both peer and peers_groups fields, with one of them containing an empty string, depending on the chosen configuration. This provides clarity and consistency in route data representation.

  • Network Route Object: The peer_groups attribute is seamlessly integrated into the network route object, ensuring it is stored efficiently for future use during network map distribution.

  • Optimized Network Map Distribution: During the network map distribution phase, the peer_groups is expanded into a list of peers within the designated group. This optimization results in the efficient transmission of routes to clients, with a focus on filtering out non-Linux peers, streamlining the distribution process.

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary
**Original Pull Request:** https://github.com/netbirdio/netbird/pull/1150 **State:** closed **Merged:** Yes --- ## Describe your changes This pull request enhances the functionality of the network routes endpoint by introducing a new parameter called `peers_group`. This addition allows users to associate network routes with specific peer groups, simplifying the management and distribution of routes within a network. **Key Changes:** - **New Parameter:** The `peer_groups` parameter is now available when creating or updating network routes. Users can specify either a single `peer` or a `peer_groups`, streamlining the route configuration process. - **Enhanced Response:** When retrieving information about a network route, the response will now include both `peer` and `peers_groups` fields, with one of them containing an empty string, depending on the chosen configuration. This provides clarity and consistency in route data representation. - **Network Route Object:** The `peer_groups` attribute is seamlessly integrated into the network route object, ensuring it is stored efficiently for future use during network map distribution. - **Optimized Network Map Distribution:** During the network map distribution phase, the `peer_groups` is expanded into a list of peers within the designated group. This optimization results in the efficient transmission of routes to clients, with a focus on filtering out non-Linux peers, streamlining the distribution process. ## Issue ticket number and link ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] It is a refactor - [x] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary
saavagebueno added the pull-request label 2025-11-20 08:04:42 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#3019