Skip to content
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

Doc(eos_designs,eos_cli_config_gen): Fix incorrect schemas #4691

Open
wants to merge 7 commits into
base: devel
Choose a base branch
from

Conversation

ClausHolbechArista
Copy link
Contributor

Change Summary

Fix incorrect schemas

Proposed changes

During development of Python classes and refactoring we hit conflicts between the code and the schema. This PR updates the schemas to conform to the implementation in the code.

  • Wrong default value
  • Missing default value
  • Missing primary_key
  • Remove * from descriptions since it breaks in Python docstrings
  • Minor description updates

How to test

No changes to inputs or behavior. This is only to reflect the correct defaults / schemas in the documentation.

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)

Copy link

github-actions bot commented Nov 6, 2024

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-4691
# Activate the virtual environment
source test-avd-pr-4691/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/ClausHolbechArista/avd.git@fix/eos_designs/schema-default-values#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/schema-default-values --force
# Optional: Install AVD examples
cd test-avd-pr-4691
ansible-playbook arista.avd.install_examples

@github-actions github-actions bot added role: eos_cli_config_gen issue related to eos_cli_config_gen role state: Documentation role Updated role: eos_designs issue related to eos_designs role labels Nov 6, 2024
Comment on lines +172 to +176
valid_values:
- p2p
- port-channel
- p2p-vrfs
- lan
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so we end up maintaining this in two places - would it not be better to have the other one refer to here and augment it with default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be counterintuitive to ref towards the child that inherits from the parent. I think we can live with maintaining this in two places.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or a defs without default somewhere and both reference it and add default where needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit much to not maintain 4 strings.

@github-actions github-actions bot added the state: CI Updated CI scenario have been updated in the PR label Nov 6, 2024
Copy link

sonarcloud bot commented Nov 7, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
role: eos_cli_config_gen issue related to eos_cli_config_gen role role: eos_designs issue related to eos_designs role state: CI Updated CI scenario have been updated in the PR state: Documentation role Updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants