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

Refactor(eos_designs): Network Services ethernet interfaces refactoring to classes #4976

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

Conversation

gmuloc
Copy link
Contributor

@gmuloc gmuloc commented Feb 4, 2025

Change Summary

Update network_services/ethernet_interfaces.py to use classes

Component(s) name

arista.avd.eos_designs

Proposed changes

How to test

molecule does not change

Checklist

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 Feb 4, 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-4976
# Activate the virtual environment
source test-avd-pr-4976/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/gmuloc/avd.git@refactor/eos_designs/network-services/ethernet-interfaces#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/gmuloc/avd.git#/ansible_collections/arista/avd/,refactor/eos_designs/network-services/ethernet-interfaces --force
# Optional: Install AVD examples
cd test-avd-pr-4976
ansible-playbook arista.avd.install_examples

@github-actions github-actions bot added the state: CI Updated CI scenario have been updated in the PR label Feb 4, 2025
@gmuloc gmuloc force-pushed the refactor/eos_designs/network-services/ethernet-interfaces branch from 9559aa3 to e87f9e0 Compare February 4, 2025 14:14
@gmuloc gmuloc marked this pull request as ready for review February 4, 2025 14:15
@gmuloc gmuloc requested review from a team as code owners February 4, 2025 14:15
@gmuloc gmuloc force-pushed the refactor/eos_designs/network-services/ethernet-interfaces branch from 300ec05 to 06e453c Compare February 4, 2025 14:45
@gmuloc gmuloc requested a review from a team February 7, 2025 10:37
@github-actions github-actions bot added the state: conflict PR with conflict label Feb 7, 2025
Copy link

github-actions bot commented Feb 7, 2025

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

@github-actions github-actions bot removed the state: conflict PR with conflict label Feb 7, 2025
Copy link

github-actions bot commented Feb 7, 2025

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

@gmuloc gmuloc requested a review from a team February 7, 2025 15:15
self._set_point_to_point_interfaces(tenant, subif_parent_interface_names)

# Add missing parent interface names if any
if missing_parent_interface_names := subif_parent_interface_names.difference(eth_int.name for eth_int in self.structured_config.ethernet_interfaces):
Copy link
Contributor

Choose a reason for hiding this comment

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

Once we flip the global toggle to not create a structured config per module, this will inspect all ethernet_interfaces created up until this point. Maybe we should use .obtain and check that the interface has no switchport and error out otherwise. Can be done later ofc.

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 an issue to track this though it does mean that this becomes order sensitive. Could this become a problem?

@gmuloc gmuloc added the one approval This PR has one approval and is only missing one more. label Feb 10, 2025
@gmuloc gmuloc requested a review from a team February 10, 2025 12:55
gmuloc and others added 2 commits February 10, 2025 13:55
…es/ethernet_interfaces.py

Co-authored-by: Claus Holbech <holbech@arista.com>
…nit_tests/inventory/host_vars/duplicate-interfaces-point-to-point-services-4.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
one approval This PR has one approval and is only missing one more. state: CI Updated CI scenario have been updated in the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants