-
Notifications
You must be signed in to change notification settings - Fork 220
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
Refactor(eos_cli_config_gen): Enhance aaa to support multiple groups where available in EOS #4666
base: devel
Are you sure you want to change the base?
Refactor(eos_cli_config_gen): Enhance aaa to support multiple groups where available in EOS #4666
Conversation
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-4666
# Activate the virtual environment
source test-avd-pr-4666/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/laxmikantchintakindi/avd.git@refactor/dot1-aaa-auth#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/laxmikantchintakindi/avd.git#/ansible_collections/arista/avd/,refactor/dot1-aaa-auth --force
# Optional: Install AVD examples
cd test-avd-pr-4666
ansible-playbook arista.avd.install_examples |
efff430
to
806dacc
Compare
python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/aaa_accounting.schema.yml
Outdated
Show resolved
Hide resolved
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
1 similar comment
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
806dacc
to
6d5fbaf
Compare
Conflicts have been resolved. A maintainer will review the pull request shortly. |
6d5fbaf
to
806dacc
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
806dacc
to
d13615c
Compare
Conflicts have been resolved. A maintainer will review the pull request shortly. |
d13615c
to
3c9d104
Compare
b080783
to
99fa899
Compare
Quality Gate passedIssues Measures |
99fa899
to
327c64a
Compare
python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/aaa-accounting.j2
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/aaa_accounting.schema.yml
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host2.cfg
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/aaa-accounting.j2
Outdated
Show resolved
Hide resolved
…where available in EOS
327c64a
to
9ad64f0
Compare
2d5a24c
to
1fe2a74
Compare
1fe2a74
to
50164ed
Compare
python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/aaa_accounting.schema.yml
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/aaa_accounting.schema.yml
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/aaa-accounting.j2
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/aaa-accounting.j2
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/aaa-accounting.j2
Outdated
Show resolved
Hide resolved
...lections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/aaa-accounting.yml
Show resolved
Hide resolved
ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg
Outdated
Show resolved
Hide resolved
…nting.j2 Co-authored-by: Mahesh Kumar <122076792+MaheshGSLAB@users.noreply.github.com>
…aa_accounting.schema.yml Co-authored-by: Mahesh Kumar <122076792+MaheshGSLAB@users.noreply.github.com>
python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/aaa-accounting.j2
Outdated
Show resolved
Hide resolved
python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/aaa-accounting.j2
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg
Outdated
Show resolved
Hide resolved
94c52cf
to
d87ac23
Compare
valid_values: ["logging", "group"] | ||
group: | ||
type: str | ||
description: Specify the server group to be used. This option is applicable only when the `method` key is explicitly set to `group`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make the change.
description: |-
Specify the server group to be used.
This option is applicable only when the `method` key is explicitly set to `group`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for multicast as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
{% if methods_list == [] %} | ||
{% do methods_list.append("-") %} | ||
{% endif %} | ||
| Dot1x - Default | - | {{ aaa_accounting.dot1x.default.type }} | {{ ", ".join(methods_list) }} | {{ logging_namespace.method_logging }} | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{% if methods_list == [] %} | |
{% do methods_list.append("-") %} | |
{% endif %} | |
| Dot1x - Default | - | {{ aaa_accounting.dot1x.default.type }} | {{ ", ".join(methods_list) }} | {{ logging_namespace.method_logging }} | | |
| Dot1x - Default | - | {{ aaa_accounting.dot1x.default.type }} | {{ ", ".join(methods_list | arista.avd.default(["-"])) }} | {{ logging_namespace.method_logging }} | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Change Summary
Enhance aaa to support multiple groups where available in EOS.
Related Issue(s)
Fixes #2521
Component(s) name
arista.avd.eos_cli_config_gen
Proposed changes
https://github.com/aristanetworks/ansible-avd/pull/2450/files#r1089721034
This EOS CLI is a bit confusing, and the documentation has a couple of typos which does not help :)
logging is a "method" similar to group abc, so it is not a property of a group.
For some reason EOS does not have a guard against repeating the same method multiple times, so that is why logging shows up after every group.
I do not know how the ordering of logging vs. group abc might affect the behavior, so until we know that, I would suggest that we skip expanding for now and just implement what we need (one group with group key similar to the rest of the models).
A future data model should probably be referring to methods which can then either be a group (with or without multicast) or logging.
How to test
Checklist
User Checklist
Repository Checklist