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): Redo the model for additional-paths in BGP #3730

Draft
wants to merge 3 commits into
base: devel
Choose a base branch
from

Conversation

laxmikantchintakindi
Copy link
Contributor

@laxmikantchintakindi laxmikantchintakindi commented Mar 11, 2024

Change Summary

Redo the model for additional-paths in BGP to reduce number of key-value pairs and avoid repeated use of block of code using defs.

Related Issue(s)

Fixes #3279

Component(s) name

`arista.avd.eos_cli_config_gen

Proposed changes

Enhancing code by replacing multiple key-value pairs with boolean values with the help of valid_values key.
Using defs to avoid repeated use of a block of code.

How to test

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)

@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 Mar 11, 2024
@laxmikantchintakindi laxmikantchintakindi marked this pull request as ready for review March 11, 2024 11:07
@laxmikantchintakindi laxmikantchintakindi marked this pull request as draft March 11, 2024 11:07
@ClausHolbechArista
Copy link
Contributor

This will break existing deployments since you are changing an existing model in a non-backwards-compatible way.

neighbor {{ neighbor.ip_address }} additional-paths send ecmp limit {{ neighbor.additional_paths.send.ecmp_limit }}
{% elif neighbor.additional_paths.send.limit is arista.avd.defined %}
neighbor {{ neighbor.ip_address }} additional-paths send limit {{ neighbor.additional_paths.send.limit }}
{% if neighbor.additional_paths.ecmp_limit is arista.avd.defined %}
Copy link
Contributor

Choose a reason for hiding this comment

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

this should also check if send has the correct value. Same for limit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i added valid_values key under 'send' in schema. Also added min, max value for limit.

Comment on lines 20 to 29
ecmp_limit:
type: int
description: Amount of ECMP paths to send. If this key-value pair is not set, it will send all paths in best ECMP group.
convert_types:
- str
min: 2
max: 64
limit:
type: int
description: Number of paths to send through bgp updates(The value of 'send' key must be 'limit').
Copy link
Contributor

Choose a reason for hiding this comment

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

We may have to rename the ecmp_limit -> send_ecmp_limit and limit -> send_limit. Just in case there will alter come some receive limit options.

@laxmikantchintakindi
Copy link
Contributor Author

This changes are kept hold till AVD5.0 release.

@github-actions github-actions bot added the state: conflict PR with conflict label Apr 17, 2024
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@ClausHolbechArista ClausHolbechArista added this to the v5.0.0 milestone May 2, 2024
@ClausHolbechArista ClausHolbechArista added data model change Change to existing data model breaking change labels May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change data model change Change to existing data model 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: conflict PR with conflict state: Documentation role Updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor(eos_cli_config_gen)!: Redo the model for additional-paths in BGP
2 participants