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 to DEVICE_METADATA yang model #12497

Merged
merged 5 commits into from
Oct 26, 2022

Conversation

isabelmsft
Copy link
Contributor

Why I did it

New field yang_config_validation needs to be represented in DEVICE_METADATA yang model, configured in minigraph.py

How I did it

Add field to yang model, set value in minigraph.py

How to verify it

Use GCU to apply patch configuring yang_config_validation field

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

@qiluo-msft qiluo-msft added the YANG YANG model related changes label Oct 25, 2022
@qiluo-msft
Copy link
Collaborator

@ganglyu could you check?

@@ -1450,7 +1450,8 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw
'hostname': hostname,
'hwsku': hwsku,
'type': device_type,
'synchronous_mode': 'enable'
'synchronous_mode': 'enable',
'yang_config_validation': 'disable'
Copy link
Contributor

Choose a reason for hiding this comment

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

Please create another PR for sonic-config-engine, and update unit test for sonic-config-engine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created separate PR

@@ -119,6 +119,14 @@ module sonic-device_metadata {
default enable;
}

leaf yang_config_validation {
type enumeration {
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to use stypes:mode-status

@ganglyu
Copy link
Contributor

ganglyu commented Oct 26, 2022

Please update Configuration.md and sample_config_db.json.

@isabelmsft isabelmsft changed the title Add yang_config_validation to DEVICE_METADATA yang model, minigraph Add yang_config_validation to DEVICE_METADATA yang model Oct 26, 2022
@isabelmsft isabelmsft merged commit 3d9a6e4 into sonic-net:master Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
YANG YANG model related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants