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

Refactor(eos_designs): Move default variables to python instead of role defaults. #2760

Conversation

ClausHolbechArista
Copy link
Contributor

@ClausHolbechArista ClausHolbechArista commented Apr 25, 2023

Change Summary

Move default variables to python instead of role defaults

Related Issue(s)

When reusing AVD code outside of Ansible (pyavd) the default values are lost.

Component(s) name

arista.avd.eos_designs

Proposed changes

  • Remove variable defaults from role defaults
  • Add default values in python code when reading from hostvars
  • Update yaml_templates_to_facts to load default node_type_keys etc. since those are required for validating input vars according to schema using dynamic_keys.
  • Added some hardcoded variants of the default values into fabric documentation templates. This will be solved once we refactor the fabric documentation to python.

Note: Still missing default_templates which involves other considerations and will be handled separately.

How to test

No change 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)

@ClausHolbechArista ClausHolbechArista force-pushed the refactor/eos_designs/Move-default-variables-to-python branch from 4c6a959 to 892975f Compare April 25, 2023 18:11
@github-actions github-actions bot added the state: conflict PR with conflict label Apr 28, 2023
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@ClausHolbechArista ClausHolbechArista force-pushed the refactor/eos_designs/Move-default-variables-to-python branch from e984993 to d951589 Compare May 8, 2023 10:58
@github-actions github-actions bot removed the state: conflict PR with conflict label May 8, 2023
@github-actions
Copy link

github-actions bot commented May 8, 2023

Conflicts have been resolved. A maintainer will review the pull request shortly.

@github-actions github-actions bot added the state: conflict PR with conflict label May 12, 2023
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@ClausHolbechArista ClausHolbechArista force-pushed the refactor/eos_designs/Move-default-variables-to-python branch from f4876be to 525c35e Compare May 17, 2023 05:46
@github-actions github-actions bot removed the state: conflict PR with conflict label May 17, 2023
@github-actions
Copy link

Conflicts have been resolved. A maintainer will review the pull request shortly.

@github-actions github-actions bot added the state: conflict PR with conflict label May 17, 2023
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@ClausHolbechArista ClausHolbechArista force-pushed the refactor/eos_designs/Move-default-variables-to-python branch from 525c35e to 326fbaa Compare May 17, 2023 18:27
@github-actions github-actions bot removed the state: conflict PR with conflict label May 17, 2023
@github-actions
Copy link

Conflicts have been resolved. A maintainer will review the pull request shortly.

@github-actions github-actions bot added the state: CI Updated CI scenario have been updated in the PR label May 17, 2023
@ClausHolbechArista ClausHolbechArista marked this pull request as ready for review May 18, 2023 00:02
@ClausHolbechArista ClausHolbechArista requested a review from a team as a code owner May 18, 2023 00:02
@ClausHolbechArista ClausHolbechArista added this to the v4.0.0-rc1 milestone May 18, 2023
Copy link
Member

@carlbuchmann carlbuchmann left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@carlbuchmann carlbuchmann left a comment

Choose a reason for hiding this comment

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

LGTM

@carlbuchmann carlbuchmann merged commit 5e39c52 into aristanetworks:devel May 18, 2023
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rn: Refactor(eos_designs) 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.

None yet

2 participants