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

Fix(eos_cli_config_gen): Fix the errdisable documentation J2 expects recovery.interval to be always set #4979

Merged
merged 13 commits into from
Feb 7, 2025

Conversation

MaheshGSLAB
Copy link
Contributor

Change Summary

Documentation template python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/errdisable.j2 unconditionally accesses errdisable.recovery.interval without trying to confirm it's existence or to set a default value (defined in schema but not implemented in J2).
Fix to use default as - if not defined.

Related Issue(s)

Fixes #4971

Component(s) name

eos_cli_config_gen

Proposed changes

Updated the j2 logic in errdisable.j2 for documentation to fix the recovery.interval to be always set

How to test

Run molecule with new tests

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)

@MaheshGSLAB MaheshGSLAB self-assigned this Feb 5, 2025
Copy link

github-actions bot commented Feb 5, 2025

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-4979
# Activate the virtual environment
source test-avd-pr-4979/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/MaheshGSLAB/ansible-avd.git@issue-4971#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/MaheshGSLAB/ansible-avd.git#/ansible_collections/arista/avd/,issue-4971 --force
# Optional: Install AVD examples
cd test-avd-pr-4979
ansible-playbook arista.avd.install_examples

@github-actions github-actions bot added the state: CI Updated CI scenario have been updated in the PR label Feb 5, 2025
@MaheshGSLAB MaheshGSLAB requested a review from gmuloc February 5, 2025 10:54
@gmuloc gmuloc added the one approval This PR has one approval and is only missing one more. label Feb 5, 2025
@gmuloc gmuloc self-requested a review February 7, 2025 08:54
Copy link

sonarqubecloud bot commented Feb 7, 2025

Copy link
Contributor

@gmuloc gmuloc left a comment

Choose a reason for hiding this comment

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

LGTM

@gmuloc gmuloc added this to the v5.2.0 milestone Feb 7, 2025
@gmuloc gmuloc dismissed Vibhu-gslab’s stale review February 7, 2025 13:09

changes addressed

@gmuloc gmuloc merged commit 8539c58 into aristanetworks:devel Feb 7, 2025
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
one approval This PR has one approval and is only missing one more. rn: Fix(eos_cli_config_gen) state: CI Updated CI scenario have been updated in the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

eos_cli_config_gen: errdisable documentation J2 expects recovery.interval to be always set
5 participants