-
Notifications
You must be signed in to change notification settings - Fork 234
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
base: devel
Are you sure you want to change the base?
Refactor(eos_designs): Network Services ethernet interfaces refactoring to classes #4976
Conversation
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 |
for more information, see https://pre-commit.ci
9559aa3
to
e87f9e0
Compare
300ec05
to
06e453c
Compare
...s_negative_unit_tests/inventory/host_vars/duplicate-interfaces-point-to-point-services-1.yml
Show resolved
Hide resolved
...s_negative_unit_tests/inventory/host_vars/duplicate-interfaces-point-to-point-services-4.yml
Show resolved
Hide resolved
python-avd/pyavd/_eos_designs/structured_config/network_services/ethernet_interfaces.py
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_designs/structured_config/network_services/ethernet_interfaces.py
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_designs/structured_config/network_services/ethernet_interfaces.py
Show resolved
Hide resolved
python-avd/pyavd/_eos_designs/structured_config/network_services/ethernet_interfaces.py
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_designs/structured_config/network_services/ethernet_interfaces.py
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_designs/structured_config/network_services/ethernet_interfaces.py
Outdated
Show resolved
Hide resolved
...s_negative_unit_tests/inventory/host_vars/duplicate-interfaces-point-to-point-services-4.yml
Show resolved
Hide resolved
python-avd/pyavd/_eos_designs/structured_config/network_services/ethernet_interfaces.py
Outdated
Show resolved
Hide resolved
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Conflicts have been resolved. A maintainer will review the pull request shortly. |
python-avd/pyavd/_eos_designs/structured_config/network_services/ethernet_interfaces.py
Show resolved
Hide resolved
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): |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
…es/ethernet_interfaces.py Co-authored-by: Claus Holbech <holbech@arista.com>
...s_negative_unit_tests/inventory/host_vars/duplicate-interfaces-point-to-point-services-4.yml
Outdated
Show resolved
Hide resolved
...s_negative_unit_tests/inventory/host_vars/duplicate-interfaces-point-to-point-services-4.yml
Outdated
Show resolved
Hide resolved
…nit_tests/inventory/host_vars/duplicate-interfaces-point-to-point-services-4.yml
|
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