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

Feat(eos_cli_config_gen): Enhance event-handlers model to accommodate other triggers with their specificities. #3878

Merged

Conversation

Shivani-gslab
Copy link
Contributor

@Shivani-gslab Shivani-gslab commented Apr 18, 2024

Change Summary

Refactor event-handlers model to accommodate other triggers with their specificities

Related Issue(s)

Fixes #3267

Component(s) name

arista.avd.eos_cli_config_gen

Proposed changes

Adding a dict with extra settings per trigger type.

        trigger: <str; "on-boot" | "on-counters" | "on-intf" | "on-logging" | "on-maintenance" | "on-startup-config" | "vm- 
                      tracer vm">
        trigger_on_counters:

          # Set the counters condition expression.
          condition: <str>

          # Set the granularity of event counting for a wildcarded condition.
          # Example -
          #   condition ( Arad*.IptCrcErrCnt.delta > 100 ) and ( Arad*.UcFifoFullDrop.delta > 100 )
          #   [* wildcard is used here]
          granularity_per_source: <bool>

          # Set the polling interval in seconds.
          poll_interval: <int>
        trigger_on_logging:

          # Set the polling interval in seconds.
          poll_interval: <int>

          # Regular expression to use for searching log messages.
          regex: <str>
        trigger_on_intf:

          # Interface name.
          # Example - Ethernet4
          #           Loopback4-6
          #           Port-channel4,7
          interface: <str; required>

          # Action is triggered upon changes to interface IP address assignment.
          ip: <bool>

          # Action is triggered upon changes to interface ip6 address assignment.
          ip6: <bool>

          # Action is triggered upon changes to interface operStatus.
          operstatus: <bool>

How to test

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)

@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 state: Documentation role Updated role: eos_designs issue related to eos_designs role labels Apr 18, 2024
@github-actions github-actions bot added the state: conflict PR with conflict label Apr 18, 2024
Copy link

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

@github-actions github-actions bot removed the state: conflict PR with conflict label Apr 19, 2024
Copy link

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

@Shivani-gslab Shivani-gslab marked this pull request as ready for review April 22, 2024 08:56
@Shivani-gslab Shivani-gslab requested review from a team as code owners April 22, 2024 08:56
@Shivani-gslab Shivani-gslab marked this pull request as draft April 23, 2024 12:29
Copy link
Contributor

@MaheshGSLAB MaheshGSLAB left a comment

Choose a reason for hiding this comment

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

One more thing i noticed that when i do not give action for any trigger then playbook get error on documentation.

TASK [arista.avd.eos_cli_config_gen : Generate device documentation] *********************************************************************
fatal: [leaf1-dc1 -> localhost]: FAILED! => {"msg": "'dict object' has no attribute 'action'. 'dict object' has no attribute 'action'"}

@Shivani-gslab
Copy link
Contributor Author

One more thing i noticed that when i do not give action for any trigger then playbook get error on documentation.

TASK [arista.avd.eos_cli_config_gen : Generate device documentation] *********************************************************************
fatal: [leaf1-dc1 -> localhost]: FAILED! => {"msg": "'dict object' has no attribute 'action'. 'dict object' has no attribute 'action'"}

Created a separated issue to fix this.

@Shivani-gslab Shivani-gslab marked this pull request as ready for review April 24, 2024 07:14
@ClausHolbechArista ClausHolbechArista changed the title Refactor(eos_cli_config_gen): Refactor event-handlers model to accommodate other triggers with their specificities. Feat(eos_cli_config_gen): Enhance event-handlers model to accommodate other triggers with their specificities. Apr 29, 2024
@Shivani-gslab Shivani-gslab marked this pull request as draft April 29, 2024 14:17
@Shivani-gslab Shivani-gslab marked this pull request as ready for review April 30, 2024 08:08
Copy link
Contributor

@sugetha24 sugetha24 left a comment

Choose a reason for hiding this comment

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

LGTM

@ClausHolbechArista ClausHolbechArista merged commit 6314ecc into aristanetworks:devel May 1, 2024
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rn: Feat(eos_cli_config_gen) 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.

Feat(eos_cli_config_gen): Refactor event-handlers model to accommodate other triggers with their specificities
4 participants