-
Notifications
You must be signed in to change notification settings - Fork 78
Update AAA module with Accounting changes #559
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
base: main
Are you sure you want to change the base?
Conversation
@@ -39,6 +39,9 @@ | |||
|
|||
AAA_AUTHENTICATION_PATH = '/data/openconfig-system:system/aaa/authentication/config' | |||
AAA_AUTHORIZATION_PATH = '/data/openconfig-system:system/aaa/authorization' | |||
AAA_COMMANDS_ACCOUNTING_PATH = '/data/openconfig-system:system/aaa/accounting/openconfig-system-ext:commands/config' | |||
AAA_SESSION_ACCOUNTING_PATH = '/data/openconfig-system:system/aaa/accounting/openconfig-system-ext:session/config' | |||
AA_AUTHORIZATION_PATH = '/data/openconfig-system:system/aaa/authorization' |
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.
AA_AUTHORIZATION_PATH = '/data/openconfig-system:system/aaa/authorization' |
duplicate
@@ -0,0 +1,3 @@ | |||
--- | |||
minor_changes: | |||
- sonic_aaa - Add Accounting support for AAA module (https://github.com/ansible-collections/dellemc.enterprise_sonic/pull/559). |
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.
- sonic_aaa - Add Accounting support for AAA module (https://github.com/ansible-collections/dellemc.enterprise_sonic/pull/559). | |
- sonic_aaa - Add support for accounting options (https://github.com/ansible-collections/dellemc.enterprise_sonic/pull/559). |
description: | ||
- AAA accounting configuration. | ||
type: dict | ||
version_added: 3.1.0 |
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.
version_added: 3.1.0 | |
version_added: 3.2.0 |
requests.append(self.get_delete_request(AAA_COMMANDS_ACCOUNTING_PATH, None)) | ||
requests.append(self.get_delete_request(AAA_SESSION_ACCOUNTING_PATH, None)) |
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 delete only if accounting config is present.
requests.append(self.get_delete_request(AAA_COMMANDS_ACCOUNTING_PATH, None)) | |
requests.append(self.get_delete_request(AAA_SESSION_ACCOUNTING_PATH, None)) | |
if commands.get('accounting'): | |
requests.append(self.get_delete_request(AAA_COMMANDS_ACCOUNTING_PATH, None)) | |
requests.append(self.get_delete_request(AAA_SESSION_ACCOUNTING_PATH, None)) |
if not accounting: | ||
data.pop('accounting') |
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 not accounting: | |
data.pop('accounting') | |
if not accounting: | |
data.pop('accounting') |
@@ -560,3 +656,13 @@ def remove_default_entries(self, data): | |||
authentication.pop('login_mfa_console') | |||
if not authentication: | |||
data.pop('authentication') | |||
accounting = data.get('accounting') | |||
if accounting: | |||
< 10000 span class="blob-code-inner blob-code-marker-addition"> for acct_key in ['commands_accounting', 'session_accounting']: |
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 acct_key in ['commands_accounting', 'session_accounting']: | |
for acct_key in ('commands_accounting', 'session_accounting'): |
suboptions: | ||
accounting_method: | ||
description: | ||
- Specifies the order of methods in which to perform accounting. |
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.
- Specifies the order of methods in which to perform accounting. | |
- Specifies the methods in which to perform accounting. |
- STOP_ONLY | ||
accounting_console_exempt: | ||
description: | ||
- Exempts accounting of events from console. |
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.
- Exempts accounting of events from console. | |
- Exempt accounting of events from console. |
- STOP_ONLY | ||
accounting_console_exempt: | ||
description: | ||
- Exempts accounting of events from console. |
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.
- Exempts accounting of events from console. | |
- Exempt accounting of events from console. |
- START_STOP | ||
- STOP_ONLY |
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 change the choices to 'start-stop' and 'stop-only'
accounting = base_cfg.get('accounting') | ||
if accounting: | ||
accounting_dict = {} | ||
for acct_type in ['commands_accounting', 'session_accounting']: |
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 acct_type in ['commands_accounting', 'session_accounting']: | |
for acct_type in ('commands_accounting', 'session_accounting'): |
SUMMARY
Added Accounting support to the AAA module.
ISSUE TYPE
COMPONENT NAME
sonic_aaa
OUTPUT
regression-2025-05-14-08-15-00.pdf
Checklist:**