Add AAA Klish CLI commands, actioner, template, and HLD#2
Open
devin-ai-integration[bot] wants to merge 2 commits intomasterfrom
Open
Add AAA Klish CLI commands, actioner, template, and HLD#2devin-ai-integration[bot] wants to merge 2 commits intomasterfrom
devin-ai-integration[bot] wants to merge 2 commits intomasterfrom
Conversation
- Add aaa.xml with Klish command definitions for AAA authentication, authorization, and accounting (config + show + no commands) - Add sonic_cli_aaa.py actioner with REST API integration for all AAA operations (PATCH/DELETE/GET via OpenConfig paths) - Add show_aaa.j2 Jinja2 template for rendering AAA configuration - Add AAA_Klish_CLI_HLD.md high-level design document - Add unit tests for actioner with 97% coverage Co-Authored-By: Arthur Poon <arthur.poon@windsurf.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Arthur Poon <arthur.poon@windsurf.com>
This was referenced Feb 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Klish-based AAA CLI commands, actioner, and show template
Summary
Implements the sonic-mgmt-framework half of migrating AAA CLI from Click (sonic-utilities) to Klish. Adds the three-layer Klish components:
CLI/clitree/cli-xml/aaa.xml— Klish XML command definitions foraaa authentication {failthrough|fallback|debug|login},aaa authorization login,aaa accounting login, correspondingnocommands, andshow aaaCLI/actioner/sonic_cli_aaa.py— Python actioner that translates CLI inputs into OpenConfig REST PATCH/DELETE/GET calls viaApiClientCLI/renderer/templates/show_aaa.j2— Jinja2 template renderingshow aaaoutputAAA_Klish_CLI_HLD.md— High-level design documentCLI/actioner/tests/test_sonic_cli_aaa.py— Unit tests (31 tests, 97% coverage)Companion PR required: sonic-mgmt-common must also receive the YANG annotation (
openconfig-aaa-annot.yang), Go transformer (xfmr_aaa.go), and augmentation YANG (openconfig-aaa-sonic-ext.yang) for the end-to-end flow to work. See sonic-mgmt-common PR #3.Updates since last revision
import jsonfromsonic_cli_aaa.py(lint fix).openconfig-aaa-sonic-ext.yang, which augments the OpenConfig AAA model with SONiC-specificfailthrough,fallback, anddebugleaves. The REST paths used by this actioner (e.g./openconfig-aaa:aaa/authentication/config/failthrough) depend on that augmentation being present.Review & Testing Checklist for Human
Risk level: 🟡 YELLOW — Changes span two repos and cannot be fully validated until both PRs merge and submodule SHA is updated in sonic-buildimage.
Verify Klish optional parameter expansion behavior — In
aaa.xmlline 79, theaaa authentication logincommand passes up to 5 optional method parameters. Confirm on a real DUT that unset optional params are either omitted or passed as empty strings (the actioner filters empties with[m for m in args if m and m.strip()]). If Klish passes literal${auth-method2}strings, the filtering won't work.Validate boolean type conversion — The actioner sends Python
True/Falseforfailthrough/fallback/debug, and the augmentation YANG defines these astype boolean. SONiC's native model usesstypes:boolean_type(string"True"/"False"). Verify the transformer framework handles this conversion correctly without a custom field transformer (these fields only havesonic-ext:field-name, nosonic-ext:field-transformer).End-to-end DUT testing — After both PRs merge and sonic-buildimage submodule SHA is updated:
aaa authentication login tacacs+ localand verify ConfigDB hasAAA|authentication|login = "tacacs+,local"aaa authentication failthrough enableand verifyAAA|authentication|failthrough = "True"show aaaand verify output matches expected formatno aaa authentication loginto reset to defaultNotes
show_aaa.j2template shows defaults forfailthroughandfallbackbut notdebug— this is intentional per the existing Click command behavior.docs/directory if that's the convention.Link to Devin run: https://cisco-demo.devinenterprise.com/sessions/dac62833768e40b09aeafb00c78f66be
Requested by: @arthurkkp-cog