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): Support of a global tacacs timeout #3173

Merged
merged 3 commits into from
Sep 29, 2023

Conversation

mmaaloul
Copy link
Contributor

Change Summary

Support of tacacs glocal timer setting

Related Issue(s)

Fixes #3126

Component(s) name

arista.avd.eos_cli_config_gen

Proposed changes

1/ Changed schema fragment "tacacs_servers.schema.yml"
2/ Ran the pre-commit playbook
3/ Changed template eos/tacacs-servers.j2 accordingly

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)

@mmaaloul mmaaloul requested review from a team as code owners September 26, 2023 15:29
@github-actions github-actions bot added role: eos_cli_config_gen issue related to eos_cli_config_gen role state: Documentation role Updated labels Sep 26, 2023
@gmuloc gmuloc changed the title fix of issue 3126 Feat(eos_cli_config_gen): Support of a global tacacs timeout Sep 26, 2023
@gmuloc
Copy link
Contributor

gmuloc commented Sep 26, 2023

Thanks for this PR - please add some molecule test to cover the newly added knobs.

Some how-to guide for a change to eos_cli_config_gen

eos_cli_config_gen

This part of the change is aimed at adding some new knobs. The following tasks are required:

  • Adding the knob to the appropriate schema fragments file in the roles/eos_cli_config_gen/schema/schema_fragments directory (or create a new file if adding a top-level feature)
  • Editing the Jinja2 templates in roles/eos_cli_config_gen/templates/eos and roles/eos_cli_config_gen/templates/documentation (or adding new template if adding a top-level feature, in that case, you should also modify the roles/eos_cli_config_gen/templates/eos-device-documentation.j2 and ``roles/eos_cli_config_gen/templates/eos-intended-config.j2 to add these new templates, trying to respect the order in the EOS CLI)
    • NOTE: This one is partially done in your PR as you have modified only the tacacs-servers.j2 template for config but you have not added anything to the documentation templates (it may or may not be necessary)
  • Run pre-commit run shemas --all to re-generate the eos_cli_config_gen schema with your modifications (you need to do this every time you change the schema, even if this is just a description changed). This is also used to add the new options to our documentation.
  • Add some molecule test in the molecule/eos_cli_config_gen scenario exercising your new knob configuration
    • NOTE: In your case you would need to add to both molecule/eos_cli_config_gen/inventory/host_vars/aaa.yml.
  • Run the molecule test locally to generate the new expected configuration and documentation for these two hosts (we recommend running the full scenario using from ansible_collections/arista/avd/molecule folder the command make converge MOLECULE=eos_cli_config_gen
  • Run all pre-commit checks pre-commit run --all to make sure that all files you have added are correct and won't be rejected by CI (this command will take ~1min)
  • Review that everything added looks correct and push to Github!

Don't hesitate to reach out for any question!

Comment on lines +12 to +15
timeout:
type: int
convert_types:
- str
Copy link
Contributor

Choose a reason for hiding this comment

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

If the min and max values are constant across platforms, please add them in the schema as well as a description indicating that this is in "seconds"

leaf1(config)#tacacs-server timeout ?
  <1-1000>  Number of seconds

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I'll put a max/min for global timeout, I shall make the same for the timeout per host. Can I make it as part of the same PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

it can be inserted in this PR yes, but first please check if this is the same on all platforms, otherwise it is probably best to not enforce these.

@github-actions github-actions bot added the state: CI Updated CI scenario have been updated in the PR label Sep 28, 2023
@gmuloc gmuloc requested a review from a team September 28, 2023 09:28
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 - Thanks @mmaaloul !

@gmuloc gmuloc requested a review from a team September 28, 2023 19:19
@gmuloc gmuloc added this to the v4.4.0 milestone Sep 28, 2023
@ClausHolbechArista ClausHolbechArista merged commit 90477d7 into aristanetworks:devel Sep 29, 2023
37 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 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.

Support of a global tacacs timeout
3 participants