Feat(plugins): Add python classes built from schemas
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_designsplugins and classes to load inputs into anEosDesignsclass instance. - Modify connected endpoints logic in shared_utils, facts and structured_config to take advantage of the
EosDesignsclass - 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)
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
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.
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.
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.
Conflicts have been resolved. A maintainer will review the pull request shortly.
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.
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.
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.
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.
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.
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.
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.
Quality Gate passed
Issues
44 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
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.