Skip to content

Conversation

@darmach
Copy link
Member

@darmach darmach commented Jan 16, 2026

Added BGP related entities - speakers and peers, conforming to openstack.cloud collection modules which are WIP.

- Adds BGP speakers parameters description
- Adds BGP peers parameters description
- Removes trailing whitespace
@darmach darmach requested a review from a team as a code owner January 16, 2026 14:42
@gemini-code-assist
Copy link

Summary of Changes

Hello @darmach, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly extends the os_networks role by integrating capabilities to manage BGP speakers and peers. This enhancement allows for more robust and flexible network configurations within OpenStack environments, enabling users to programmatically define BGP routing entities in line with evolving cloud collection modules.

Highlights

  • BGP Speaker Management: Introduced functionality to create and manage BGP speakers within the os_networks role, allowing configuration of properties like local AS, IP version, and advertisement settings.
  • BGP Peer Management: Added support for defining and configuring BGP peers, including their IP address, remote AS, and authentication type, as part of the os_networks role.
  • Documentation Update: Updated the README.md to include comprehensive documentation for the newly added os_networks_bgp_speakers and os_networks_bgp_peers variables, detailing their respective parameters.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for BGP speakers and peers, which is a valuable addition. The changes are mostly well-implemented, but I've identified a few areas for improvement. My main concerns are with the robustness of the new Ansible tasks, which could fail if the corresponding variables are not defined. I've suggested adding when conditions to prevent this. Additionally, the BGP peer creation task is missing the password parameter, which is crucial for setting up MD5 authentication. I've also pointed out some minor inconsistencies and a typo in the documentation that should be addressed for clarity. Addressing these points will make the new functionality more robust and user-friendly.

advertise_floating_ip_host_routes: "{{ item.advertise_floating_ip_host_routes | default(omit) }}"
advertise_tenant_networks: "{{ item.advertise_tenant_networks | default(omit) }}"
state: "{{ item.state | default(omit) }}"
with_items: "{{ os_networks_bgp_speakers }}"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This task will fail if the os_networks_bgp_speakers variable is not defined. To make the role more robust, you should add a when condition to only run this task if the list is defined and not empty. I'd also recommend adding os_networks_bgp_speakers: [] to defaults/main.yml.

  with_items: "{{ os_networks_bgp_speakers }}"
  when: os_networks_bgp_speakers | default([]) | length > 0

peer_ip: "{{ item.peer_ip }}"
peer_auth_type: "{{ item.peer_auth_type }}"
state: "{{ item.state | default(omit) }}"
with_items: "{{ os_networks_bgp_peers }}"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Similar to the BGP speakers task, this task will fail if os_networks_bgp_peers is not defined. A when condition should be added for robustness. I'd also recommend adding os_networks_bgp_peers: [] to defaults/main.yml.

  with_items: "{{ os_networks_bgp_peers }}"
  when: os_networks_bgp_peers | default([]) | length > 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants