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): Move default platform_settings. network_services_keys and connected_endpoints_keys to schema #4395

Conversation

gmuloc
Copy link
Contributor

@gmuloc gmuloc commented Aug 27, 2024

Change Summary

Currently default platform_settingss are maintained both in schema default values and in the shared_utils python code.
This PR removes the python code.

It also leverages the same mechanism to retrieve the default value for connected_endpoint_keys and network_services_keys from the schema

Component(s) name

arista.avd.eos_designs

Proposed changes

Read default values from schema

How to test

Molecule tests are still all passing without changes

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)

@gmuloc gmuloc requested review from a team as code owners August 27, 2024 08:15
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-4395
# Activate the virtual environment
source test-avd-pr-4395/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/gmuloc/avd.git@remove-duplicate-platform-default-values#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/,remove-duplicate-platform-default-values --force
# Optional: Install AVD examples
cd test-avd-pr-4395
ansible-playbook arista.avd.install_examples

Copy link
Contributor

@ClausHolbechArista ClausHolbechArista left a comment

Choose a reason for hiding this comment

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

LGTM. As agreed we will remove the campus comment again.

This should help keep things in sync. We should look into the same for other defaults like network_services_keys and connected_endpoints_keys.

@gmuloc gmuloc changed the title Refactor(eos_designs): Remove duplicate default for platform_settings Refactor(eos_designs): Move default platform_settings. network_services_keys and connected_endpoints_keys to schema Aug 27, 2024
@gmuloc gmuloc added this to the v5.0.0 milestone Aug 28, 2024
Copy link
Contributor

@JulioPDX JulioPDX left a comment

Choose a reason for hiding this comment

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

Great stuff, tested with built-in examples. Configs generated correctly when specifying platforms and connected endpoints keys. LGTM

Copy link

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

@github-actions github-actions bot added the state: conflict PR with conflict label Aug 29, 2024
@github-actions github-actions bot removed the state: conflict PR with conflict label Aug 30, 2024
Copy link

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

@gmuloc gmuloc added the one approval This PR has one approval and is only missing one more. label Aug 30, 2024
Copy link

sonarcloud bot commented Sep 2, 2024

@ClausHolbechArista ClausHolbechArista merged commit ef902de into aristanetworks:devel Sep 2, 2024
40 checks passed
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. rn: Refactor(eos_designs) role: eos_designs issue related to eos_designs role state: Documentation role Updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants