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

The type key should be required under aaa_server_groups and need to add defined check for servers key #4650

Open
2 tasks
Shivani-gslab opened this issue Oct 25, 2024 · 1 comment

Comments

@Shivani-gslab
Copy link
Contributor

Shivani-gslab commented Oct 25, 2024

Issue Summary

  • The type key under aaa_server_groups should be required as per EOS CLI.
  • The servers key is not a required key but it has not been checked "if defined or not in the template", so it throws error if not defined. The template needs to be fixed.
aaa_server_groups:
    - name: TACACS
       type: tacacs+            ----------> [ this should be a required key ]
       servers:                     ----------> [ defined check should be added for this ] 
           - server: 10.10.11.157 
              vrf: mgt

Originally posted in PR #4626

         The `type` key should be `required` in schema.

Also, the same issue as tacacs server - servers key is not required but its not checked for defined in template so it throws error if not defined. (need to update j2 template)

Originally posted by @Shivani-gslab in #4626 (comment)

Steps to reproduce:

Give the following input to eos_cli_config_gen role -

aaa_server_groups:
    - name: TACACS
      type: tacacs+
    - name: TACACS2
@Shivani-gslab Shivani-gslab changed the title The type key should be required in schema. The type key should be required under aaa_server_groups and need to add defined check for servers key Oct 25, 2024
@ClausHolbechArista
Copy link
Contributor

ClausHolbechArista commented Oct 25, 2024

In eos_cli_config_gen we try to just ignore incomplete entries. So just add if-defined checks in the templates. nevermind. when absolutely required for CLI I am ok with using the required in schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants