[yang]: Update yang models to support 'cluster' (#9806)
Why I did it Minigraph parser added a new field 'cluster' to device_metadata, and then yang validation is blocked. How I did it Add 'cluster' to device_metadata yang models. How to verify it Run UT for sonc-yang-models. Use minigraph parser to generate ConfigDB schema and run yang validation. Signed-off-by: Gang Lv ganglv@microsoft.com
This commit is contained in:
parent
533471231a
commit
a04da0456b
@ -67,6 +67,9 @@
|
||||
"DEVICE_METADATA_RESOURCE_TYPE_CONFIG": {
|
||||
"desc": "Verifying resource type configuration."
|
||||
},
|
||||
"DEVICE_METADATA_VALID_CLUSTER": {
|
||||
"desc": "Verifying valid cluster configuration."
|
||||
},
|
||||
"DEVICE_METADATA_VALID_SUBTYPE": {
|
||||
"desc": "Verifying valid subtype value"
|
||||
},
|
||||
|
@ -178,6 +178,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"DEVICE_METADATA_VALID_CLUSTER": {
|
||||
"sonic-device_metadata:sonic-device_metadata": {
|
||||
"sonic-device_metadata:DEVICE_METADATA": {
|
||||
"sonic-device_metadata:localhost": {
|
||||
"cluster": "AAA00PrdStr00"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"DEVICE_METADATA_VALID_SUBTYPE": {
|
||||
"sonic-device_metadata:sonic-device_metadata": {
|
||||
"sonic-device_metadata:DEVICE_METADATA": {
|
||||
|
@ -135,6 +135,11 @@ module sonic-device_metadata {
|
||||
type string;
|
||||
}
|
||||
|
||||
leaf cluster {
|
||||
type string;
|
||||
description "The switch is a member of this cluster.";
|
||||
}
|
||||
|
||||
leaf subtype {
|
||||
type string {
|
||||
pattern "DualToR";
|
||||
|
Reference in New Issue
Block a user