Skip to content

Feat(eos_designs): Add static_routes data model under svis in network services #5240

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
wants to merge 14 commits into
base: devel
Choose a base branch
from

Conversation

laxmikantchintakindi
Copy link
Contributor

@laxmikantchintakindi laxmikantchintakindi commented Apr 1, 2025

Change Summary

Add static_routes data model under SVI

Related Issue(s)

Fixes #4570

Component(s) name

arista.avd.eos_designs

Proposed changes

User likes to be able to apply static routes only on the l3leafs where the svi (nexthop) is reachable. This can be achieved by create a new designvar 'static_routes' under the 'svi' and 'l3interface' specifically.

How to test

Add static_routes under SVIs.

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

github-actions bot commented Apr 1, 2025

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-5240
# Activate the virtual environment
source test-avd-pr-5240/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/laxmikantchintakindi/avd.git@feat/eos_designs/svi_static_routes#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/laxmikantchintakindi/avd.git#/ansible_collections/arista/avd/,feat/eos_designs/svi_static_routes --force
# Optional: Install AVD examples
cd test-avd-pr-5240
ansible-playbook arista.avd.install_examples

@github-actions github-actions bot added state: CI Updated CI scenario have been updated in the PR state: Documentation role Updated role: eos_designs issue related to eos_designs role labels Apr 1, 2025
@laxmikantchintakindi laxmikantchintakindi force-pushed the feat/eos_designs/svi_static_routes branch 2 times, most recently from 03f37da to 2449c46 Compare April 1, 2025 10:59
@laxmikantchintakindi laxmikantchintakindi force-pushed the feat/eos_designs/svi_static_routes branch 3 times, most recently from 3d68fbd to c66fef0 Compare April 4, 2025 14:01
@laxmikantchintakindi laxmikantchintakindi force-pushed the feat/eos_designs/svi_static_routes branch 2 times, most recently from a257750 to 057beb7 Compare April 7, 2025 09:22
@laxmikantchintakindi laxmikantchintakindi marked this pull request as ready for review April 9, 2025 11:07
@laxmikantchintakindi laxmikantchintakindi requested review from a team as code owners April 9, 2025 11:07
@laxmikantchintakindi laxmikantchintakindi force-pushed the feat/eos_designs/svi_static_routes branch from 27eff97 to d46eaa8 Compare April 15, 2025 10:19
@github-actions github-actions bot added the state: conflict PR with conflict label Apr 24, 2025
Copy link

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

@ClausHolbechArista
Copy link
Contributor

need a rebase and rerun of molecule. Moving to draft to keep track.

@ClausHolbechArista ClausHolbechArista marked this pull request as draft April 25, 2025 05:43
Copy link

Conflicts have been resolved. A maintainer will review the pull request shortly.

@github-actions github-actions bot removed the state: conflict PR with conflict label Apr 28, 2025
@laxmikantchintakindi laxmikantchintakindi marked this pull request as ready for review April 28, 2025 07:23
@@ -679,6 +679,44 @@ $defs:
convert_types:
- int
description: Tag value.
static_routes:
Copy link
Contributor

Choose a reason for hiding this comment

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

Please check if we could use a $ref here instead of repeating the full schema

Copy link
Contributor

Choose a reason for hiding this comment

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

The description should probable be Static routes to be configured on every device where the SVI is configured

Copy link
Contributor Author

Choose a reason for hiding this comment

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

vrfs[].static_routes and vrfs[].ipv6_static_routes have old keys destination_address_prefix and gateway, so unable to add $ref.

Copy link
Contributor

Choose a reason for hiding this comment

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

you can add ref - make a ref without the old keys and keep the old keys under the ref in the previous place

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

Comment on lines 657 to 660
- vrf: Tenant_A_WAN_Zone
destination_address_prefix: 10.3.5.0/24
gateway: 1.2.3.4
name: SVI_static_route
Copy link
Contributor

Choose a reason for hiding this comment

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

These should use the new models.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@@ -1080,75 +1085,40 @@ $defs:
destination_address_prefix:
type: str
description: IPv4_address.
deprecation:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the deprecation for now. #5327. is the PR for deprecation of these keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
role: eos_designs issue related to eos_designs 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.

Link static_routes under svi/l3interface
5 participants