Add sonic-otn-cli-filter package to hide unwanted switch CLI commands - #24
Open
jjin62 wants to merge 15 commits into
Open
Add sonic-otn-cli-filter package to hide unwanted switch CLI commands#24jjin62 wants to merge 15 commits into
jjin62 wants to merge 15 commits into
Conversation
Signed-off-by: oplklum <lu.mao@molex.com>
Signed-off-by: oplklum <lu.mao@molex.com>
Signed-off-by: oplklum <lu.mao@molex.com>
Signed-off-by: oplklum <lu.mao@molex.com>
This commit introduces the sonic-yanggen package for the otn-kvm platform. This package automates the conversion of OpenConfig annotation YANG files into SONiC YANG models and generates the corresponding CLI commands at runtime. Key features: - Automatically converts annotation YANGs to SONiC YANGs during build. - Supports configuration via 'yang_auto_cli' file in device directory. - Provides 'yang_auto_cli.sh' service to register CLI commands on startup. - Includes logic to avoid conflicts with existing system CLI commands.
…e release tag from sonic-otn-libs
add build action for sonic-otn otn-kvm platform
Consolidate OTN submodule pin updates, including repinning sonic-swss to f68c781f for the current build-compatible branch state. Made-with: Cursor
OCS/OTN platforms do not need switch-oriented CLI commands such as
VLAN, VXLAN, NAT, BGP, etc. This new package leverages the existing
sonic-utilities plugin mechanism to filter them out at runtime.
Key components:
- sonic_otn_cli_filter.py: core filtering logic that monkey-patches
click.Group.list_commands/get_command based on a per-device blacklist
- zzz_{show,config,clear}_platform_filter.py: plugins with zzz_ prefix
to guarantee they load last, after all other plugins register commands
- cli_unwanted.json: per-device blacklist for the otn-kvm platform
- debian packaging with postinst/prerm to symlink plugins into the
sonic-utilities plugin directories at install time
- Build integration via rules.mk, rules.dep and one-image.mk
jjin62
force-pushed
the
otn-dev
branch
2 times, most recently
from
August 5, 2026 21:01
55f1ad7 to
63b8693
Compare
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.
OCS/OTN platforms do not need switch-oriented CLI commands such as VLAN, VXLAN, NAT, BGP, etc. This new package leverages the existing sonic-utilities plugin mechanism to filter them out at runtime.
Key components:
Reference: #22