[YANG] Add new attributes in CONSOLE_PORT to support Console Logging feature - #28411
nats-nokia wants to merge 3 commits into
Conversation
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
@nats-nokia please check if there is room to improve the unit test coverage? |
c7fb3c0 to
527efab
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Hi @yxieca Total Test cases summary.
Valid Test Cases:
Invalid Test Cases:
|
527efab to
e06a764
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
@ediwibowo-msft, @judyjoseph Can you please help review? |
|
@yxieca , @judyjoseph Please review the latest code change. |
|
Retriggered PR test |
|
lgtm. I would suggest another PR should be created to update |
e06a764 to
317e202
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Signed-off-by: Natarajan Subbiramani <natarajan.subbiramani@nokia.com>
Signed-off-by: Natarajan Subbiramani <natarajan.subbiramani@nokia.com>
Signed-off-by: Natarajan Subbiramani <natarajan.subbiramani@nokia.com>
317e202 to
3f8c3c1
Compare
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 2 pipeline(s) were filtered out due to trigger conditions. |
Why I did it
[YANG] Support logging_enabled, log_file, logrotate_count and logrotate_size attributes in CONSOLE_PORT table to enable/diable console logging feature on SONiC BMC/console switch.
YANG schema added:
Sample config:
platform/aspeed/aspeed-platform-services/scripts/sonic-switchcpu-console-init.sh is modified to skip deleting CONSOLE_PORT|0 and keeps the previously saved CONSOLE_PORT|0 configuration.
Related PR from other submodules:
sonic-net/sonic-host-services#409
sonic-net/sonic-utilities#4685
Work item tracking
How I did it
Update Yang model for sonic-console and add corresponding unit tests:
- Added logging_enabled attribute in CONSOLE_PORT
- Added test cases for default value verification
- Added test cases for valid configuration
- Added test cases for valid configuration with optional parameters as default
- Added test cases for invalid pattern detection
How to verify it
Verified by manual testing on testbed and unit test.
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)