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

Add yang_config_validation in device_info #11715

Merged
merged 3 commits into from
Aug 17, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/sonic-py-common/sonic_py_common/device_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,10 @@ def get_chassis_info():

return chassis_info_dict


def is_yang_config_validation_enabled(config_db=None):
Copy link
Collaborator

@qiluo-msft qiluo-msft Aug 12, 2022

Choose a reason for hiding this comment

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

=None

For new code, let's remove =None. #Closed

return get_localhost_info('yang_config_validation', config_db) == 'enable'

#
# Multi-NPU functionality
#
Expand Down