-
Notifications
You must be signed in to change notification settings - Fork 232
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(plugins): Improve schema models #4795
Refactor(plugins): Improve schema models #4795
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-4795
# Activate the virtual environment
source test-avd-pr-4795/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/ClausHolbechArista/avd.git@refactor/plugins/improve-schema-models#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/,refactor/plugins/improve-schema-models --force
# Optional: Install AVD examples
cd test-avd-pr-4795
ansible-playbook arista.avd.install_examples |
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.
Tested, LGTM!
I pushed some extra changes. Somehow it messed up so I will dismiss your review.
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.
Retested with same repos, still LGTM!
aff1d0c
to
332fea6
Compare
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.
In general I feel like it would make sense to add some unittest for merging and inheriting with the flags for some classes to make sure we don't break this in further refactoring
Co-authored-by: Guillaume Mulocher <[email protected]>
._update
onAvdModel
andappend_new
onAvdList
andAvdIndexedList
gives type hints similar to__init__()
of the item class. This means it is easy to provide the correct supported fields.