-
Notifications
You must be signed in to change notification settings - Fork 228
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
Feat(eos_designs): Relax mode in structured config #4784
Feat(eos_designs): Relax mode in structured config #4784
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-4784
# Activate the virtual environment
source test-avd-pr-4784/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/gmuloc/avd.git@relax-mode-in-structured-config#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/,relax-mode-in-structured-config --force
# Optional: Install AVD examples
cd test-avd-pr-4784
ansible-playbook arista.avd.install_examples |
...molecule/eos_designs_unit_tests/inventory/host_vars/relaxed-structured-config-validation.yml
Outdated
Show resolved
Hide resolved
...molecule/eos_designs_unit_tests/inventory/host_vars/relaxed-structured-config-validation.yml
Show resolved
Hide resolved
...molecule/eos_designs_unit_tests/inventory/host_vars/relaxed-structured-config-validation.yml
Outdated
Show resolved
Hide resolved
Co-authored-by: Claus Holbech <[email protected]>
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.
it is still in draft, but looks good to me.
@ClausHolbechArista the next steps will be to go over |
@gmuloc can you add a brief change summary on this PR? |
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 absent router_isis.instance key in structured_config which generates schema errors with devel, but with this PR the relaxed validation ignores it. LGTM!
Co-authored-by: Claus Holbech <[email protected]>
Change Summary
This pull request introduces a relaxed mode to validate the schema when handling
structured_configuration
(notcustom_structured_configuration
) ineos_designs
. This relaxed validation mode ignore missing required keys.Related Issue(s)
Component(s) name
arista.avd.eos_designs
Proposed changes
relaxed_validation
boolean key in the metaschema to be able to indicate in the schema which keys (and their children) should use the relaxed validation moderelaxed_validation: true
for all existing structured_config keys ineos_designs
required
keys whenrelaxed_validation
istrue
aaa.accounting
model ineos_cli_config_gen
for testingHow to test
Added a molecule test
Checklist
Repository Checklist