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 templates for event-handlers #4055

Merged

Conversation

Shivani-gslab
Copy link
Contributor

@Shivani-gslab Shivani-gslab commented May 30, 2024

Change Summary

Current documentation template for event-handlers throws error if poll_interval is not defined for trigger_on_counters and trigger_on_logging

TASK [arista.avd.eos_cli_config_gen : Generate device documentation] ***************************************************
fatal: [tp-avd-leaf1 -> localhost]: FAILED! => {"msg": "'trigger_config' is undefined. 'trigger_config' is undefined"}
fatal: [tp-avd-spine1 -> localhost]: FAILED! => {"msg": "'trigger_config' is undefined. 'trigger_config' is undefined"}

Few updates in config template and its test-cases.

Related Issue(s)

Fixes #

Component(s) name

arista.avd.eos_cli_config_gen

Proposed changes

Changing the logic to add multiple entries in the table for event-handler triggers

How to test

Do not provide poll_interval for trigger_on_counters and trigger_on_logging input and give other options.
Run the playbook for eos_cli_config_gen, you should not see any error and the documentation output should be proper.

Checklist

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

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-4055
# Activate the virtual environment
source test-avd-pr-4055/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/Shivani-gslab/avd.git@event-handlers-trigger#subdirectory=python-avd" --force
# Install Ansible collection
ansible-galaxy collection install git+https://github.com/Shivani-gslab/avd.git#/ansible_collections/arista/avd/,event-handlers-trigger --force
# Optional: Install AVD examples
cd test-avd-pr-4055
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: CI Updated CI scenario have been updated in the PR labels May 30, 2024
@Shivani-gslab Shivani-gslab changed the title Fix(eos_cli_config_gen): Fix the documentation template for event-handlers Fix(eos_cli_config_gen): Fix the templates for event-handlers May 31, 2024
@Shivani-gslab Shivani-gslab force-pushed the event-handlers-trigger branch 8 times, most recently from 4445b0e to 7f0bcf0 Compare June 3, 2024 11:48
Copy link
Contributor

@Vibhu-gslab Vibhu-gslab left a comment

Choose a reason for hiding this comment

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

Minor comment otherwise LGTM!

@Shivani-gslab Shivani-gslab marked this pull request as ready for review June 6, 2024 07:06
@Shivani-gslab Shivani-gslab requested review from a team as code owners June 6, 2024 07:06
Copy link
Contributor

@noredistribution noredistribution left a comment

Choose a reason for hiding this comment

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

lgtm and works in my env +1

@Shivani-gslab Shivani-gslab marked this pull request as draft June 10, 2024 06:38
@Shivani-gslab Shivani-gslab marked this pull request as ready for review June 10, 2024 07:11
Copy link

sonarcloud bot commented Jun 11, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@ClausHolbechArista ClausHolbechArista merged commit cc0dce3 into aristanetworks:devel Jun 11, 2024
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rn: Fix(eos_cli_config_gen) role: eos_cli_config_gen issue related to eos_cli_config_gen role state: CI Updated CI scenario have been updated in the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants