Skip to content
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

Feat(eos_cli_config_gen): Add support for BGP default timers and send-community commands #4607

Open
wants to merge 13 commits into
base: devel
Choose a base branch
from

Conversation

Shivani-gslab
Copy link
Contributor

@Shivani-gslab Shivani-gslab commented Oct 17, 2024

Change Summary

Add support for BGP default timers and send-community commands

Related Issue(s)

Fixes #4218

Component(s) name

arista.avd.eos_cli_config_gen

Proposed changes

router_bgp:
      timers:

        # Time between BGP keepalive messages in seconds.
        # `keepalive_time` should be lesser than `hold_time`.
        keepalive_time: <int; 0-3600>

        # Hold time in seconds. Must be defined along with `keepalive_time`.
        # The valid values are 3-7200 or 0 if both values are 0.
        hold_time: <int; 0-7200>

        # Neighbor's minimum hold time constraint in seconds.
        # `min_hold_time` should be less than `hold_time`.
        min_hold_time: <int; 3-7200>

        # Send failure hold time in seconds.
        send_failure_hold_time: <int; 60-65535>
      neighbor_default:
        send_community: <str; "all" | "large" | "extended" | "standard" | "extended large" | "standard large" | "standard extended" | "standard extended large">

How to test

Match with EOS CLI.

Checklist

User Checklist

  • N/A

Repository Checklist

  • My code has been rebased from devel before I start
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation and documentation have been updated accordingly.
  • I have updated molecule CI testing accordingly. (check the box if not applicable)

Copy link

Review docs on Read the Docs

To test this pull request:

# Create virtual environment for this testing below the current directory
python -m venv test-avd-pr-4607
# Activate the virtual environment
source test-avd-pr-4607/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/Shivani-gslab/avd.git@bgp_timers_send_community#subdirectory=python-avd" --force
# Point Ansible collections path to the Python virtual environment
export ANSIBLE_COLLECTIONS_PATH=$VIRTUAL_ENV/ansible_collections
# Install Ansible collection
ansible-galaxy collection install git+https://github.com/Shivani-gslab/avd.git#/ansible_collections/arista/avd/,bgp_timers_send_community --force
# Optional: Install AVD examples
cd test-avd-pr-4607
ansible-playbook arista.avd.install_examples

@github-actions github-actions bot added role: eos_cli_config_gen issue related to eos_cli_config_gen role state: CI Updated CI scenario have been updated in the PR state: Documentation role Updated labels Oct 17, 2024
@gmuloc gmuloc added this to the v5.1.0-dev1 milestone Oct 17, 2024
@Vibhu-gslab Vibhu-gslab marked this pull request as ready for review October 18, 2024 11:18
@Vibhu-gslab Vibhu-gslab requested review from a team as code owners October 18, 2024 11:18
@Shivani-gslab Shivani-gslab marked this pull request as draft November 6, 2024 07:41
@Shivani-gslab Shivani-gslab marked this pull request as ready for review November 7, 2024 06:02
@Shivani-gslab Shivani-gslab marked this pull request as draft November 8, 2024 10:46
@Shivani-gslab Shivani-gslab marked this pull request as ready for review November 8, 2024 11:17
@ClausHolbechArista ClausHolbechArista removed this from the v5.1.0-dev2 milestone Nov 8, 2024
@Shivani-gslab Shivani-gslab marked this pull request as draft November 11, 2024 11:01
@Shivani-gslab Shivani-gslab force-pushed the bgp_timers_send_community branch 2 times, most recently from 0917539 to b013b07 Compare November 11, 2024 11:11
@Shivani-gslab Shivani-gslab marked this pull request as ready for review November 11, 2024 11:46
@Shivani-gslab Shivani-gslab marked this pull request as draft November 13, 2024 06:43
Copy link

sonarcloud bot commented Nov 13, 2024

Please retry analysis of this Pull-Request directly on SonarQube Cloud

Comment on lines 8 to 10
router-id 192.168.255.3
timers bgp min-hold-time 5 send-failure hold-time 65
no bgp default ipv4-unicast
Copy link
Contributor

Choose a reason for hiding this comment

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

I my test the timers comes after the no bgp default ipv4-unicast

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

+router bgp 65101
+   router-id 192.168.255.3
+   no bgp default ipv4-unicast
+   timers bgp min-hold-time 5 send-failure hold-time 65
+   distance bgp 20 200 200
+   graceful-restart restart-time 300
+   graceful-restart
+   maximum-paths 2 ecmp 2
+   neighbor default send-community standard extended large
+   neighbor EVPN-OVERLAY-PEERS peer group
+   neighbor EVPN-OVERLAY-PEERS remote-as 65001
+   neighbor EVPN-OVERLAY-PEERS update-source Loopback0

Copy link
Contributor Author

@Shivani-gslab Shivani-gslab Nov 14, 2024

Choose a reason for hiding this comment

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

Yes, the ordering is same in the template, this mismatch in the ordering of this file is because these commands are defined under bgp_defaults key, which is below timers in the template.

We can see the correct ordering in router-bgp-base.cfg

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@alexeygorbunov alexeygorbunov left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
role: eos_cli_config_gen issue related to eos_cli_config_gen role state: CI Updated CI scenario have been updated in the PR state: Documentation role Updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for BGP default timers and send-community commands
7 participants