-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add yang_config_validation to DEVICE_METADATA yang model #12497
Conversation
@ganglyu could you check? |
src/sonic-config-engine/minigraph.py
Outdated
@@ -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' |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use mode-status instead?
https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-yang-models/yang-templates/sonic-types.yang.j2#L178
There was a problem hiding this comment.
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
Please update Configuration.md and sample_config_db.json. |
Why I did it
New field
yang_config_validation
needs to be represented in DEVICE_METADATA yang model, configured in minigraph.pyHow 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
fieldDescription 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.