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

[Banner] Added CLI commands to configure Banner and display current configuration #3021

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SviatoslavBoichuk
Copy link

What I did

Added CLI commands for Banner feature according to HLD: sonic-net/SONiC#1361

How I did it

Added CLI commands to:

  1. Enable/disable Banner feature
  2. Configure Banner messages: login/motd/logout
  3. Related show command

How to verify it

Manual testing

Previous command output (if the output of a command-line utility has changed)

N/A

New command output (if the output of a command-line utility has changed)

N/A

@liat-grozovik liat-grozovik changed the title Added CLI commands to configure Banner and display current configuration [Banner] Added CLI commands to configure Banner and display current configuration Dec 3, 2023
@liat-grozovik
Copy link
Collaborator

@SviatoslavBoichuk i am missing command reference guide updates. please update it based on the new proposed CLI commands

@SviatoslavBoichuk
Copy link
Author

@SviatoslavBoichuk i am missing command reference guide updates. please update it based on the new proposed CLI commands

Added Commands to Command Reference Quide.


config_db = ConfigDBConnector()
config_db.connect()
config_db.mod_entry(swsscommon.CFG_BANNER_MESSAGE_TABLE_NAME, 'global',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CFG_BANNER_MESSAGE_TABLE_NAME

Why not use FEATURE table?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FEATURE table was designed for SONiC App extensions features. The Banner feature is not the case...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see many features are not SONiC App extensions feature there.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see many features are not SONiC App extensions feature there.

Sure. But we need to keep separate. In that case, it is much easier to handle. In hostcfgd we have a logic to handle FEATURE table changes. It would be overload to add additional logic to handle the banner there.
So for that, we added a new table and new subscriber in hostcfgd to handle it separately. The code looks much clearer and it is consistent over other features: NTP, RSYSLOG, SSH, etc.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@qiluo-msft FEATURE table in general is associated with an application with a docker today. We have a dedicated application featured which listens to feature table and enables system services. We also have coppmgr using this logic to enable traps. Adding entry to feature table when there is no associated docker will lead to errors in some flows and currently it is not supported. Hence in this scenario it is advisable to use a separate table.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@qiluo-msft please see @dgsudharsan answer. I agree with him

@fastiuk
Copy link
Contributor

fastiuk commented Apr 22, 2024

The test is failing because sonic-net/sonic-swss-common#826 should be merged first

Copy link

linux-foundation-easycla bot commented Apr 27, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@liat-grozovik
Copy link
Collaborator

@qiluo-msft kindly review the comments and lets close the review loop.
@fastiuk please followup on PR checkers. lets ensure all passing

@fastiuk
Copy link
Contributor

fastiuk commented May 7, 2024

@qiluo-msft kindly review the comments and lets close the review loop.
@fastiuk please followup on PR checkers. lets ensure all passing

Checkers are not passing because sonic-swss-common PR must be merged first

@fastiuk fastiuk closed this May 8, 2024
@fastiuk fastiuk reopened this May 8, 2024
@fastiuk fastiuk force-pushed the dev-banner-feature branch 2 times, most recently from 93b6e22 to 9bdd4ca Compare May 14, 2024 20:21
@fastiuk
Copy link
Contributor

fastiuk commented May 14, 2024

@qiluo-msft conflicts were resolved. Please re-review/approve.

Signed-off-by: Yevhen Fastiuk <yfastiuk@nvidia.com>
Signed-off-by: Yevhen Fastiuk <yfastiuk@nvidia.com>
Signed-off-by: Yevhen Fastiuk <yfastiuk@nvidia.com>
@fastiuk
Copy link
Contributor

fastiuk commented May 20, 2024

@qiluo-msft rebased with the master. Please re-review/approve.

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

Successfully merging this pull request may close these issues.

None yet

5 participants