avd icon indicating copy to clipboard operation
avd copied to clipboard

Feat(plugins): Add python classes built from schemas

Open ClausHolbechArista opened this issue 1 year ago • 4 comments

Change Summary

Add python classes built from schemas

Component(s) name

arista.avd.eos_designs arista.avd.eos_cli_config_gen

Proposed changes

  • New tooling to generate Python classes from AVD schemas.
  • Loader to load data including coercion into the new classes.
  • Modify various eos_designs plugins and classes to load inputs into an EosDesigns class instance.
  • Modify connected endpoints logic in shared_utils, facts and structured_config to take advantage of the EosDesigns class - as a POC.
  • Minor fixes of schemas.

How to test

No changes to molecule.

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)

ClausHolbechArista avatar Oct 16 '24 14:10 ClausHolbechArista

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-4603
# Activate the virtual environment
source test-avd-pr-4603/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/ClausHolbechArista/avd.git@schemas-as-classes-no-validation-nested#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/ClausHolbechArista/avd.git#/ansible_collections/arista/avd/,schemas-as-classes-no-validation-nested --force
# Optional: Install AVD examples
cd test-avd-pr-4603
ansible-playbook arista.avd.install_examples

github-actions[bot] avatar Oct 16 '24 14:10 github-actions[bot]

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

github-actions[bot] avatar Oct 17 '24 07:10 github-actions[bot]

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

github-actions[bot] avatar Oct 18 '24 06:10 github-actions[bot]

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

github-actions[bot] avatar Oct 21 '24 14:10 github-actions[bot]

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

github-actions[bot] avatar Oct 21 '24 15:10 github-actions[bot]

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

github-actions[bot] avatar Oct 23 '24 02:10 github-actions[bot]

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

github-actions[bot] avatar Oct 29 '24 15:10 github-actions[bot]

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

github-actions[bot] avatar Oct 29 '24 15:10 github-actions[bot]

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

github-actions[bot] avatar Oct 30 '24 01:10 github-actions[bot]

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

github-actions[bot] avatar Nov 04 '24 14:11 github-actions[bot]

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

github-actions[bot] avatar Nov 04 '24 20:11 github-actions[bot]

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

github-actions[bot] avatar Nov 05 '24 09:11 github-actions[bot]

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

github-actions[bot] avatar Nov 07 '24 09:11 github-actions[bot]

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

github-actions[bot] avatar Nov 08 '24 13:11 github-actions[bot]

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

github-actions[bot] avatar Nov 08 '24 15:11 github-actions[bot]

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

github-actions[bot] avatar Nov 13 '24 07:11 github-actions[bot]

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

github-actions[bot] avatar Nov 13 '24 10:11 github-actions[bot]

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

github-actions[bot] avatar Nov 13 '24 15:11 github-actions[bot]

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

github-actions[bot] avatar Nov 15 '24 16:11 github-actions[bot]

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

github-actions[bot] avatar Nov 18 '24 12:11 github-actions[bot]

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

github-actions[bot] avatar Nov 18 '24 14:11 github-actions[bot]

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

github-actions[bot] avatar Nov 19 '24 13:11 github-actions[bot]

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

github-actions[bot] avatar Nov 21 '24 19:11 github-actions[bot]

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

github-actions[bot] avatar Nov 22 '24 11:11 github-actions[bot]