-
Notifications
You must be signed in to change notification settings - Fork 236
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
Fix(eos_designs): Fix schema validation of dynamic keys #4474
Fix(eos_designs): Fix schema validation of dynamic keys #4474
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-4474
# Activate the virtual environment
source test-avd-pr-4474/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/ClausHolbechArista/avd.git@fix/eos_designs/fix-schema-validation-of-dynamic-keys-lists#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/,fix/eos_designs/fix-schema-validation-of-dynamic-keys-lists --force
# Optional: Install AVD examples
cd test-avd-pr-4474
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 with repo that broke node_type_keys, connected_endpoints_keys and network_services_keys. All faulty variables now result in proper schema validation type errors. LGTM!
ansible_collections/arista/avd/roles/eos_designs/docs/tables/connected-endpoints.md
Outdated
Show resolved
Hide resolved
|
Change Summary
Fix schema validation of dynamic keys
The schema validation tooling did not have a way of populating the default values of dynamic keys lists like
node_type_keys
, so this was implemented manually before running validation.The default values were loaded from
shared_utils
but since no validation had been done,shared_utils
would fail badly if any input was not as expected.